diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..bcf8189d323b2a1b85358aa65526eb945068c95b --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +The MIT License (MIT) +Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/main/cdngen.f90 b/main/cdngen.f90 index 24803bdf8708eb66734e5e749d9a12d323c4b19b..b36fd73721b07a27d85cd32780be64547677c89b 100644 --- a/main/cdngen.f90 +++ b/main/cdngen.f90 @@ -1,3 +1,8 @@ +!-------------------------------------------------------------------------------- +! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany +! This file is part of FLEUR and available as free software under the conditions +! of the MIT license as expressed in the LICENSE file in more detail. +!-------------------------------------------------------------------------------- MODULE m_cdngen use m_juDFT CONTAINS @@ -6,16 +11,9 @@ enpara, cell, noco,jij, results, oneD) ! ! ***************************************************** -! flapw7 charge density generator -! c.l.fu -! correction for nwd>1: semic must be set false for nw=nwd -! furthermore ch.d. arrays initialized to zero INSIDE nw -! loop; only last window stored; shift do 10 -! aug 90; r.p. -! modifications for slicing by r.p. and h.e. (1/91) -! error in reading 66 for spin-polarized case: -! read(66) nkpt was read for jspin>1 also -! Corrected mai 93 r.p. +! Charge density generator +! calls cdnval to generate the valence charge and the +! core routines for the core contribution ! ***************************************************** ! USE m_constants, ONLY : pi_const,sfp_const diff --git a/main/fleur.F90 b/main/fleur.F90 index 75fc95dc311078f796b4154dc7231af513ffb6ae..a6c123cae7c29bd80f743487c821e4dedf731e24 100644 --- a/main/fleur.F90 +++ b/main/fleur.F90 @@ -1,3 +1,8 @@ +!-------------------------------------------------------------------------------- +! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany +! This file is part of FLEUR and available as free software under the conditions +! of the MIT license as expressed in the LICENSE file in more detail. +!-------------------------------------------------------------------------------- MODULE m_fleur IMPLICIT NONE CONTAINS diff --git a/main/fleur_init.F90 b/main/fleur_init.F90 index 2b78c4c3c4405823370bcb36bed149ef7c1f8eca..f3f6e8c475331ed38111a786da59effbdcdf9784 100644 --- a/main/fleur_init.F90 +++ b/main/fleur_init.F90 @@ -1,3 +1,8 @@ +!-------------------------------------------------------------------------------- +! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany +! This file is part of FLEUR and available as free software under the conditions +! of the MIT license as expressed in the LICENSE file in more detail. +!-------------------------------------------------------------------------------- MODULE m_fleur_init IMPLICIT NONE CONTAINS diff --git a/main/fleur_job.F90 b/main/fleur_job.F90 index a2ca6ff8f82e18ea1bb27ce9894a85a2e0e49618..cc496e98186d6330548fbc4aef480f6221ef89c8 100644 --- a/main/fleur_job.F90 +++ b/main/fleur_job.F90 @@ -1,3 +1,8 @@ +!-------------------------------------------------------------------------------- +! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany +! This file is part of FLEUR and available as free software under the conditions +! of the MIT license as expressed in the LICENSE file in more detail. +!-------------------------------------------------------------------------------- MODULE m_fleur_jobs USE m_juDFT IMPLICIT NONE diff --git a/main/mix.F90 b/main/mix.F90 index 3501cfaf308b41906c9e31da03aae56331305284..fb8934a46e8d845465c233734c69b2c95bbce888 100644 --- a/main/mix.F90 +++ b/main/mix.F90 @@ -1,12 +1,16 @@ +!-------------------------------------------------------------------------------- +! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany +! This file is part of FLEUR and available as free software under the conditions +! of the MIT license as expressed in the LICENSE file in more detail. +!-------------------------------------------------------------------------------- MODULE m_mix USE m_juDFT !************************************************************************* - !**** mixing of charge densities: **** - !**** IMIX= 0 : linear mixing **** - !**** IMIX = 3 : BROYDEN'S FIRST METHOD **** - !**** IMIX = 5 : BROYDEN'S SECOND METHOD **** - !**** IMIX = 7 : GENERALIZED ANDERSEN METHOD **** - !**** implementation to flapw7 ..... R.Pentcheva, D.Vogtenhuber **** + ! mixing of charge densities or potentials: + ! IMIX= 0 : linear mixing + ! IMIX = 3 : BROYDEN'S FIRST METHOD + ! IMIX = 5 : BROYDEN'S SECOND METHOD + ! IMIX = 7 : GENERALIZED ANDERSEN METHOD !************************************************************************ CONTAINS SUBROUTINE mix(stars,atoms,sphhar,vacuum,input,sym, cell, it, noco, oneD,hybrid) diff --git a/main/optional.f90 b/main/optional.f90 index ffece0f0a0c3255a8373ac72ac509f09d90b7952..7aba58bb276ef43f75fc780bcc5284b762e0773c 100644 --- a/main/optional.f90 +++ b/main/optional.f90 @@ -1,208 +1,206 @@ - MODULE m_optional - use m_juDFT - CONTAINS - SUBROUTINE optional(& - & mpi,& - & atoms,sphhar,vacuum,dimension,& - & stars,input,sym,& - & cell,& - & sliceplot,obsolete,& - & xcpot,& - & noco,& - & oneD) -! -!---------------------------------------- -! this routine is called by: fleur.F -! -! optional --+-- plot -+- loddop -! | +- outcdn -+- cotra0 -! | +- cotra1 -! | +- starf2 -- spgrot -! | +- starf3 -! | +- ylm3 -! +-- stden -+- atom2 -+- setcor -! | | +- stpot1 -! | | +- differ -+- inwint -! | | | +- outint -! | | +- vxcall (-> see vgen.F) or: -! | | +- potl0 -+- grdchlh -! | | | +- mkgl0 -! | | | +- vxcallg (-> see vgen.F) -! | | +- intgr1 -! | +- cdnovlp -+- spgrot -! | | +- rcerf --wofz -! | | +- diflgr -! | | +- qpw_to_nmt -+- phasy1 -+- spgrot -! | | | +- ylm3 -! | | +- sphbes -! | +- qfix -- cdntot -+- intgr3 -! | | +- qsf -! | | +- pwint -- spgrot -! | +- wrtdop -! | +- points -- qranf -! | +- sphpts -- qranf -! | +- checkdop -+- starf3 -! | +- cotra0 -! | +- starf2 -- spgrot -! | +- fitchk -! | +- cotra1 -! | +- ylm3 -! +-- cdnsp -+- loddop -! | +- wrtdop -! | +- intgr3 -! +-- flipcdn -+- loddop -! | +- wrtdop -! +-- f2u -- wrtdop -! +-- u2f -- loddop -! +-- bmt -+- loddop -! +- wrtdop -!---------------------------------------- - USE m_bmt - USE m_plotdop - USE m_stden - USE m_cdnsp - USE m_flipcdn - USE m_f2u - USE m_u2f - USE m_types - IMPLICIT NONE -! .. -! .. Scalar Arguments .. +!-------------------------------------------------------------------------------- +! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany +! This file is part of FLEUR and available as free software under the conditions +! of the MIT license as expressed in the LICENSE file in more detail. +!-------------------------------------------------------------------------------- +MODULE m_optional + USE m_juDFT +CONTAINS + SUBROUTINE OPTIONAL(mpi, atoms,sphhar,vacuum,DIMENSION,& + stars,input,sym, cell, sliceplot,obsolete, xcpot, noco, oneD) + ! + !---------------------------------------- + ! this routine is called by: fleur.F90 + ! + ! optional --+-- plot -+- loddop + ! | +- outcdn -+- cotra0 + ! | +- cotra1 + ! | +- starf2 -- spgrot + ! | +- starf3 + ! | +- ylm3 + ! +-- stden -+- atom2 -+- setcor + ! | | +- stpot1 + ! | | +- differ -+- inwint + ! | | | +- outint + ! | | +- vxcall (-> see vgen.F) or: + ! | | +- potl0 -+- grdchlh + ! | | | +- mkgl0 + ! | | | +- vxcallg (-> see vgen.F) + ! | | +- intgr1 + ! | +- cdnovlp -+- spgrot + ! | | +- rcerf --wofz + ! | | +- diflgr + ! | | +- qpw_to_nmt -+- phasy1 -+- spgrot + ! | | | +- ylm3 + ! | | +- sphbes + ! | +- qfix -- cdntot -+- intgr3 + ! | | +- qsf + ! | | +- pwint -- spgrot + ! | +- wrtdop + ! | +- points -- qranf + ! | +- sphpts -- qranf + ! | +- checkdop -+- starf3 + ! | +- cotra0 + ! | +- starf2 -- spgrot + ! | +- fitchk + ! | +- cotra1 + ! | +- ylm3 + ! +-- cdnsp -+- loddop + ! | +- wrtdop + ! | +- intgr3 + ! +-- flipcdn -+- loddop + ! | +- wrtdop + ! +-- f2u -- wrtdop + ! +-- u2f -- loddop + ! +-- bmt -+- loddop + ! +- wrtdop + !---------------------------------------- + USE m_bmt + USE m_plotdop + USE m_stden + USE m_cdnsp + USE m_flipcdn + USE m_f2u + USE m_u2f + USE m_types + IMPLICIT NONE + ! .. + ! .. Scalar Arguments .. - TYPE(t_mpi),INTENT(IN) :: mpi - TYPE(t_atoms),INTENT(IN) :: atoms - TYPE(t_dimension),INTENT(IN):: DIMENSION - TYPE(t_sphhar),INTENT(IN) :: sphhar - TYPE(t_obsolete),INTENT(IN) :: obsolete - TYPE(t_sym),INTENT(IN) :: sym - TYPE(t_stars),INTENT(IN) :: stars - TYPE(t_oneD),INTENT(IN) :: oneD - TYPE(t_input),INTENT(INOUT) :: input - TYPE(t_noco),INTENT(IN) :: noco - TYPE(t_vacuum),INTENT(IN) :: vacuum - TYPE(t_cell),INTENT(IN) :: cell - TYPE(t_xcpot),INTENT(IN) :: xcpot - TYPE(t_sliceplot),INTENT(IN):: sliceplot -! .. -! .. Local Scalars .. - INTEGER :: it - CHARACTER*10 :: cdnfname -! .. - it = 1 + TYPE(t_mpi),INTENT(IN) :: mpi + TYPE(t_atoms),INTENT(IN) :: atoms + TYPE(t_dimension),INTENT(IN):: DIMENSION + TYPE(t_sphhar),INTENT(IN) :: sphhar + TYPE(t_obsolete),INTENT(IN) :: obsolete + TYPE(t_sym),INTENT(IN) :: sym + TYPE(t_stars),INTENT(IN) :: stars + TYPE(t_oneD),INTENT(IN) :: oneD + TYPE(t_input),INTENT(INOUT) :: input + TYPE(t_noco),INTENT(IN) :: noco + TYPE(t_vacuum),INTENT(IN) :: vacuum + TYPE(t_cell),INTENT(IN) :: cell + TYPE(t_xcpot),INTENT(IN) :: xcpot + TYPE(t_sliceplot),INTENT(IN):: sliceplot + ! .. + ! .. Local Scalars .. + INTEGER :: it + CHARACTER*10 :: cdnfname + ! .. + it = 1 - IF (mpi%irank == 0) THEN - 10 IF (sliceplot%plpot) input%score = .false. - IF (sliceplot%iplot) THEN - CALL timestart("Plotting") - IF (input%strho) CALL juDFT_error("strho = T and iplot=T",calledby& - & ="optional") - IF (noco%l_noco) THEN - cdnfname = 'cdn' - CALL plotdop(& - & oneD,stars,vacuum,sphhar,atoms,& - & input,sym,cell,sliceplot,& - & noco%l_noco,cdnfname) - cdnfname = 'mdnx' - CALL plotdop(& - & oneD,stars,vacuum,sphhar,atoms,& - & input,sym,cell,sliceplot,& - & noco%l_noco,cdnfname) - cdnfname = 'mdny' - CALL plotdop(& - & oneD,stars,vacuum,sphhar,atoms,& - & input,sym,cell,sliceplot,& - & noco%l_noco,cdnfname) - cdnfname = 'mdnz' - CALL plotdop(& - & oneD,stars,vacuum,sphhar,atoms,& - & input,sym,cell,sliceplot,& - & noco%l_noco,cdnfname) - ELSE - IF (sliceplot%slice) THEN - cdnfname = 'cdn_slice' - ELSE - cdnfname = 'cdn1' - ENDIF - CALL plotdop(& - & oneD,stars,vacuum,sphhar,atoms,& - & input,sym,cell,sliceplot,& - & noco%l_noco,cdnfname) - ENDIF - CALL timestop("Plotting") - END IF - ENDIF ! mpi%irank == 0 -! -! --->generate starting charge density -! - IF (input%strho) THEN - input%total = .false. -! - CALL timestart("generation of start-density") - CALL stden(mpi,& - & sphhar,stars,atoms,sym,& - & dimension,vacuum,& - & input,& - & cell,& - & xcpot,& - & obsolete,& - & oneD) -! - CALL timestart("generation of start-density") - END IF - IF (mpi%irank == 0) THEN -! -! --->generate spin polarized charge density -! - call timestart("optional: spin polarized density") - IF (input%swsp) THEN - CALL cdnsp(& - & atoms,input,vacuum,sphhar,& - & stars,& - & sym,& - & cell,dimension) -! - call timestop("optional: spin polarized density") - END IF -! -! --->flip magnetic moments -! - IF (input%lflip) THEN + IF (mpi%irank == 0) THEN +10 IF (sliceplot%plpot) input%score = .FALSE. + IF (sliceplot%iplot) THEN + CALL timestart("Plotting") + IF (input%strho) CALL juDFT_error("strho = T and iplot=T",calledby& + & ="optional") + IF (noco%l_noco) THEN + cdnfname = 'cdn' + CALL plotdop(& + & oneD,stars,vacuum,sphhar,atoms,& + & input,sym,cell,sliceplot,& + & noco%l_noco,cdnfname) + cdnfname = 'mdnx' + CALL plotdop(& + & oneD,stars,vacuum,sphhar,atoms,& + & input,sym,cell,sliceplot,& + & noco%l_noco,cdnfname) + cdnfname = 'mdny' + CALL plotdop(& + & oneD,stars,vacuum,sphhar,atoms,& + & input,sym,cell,sliceplot,& + & noco%l_noco,cdnfname) + cdnfname = 'mdnz' + CALL plotdop(& + & oneD,stars,vacuum,sphhar,atoms,& + & input,sym,cell,sliceplot,& + & noco%l_noco,cdnfname) + ELSE + IF (sliceplot%slice) THEN + cdnfname = 'cdn_slice' + ELSE + cdnfname = 'cdn1' + ENDIF + CALL plotdop(& + & oneD,stars,vacuum,sphhar,atoms,& + & input,sym,cell,sliceplot,& + & noco%l_noco,cdnfname) + ENDIF + CALL timestop("Plotting") + END IF + ENDIF ! mpi%irank == 0 + ! + ! --->generate starting charge density + ! + IF (input%strho) THEN + input%total = .FALSE. + ! + CALL timestart("generation of start-density") + CALL stden(mpi,& + & sphhar,stars,atoms,sym,& + & DIMENSION,vacuum,& + & input,& + & cell,& + & xcpot,& + & obsolete,& + & oneD) + ! + CALL timestart("generation of start-density") + END IF + IF (mpi%irank == 0) THEN + ! + ! --->generate spin polarized charge density + ! + CALL timestart("optional: spin polarized density") + IF (input%swsp) THEN + CALL cdnsp(& + & atoms,input,vacuum,sphhar,& + & stars,& + & sym,& + & cell,DIMENSION) + ! + CALL timestop("optional: spin polarized density") + END IF + ! + ! --->flip magnetic moments + ! + IF (input%lflip) THEN - CALL timestart('optional: flip magnetic moments') - CALL flipcdn(& - & atoms,input,vacuum,sphhar,& - & stars,sym,cell,noco%l_noco) -! - CALL timestop('optional: flip magnetic moments') - END IF + CALL timestart('optional: flip magnetic moments') + CALL flipcdn(& + & atoms,input,vacuum,sphhar,& + & stars,sym,cell,noco%l_noco) + ! + CALL timestop('optional: flip magnetic moments') + END IF - IF (obsolete%l_u2f) THEN + IF (obsolete%l_u2f) THEN - CALL timestart('optional: conversion to formatted') - CALL u2f(& - & stars,input,atoms,sphhar,vacuum,& - & cell,sym,noco%l_noco) -! - CALL timestop('optional: conversion to formatted') - ENDIF + CALL timestart('optional: conversion to formatted') + CALL u2f(& + & stars,input,atoms,sphhar,vacuum,& + & cell,sym,noco%l_noco) + ! + CALL timestop('optional: conversion to formatted') + ENDIF - IF (obsolete%l_f2u) THEN + IF (obsolete%l_f2u) THEN - CALL timestart('optional: conversion to unformatted') - CALL f2u(& - & stars,input,atoms,sphhar,vacuum,& - & cell,sym,noco%l_noco) -! - CALL timestop('optional: conversion to unformatted') - ENDIF + CALL timestart('optional: conversion to unformatted') + CALL f2u(& + & stars,input,atoms,sphhar,vacuum,& + & cell,sym,noco%l_noco) + ! + CALL timestop('optional: conversion to unformatted') + ENDIF - IF (input%l_bmt) THEN - CALL bmt(& - & stars,input,noco,atoms,sphhar,vacuum,& - & cell,sym) - ENDIF + IF (input%l_bmt) THEN + CALL bmt(& + & stars,input,noco,atoms,sphhar,vacuum,& + & cell,sym) + ENDIF - ENDIF ! mpi%irank == 0 + ENDIF ! mpi%irank == 0 - END SUBROUTINE optional - END MODULE m_optional + END SUBROUTINE OPTIONAL +END MODULE m_optional diff --git a/main/totale.f90 b/main/totale.f90 index 070c14ed78fa890c61d6e3ed0792be9ba14a4b7c..ab7261ff407d738caf1951e2d62d8b81b24ca9d0 100644 --- a/main/totale.f90 +++ b/main/totale.f90 @@ -1,11 +1,15 @@ +!-------------------------------------------------------------------------------- +! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany +! This file is part of FLEUR and available as free software under the conditions +! of the MIT license as expressed in the LICENSE file in more detail. +!-------------------------------------------------------------------------------- MODULE m_totale CONTAINS SUBROUTINE totale(atoms,sphhar,stars,vacuum, & sym,input,noco,cell,oneD, xcpot,hybrid, it,results) ! ! *************************************************** - ! subroutine calculates the total energy of the slab - ! c.l.fu + ! subroutine calculates the total energy ! *************************************************** ! single particle energies ! SEIGC sum of the eigenvalues of the core states diff --git a/main/vgen.F90 b/main/vgen.F90 index 46f1521c438cdff493cc11b8aaf344e43896d1c1..fcc200b8cfbf4d896f90eb654391fa7b02617267 100644 --- a/main/vgen.F90 +++ b/main/vgen.F90 @@ -1,13 +1,15 @@ +!-------------------------------------------------------------------------------- +! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany +! This file is part of FLEUR and available as free software under the conditions +! of the MIT license as expressed in the LICENSE file in more detail. +!-------------------------------------------------------------------------------- MODULE m_vgen USE m_juDFT CONTAINS SUBROUTINE vgen(reap,input,xcpot,dimension, atoms,sphhar,stars,& vacuum,sym, obsolete,cell,oneD,sliceplot,mpi, results,noco) ! *********************************************************** - ! FLAPW7 film potential generator * - ! composed July 1986, revised and tested May 1987 * - ! spin-polarized added may 1987 * - ! c.l.fu, R. Podloucky * + ! FLAPW potential generator * ! *********************************************************** ! calculates the density-potential integrals needed for the ! total energy @@ -15,10 +17,6 @@ CONTAINS ! TE_VEFF: charge density-effective potential integral ! TE_EXC : charge density-ex-corr.energy density integral ! *********************************************************** - ! VR0 average coulomb potential contributes to the Madelung term - ! R.Pentcheva 09.05.96 - ! *********************************************************** - ! #include"cpp_double.h" USE m_constants USE m_vmts