Merge lp:~albertog/siesta/merge-OSSO into lp:siesta
- merge-OSSO
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 693 |
Proposed branch: | lp:~albertog/siesta/merge-OSSO |
Merge into: | lp:siesta |
Diff against target: |
28543 lines (+15696/-10454) 185 files modified
Docs/Contributors.txt (+2/-1) Docs/SOC_offsite_notes.txt (+33/-0) Docs/siesta.tex (+121/-79) Src/Makefile (+38/-34) Src/atm_types.f (+6/-3) Src/atmfuncs.f (+2/-0) Src/atmparams.f (+5/-1) Src/atom.F (+193/-141) Src/bands.F (+4/-4) Src/basis_io.F (+31/-5) Src/broadcast_basis.F (+6/-0) Src/compute_energies.F90 (+175/-56) Src/dfscf.f (+2/-1) Src/final_H_f_stress.F (+46/-25) Src/initatom.f (+15/-9) Src/m_cite.F90 (+23/-1) Src/m_pulay.F90 (+7/-8) Src/m_spin.F90 (+71/-65) Src/mixer.F (+9/-9) Src/moments.F (+0/-1) Src/nlefsm.f (+615/-6) Src/setup_H0.F (+73/-19) Src/setup_hamiltonian.F (+101/-47) Src/siesta_options.F90 (+2/-3) Src/sparse_matrices.F (+9/-3) Src/spinorbit.f (+4/-7) Src/state_analysis.F (+2/-2) Src/state_init.F (+14/-7) Tests/FePt_soc/FePt_soc.fdf (+65/-0) Tests/FePt_soc/FePt_soc.pseudos (+2/-0) Tests/FePt_soc/makefile (+2/-0) Tests/Makefile (+3/-7) Tests/More_SOC_Examples/README (+10/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xx/FePtxx.fdf (+72/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xx/FePtxx.pseudos (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xx/README (+33/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xx/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.fdf (+74/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.pseudos (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/README (+33/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xz/FePtxz.fdf (+72/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xz/FePtxz.pseudos (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xz/README (+33/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xz/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.fdf (+70/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.pseudos (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/README (+33/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zy/FePtzy.fdf (+72/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zy/FePtzy.pseudos (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zy/README (+33/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zy/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.fdf (+68/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.pseudos (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/README (+33/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zz/FePtzz.fdf (+72/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zz/FePtzz.pseudos (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zz/README (+33/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zz/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.fdf (+64/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.pseudos (+2/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/README (+33/-0) Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/Pt2xx.fdf (+64/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/Pt2xx.pseudos (+1/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/README (+34/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/Pt2xz.fdf (+59/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/Pt2xz.pseudos (+1/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/README (+34/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/Pt2zy.fdf (+64/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/Pt2zy.pseudos (+1/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/README (+34/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/makefile (+2/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_zz/Pt2zz.fdf (+59/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_zz/Pt2zz.pseudos (+1/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_zz/README (+34/-0) Tests/More_SOC_Examples/offsite_SOC_Pt2_zz/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xx/FePtxx.fdf (+72/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xx/FePtxx.pseudos (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xx/README (+33/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xx/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.fdf (+74/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.pseudos (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xx/offsite_SOC_FePt_xx/README (+33/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xx/offsite_SOC_FePt_xx/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xz/FePtxz.fdf (+68/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xz/FePtxz.pseudos (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xz/README (+33/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xz/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.fdf (+70/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.pseudos (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xz/offsite_SOC_FePt_xz/README (+33/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_xz/offsite_SOC_FePt_xz/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zy/FePtzy.fdf (+66/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zy/FePtzy.pseudos (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zy/README (+33/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zy/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.fdf (+68/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.pseudos (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zy/offsite_SOC_FePt_zy/README (+33/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zy/offsite_SOC_FePt_zy/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zz/FePtzz.fdf (+62/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zz/FePtzz.pseudos (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zz/README (+33/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zz/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.fdf (+64/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.pseudos (+2/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zz/offsite_SOC_FePt_zz/README (+33/-0) Tests/More_SOC_Examples/onsite_SOC_FePt_zz/offsite_SOC_FePt_zz/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_xx/Pt2xx.fdf (+62/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_xx/Pt2xx.pseudos (+1/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_xx/README (+34/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_xx/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_xz/Pt2xz.fdf (+57/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_xz/Pt2xz.pseudos (+1/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_xz/README (+34/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_xz/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_zy/Pt2zy.fdf (+62/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_zy/Pt2zy.pseudos (+1/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_zy/README (+34/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_zy/makefile (+2/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_zz/Pt2zz.fdf (+57/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_zz/Pt2zz.pseudos (+1/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_zz/README (+34/-0) Tests/More_SOC_Examples/onsite_SOC_Pt2_zz/makefile (+2/-0) Tests/Pseudos/Fe_SOC.psf (+0/-2831) Tests/Pseudos/Fe_fept_SOC.psf (+2831/-0) Tests/Pseudos/Pt_SOC.psf (+0/-3051) Tests/Pseudos/Pt_fept_SOC.psf (+3051/-0) Tests/Pseudos/Pt_pt2_SOC.psf (+3051/-0) Tests/Pt_dimer_soc/Pt_dimer_soc.fdf (+61/-0) Tests/Pt_dimer_soc/Pt_dimer_soc.pseudos (+1/-0) Tests/Pt_dimer_soc/makefile (+2/-0) Tests/Reference/FePt_soc.out (+687/-0) Tests/Reference/Pt_dimer_soc.out (+567/-0) Tests/Reference/SOC_Pt2_xx.out (+0/-609) Tests/Reference/SOC_Pt2_xz.out (+0/-964) Tests/Reference/SOC_Pt2_zy.out (+0/-922) Tests/Reference/SOC_Pt2_zz.out (+0/-622) Tests/Reference/ge_soc_bands.bands (+587/-0) Tests/Reference/ge_soc_bands.out (+513/-0) Tests/SOC_FePt_xx/README (+0/-33) Tests/SOC_FePt_xx/SOC_FePt_xx.fdf (+0/-71) Tests/SOC_FePt_xx/SOC_FePt_xx.pseudos (+0/-2) Tests/SOC_FePt_xx/makefile (+0/-2) Tests/SOC_FePt_xz/README (+0/-33) Tests/SOC_FePt_xz/SOC_FePt_xz.fdf (+0/-71) Tests/SOC_FePt_xz/SOC_FePt_xz.pseudos (+0/-2) Tests/SOC_FePt_xz/makefile (+0/-2) Tests/SOC_FePt_zy/README (+0/-33) Tests/SOC_FePt_zy/SOC_FePt_zy.fdf (+0/-72) Tests/SOC_FePt_zy/SOC_FePt_zy.pseudos (+0/-2) Tests/SOC_FePt_zy/makefile (+0/-2) Tests/SOC_FePt_zz/README (+0/-33) Tests/SOC_FePt_zz/SOC_FePt_zz.fdf (+0/-72) Tests/SOC_FePt_zz/SOC_FePt_zz.pseudos (+0/-2) Tests/SOC_FePt_zz/makefile (+0/-2) Tests/SOC_Pt2_xx/README (+0/-34) Tests/SOC_Pt2_xx/SOC_Pt2_xx.fdf (+0/-57) Tests/SOC_Pt2_xx/SOC_Pt2_xx.pseudos (+0/-1) Tests/SOC_Pt2_xx/makefile (+0/-2) Tests/SOC_Pt2_xz/README (+0/-34) Tests/SOC_Pt2_xz/SOC_Pt2_xz.fdf (+0/-57) Tests/SOC_Pt2_xz/SOC_Pt2_xz.pseudos (+0/-1) Tests/SOC_Pt2_xz/makefile (+0/-2) Tests/SOC_Pt2_zy/README (+0/-34) Tests/SOC_Pt2_zy/SOC_Pt2_zy.fdf (+0/-57) Tests/SOC_Pt2_zy/SOC_Pt2_zy.pseudos (+0/-1) Tests/SOC_Pt2_zy/makefile (+0/-2) Tests/SOC_Pt2_zz/README (+0/-34) Tests/SOC_Pt2_zz/SOC_Pt2_zz.fdf (+0/-57) Tests/SOC_Pt2_zz/SOC_Pt2_zz.pseudos (+0/-1) Tests/SOC_Pt2_zz/makefile (+0/-2) Tests/ge_soc_bands/README (+9/-0) Tests/ge_soc_bands/ge_soc_bands.fdf (+49/-0) Tests/ge_soc_bands/ge_soc_bands.pseudos (+1/-0) Tests/ge_soc_bands/makefile (+6/-0) Util/Denchar/Src/Makefile (+52/-49) Util/Gen-basis/gen-basis.F (+2/-1) Util/TS/TBtrans/Makefile (+53/-50) version.info (+2/-1) |
To merge this branch: | bzr merge lp:~albertog/siesta/merge-OSSO |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nick Papior | Approve | ||
Roberto Robles (community) | Approve | ||
Ramon Cuadrado (community) | Approve | ||
Review via email: mp+344793@code.launchpad.net |
This proposal supersedes a proposal from 2018-04-22.
Commit message
Merge the 'offsite spin-orbit' implementation by Ramon Cuadrado.
Reference:
R. Cuadrado and J. I. Cerda, J. Phys.: Condens. Matter 24, 086005,
(2012) (DOI:10.
The new 'offsite' implementation is now the default when
Spin { SO, SOC, S+O }
SpinOrbit T (deprecated)
is specified in the input fdf file. To request the 'onsite' approximation,
use
Spin { SO+onsite, SOC+onsite, S+O+onsite}
The only basic change from the existing 'onsite' implementation is in
the construction of the SO hamiltonian, which involves the full set of
lj KB projectors. These are constructed by new code in 'atom', and
processed in the new routine 'nlefsm_SO_off', which has roughly the
same structure as 'nlefsm', but constructs at the same time the 'ion'
(nl) and 'SO' pieces from the relativistic projectors.
This routine calls 'calc_Vj_
corresponding forces are computed using the Clebsch–Gordan
coefficients needed to change from the basis |l,m,sigma> to |j,mj>.
The conventions for structure and signs in H and the DM are the same
as in the existing 'onsite' implementation, so there are no changes in
the diagonalization routines, or in the analysis routines and tools.
Eventually, the 'offsite' qualifier might be removed, as this is a
full spin-orbit implementation.
Note that this merge focuses on the core electronic-
functionality of 'full' spin-orbit coupling, and does not provide any
spin-orbit enhancements to the analysis tools.
Description of the change
Some polishing, shorter-running tests for SOC, etc.
This should be mature enough to go to the trunk, as an implementation of the 'offsite' SOC.
Further enhancements to analysis tools, etc, should be worked on in the other series,
Nick Papior (nickpapior) wrote : Posted in a previous version of this proposal | # |
Nick Papior (nickpapior) wrote : Posted in a previous version of this proposal | # |
Great work Alberto!
I have amended comments again.
If you want, I can have a go on a PR for this branch?
Alberto Garcia (albertog) wrote : Posted in a previous version of this proposal | # |
Ok. Dfscf and rhoofd are going to be changed later.
On Fri, Apr 20, 2018, 11:59 Nick Papior <email address hidden> wrote:
> Review: Needs Fixing
>
> Great work Alberto!
>
> I have amended comments again.
>
> If you want, I can have a go on a PR for this branch?
>
> Diff comments:
>
> > === modified file 'Docs/siesta.tex'
> > --- Docs/siesta.tex 2018-04-17 13:07:32 +0000
> > +++ Docs/siesta.tex 2018-04-20 09:43:43 +0000
> > @@ -3721,10 +3728,12 @@
> >
> > \option[
> > \fdfindex*
> > - Perform a calculation with spin-orbit coupling. This requires the
> > + Performs calculations including the spin--orbit coupling. By
> default the
> > + off--site SO option is set to \fdftrue. To perform an on--site SO
> calculations
> > + this option has to be {\bf spin-orbit+onsite}. This requires the
>
> No \bf, \textbf{...} ;)
>
> > pseudopotentials to be relativistic.
> >
> > - See Sect.~\
> > + See Sect.~\
> options.
> >
> > \end{fdfoptions}
> >
> > @@ -3775,96 +3784,148 @@
> > \siesta\ includes the posibility to perform fully relativistic
> > calculations by means of the inclusion in the total Hamiltonian not
> > only the Darwin and velocity correction terms~(
> > -calculations), but also the spin-orbit~(SO) contribution. The
> > -implementation is based on the on-site SO approximation, where only
> > -the intra-SO contribution of each atom is taken into account. See
> > -\fdf{Spin} on how to turn on the spin-orbit coupling.
> > +calculations), but also the spin--orbit~(SO) contribution. There are
> > +two approaches regarding the SO formalism: on--site and off--site.
> > +Within the on--site approximation only the intra--atomic SO
> contribution is taken
> > +into account. In the off--site scheme additional neighboring
> > +interactions are also included in the SO term. By default, the
> off--site SO
> > +formalism is switched on, being necessary to change the \fdf{Spin} flag
> > +in the input file if the on--site approximation wants to be used. See
> > +\fdf{Spin} on how to handle the spin--orbit coupling.
> >
> > -The current implementation in \siesta\ has been implemented by
> > -Dr. Ram\'on Cuadrado based on the original on-site SO formalism and
> > -implementation developed by Prof. Jaime Ferrer, \textit{et al}~(L
> > +The on--site spin-orbit scheme in this version of \siesta\ has been
> implemented by
> > +Dr. Ram\'on Cuadrado based on the original on--site SO formalism and
> > +implementation developed by Prof. Jaime Ferrer and his collaborators
> \textit{et al}~(L
> > Fern\'andez-
> > -Physics: Condensed Matter, 2006 vol. 18 pp. 7999; L
> > -Fern\'
> > -183401).
> > -
> > -The inclusion of the SO term in the Hamiltonian~(and in the Density
> > -Matrix) will involve the increase of non-zero elements in their
> > -off-diagonal parts, i.e., for some $\mu\nu$ orbitals,
> > -H$^{\sigma\
> > +Physics: Condensed Matter, {\bf 18...
Alberto Garcia (albertog) wrote : Posted in a previous version of this proposal | # |
Please re-check physical results in view of the fix of the neglect of the highest-l SO component in the pseudopotential.
Nick Papior (nickpapior) wrote : Posted in a previous version of this proposal | # |
Very good Alberto.
I have re-assessed the comments and I only have two more points:
1) The WriteOrbMoms seems like a "bad" option name.
2) I can make a PR for clarifying H_so in sparse_matrices. I think having the classes and names of the variables to coincide with the type to be good (H_so_on_2D, H_so_off_2D) for instance?
Ramon Cuadrado (ramon-cuadrado) wrote : Posted in a previous version of this proposal | # |
Hi Alberto, all,
Just finished some FePt and Pt2 tests (not Z-matrix) and it seems that for trunk-688-
The code does not finish properly. Just stops after write "Target enthalpy (eV/cell)" or Mulliken pop which I guess that will be fixed in the final merge...
One more thing, I am not sure if the makefile within "offsite_SOC_" works fine. Just for info.
Best,
Ramón
Alberto Garcia (albertog) wrote : Posted in a previous version of this proposal | # |
> Very good Alberto.
>
> I have re-assessed the comments and I only have two more points:
>
> 1) The WriteOrbMoms seems like a "bad" option name.
I agree. We can change that in 4.1 and propagate.
>
> 2) I can make a PR for clarifying H_so in sparse_matrices. I think having the
> classes and names of the variables to coincide with the type to be good
> (H_so_on_2D, H_so_off_2D) for instance?
Please go ahead. At some point I would like the offSO H to be a real array with the same
conventions as the rest, to clarify the code throughout.
Alberto Garcia (albertog) wrote : Posted in a previous version of this proposal | # |
> Hi Alberto, all,
>
> Just finished some FePt and Pt2 tests (not Z-matrix) and it seems that for
> trunk-688-
> energies, MMs, forces and rotational tests are ok. Maybe Roberto wants to
> perform an additional test.
So you find no changes stemming from the fixing of the wrong-highest-l pseudo SO contribution?
>
> The code does not finish properly. Just stops after write "Target enthalpy
> (eV/cell)" or Mulliken pop which I guess that will be fixed in the final
> merge...
We need to look at this. Please provide fdf file and psf's.
>
Ramon Cuadrado (ramon-cuadrado) wrote : Posted in a previous version of this proposal | # |
> > Hi Alberto, all,
> >
> > Just finished some FePt and Pt2 tests (not Z-matrix) and it seems that
> for
> > trunk-688-
> > energies, MMs, forces and rotational tests are ok. Maybe Roberto wants to
> > perform an additional test.
>
> So you find no changes stemming from the fixing of the wrong-highest-l pseudo
> SO contribution?
No changes.
>
> >
> > The code does not finish properly. Just stops after write "Target
> enthalpy
> > (eV/cell)" or Mulliken pop which I guess that will be fixed in the final
> > merge...
>
> We need to look at this. Please provide fdf file and psf's.
The PPs and the fdf’s are thosein the Test directory for FePt and Pt2...
>
> >
Roberto Robles (roberto-robles) wrote : Posted in a previous version of this proposal | # |
El 23/04/18 a las 11:35, Ramon Cuadrado escribió:
>>> Hi Alberto, all,
>>>
>>> Just finished some FePt and Pt2 tests (not Z-matrix) and it seems that
>> for
>>> trunk-688-
>>> energies, MMs, forces and rotational tests are ok. Maybe Roberto wants to
>>> perform an additional test.
>> So you find no changes stemming from the fixing of the wrong-highest-l pseudo
>> SO contribution?
> No changes.
>
>
>>> The code does not finish properly. Just stops after write "Target
>> enthalpy
>>> (eV/cell)" or Mulliken pop which I guess that will be fixed in the final
>>> merge...
>> We need to look at this. Please provide fdf file and psf's.
> The PPs and the fdf’s are thosein the Test directory for FePt and Pt2...
Is this the bug with state_analysis.F compiled with an intel compiler?
This is a very annoying problem, up to three people has contacted me
with that problem. If we can not fix it it should be stated in the
manual in the instructions for compiling, since usually people recycle
their arch.make instead of modifying the supplied intel.make
Roberto
>
Ramon Cuadrado (ramon-cuadrado) wrote : | # |
Ok. Go ahead!
Roberto Robles (roberto-robles) : | # |
Nick Papior (nickpapior) : | # |
- 713. By Alberto Garcia
-
Update SOC_offsite notes in Docs
Also, remove comment in siesta.tex regarding structural optimization
with the on-site approximation.(Thanks to Roberto Robles for input)
Preview Diff
1 | === modified file 'Docs/Contributors.txt' | |||
2 | --- Docs/Contributors.txt 2016-09-28 07:49:18 +0000 | |||
3 | +++ Docs/Contributors.txt 2018-04-30 20:53:35 +0000 | |||
4 | @@ -30,7 +30,8 @@ | |||
5 | 30 | Thomas Archer | 30 | Thomas Archer |
6 | 31 | Luis C. Balbas | 31 | Luis C. Balbas |
7 | 32 | Xavier Blase | 32 | Xavier Blase |
9 | 33 | Ramon Cuadrado | 33 | Jorge I. Cerda, |
10 | 34 | Ramon Cuadrado, | ||
11 | 34 | Michele Ceriotti | 35 | Michele Ceriotti |
12 | 35 | Raul de la Cruz | 36 | Raul de la Cruz |
13 | 36 | Gabriel Fabricius | 37 | Gabriel Fabricius |
14 | 37 | 38 | ||
15 | === added file 'Docs/SOC_offsite_notes.txt' | |||
16 | --- Docs/SOC_offsite_notes.txt 1970-01-01 00:00:00 +0000 | |||
17 | +++ Docs/SOC_offsite_notes.txt 2018-04-30 20:53:35 +0000 | |||
18 | @@ -0,0 +1,33 @@ | |||
19 | 1 | Notes to the new 'offsite spin-orbit' implementation by Ramon Cuadrado. | ||
20 | 2 | |||
21 | 3 | Reference: | ||
22 | 4 | |||
23 | 5 | R. Cuadrado and J. I. Cerda, | ||
24 | 6 | "Fully relativistic pseudopotential formalism under an atomic orbital | ||
25 | 7 | basis: spin–orbit splittings and magnetic anisotropies", | ||
26 | 8 | J. Phys.: Condens. Matter 24, 086005, (2012) | ||
27 | 9 | (DOI:10.1088/0953-8984/24/8/086005) | ||
28 | 10 | |||
29 | 11 | In this 'offsite' implementation the introduction of a fully | ||
30 | 12 | relativistic Hamiltonian is done by using fully non-local operators | ||
31 | 13 | for the pseudopotentials. In this way it is possible to avoid the | ||
32 | 14 | 'onsite' approximation needed to reduce the computational effort | ||
33 | 15 | required when explicitly computing the LS term. | ||
34 | 16 | |||
35 | 17 | The construction of a fully relativistic Hamiltonian involves the use | ||
36 | 18 | of a full set of lj KB projectors. These are constructed by new code | ||
37 | 19 | in 'atom', and processed in the new routine 'nlefsm_SO_off', which has | ||
38 | 20 | roughly the same structure as 'nlefsm', but constructs at the same | ||
39 | 21 | time the 'ion' and 'SO' pieces from the relativistic projectors. | ||
40 | 22 | |||
41 | 23 | This routine calls 'calc_Vj_offsiteSO', where VSO and Vion and the | ||
42 | 24 | corresponding forces are computed using the Clebsch–Gordan | ||
43 | 25 | coefficients needed to change from the basis |l,m,sigma> to |j,mj>. | ||
44 | 26 | |||
45 | 27 | The conventions for structure and signs in H and the DM are the same | ||
46 | 28 | as in the existing 'onsite' implementation, so there are no changes in | ||
47 | 29 | the diagonalization routines, or in the analysis routines and tools. | ||
48 | 30 | |||
49 | 31 | Eventually, the 'offsite' qualifier might be removed, as this is a | ||
50 | 32 | full spin-orbit implementation which involves a similar computational | ||
51 | 33 | effort using less drastic approximations. | ||
52 | 0 | 34 | ||
53 | === modified file 'Docs/siesta.tex' | |||
54 | --- Docs/siesta.tex 2018-04-24 10:24:02 +0000 | |||
55 | +++ Docs/siesta.tex 2018-04-30 20:53:35 +0000 | |||
56 | @@ -214,7 +214,8 @@ | |||
57 | 214 | Thomas Archer, | 214 | Thomas Archer, |
58 | 215 | Luis C. Balbas, | 215 | Luis C. Balbas, |
59 | 216 | Xavier Blase, | 216 | Xavier Blase, |
61 | 217 | Ramon Cuadrado, | 217 | Jorge I. Cerd\'a, |
62 | 218 | Ram\'on Cuadrado, | ||
63 | 218 | Michele Ceriotti, | 219 | Michele Ceriotti, |
64 | 219 | Raul de la Cruz, | 220 | Raul de la Cruz, |
65 | 220 | Gabriel Fabricius, | 221 | Gabriel Fabricius, |
66 | @@ -2241,6 +2242,12 @@ | |||
67 | 2241 | The default is \emph{one} KB projector from each angular momentum, | 2242 | The default is \emph{one} KB projector from each angular momentum, |
68 | 2242 | constructed from the nodeless eigenfunction. | 2243 | constructed from the nodeless eigenfunction. |
69 | 2243 | 2244 | ||
70 | 2245 | For full spin-orbit calculations, the program generates $lj$ | ||
71 | 2246 | projectors using the $l+1/2$ and $l-1/2$ components of the | ||
72 | 2247 | (relativistic) pseudopotentials. In this case the specification of the | ||
73 | 2248 | reference energies for projectors is not changed: only $l$ is | ||
74 | 2249 | relevant. | ||
75 | 2250 | |||
76 | 2244 | \end{fdfentry} | 2251 | \end{fdfentry} |
77 | 2245 | 2252 | ||
78 | 2246 | 2253 | ||
79 | @@ -3251,7 +3258,7 @@ | |||
80 | 3251 | coordinates rigidly to have them positive, by using | 3258 | coordinates rigidly to have them positive, by using |
81 | 3252 | \fdf{AtomicCoordinatesOrigin}. See the | 3259 | \fdf{AtomicCoordinatesOrigin}. See the |
82 | 3253 | \program{Sies2arc}\index{Sies2arc@\textsc{Sies2arc}} utility in the | 3260 | \program{Sies2arc}\index{Sies2arc@\textsc{Sies2arc}} utility in the |
84 | 3254 | \program{Util/} directory for generating \sysfile*{.arc} files for CERIUS animation. | 3261 | \program{Util/} directory for generating \sysfile*{arc} files for CERIUS animation. |
85 | 3255 | 3262 | ||
86 | 3256 | \end{fdflogicalF} | 3263 | \end{fdflogicalF} |
87 | 3257 | 3264 | ||
88 | @@ -3481,8 +3488,9 @@ | |||
89 | 3481 | symmetry is valid in the absence of external magnetic fields or | 3488 | symmetry is valid in the absence of external magnetic fields or |
90 | 3482 | non-collinear/spin-orbit interaction. | 3489 | non-collinear/spin-orbit interaction. |
91 | 3483 | 3490 | ||
94 | 3484 | This flag should be used with care, as the code will produce wrong | 3491 | This flag is only honored for spinless or collinear-spin calculations, |
95 | 3485 | results if there is no support for the appropriate symmetrization. | 3492 | as the code will produce wrong results if there is no support for the |
96 | 3493 | appropriate symmetrization. | ||
97 | 3486 | 3494 | ||
98 | 3487 | The default value is \fdftrue unless: a) the option \fdf{Spin!Spiral} | 3495 | The default value is \fdftrue unless: a) the option \fdf{Spin!Spiral} |
99 | 3488 | is used. In this case time-reversal-symmetry is broken explicitly. b) | 3496 | is used. In this case time-reversal-symmetry is broken explicitly. b) |
100 | @@ -3721,10 +3729,12 @@ | |||
101 | 3721 | 3729 | ||
102 | 3722 | \option[spin-orbit]% | 3730 | \option[spin-orbit]% |
103 | 3723 | \fdfindex*{Spin:spin-orbit}% | 3731 | \fdfindex*{Spin:spin-orbit}% |
105 | 3724 | Perform a calculation with spin-orbit coupling. This requires the | 3732 | Performs calculations including the spin-orbit coupling. By default the |
106 | 3733 | off-site SO option is set to \fdftrue. To perform an on-site SO calculations | ||
107 | 3734 | this option has to be \fdf*{spin-orbit+onsite}. This requires the | ||
108 | 3725 | pseudopotentials to be relativistic. | 3735 | pseudopotentials to be relativistic. |
109 | 3726 | 3736 | ||
111 | 3727 | See Sect.~\ref{sec:spin-orbit}. | 3737 | See Sect.~\ref{sec:spin-orbit} for further specific spin-orbit options. |
112 | 3728 | 3738 | ||
113 | 3729 | \end{fdfoptions} | 3739 | \end{fdfoptions} |
114 | 3730 | 3740 | ||
115 | @@ -3769,96 +3779,127 @@ | |||
116 | 3769 | \end{fdflogicalF} | 3779 | \end{fdflogicalF} |
117 | 3770 | 3780 | ||
118 | 3771 | 3781 | ||
120 | 3772 | \subsection{Spin--Orbit coupling} | 3782 | \subsection{Spin-Orbit coupling} |
121 | 3773 | \label{sec:spin-orbit} | 3783 | \label{sec:spin-orbit} |
122 | 3774 | 3784 | ||
123 | 3775 | \siesta\ includes the posibility to perform fully relativistic | 3785 | \siesta\ includes the posibility to perform fully relativistic |
124 | 3776 | calculations by means of the inclusion in the total Hamiltonian not | 3786 | calculations by means of the inclusion in the total Hamiltonian not |
125 | 3777 | only the Darwin and velocity correction terms~(Scalar--Relativistic | 3787 | only the Darwin and velocity correction terms~(Scalar--Relativistic |
130 | 3778 | calculations), but also the spin-orbit~(SO) contribution. The | 3788 | calculations), but also the spin-orbit~(SO) contribution. There are |
131 | 3779 | implementation is based on the on-site SO approximation, where only | 3789 | two approaches regarding the SO formalism: on-site and off-site. |
132 | 3780 | the intra-SO contribution of each atom is taken into account. See | 3790 | Within the on-site approximation only the intra-atomic SO |
133 | 3781 | \fdf{Spin} on how to turn on the spin-orbit coupling. | 3791 | contribution is taken into account. In the off-site scheme additional |
134 | 3792 | neighboring interactions are also included in the SO term. By default, | ||
135 | 3793 | the off-site SO formalism is switched on, being necessary to change | ||
136 | 3794 | the \fdf{Spin} flag in the input file if the on-site approximation | ||
137 | 3795 | wants to be used. See \fdf{Spin} on how to handle the spin-orbit | ||
138 | 3796 | coupling. | ||
139 | 3782 | 3797 | ||
141 | 3783 | The current implementation in \siesta\ has been implemented by | 3798 | The on-site spin-orbit scheme in this version of \siesta\ has been implemented by |
142 | 3784 | Dr. Ram\'on Cuadrado based on the original on-site SO formalism and | 3799 | Dr. Ram\'on Cuadrado based on the original on-site SO formalism and |
144 | 3785 | implementation developed by Prof. Jaime Ferrer, \textit{et al}~(L | 3800 | implementation developed by Prof. Jaime Ferrer and his collaborators \textit{et al}~(L |
145 | 3786 | Fern\'andez--Seivane, M Oliveira, S Sanvito, and J Ferrer, Journal of | 3801 | Fern\'andez--Seivane, M Oliveira, S Sanvito, and J Ferrer, Journal of |
155 | 3787 | Physics: Condensed Matter, 2006 vol. 18 pp. 7999; L | 3802 | Physics: Condensed Matter, \textbf{18}, 7999 (2006); L Fern\'andez--Seivane |
156 | 3788 | Fern\'andez--Seivane and Jaime Ferrer, Phys. Rev. Lett. 99, 2007, | 3803 | and Jaime Ferrer, Phys. Rev. Lett. \textbf{99}, 183401 (2007)). |
157 | 3789 | 183401). | 3804 | |
158 | 3790 | 3805 | The off-site scheme has been implemented by | |
159 | 3791 | The inclusion of the SO term in the Hamiltonian~(and in the Density | 3806 | Dr. Ram\'on Cuadrado and Dr. Jorge I. Cerd\'a based on their initial |
160 | 3792 | Matrix) will involve the increase of non-zero elements in their | 3807 | work~(R. Cuadrado and J. I. Cerd\'a ``Fully relativistic pseudopotential |
161 | 3793 | off-diagonal parts, i.e., for some $\mu\nu$ orbitals, | 3808 | formalism under an atomic orbital basis: spin-orbit splittings and |
162 | 3794 | H$^{\sigma\sigma'}_{\mu\nu}$(DM$^{\sigma\sigma'}_{\mu\nu}$) | 3809 | magnetic anisotropies'', J. Phys.: Condens. Matter \textbf{24}, 086005 (2012); |
163 | 3795 | [$\sigma,\sigma'$=$\uparrow,\downarrow$] will be $\neq$0. This is | 3810 | ``In-plane/out-of-plane disorder influence on the magnetic anisotropy of |
164 | 3811 | Fe$_{1-y}$Mn$_y$Pt-L1(0) bulk alloy'', R. Cuadrado, Kai Liu, Timothy | ||
165 | 3812 | J. Klemmer and R. W. Chantrell, Applied Physics Letters, \textbf{108}, | ||
166 | 3813 | 123102 (2016)). | ||
167 | 3814 | |||
168 | 3815 | The inclusion of the SO term in the Hamiltonian (and in the Density | ||
169 | 3816 | Matrix) causes an increase in the number of non-zero elements in their | ||
170 | 3817 | off-diagonal parts, i.e., for some $(\mu,\nu)$ pair of basis | ||
171 | 3818 | orbitals, $\mathbf H^{\sigma\sigma'}_{\mu\nu}$ ($\mathbf{DM}^{\sigma\sigma'}_{\mu\nu}$) | ||
172 | 3819 | [$\sigma,\sigma'=\uparrow,\downarrow$] will be $\neq0$. This is | ||
173 | 3796 | mainly due to the fact that the $\mathbf L\cdot\mathbf S$ operator | 3820 | mainly due to the fact that the $\mathbf L\cdot\mathbf S$ operator |
182 | 3797 | will promote the mixing between different spin-up/down components. The | 3821 | will promote the mixing between different spin-up/down components. |
183 | 3798 | terms responsible of this matrices expansion are the | 3822 | In addition, these $\mathbf H^{\sigma\sigma'}_{\mu\nu}$ (and |
184 | 3799 | exchange-correlation potential and the SO. The remaining terms such as | 3823 | $\mathbf{DM}^{\sigma\sigma'}_{\mu\nu}$) elements will be complex, in contrast |
185 | 3800 | the kinetic energy or Hartree contribution do not depend of the spin | 3824 | with typical polarized/non-polarized calculations where these |
186 | 3801 | orientations and hence will be only added to the total | 3825 | matrices are purely real. Since the spin-up and spin-down manifolds |
187 | 3802 | Hamiltonian~(and DM) to their diagonal parts. | 3826 | are essentially mixed, the solver has to deal with matrices whose |
188 | 3803 | 3827 | dimensions are twice as large as for the collinear (unmixed) spin | |
189 | 3804 | The current SO formalism enables the possibility of several types of calculations: | 3828 | problem. Due to this, we advise to take special |
190 | 3829 | attention to the memory needed to perform a spin-orbit calculation. | ||
191 | 3830 | |||
192 | 3831 | |||
193 | 3832 | Unless explicitly advised the following type of calculation can be carried out | ||
194 | 3833 | regardless of whether on-site or off-site approximation is employed: | ||
195 | 3805 | \begin{itemize} | 3834 | \begin{itemize} |
196 | 3806 | % | 3835 | % |
197 | 3807 | \item Selfconsistent calculations for gamma point as well as for | 3836 | \item Selfconsistent calculations for gamma point as well as for |
211 | 3808 | bulks~(Not yet implemented for optimizations). | 3837 | bulks. |
212 | 3809 | % | 3838 | % |
213 | 3810 | \item Magnetic Anisotropy Energy~(MAE) can be easily calculated. From | 3839 | \item Structure optimizations |
214 | 3811 | first principles calculations, MAE is obtained after subtract the | 3840 | % |
215 | 3812 | total selfconsistent energy in two different orientations, usually the | 3841 | %%% *** Incompatible... \item LDA+U calculations~(See Sect.\ref{sec:lda+u} for further info). |
216 | 3813 | total energy associated with easy axis from the hard axis. In \siesta\ | 3842 | % |
217 | 3814 | it is possible to perform several self-consistent calculations for | 3843 | \item Magnetic Anisotropy Energy~(MAE) can be easily |
218 | 3815 | different magnetization orientations using the specific block | 3844 | calculated. From first principles it is obtained after subtracting |
219 | 3816 | \fdf{DM.InitSpin} in the fdf file. In doing so one will be able to | 3845 | the total selfconsistent energy calculated for two different |
220 | 3817 | include the initial orientation angles of the magnetization for each | 3846 | magnetic orientations. In \siesta\ it is possible to perform |
221 | 3818 | atom, as well as an initial value of their net magnetic moments. | 3847 | calculations with different initial magnetic orderings |
222 | 3819 | % | 3848 | by means of the use of the block \fdf{DM.InitSpin} in the fdf |
223 | 3820 | \item By means of Mulliken analysis, after the self-consistent | 3849 | file. In doing so one will be able to include the initial |
224 | 3850 | orientation angles of the magnetization for each atom, as well as | ||
225 | 3851 | an initial value of its net magnetic moments. | ||
226 | 3852 | % | ||
227 | 3853 | \item By means of Mulliken analysis, after the selfconsistent | ||
228 | 3821 | procedure, local spin and orbital moments can be calculated by means | 3854 | procedure, local spin and orbital moments can be calculated by means |
229 | 3822 | of the flags \fdf{WriteMullikenPop} and \fdf{WriteOrbMom}. | 3855 | of the flags \fdf{WriteMullikenPop} and \fdf{WriteOrbMom}. |
230 | 3856 | % | ||
231 | 3823 | \end{itemize} | 3857 | \end{itemize} |
232 | 3824 | 3858 | ||
254 | 3825 | Note: Due to the small SO energy value contribution to the total | 3859 | Note: Due to the small SO contribution to the total energy, the level |
255 | 3826 | energy, the level of precision requiered to perform a proper fully | 3860 | of precision required to perform a proper fully relativistic |
256 | 3827 | relativistic calculation during the selfconsistent process is quite | 3861 | calculation during the selfconsistent process is quite demanding. The |
257 | 3828 | demanding. The following values must be carefully converged and | 3862 | following values must be carefully converged and checked for each |
258 | 3829 | checked for each specific system to assure that the results are | 3863 | specific system to assure that the results are accurate enough: |
259 | 3830 | accurate enough: \fdf{SCF.H!Tolerance} during the | 3864 | \fdf{SCF.H!Tolerance} during the selfconsistency (typically between |
260 | 3831 | selfconsistency~(typically <10$^{-5}$eV), \fdf{ElectronicTemperature}, | 3865 | $10^{-3}\,\mathrm{eV}$ -- $10^{-4}\,\mathrm{eV}$), |
261 | 3832 | \textbf{k}-point sampling and high values of | 3866 | \fdf{ElectronicTemperature}, \textbf{k}--point sampling and high |
262 | 3833 | \fdf{MeshCutoff}~(specifically for extended solids). In general, one | 3867 | values of \fdf{MeshCutoff}~(specifically for extended solids). In |
263 | 3834 | can say that a good calculation will have high number of k--points, | 3868 | general, one can say that a good calculation will have high number of |
264 | 3835 | low \fdf{ElectronicTemperature}, extremely small \fdf{SCF.H!Tolerance} | 3869 | \textbf{k}--points, low \fdf{ElectronicTemperature}, extremely small |
265 | 3836 | and high values of \fdf{MeshCutoff}. We encourage the user to test | 3870 | \fdf{SCF.H!Tolerance} and high values of \fdf{MeshCutoff}. We |
266 | 3837 | carefully these options for each system. An additional point to take | 3871 | encourage the user to test carefully these options for each system. An |
267 | 3838 | into account when the spin--orbit contribution is included is the | 3872 | additional point to take into account is the mixing scheme |
268 | 3839 | mixing scheme employed. You are encouraged to use \fdf{SCF.Mix} | 3873 | employed. You are encouraged to use \fdf{SCF.Mix:hamiltonian} |
269 | 3840 | \fdf*{hamiltonian} instead of the density matrix, due to the fact that | 3874 | (currently is set up by default) instead of density matrix mixing, |
270 | 3841 | the convergence speed increases considerably for the first case. In | 3875 | since it speeds up the convergence. The pseudopotentials have to be |
271 | 3842 | addition, the pseudopotentials have to be well generated and tested | 3876 | properly generated and tested for each specific system and they have |
272 | 3843 | for each specific system and they have to be generated in their fully | 3877 | to be in their fully relativistic form, together with the non-linear |
273 | 3844 | relativistic form and use the non-linear core corrections. | 3878 | core corrections. Finally it is worth to mention that the |
274 | 3845 | 3879 | selfconsistent convergence for some non-highly symmetric | |
275 | 3880 | magnetizations directions with respect to the physical symmetry axis | ||
276 | 3881 | could still be difficult. | ||
277 | 3882 | |||
278 | 3846 | \begin{fdfentry}{Spin!OrbitStrength}[real]<1.0> | 3883 | \begin{fdfentry}{Spin!OrbitStrength}[real]<1.0> |
279 | 3847 | 3884 | ||
284 | 3848 | It allows to vary the strength of the spin-orbit interaction from | 3885 | It allows to vary the strength of the |
285 | 3849 | zero to any positive value, including the physical value. This flag | 3886 | spin-orbit interaction from zero to any positive value. It can be |
286 | 3850 | is only active when \fdf{Spin} is set to \fdf*{spin-orbit}. | 3887 | used for both the on-site and off-site SOC flavors, but only for |
287 | 3851 | 3888 | debugging and testing purposes, as the only physical value is 1.0. | |
288 | 3889 | Note that this feature is implemented by modifying the SO parts of the | ||
289 | 3890 | semilocal potentials read from a \code{.psf} file. Care must be | ||
290 | 3891 | taken when re-using any \code{.ion} files produced. | ||
291 | 3892 | |||
292 | 3852 | \end{fdfentry} | 3893 | \end{fdfentry} |
293 | 3853 | 3894 | ||
294 | 3854 | \begin{fdflogicalF}{WriteOrbMom} | 3895 | \begin{fdflogicalF}{WriteOrbMom} |
295 | 3855 | 3896 | ||
297 | 3856 | If \fdftrue, a table is provided in the main output file, which | 3897 | If \fdftrue, a table is provided in the output file that |
298 | 3857 | includes an estimation of the vector orbital magnetic | 3898 | includes an estimation of the vector orbital magnetic |
303 | 3858 | moments, in units of the Bohr magneton, projected onto each orbital | 3899 | moments, in units of the Bohr magneton, projected |
304 | 3859 | and also onto each atom. The estimation for the orbital moments is | 3900 | onto each orbital and also onto each atom. The estimation for the |
305 | 3860 | based on a two-center approximation, and makes use of the Mulliken | 3901 | orbital moments is based on a two-center approximation, and makes use |
306 | 3861 | population analysis. | 3902 | of the Mulliken population analysis. |
307 | 3862 | 3903 | ||
308 | 3863 | If \fdf{MullikenInScf} is \fdftrue, this information is printed at | 3904 | If \fdf{MullikenInScf} is \fdftrue, this information is printed at |
309 | 3864 | every scf step. | 3905 | every scf step. |
310 | @@ -3866,6 +3907,7 @@ | |||
311 | 3866 | \end{fdflogicalF} | 3907 | \end{fdflogicalF} |
312 | 3867 | 3908 | ||
313 | 3868 | 3909 | ||
314 | 3910 | |||
315 | 3869 | \subsection{The self-consistent-field loop} | 3911 | \subsection{The self-consistent-field loop} |
316 | 3870 | 3912 | ||
317 | 3871 | \textbf{IMPORTANT NOTE: Convergence of the Kohn-Sham energy and forces} | 3913 | \textbf{IMPORTANT NOTE: Convergence of the Kohn-Sham energy and forces} |
318 | @@ -4988,7 +5030,7 @@ | |||
319 | 4988 | \index{reading saved data!density matrix} | 5030 | \index{reading saved data!density matrix} |
320 | 4989 | 5031 | ||
321 | 4990 | Instructs to read the density matrix stored in file | 5032 | Instructs to read the density matrix stored in file |
323 | 4991 | \sysfile{.DM} by a previous run. | 5033 | \sysfile{DM} by a previous run. |
324 | 4992 | 5034 | ||
325 | 4993 | \siesta\ will continue even if \sysfile*{DM} is not found. | 5035 | \siesta\ will continue even if \sysfile*{DM} is not found. |
326 | 4994 | 5036 | ||
327 | @@ -9014,8 +9056,8 @@ | |||
328 | 9014 | Enable an experimental timer which is based on wall time on the master | 9056 | Enable an experimental timer which is based on wall time on the master |
329 | 9015 | node and is aware of the tree-structure of the timed sections. At the | 9057 | node and is aware of the tree-structure of the timed sections. At the |
330 | 9016 | end of the program, a report is generated in the output file, and a | 9058 | end of the program, a report is generated in the output file, and a |
333 | 9017 | {\tt time.json} file in JSON format is also written. \index{JSON | 9059 | \file{time.json} file in JSON format is also written. \index{JSON |
334 | 9018 | timing report@{\bf JSON timing report}} This file can be used by | 9060 | timing report@\textbf{JSON timing report}} This file can be used by |
335 | 9019 | third-party scripts to process timing data. | 9061 | third-party scripts to process timing data. |
336 | 9020 | 9062 | ||
337 | 9021 | \note, if used with the PEXSI solver (see Sec.~\ref{SolverPEXSI}) | 9063 | \note, if used with the PEXSI solver (see Sec.~\ref{SolverPEXSI}) |
338 | @@ -10567,9 +10609,9 @@ | |||
339 | 10567 | 10609 | ||
340 | 10568 | \begin{fdflogicalF}{TDED.Saverho} | 10610 | \begin{fdflogicalF}{TDED.Saverho} |
341 | 10569 | 10611 | ||
345 | 10570 | If \fdftrue\ the instantaneous time-dependent density is saved to | 10612 | If \fdftrue\ the instantaneous time-dependent density is saved to |
346 | 10571 | \texttt{ <istep>}.\texttt{TDRho}\index{TDRho@{\bf TDRho}} after every | 10613 | \file{<istep>.TDRho} after every \fdf{TDED.Nsaverho} number of |
347 | 10572 | \fdf{TDED.Nsaverho} number of steps. | 10614 | steps. |
348 | 10573 | 10615 | ||
349 | 10574 | \end{fdflogicalF} | 10616 | \end{fdflogicalF} |
350 | 10575 | 10617 | ||
351 | 10576 | 10618 | ||
352 | === modified file 'Src/Makefile' | |||
353 | --- Src/Makefile 2018-04-24 10:24:02 +0000 | |||
354 | +++ Src/Makefile 2018-04-30 20:53:35 +0000 | |||
355 | @@ -635,10 +635,11 @@ | |||
356 | 635 | compute_dm.o: normalize_dm.o ordern.o parallel.o precision.o siesta_geom.o | 635 | compute_dm.o: normalize_dm.o ordern.o parallel.o precision.o siesta_geom.o |
357 | 636 | compute_dm.o: siesta_options.o sparse_matrices.o sys.o units.o | 636 | compute_dm.o: siesta_options.o sparse_matrices.o sys.o units.o |
358 | 637 | compute_ebs_shift.o: m_mpi_utils.o parallel.o precision.o | 637 | compute_ebs_shift.o: m_mpi_utils.o parallel.o precision.o |
363 | 638 | compute_energies.o: atomlist.o class_SpData1D.o class_SpData2D.o dhscf.o | 638 | compute_energies.o: atomlist.o class_SpData1D.o class_SpData2D.o |
364 | 639 | compute_energies.o: files.o m_dipol.o m_energies.o m_mpi_utils.o m_ntm.o | 639 | compute_energies.o: class_SpData2D.o dhscf.o files.o m_dipol.o m_energies.o |
365 | 640 | compute_energies.o: m_rhog.o m_spin.o precision.o siesta_geom.o | 640 | compute_energies.o: m_mpi_utils.o m_ntm.o m_rhog.o m_spin.o parallel.o |
366 | 641 | compute_energies.o: siesta_options.o sparse_matrices.o | 641 | compute_energies.o: precision.o siesta_geom.o siesta_options.o |
367 | 642 | compute_energies.o: sparse_matrices.o | ||
368 | 642 | compute_max_diff.o: m_mpi_utils.o precision.o | 643 | compute_max_diff.o: m_mpi_utils.o precision.o |
369 | 643 | compute_norm.o: m_mpi_utils.o m_spin.o precision.o sparse_matrices.o | 644 | compute_norm.o: m_mpi_utils.o m_spin.o precision.o sparse_matrices.o |
370 | 644 | compute_pw_matrix.o: alloc.o m_planewavematrix.o m_planewavematrixvar.o | 645 | compute_pw_matrix.o: alloc.o m_planewavematrix.o m_planewavematrixvar.o |
371 | @@ -725,15 +726,15 @@ | |||
372 | 725 | fft.o: alloc.o fft1d.o m_timer.o mesh.o parallel.o parallelsubs.o precision.o | 726 | fft.o: alloc.o fft1d.o m_timer.o mesh.o parallel.o parallelsubs.o precision.o |
373 | 726 | fft.o: sys.o | 727 | fft.o: sys.o |
374 | 727 | fft1d.o: parallel.o precision.o sys.o | 728 | fft1d.o: parallel.o precision.o sys.o |
384 | 728 | final_H_f_stress.o: alloc.o atomlist.o class_SpData2D.o compute_max_diff.o | 729 | final_H_f_stress.o: alloc.o atomlist.o class_SpData2D.o class_SpData2D.o |
385 | 729 | final_H_f_stress.o: dnaefs.o files.o grdsam.o kinefsm.o ldau.o ldau_specs.o | 730 | final_H_f_stress.o: compute_max_diff.o dnaefs.o files.o grdsam.o kinefsm.o |
386 | 730 | final_H_f_stress.o: m_dipol.o m_energies.o m_forces.o m_gamma.o m_hsx.o | 731 | final_H_f_stress.o: ldau.o ldau_specs.o m_dipol.o m_energies.o m_forces.o |
387 | 731 | final_H_f_stress.o: m_mpi_utils.o m_ncdf_siesta.o m_ntm.o m_spin.o m_steps.o | 732 | final_H_f_stress.o: m_gamma.o m_hsx.o m_mpi_utils.o m_ncdf_siesta.o m_ntm.o |
388 | 732 | final_H_f_stress.o: m_stress.o m_ts_global_vars.o m_ts_io.o m_ts_kpoints.o | 733 | final_H_f_stress.o: m_spin.o m_steps.o m_stress.o m_ts_global_vars.o m_ts_io.o |
389 | 733 | final_H_f_stress.o: m_ts_options.o metaforce.o molecularmechanics.o naefs.o | 734 | final_H_f_stress.o: m_ts_kpoints.o m_ts_options.o metaforce.o |
390 | 734 | final_H_f_stress.o: nlefsm.o overfsm.o parallel.o siesta_geom.o | 735 | final_H_f_stress.o: molecularmechanics.o naefs.o nlefsm.o overfsm.o parallel.o |
391 | 735 | final_H_f_stress.o: siesta_options.o sparse_matrices.o spinorbit.o sys.o | 736 | final_H_f_stress.o: siesta_geom.o siesta_options.o sparse_matrices.o |
392 | 736 | final_H_f_stress.o: units.o | 737 | final_H_f_stress.o: spinorbit.o sys.o units.o |
393 | 737 | find_kgrid.o: alloc.o minvec.o parallel.o precision.o units.o | 738 | find_kgrid.o: alloc.o minvec.o parallel.o precision.o units.o |
394 | 738 | fire_optim.o: alloc.o m_fire.o m_mpi_utils.o parallel.o precision.o | 739 | fire_optim.o: alloc.o m_fire.o m_mpi_utils.o parallel.o precision.o |
395 | 739 | fire_optim.o: siesta_options.o units.o | 740 | fire_optim.o: siesta_options.o units.o |
396 | @@ -932,7 +933,7 @@ | |||
397 | 932 | m_sparsity_handling.o: class_SpData2D.o class_Sparsity.o geom_helper.o | 933 | m_sparsity_handling.o: class_SpData2D.o class_Sparsity.o geom_helper.o |
398 | 933 | m_sparsity_handling.o: intrinsic_missing.o m_interpolate.o m_region.o | 934 | m_sparsity_handling.o: intrinsic_missing.o m_interpolate.o m_region.o |
399 | 934 | m_sparsity_handling.o: precision.o | 935 | m_sparsity_handling.o: precision.o |
401 | 935 | m_spin.o: alloc.o parallel.o precision.o sys.o units.o | 936 | m_spin.o: alloc.o files.o m_cite.o parallel.o precision.o sys.o units.o |
402 | 936 | m_stress.o: precision.o | 937 | m_stress.o: precision.o |
403 | 937 | m_supercell.o: atom_graph.o class_OrbitalDistribution.o class_SpData2D.o | 938 | m_supercell.o: atom_graph.o class_OrbitalDistribution.o class_SpData2D.o |
404 | 938 | m_supercell.o: intrinsic_missing.o parallel.o parallelsubs.o precision.o | 939 | m_supercell.o: intrinsic_missing.o parallel.o parallelsubs.o precision.o |
405 | @@ -1135,7 +1136,7 @@ | |||
406 | 1135 | new_matel.o: alloc.o errorf.o interpolation.o matel_registry.o parallel.o | 1136 | new_matel.o: alloc.o errorf.o interpolation.o matel_registry.o parallel.o |
407 | 1136 | new_matel.o: precision.o radfft.o spher_harm.o sys.o | 1137 | new_matel.o: precision.o radfft.o spher_harm.o sys.o |
408 | 1137 | nlefsm.o: alloc.o atm_types.o atmfuncs.o atomlist.o chemical.o mneighb.o | 1138 | nlefsm.o: alloc.o atm_types.o atmfuncs.o atomlist.o chemical.o mneighb.o |
410 | 1138 | nlefsm.o: new_matel.o parallel.o parallelsubs.o precision.o | 1139 | nlefsm.o: new_matel.o parallel.o parallelsubs.o precision.o sparse_matrices.o |
411 | 1139 | normalize_dm.o: atomlist.o m_mpi_utils.o m_spin.o parallel.o precision.o | 1140 | normalize_dm.o: atomlist.o m_mpi_utils.o m_spin.o parallel.o precision.o |
412 | 1140 | normalize_dm.o: siesta_options.o sparse_matrices.o sys.o | 1141 | normalize_dm.o: siesta_options.o sparse_matrices.o sys.o |
413 | 1141 | obc.o: alloc.o precision.o | 1142 | obc.o: alloc.o precision.o |
414 | @@ -1227,15 +1228,17 @@ | |||
415 | 1227 | setatomnodes.o: alloc.o parallel.o precision.o spatial.o sys.o | 1228 | setatomnodes.o: alloc.o parallel.o precision.o spatial.o sys.o |
416 | 1228 | setspatial.o: alloc.o parallel.o precision.o spatial.o | 1229 | setspatial.o: alloc.o parallel.o precision.o spatial.o |
417 | 1229 | setup_H0.o: alloc.o atmfuncs.o atomlist.o class_SpData1D.o class_SpData2D.o | 1230 | setup_H0.o: alloc.o atmfuncs.o atomlist.o class_SpData1D.o class_SpData2D.o |
421 | 1230 | setup_H0.o: dhscf.o dnaefs.o kinefsm.o m_energies.o m_mpi_utils.o m_ntm.o | 1231 | setup_H0.o: class_SpData2D.o dhscf.o dnaefs.o kinefsm.o m_energies.o |
422 | 1231 | setup_H0.o: m_spin.o metaforce.o molecularmechanics.o naefs.o nlefsm.o | 1232 | setup_H0.o: m_mpi_utils.o m_ntm.o m_spin.o metaforce.o molecularmechanics.o |
423 | 1232 | setup_H0.o: siesta_geom.o siesta_options.o sparse_matrices.o spinorbit.o | 1233 | setup_H0.o: naefs.o nlefsm.o siesta_geom.o siesta_options.o sparse_matrices.o |
424 | 1234 | setup_H0.o: spinorbit.o | ||
425 | 1233 | setup_hamiltonian.o: alloc.o atmfuncs.o atomlist.o class_SpData1D.o | 1235 | setup_hamiltonian.o: alloc.o atmfuncs.o atomlist.o class_SpData1D.o |
431 | 1234 | setup_hamiltonian.o: class_SpData2D.o dhscf.o files.o ldau.o ldau_specs.o | 1236 | setup_hamiltonian.o: class_SpData2D.o class_SpData2D.o dhscf.o files.o ldau.o |
432 | 1235 | setup_hamiltonian.o: m_dipol.o m_energies.o m_gamma.o m_hsx.o m_mpi_utils.o | 1237 | setup_hamiltonian.o: ldau_specs.o m_dipol.o m_energies.o m_gamma.o m_hsx.o |
433 | 1236 | setup_hamiltonian.o: m_ntm.o m_partial_charges.o m_rhog.o m_spin.o m_steps.o | 1238 | setup_hamiltonian.o: m_mpi_utils.o m_ntm.o m_partial_charges.o m_rhog.o |
434 | 1237 | setup_hamiltonian.o: m_stress.o metaforce.o molecularmechanics.o parallel.o | 1239 | setup_hamiltonian.o: m_spin.o m_steps.o m_stress.o metaforce.o |
435 | 1238 | setup_hamiltonian.o: siesta_geom.o siesta_options.o sparse_matrices.o sys.o | 1240 | setup_hamiltonian.o: molecularmechanics.o parallel.o siesta_geom.o |
436 | 1241 | setup_hamiltonian.o: siesta_options.o sparse_matrices.o sys.o | ||
437 | 1239 | setup_ordern_indexes.o: alloc.o domain_decom.o parallel.o spatial.o | 1242 | setup_ordern_indexes.o: alloc.o domain_decom.o parallel.o spatial.o |
438 | 1240 | shaper.o: atmfuncs.o mneighb.o precision.o | 1243 | shaper.o: atmfuncs.o mneighb.o precision.o |
439 | 1241 | show_distribution.o: atomlist.o parallel.o parallelsubs.o siesta_geom.o sys.o | 1244 | show_distribution.o: atomlist.o parallel.o parallelsubs.o siesta_geom.o sys.o |
440 | @@ -1305,26 +1308,27 @@ | |||
441 | 1305 | siesta_tddft.o: wavefunctions.o | 1308 | siesta_tddft.o: wavefunctions.o |
442 | 1306 | sparse_matrices.o: alloc.o class_Fstack_Pair_Geometry_SpData2D.o | 1309 | sparse_matrices.o: alloc.o class_Fstack_Pair_Geometry_SpData2D.o |
443 | 1307 | sparse_matrices.o: class_OrbitalDistribution.o class_SpData1D.o | 1310 | sparse_matrices.o: class_OrbitalDistribution.o class_SpData1D.o |
445 | 1308 | sparse_matrices.o: class_SpData2D.o class_Sparsity.o precision.o | 1311 | sparse_matrices.o: class_SpData2D.o class_SpData2D.o class_Sparsity.o |
446 | 1312 | sparse_matrices.o: precision.o | ||
447 | 1309 | spatial.o: precision.o | 1313 | spatial.o: precision.o |
448 | 1310 | spher_harm.o: alloc.o precision.o sys.o | 1314 | spher_harm.o: alloc.o precision.o sys.o |
449 | 1311 | spinorbit.o: atm_types.o atmfuncs.o atmparams.o basis_types.o m_mpi_utils.o | 1315 | spinorbit.o: atm_types.o atmfuncs.o atmparams.o basis_types.o m_mpi_utils.o |
451 | 1312 | spinorbit.o: parallel.o parallelsubs.o precision.o pseudopotential.o sys.o | 1316 | spinorbit.o: parallel.o parallelsubs.o precision.o pseudopotential.o |
452 | 1313 | state_analysis.o: atomlist.o born_charge.o flook_siesta.o m_energies.o | 1317 | state_analysis.o: atomlist.o born_charge.o flook_siesta.o m_energies.o |
453 | 1314 | state_analysis.o: m_fixed.o m_forces.o m_ntm.o m_spin.o m_stress.o | 1318 | state_analysis.o: m_fixed.o m_forces.o m_ntm.o m_spin.o m_stress.o |
454 | 1315 | state_analysis.o: m_wallclock.o parallel.o remove_intramol_pressure.o | 1319 | state_analysis.o: m_wallclock.o parallel.o remove_intramol_pressure.o |
455 | 1316 | state_analysis.o: siesta_cml.o siesta_geom.o siesta_options.o sparse_matrices.o | 1320 | state_analysis.o: siesta_cml.o siesta_geom.o siesta_options.o sparse_matrices.o |
456 | 1317 | state_analysis.o: units.o write_subs.o zmatrix.o | 1321 | state_analysis.o: units.o write_subs.o zmatrix.o |
457 | 1318 | state_init.o: alloc.o atomlist.o class_Data2D.o class_SpData1D.o | 1322 | state_init.o: alloc.o atomlist.o class_Data2D.o class_SpData1D.o |
467 | 1319 | state_init.o: class_SpData2D.o class_Sparsity.o create_Sparsity_SC.o | 1323 | state_init.o: class_SpData2D.o class_SpData2D.o class_Sparsity.o |
468 | 1320 | state_init.o: domain_decom.o files.o hsparse.o iodm_netcdf.o iodmhs_netcdf.o | 1324 | state_init.o: create_Sparsity_SC.o domain_decom.o files.o hsparse.o |
469 | 1321 | state_init.o: iotdxv.o ioxv.o kpoint_grid.o ldau_specs.o m_chess.o m_energies.o | 1325 | state_init.o: iodm_netcdf.o iodmhs_netcdf.o iotdxv.o ioxv.o kpoint_grid.o |
470 | 1322 | state_init.o: m_eo.o m_gamma.o m_mixing.o m_mixing_scf.o m_mpi_utils.o | 1326 | state_init.o: ldau_specs.o m_chess.o m_energies.o m_eo.o m_gamma.o m_mixing.o |
471 | 1323 | state_init.o: m_new_dm.o m_os.o m_pivot_methods.o m_rmaxh.o m_sparse.o | 1327 | state_init.o: m_mixing_scf.o m_mpi_utils.o m_new_dm.o m_os.o m_pivot_methods.o |
472 | 1324 | state_init.o: m_sparsity_handling.o m_spin.o m_steps.o m_supercell.o | 1328 | state_init.o: m_rmaxh.o m_sparse.o m_sparsity_handling.o m_spin.o m_steps.o |
473 | 1325 | state_init.o: m_test_io.o m_ts_charge.o m_ts_electype.o m_ts_global_vars.o | 1329 | state_init.o: m_supercell.o m_test_io.o m_ts_charge.o m_ts_electype.o |
474 | 1326 | state_init.o: m_ts_io.o m_ts_kpoints.o m_ts_options.o m_ts_sparse.o | 1330 | state_init.o: m_ts_global_vars.o m_ts_io.o m_ts_kpoints.o m_ts_options.o |
475 | 1327 | state_init.o: m_ts_tri_init.o normalize_dm.o overlap.o parallel.o | 1331 | state_init.o: m_ts_sparse.o m_ts_tri_init.o normalize_dm.o overlap.o parallel.o |
476 | 1328 | state_init.o: proximity_check.o siesta_cml.o siesta_dicts.o siesta_geom.o | 1332 | state_init.o: proximity_check.o siesta_cml.o siesta_dicts.o siesta_geom.o |
477 | 1329 | state_init.o: siesta_options.o sparse_matrices.o sys.o units.o write_subs.o | 1333 | state_init.o: siesta_options.o sparse_matrices.o sys.o units.o write_subs.o |
478 | 1330 | state_init.o: zmatrix.o | 1334 | state_init.o: zmatrix.o |
479 | 1331 | 1335 | ||
480 | === modified file 'Src/atm_types.f' | |||
481 | --- Src/atm_types.f 2018-04-07 19:24:04 +0000 | |||
482 | +++ Src/atm_types.f 2018-04-30 20:53:35 +0000 | |||
483 | @@ -23,12 +23,12 @@ | |||
484 | 23 | integer, parameter, public :: maxnorbs = 100 | 23 | integer, parameter, public :: maxnorbs = 100 |
485 | 24 | ! Maximum number of nlm orbitals | 24 | ! Maximum number of nlm orbitals |
486 | 25 | ! | 25 | ! |
488 | 26 | integer, parameter, public :: maxn_pjnl = 10 | 26 | integer, parameter, public :: maxn_pjnl = 20 |
489 | 27 | ! Maximum number of projectors (not counting different "m" copies) | 27 | ! Maximum number of projectors (not counting different "m" copies) |
490 | 28 | integer, parameter, public :: maxn_orbnl = 200 | 28 | integer, parameter, public :: maxn_orbnl = 200 |
491 | 29 | ! Maximum number of nl orbitals (not counting different "m" copies) | 29 | ! Maximum number of nl orbitals (not counting different "m" copies) |
492 | 30 | ! Now very large to accommodate filteret basis sets | 30 | ! Now very large to accommodate filteret basis sets |
494 | 31 | integer, parameter, public :: maxnprojs = 50 | 31 | integer, parameter, public :: maxnprojs = 100 |
495 | 32 | ! Maximum number of nlm projectors | 32 | ! Maximum number of nlm projectors |
496 | 33 | ! | 33 | ! |
497 | 34 | 34 | ||
498 | @@ -66,9 +66,11 @@ | |||
499 | 66 | ! 1 to the total number of projectors at that l. | 66 | ! 1 to the total number of projectors at that l. |
500 | 67 | ! | 67 | ! |
501 | 68 | ! | 68 | ! |
502 | 69 | logical :: lj_projs = .false. | ||
503 | 69 | integer :: n_pjnl=0 ! num of "nl" projs | 70 | integer :: n_pjnl=0 ! num of "nl" projs |
504 | 70 | integer :: lmax_projs=0 ! l cutoff for projs | 71 | integer :: lmax_projs=0 ! l cutoff for projs |
505 | 71 | integer, dimension(maxn_pjnl) :: pjnl_l ! l of each nl proj | 72 | integer, dimension(maxn_pjnl) :: pjnl_l ! l of each nl proj |
506 | 73 | real(dp), dimension(maxn_pjnl) :: pjnl_j ! j of each nl proj | ||
507 | 72 | integer, dimension(maxn_pjnl) :: pjnl_n ! n of each nl proj | 74 | integer, dimension(maxn_pjnl) :: pjnl_n ! n of each nl proj |
508 | 73 | real(dp), dimension(maxn_pjnl) | 75 | real(dp), dimension(maxn_pjnl) |
509 | 74 | $ :: pjnl_ekb ! energy of | 76 | $ :: pjnl_ekb ! energy of |
510 | @@ -92,9 +94,10 @@ | |||
511 | 92 | integer, dimension(maxnprojs) :: pj_index | 94 | integer, dimension(maxnprojs) :: pj_index |
512 | 93 | integer, dimension(maxnprojs) :: pj_n | 95 | integer, dimension(maxnprojs) :: pj_n |
513 | 94 | integer, dimension(maxnprojs) :: pj_l | 96 | integer, dimension(maxnprojs) :: pj_l |
514 | 97 | real(dp), dimension(maxnprojs) :: pj_j | ||
515 | 95 | integer, dimension(maxnprojs) :: pj_m | 98 | integer, dimension(maxnprojs) :: pj_m |
516 | 96 | integer, dimension(maxnprojs) :: pj_gindex | 99 | integer, dimension(maxnprojs) :: pj_gindex |
518 | 97 | ! | 100 | !---------------------------- |
519 | 98 | ! LDA+U Projectors | 101 | ! LDA+U Projectors |
520 | 99 | ! Here we follow the scheme used for the KB projectors | 102 | ! Here we follow the scheme used for the KB projectors |
521 | 100 | ! | 103 | ! |
522 | 101 | 104 | ||
523 | === modified file 'Src/atmfuncs.f' | |||
524 | --- Src/atmfuncs.f 2016-04-29 07:31:13 +0000 | |||
525 | +++ Src/atmfuncs.f 2018-04-30 20:53:35 +0000 | |||
526 | @@ -20,6 +20,8 @@ | |||
527 | 20 | use atm_types | 20 | use atm_types |
528 | 21 | use radial, only: rad_get, rad_func | 21 | use radial, only: rad_get, rad_func |
529 | 22 | use spher_harm, only: rlylm | 22 | use spher_harm, only: rlylm |
530 | 23 | |||
531 | 24 | |||
532 | 23 | 25 | ||
533 | 24 | implicit none | 26 | implicit none |
534 | 25 | ! | 27 | ! |
535 | 26 | 28 | ||
536 | === modified file 'Src/atmparams.f' | |||
537 | --- Src/atmparams.f 2016-01-25 16:00:16 +0000 | |||
538 | +++ Src/atmparams.f 2018-04-30 20:53:35 +0000 | |||
539 | @@ -21,7 +21,11 @@ | |||
540 | 21 | C INTEGER NKBMX : Maximum number of Kleinman-Bylander projectors | 21 | C INTEGER NKBMX : Maximum number of Kleinman-Bylander projectors |
541 | 22 | C for each angular momentum | 22 | C for each angular momentum |
542 | 23 | 23 | ||
544 | 24 | integer, parameter, public :: nkbmx = 2 | 24 | C For the off-site SO calculation plus semicore states |
545 | 25 | C there will be at least 4 KBs for each l angular momentum | ||
546 | 26 | C (for each l shell we have J = l +/- 1/2 ) | ||
547 | 27 | integer, parameter, public :: nkbmx = 4 | ||
548 | 28 | |||
549 | 25 | 29 | ||
550 | 26 | C INTEGER NSMX : Maximum number of semicore shells for each angular | 30 | C INTEGER NSMX : Maximum number of semicore shells for each angular |
551 | 27 | C momentum present in the atom ( for normal atom nsmx=0) | 31 | C momentum present in the atom ( for normal atom nsmx=0) |
552 | 28 | 32 | ||
553 | === modified file 'Src/atom.F' | |||
554 | --- Src/atom.F 2018-04-26 13:16:13 +0000 | |||
555 | +++ Src/atom.F 2018-04-30 20:53:35 +0000 | |||
556 | @@ -97,7 +97,7 @@ | |||
557 | 97 | . rco,lambda_in,atm_label,npolorb,semic, | 97 | . rco,lambda_in,atm_label,npolorb,semic, |
558 | 98 | . nsemic,cnfigmx,charge_in,smass,basistype, | 98 | . nsemic,cnfigmx,charge_in,smass,basistype, |
559 | 99 | . ISIN,RINN,VCTE,qcoe,qyuk,qwid, | 99 | . ISIN,RINN,VCTE,qcoe,qyuk,qwid, |
561 | 100 | . split_norm,filtercut_in,basp, spp) | 100 | . split_norm,filtercut_in,basp,spp,lj_projs) |
562 | 101 | 101 | ||
563 | 102 | use atm_types, only: species_info | 102 | use atm_types, only: species_info |
564 | 103 | 103 | ||
565 | @@ -105,6 +105,7 @@ | |||
566 | 105 | 105 | ||
567 | 106 | type(basis_def_t), pointer :: basp | 106 | type(basis_def_t), pointer :: basp |
568 | 107 | type(species_info), intent(inout) :: spp | 107 | type(species_info), intent(inout) :: spp |
569 | 108 | logical, intent(in) :: lj_projs | ||
570 | 108 | 109 | ||
571 | 109 | integer, intent(in) :: izin | 110 | integer, intent(in) :: izin |
572 | 110 | ! Atomic number (if IZ is negative it will be regarded as a set of | 111 | ! Atomic number (if IZ is negative it will be regarded as a set of |
573 | @@ -242,6 +243,7 @@ | |||
574 | 242 | real(dp) | 243 | real(dp) |
575 | 243 | . rofi(nrmax), drdi(nrmax), s(nrmax), | 244 | . rofi(nrmax), drdi(nrmax), s(nrmax), |
576 | 244 | . vps(nrmax,0:lmaxd), rphi(nrmax,0:lmaxd,nsemx), | 245 | . vps(nrmax,0:lmaxd), rphi(nrmax,0:lmaxd,nsemx), |
577 | 246 | . vps_u(nrmax,0:lmaxd), | ||
578 | 245 | . vlocal(nrmax), vxc(nrmax), ve(nrmax), | 247 | . vlocal(nrmax), vxc(nrmax), ve(nrmax), |
579 | 246 | . rho(nrmax), chcore(nrmax), rho_PAO(nrmax), auxrho(nrmax), | 248 | . rho(nrmax), chcore(nrmax), rho_PAO(nrmax), auxrho(nrmax), |
580 | 247 | . vePAO(nrmax), qPAO(0:lmaxd,nsemx), chlocal(nrmax), | 249 | . vePAO(nrmax), qPAO(0:lmaxd,nsemx), chlocal(nrmax), |
581 | @@ -329,7 +331,7 @@ | |||
582 | 329 | ! | 331 | ! |
583 | 330 | ! Reading pseudopotentials | 332 | ! Reading pseudopotentials |
584 | 331 | ! | 333 | ! |
586 | 332 | call read_vps(lmxo, lmxkb, nrval,a,b,rofi,drdi,s,vps, | 334 | call read_vps(lmxo, lmxkb, nrval,a,b,rofi,drdi,s,vps,vps_u, |
587 | 333 | . rho, chcore, zval, chgvps, nicore, irel, icorr,basp) | 335 | . rho, chcore, zval, chgvps, nicore, irel, icorr,basp) |
588 | 334 | 336 | ||
589 | 335 | do ir=1,nrval | 337 | do ir=1,nrval |
590 | @@ -569,8 +571,8 @@ | |||
591 | 569 | ! Calculation of the Kleinman-Bylander projector functions | 571 | ! Calculation of the Kleinman-Bylander projector functions |
592 | 570 | ! | 572 | ! |
593 | 571 | call KBgen(is, a,b,rofi,drdi,s, | 573 | call KBgen(is, a,b,rofi,drdi,s, |
596 | 572 | . vps, vlocal, ve, nrval, Zval, lmxkb, | 574 | . vps, vps_u, vlocal, ve, nrval, Zval, lmxkb, |
597 | 573 | . nkbl, erefkb, nkb, spp) | 575 | . nkbl, erefkb, nkb, spp, lj_projs) |
598 | 574 | 576 | ||
599 | 575 | elseif(flting.lt.0.0d0) then | 577 | elseif(flting.lt.0.0d0) then |
600 | 576 | ! | 578 | ! |
601 | @@ -1856,7 +1858,7 @@ | |||
602 | 1856 | 1858 | ||
603 | 1857 | 1859 | ||
604 | 1858 | subroutine KBproj(ikb,rofi,drdi,vps,vlocal,nrwf,l,rphi, | 1860 | subroutine KBproj(ikb,rofi,drdi,vps,vlocal,nrwf,l,rphi, |
606 | 1859 | . dkbcos,ekb,proj,nrc) | 1861 | . dkbcos,ekb,proj,nrc,rphi2,vii) |
607 | 1860 | C | 1862 | C |
608 | 1861 | C This routine calculates the Kleinman-Bylander projector | 1863 | C This routine calculates the Kleinman-Bylander projector |
609 | 1862 | C with angular momentum l. | 1864 | C with angular momentum l. |
610 | @@ -1872,6 +1874,7 @@ | |||
611 | 1872 | . rphi(*), vlocal(*) | 1874 | . rphi(*), vlocal(*) |
612 | 1873 | real(dp), intent(out) :: proj(*), dkbcos, ekb | 1875 | real(dp), intent(out) :: proj(*), dkbcos, ekb |
613 | 1874 | integer, intent(out) :: nrc | 1876 | integer, intent(out) :: nrc |
614 | 1877 | real(dp), intent(inout) :: rphi2(:,:), vii(:) | ||
615 | 1875 | C | 1878 | C |
616 | 1876 | C Internal variables | 1879 | C Internal variables |
617 | 1877 | C | 1880 | C |
618 | @@ -1880,8 +1883,6 @@ | |||
619 | 1880 | . dnrm, vl, vphi, avgv, r, phi, dknrm, | 1883 | . dnrm, vl, vphi, avgv, r, phi, dknrm, |
620 | 1881 | . dincv, rc, sum, vij(nkbmx) | 1884 | . dincv, rc, sum, vij(nkbmx) |
621 | 1882 | 1885 | ||
622 | 1883 | real(dp), save :: rphi2(nrmax,nkbmx), vii(nkbmx) | ||
623 | 1884 | |||
624 | 1885 | integer ir, jkb | 1886 | integer ir, jkb |
625 | 1886 | 1887 | ||
626 | 1887 | real(dp), parameter :: eps=1.0d-6 | 1888 | real(dp), parameter :: eps=1.0d-6 |
627 | @@ -2702,7 +2703,7 @@ | |||
628 | 2702 | 2703 | ||
629 | 2703 | ! | 2704 | ! |
630 | 2704 | subroutine read_vps(lmxo, lmxkb, | 2705 | subroutine read_vps(lmxo, lmxkb, |
632 | 2705 | . nrval,a,b,rofi,drdi,s,vps, | 2706 | . nrval,a,b,rofi,drdi,s,vps, vps_u, |
633 | 2706 | . rho, chcore, zval, chgvps, | 2707 | . rho, chcore, zval, chgvps, |
634 | 2707 | . nicore, irel, icorr,basp) | 2708 | . nicore, irel, icorr,basp) |
635 | 2708 | 2709 | ||
636 | @@ -2718,14 +2719,14 @@ | |||
637 | 2718 | 2719 | ||
638 | 2719 | real(dp) | 2720 | real(dp) |
639 | 2720 | . rofi(nrmax), drdi(nrmax), s(nrmax), vps(nrmax,0:lmaxd), | 2721 | . rofi(nrmax), drdi(nrmax), s(nrmax), vps(nrmax,0:lmaxd), |
640 | 2722 | . vps_u(nrmax,0:lmaxd), | ||
641 | 2721 | . rho(nrmax), chcore(nrmax) | 2723 | . rho(nrmax), chcore(nrmax) |
642 | 2722 | 2724 | ||
643 | 2723 | real(dp) | 2725 | real(dp) |
644 | 2724 | . a, b, zval | 2726 | . a, b, zval |
645 | 2725 | |||
646 | 2726 | integer nrval, lmxo, lmxkb | 2727 | integer nrval, lmxo, lmxkb |
647 | 2727 | |||
648 | 2728 | character nicore*4, irel*3, icorr*2 | 2728 | character nicore*4, irel*3, icorr*2 |
649 | 2729 | integer :: nup_end | ||
650 | 2729 | C | 2730 | C |
651 | 2730 | C Internal variables | 2731 | C Internal variables |
652 | 2731 | C | 2732 | C |
653 | @@ -2736,12 +2737,14 @@ | |||
654 | 2736 | . ea, rpb, chgvps | 2737 | . ea, rpb, chgvps |
655 | 2737 | 2738 | ||
656 | 2738 | integer | 2739 | integer |
658 | 2739 | . nr, nodd, lmax, linput, npotd, npotu, ndown, l, ir, i | 2740 | . nr, nodd, lmax, linput, npotd, npotu, ndown, l, ir, i, nup |
659 | 2740 | 2741 | ||
660 | 2741 | character method(6)*10,text*70 | 2742 | character method(6)*10,text*70 |
661 | 2742 | 2743 | ||
662 | 2743 | type(pseudopotential_t), pointer :: vp | 2744 | type(pseudopotential_t), pointer :: vp |
663 | 2744 | 2745 | ||
664 | 2746 | real(dp) :: so_strength | ||
665 | 2747 | |||
666 | 2745 | vp => basp%pseudopotential | 2748 | vp => basp%pseudopotential |
667 | 2746 | 2749 | ||
668 | 2747 | icorr = vp%icorr | 2750 | icorr = vp%icorr |
669 | @@ -2792,12 +2795,8 @@ | |||
670 | 2792 | write(6,'(7a)') | 2795 | write(6,'(7a)') |
671 | 2793 | . 'read_vps: ',method(1),(method(i),i=3,6) | 2796 | . 'read_vps: ',method(1),(method(i),i=3,6) |
672 | 2794 | 2797 | ||
677 | 2795 | C We are going to find the charge configuration | 2798 | !Total charge density used for the pseudopotential generation |
674 | 2796 | C used for the pseudopotential generation using the information given in | ||
675 | 2797 | C the 'text' variable. | ||
676 | 2798 | |||
678 | 2799 | chgvps = vp%gen_zval | 2799 | chgvps = vp%gen_zval |
679 | 2800 | |||
680 | 2801 | write(6,'(a,f10.5)') 'Total valence charge: ', chgvps | 2800 | write(6,'(a,f10.5)') 'Total valence charge: ', chgvps |
681 | 2802 | 2801 | ||
682 | 2803 | if (nicore.ne.'nc ') then | 2802 | if (nicore.ne.'nc ') then |
683 | @@ -2842,9 +2841,9 @@ | |||
684 | 2842 | enddo | 2841 | enddo |
685 | 2843 | 2842 | ||
686 | 2844 | 2843 | ||
688 | 2845 | ! Ionic pseudopotentials (Only 'down' used) | 2844 | ! Ionic pseudopotentials (down and up) |
689 | 2846 | 2845 | ||
691 | 2847 | do 20 ndown=1,lmax+1 | 2846 | do ndown=1,lmax+1 |
692 | 2848 | l = vp%ldown(ndown) | 2847 | l = vp%ldown(ndown) |
693 | 2849 | if (l.ne.ndown-1) then | 2848 | if (l.ne.ndown-1) then |
694 | 2850 | write(6,'(a)') | 2849 | write(6,'(a)') |
695 | @@ -2858,40 +2857,51 @@ | |||
696 | 2858 | enddo | 2857 | enddo |
697 | 2859 | vps(1,l) = vps(2,l) ! AG | 2858 | vps(1,l) = vps(2,l) ! AG |
698 | 2860 | 2859 | ||
701 | 2861 | 20 continue | 2860 | enddo |
702 | 2862 | 2861 | ||
703 | 2862 | vps_u = 0.0_dp | ||
704 | 2863 | ! For backward compatibility with original OSSO branch, | ||
705 | 2864 | ! put 'keep-npotu-bug T' in fdf file | ||
706 | 2865 | ! To be removed altogether for releases | ||
707 | 2866 | if (fdf_get('keep-npotu-bug',.false.)) then | ||
708 | 2867 | nup_end = min(lmax,npotu-1) | ||
709 | 2868 | write(6,'(a)') 'atom: *** Buggy code in highest-l ' // | ||
710 | 2869 | $ 'SO component setup enabled ***' | ||
711 | 2870 | else | ||
712 | 2871 | nup_end = npotu | ||
713 | 2872 | endif | ||
714 | 2873 | |||
715 | 2874 | ! Allow an overall factor for the SO part (for debugging only!) | ||
716 | 2875 | ! Note that (notably for the lj-based SO implementation) this | ||
717 | 2876 | ! trick is based on the availability of a semilocal pseudo. Care | ||
718 | 2877 | ! should also be taken with the onward use of any .ion files | ||
719 | 2878 | ! produced. | ||
720 | 2879 | |||
721 | 2880 | so_strength = fdf_get('spin-orbit-strength', 1.0_dp) | ||
722 | 2881 | if (so_strength /= 1.0_dp) then | ||
723 | 2882 | write(6,'(a,f10.6)') 'atom: *** SO enhancement factor: ', | ||
724 | 2883 | $ so_strength | ||
725 | 2884 | endif | ||
726 | 2885 | |||
727 | 2886 | do nup=1,nup_end | ||
728 | 2887 | l = vp%lup(nup) | ||
729 | 2888 | vp%vup(nup,1:nrval) = so_strength * vp%vup(nup,1:nrval) | ||
730 | 2889 | vps_u(1:nrval,l) = vp%vup(nup,1:nrval) | ||
731 | 2890 | do ir=2,nrval | ||
732 | 2891 | vps_u(ir,l)=vps_u(ir,l)/rofi(ir) | ||
733 | 2892 | enddo | ||
734 | 2893 | vps_u(1,l) = vps_u(2,l) | ||
735 | 2894 | enddo | ||
736 | 2863 | 2895 | ||
737 | 2864 | ! Core and valence charge density | 2896 | ! Core and valence charge density |
738 | 2865 | 2897 | ||
739 | 2866 | chcore(1:nrval) = vp%chcore(1:nrval) | 2898 | chcore(1:nrval) = vp%chcore(1:nrval) |
740 | 2867 | rho(1:nrval) = vp%chval(1:nrval) | 2899 | rho(1:nrval) = vp%chval(1:nrval) |
765 | 2868 | C | 2900 | |
742 | 2869 | C Obtain an ionic-pseudopotential if core correction for Hartree | ||
743 | 2870 | C potential | ||
744 | 2871 | ! | ||
745 | 2872 | ! AG: OBSOLETE, as the program will stop in this case. | ||
746 | 2873 | |||
747 | 2874 | if ((nicore.eq.'pche').or.(nicore.eq.'fche')) then | ||
748 | 2875 | call vhrtre(chcore,ve,rofi,drdi,s,nrval,a) | ||
749 | 2876 | do l=0,lmax | ||
750 | 2877 | do ir=2,nrval | ||
751 | 2878 | vps(ir,l)=vps(ir,l)+ve(ir) | ||
752 | 2879 | enddo | ||
753 | 2880 | vps(1,l) = vps(2,l) ! AG | ||
754 | 2881 | enddo | ||
755 | 2882 | endif | ||
756 | 2883 | |||
757 | 2884 | return | ||
758 | 2885 | |||
759 | 2886 | 5000 continue | ||
760 | 2887 | write(6,*) | ||
761 | 2888 | . 'ERROR: You are using an old pseudopotential file.', | ||
762 | 2889 | . ' Siesta needs a newer version.' | ||
763 | 2890 | call die | ||
764 | 2891 | |||
766 | 2892 | end subroutine read_vps | 2901 | end subroutine read_vps |
767 | 2893 | ! | 2902 | ! |
769 | 2894 | subroutine comKB(is,a,b,rofi,proj,l,ikb,rc,ekb,nrc,spp) | 2903 | subroutine comKB(is,a,b,rofi,proj,l,lj_projs,jk, |
770 | 2904 | $ ikb,rc,ekb,nrc,spp) | ||
771 | 2895 | C | 2905 | C |
772 | 2896 | C Creates the common block with all the information about the | 2906 | C Creates the common block with all the information about the |
773 | 2897 | C Kleinman-Bylander projectors. | 2907 | C Kleinman-Bylander projectors. |
774 | @@ -2906,6 +2916,8 @@ | |||
775 | 2906 | integer, intent(in) :: l, nrc,is, ikb | 2916 | integer, intent(in) :: l, nrc,is, ikb |
776 | 2907 | real(dp), intent(in) :: rc, ekb, proj(nrmax), a, b, | 2917 | real(dp), intent(in) :: rc, ekb, proj(nrmax), a, b, |
777 | 2908 | . rofi(nrmax) | 2918 | . rofi(nrmax) |
778 | 2919 | logical, intent(in) :: lj_projs | ||
779 | 2920 | integer, intent(in) :: jk | ||
780 | 2909 | type(species_info), intent(inout) :: spp | 2921 | type(species_info), intent(inout) :: spp |
781 | 2910 | 2922 | ||
782 | 2911 | character(len=40) filename | 2923 | character(len=40) filename |
783 | @@ -2932,10 +2944,17 @@ | |||
784 | 2932 | 2944 | ||
785 | 2933 | spp%pjnl_n(n) = ikb | 2945 | spp%pjnl_n(n) = ikb |
786 | 2934 | spp%pjnl_l(n) = l | 2946 | spp%pjnl_l(n) = l |
787 | 2947 | if (lj_projs) then | ||
788 | 2948 | spp%pjnl_j(n) = l + (2*jk-3)*0.5_dp ! l -/+ 1/2 | ||
789 | 2949 | if (l == 0 ) spp%pjnl_j(n) = 0.5_dp ! special case: only jk=1 | ||
790 | 2950 | else | ||
791 | 2951 | spp%pjnl_j(n) = 0.0_dp | ||
792 | 2952 | endif | ||
793 | 2935 | do m = -l, l | 2953 | do m = -l, l |
794 | 2936 | ntot = ntot + 1 | 2954 | ntot = ntot + 1 |
795 | 2937 | spp%pj_index(ntot) = n | 2955 | spp%pj_index(ntot) = n |
796 | 2938 | spp%pj_l(ntot) = l | 2956 | spp%pj_l(ntot) = l |
797 | 2957 | spp%pj_j(ntot) = spp%pjnl_j(n) | ||
798 | 2939 | spp%pj_m(ntot) = m | 2958 | spp%pj_m(ntot) = m |
799 | 2940 | enddo | 2959 | enddo |
800 | 2941 | spp%nprojs = ntot | 2960 | spp%nprojs = ntot |
801 | @@ -2983,8 +3002,8 @@ | |||
802 | 2983 | end subroutine comkb | 3002 | end subroutine comkb |
803 | 2984 | ! | 3003 | ! |
804 | 2985 | subroutine KBgen(is, a,b,rofi,drdi,s, | 3004 | subroutine KBgen(is, a,b,rofi,drdi,s, |
807 | 2986 | . vps, vlocal, ve, nrval, Zval, lmxkb, | 3005 | . vps, vps_u, vlocal, ve, nrval, Zval, lmxkb, |
808 | 2987 | . nkbl, erefkb, nkb, spp) | 3006 | . nkbl, erefkb, nkb, spp, lj_projs) |
809 | 2988 | 3007 | ||
810 | 2989 | use basis_specs, only: restricted_grid | 3008 | use basis_specs, only: restricted_grid |
811 | 2990 | use atom_options, only: new_kb_reference_orbitals | 3009 | use atom_options, only: new_kb_reference_orbitals |
812 | @@ -3002,28 +3021,34 @@ | |||
813 | 3002 | 3021 | ||
814 | 3003 | implicit none | 3022 | implicit none |
815 | 3004 | 3023 | ||
818 | 3005 | real(dp) | 3024 | real(dp), intent(in) :: |
819 | 3006 | . a, b, rofi(nrmax), vps(nrmax,0:lmaxd), | 3025 | . a, b, rofi(nrmax), vps(nrmax,0:lmaxd), vps_u(nrmax,0:lmaxd), |
820 | 3007 | . drdi(nrmax), s(nrmax), ve(nrmax),vlocal(nrmax), | 3026 | . drdi(nrmax), s(nrmax), ve(nrmax),vlocal(nrmax), |
821 | 3008 | . Zval, erefkb(nkbmx,0:lmaxd) | 3027 | . Zval, erefkb(nkbmx,0:lmaxd) |
822 | 3009 | 3028 | ||
824 | 3010 | integer | 3029 | integer, intent(in) :: |
825 | 3011 | . nrval, lmxkb, nkb, is, nkbl(0:lmaxd) | 3030 | . nrval, lmxkb, nkb, is, nkbl(0:lmaxd) |
826 | 3012 | 3031 | ||
827 | 3013 | type(species_info), intent(inout) :: spp | 3032 | type(species_info), intent(inout) :: spp |
828 | 3033 | real(dp), allocatable :: rphi2(:,:,:), vii(:,:) | ||
829 | 3034 | real(dp), allocatable :: rphi(:,:,:) | ||
830 | 3035 | real(dp), allocatable :: eref(:,:) | ||
831 | 3036 | |||
832 | 3037 | logical, intent(in) :: lj_projs | ||
833 | 3014 | C | 3038 | C |
834 | 3015 | C Internal variables | 3039 | C Internal variables |
835 | 3016 | C | 3040 | C |
836 | 3017 | integer | 3041 | integer |
837 | 3018 | . l,nprin, nnodes, ighost, nrwf, ikb, ir, | 3042 | . l,nprin, nnodes, ighost, nrwf, ikb, ir, |
842 | 3019 | . nrc, nrlimit, n_pjnl, nkbs_tot | 3043 | . nrc, nrlimit, n_pjnl, nkbs_tot, jk, nj |
843 | 3020 | real(dp) | 3044 | real(dp) :: rc, dkbcos, ekb |
840 | 3021 | . rc(nkbmx,0:lmaxd), dkbcos(nkbmx,0:lmaxd), | ||
841 | 3022 | . ekb(nkbmx,0:lmaxd) | ||
844 | 3023 | 3045 | ||
845 | 3024 | real(dp) | 3046 | real(dp) |
848 | 3025 | . rphi(nrmax,nkbmx), rmax, dnrm, | 3047 | . rmax, dnrm, |
849 | 3026 | . proj(nrmax) | 3048 | . proj(nrmax), vp(nrmax) |
850 | 3049 | |||
851 | 3050 | character(len=2) :: jstr | ||
852 | 3051 | logical :: multiple_projectors | ||
853 | 3027 | 3052 | ||
854 | 3028 | C The atomic wavefunctions and/or its energy derivatives are | 3053 | C The atomic wavefunctions and/or its energy derivatives are |
855 | 3029 | C calculated only inside a sphere of radius Rmax. To define the | 3054 | C calculated only inside a sphere of radius Rmax. To define the |
856 | @@ -3056,13 +3081,20 @@ | |||
857 | 3056 | 3081 | ||
858 | 3057 | spp%lmax_projs = lmxkb | 3082 | spp%lmax_projs = lmxkb |
859 | 3058 | 3083 | ||
860 | 3059 | ! Generalize this for lj projectors | ||
861 | 3060 | nkbs_tot = 0 | 3084 | nkbs_tot = 0 |
862 | 3061 | n_pjnl = 0 | 3085 | n_pjnl = 0 |
863 | 3062 | do l = 0, lmxkb | 3086 | do l = 0, lmxkb |
866 | 3063 | n_pjnl = n_pjnl + nkbl(l) | 3087 | do ikb = 1, nkbl(l) |
867 | 3064 | nkbs_tot = nkbs_tot + nkbl(l)*(2*l+1) | 3088 | n_pjnl = n_pjnl + 1 |
868 | 3089 | nkbs_tot = nkbs_tot + (2*l+1) | ||
869 | 3090 | if (lj_projs .and. l>0) then ! j=l+1/2 and j=l-1/2 shells | ||
870 | 3091 | n_pjnl = n_pjnl + 1 | ||
871 | 3092 | nkbs_tot = nkbs_tot + (2*l+1) | ||
872 | 3093 | endif | ||
873 | 3094 | enddo | ||
874 | 3065 | enddo | 3095 | enddo |
875 | 3096 | |||
876 | 3097 | spp%lj_projs = lj_projs | ||
877 | 3066 | 3098 | ||
878 | 3067 | ! Eventually will make the arrays allocatable | 3099 | ! Eventually will make the arrays allocatable |
879 | 3068 | if (n_pjnl > maxn_pjnl) then | 3100 | if (n_pjnl > maxn_pjnl) then |
880 | @@ -3076,88 +3108,128 @@ | |||
881 | 3076 | ! zero out for build-up in comkb | 3108 | ! zero out for build-up in comkb |
882 | 3077 | spp%n_pjnl = 0 | 3109 | spp%n_pjnl = 0 |
883 | 3078 | spp%nprojs = 0 | 3110 | spp%nprojs = 0 |
884 | 3111 | |||
885 | 3112 | write(6,'(/,a)')'KBgen: Kleinman-Bylander projectors: ' | ||
886 | 3113 | |||
887 | 3114 | multiple_projectors = .false. | ||
888 | 3115 | |||
889 | 3116 | if (lj_projs) then | ||
890 | 3117 | nj = 2 | ||
891 | 3118 | else | ||
892 | 3119 | nj = 1 | ||
893 | 3120 | endif | ||
894 | 3079 | 3121 | ||
895 | 3122 | ! Some output related to ghosts might be changed | ||
896 | 3123 | ! Note ordering of projectors | ||
897 | 3124 | ! Independent projector stacks for different j's | ||
898 | 3125 | allocate (rphi2(nrmax,nkbmx,nj), vii(nkbmx,nj)) | ||
899 | 3126 | ! For the derivative option, we need a previous projector | ||
900 | 3127 | ! and the previous reference energy | ||
901 | 3128 | allocate (rphi(nrmax,nkbmx,nj)) | ||
902 | 3129 | allocate (eref(nkbmx,nj)) | ||
903 | 3080 | do l=0,lmxkb | 3130 | do l=0,lmxkb |
910 | 3081 | do ir=1,nrmax | 3131 | rphi(:,:,:) = 0.0_dp |
905 | 3082 | do ikb=1,nkbmx | ||
906 | 3083 | rphi(ir,ikb)=0.0d0 | ||
907 | 3084 | enddo | ||
908 | 3085 | proj(ir)=0.0d0 | ||
909 | 3086 | enddo | ||
911 | 3087 | do ikb= 1, nkbl(l) | 3132 | do ikb= 1, nkbl(l) |
919 | 3088 | C | 3133 | do jk = 1, nj ! j-, j+ |
920 | 3089 | C Atomic wavefunctions and eigenvalues | 3134 | |
921 | 3090 | C for the construction of the KB projectors | 3135 | if (jk == 2 .and. l==0) CYCLE ! only one proj for l=0 |
922 | 3091 | C | 3136 | if (lj_projs .and. l>0 ) then |
923 | 3092 | C If the reference energies have not been specifed, the eigenstates | 3137 | ! Set up the appropriate potential and label |
924 | 3093 | C with the condition of being zero at r(nrval) will be used. | 3138 | if (jk == 1) then |
925 | 3094 | C | 3139 | ! V(l-j/2) = Vdn - (l+1)/2 Vup = Vion - (l+1)/2 Vso |
926 | 3140 | vp(:) = vps(:,l) - 0.5_dp*(l+1)*vps_u(:,l) | ||
927 | 3141 | jstr = 'j-' | ||
928 | 3142 | else | ||
929 | 3143 | ! V(l+1/2) = Vdn + l/2 Vup = Vion + l/2 Vso | ||
930 | 3144 | vp(:) = vps(:,l) + 0.5_dp*l*vps_u(:,l) | ||
931 | 3145 | jstr = 'j+' | ||
932 | 3146 | endif | ||
933 | 3147 | else | ||
934 | 3148 | vp(:) = vps(:,l) | ||
935 | 3149 | jstr = ' ' | ||
936 | 3150 | endif | ||
937 | 3151 | proj(:) = 0.0_dp | ||
938 | 3152 | |||
939 | 3153 | ! Atomic wavefunctions and eigenvalues | ||
940 | 3154 | ! for the construction of the KB projectors | ||
941 | 3155 | |||
942 | 3156 | ! We use the same user-entered reference energies for both j's | ||
943 | 3157 | |||
944 | 3095 | if (erefkb(ikb,l).ge.1.0d3) then | 3158 | if (erefkb(ikb,l).ge.1.0d3) then |
945 | 3159 | ! If the reference energies have not been specifed, the | ||
946 | 3160 | ! eigenstates with the condition of being zero at r(nrval) | ||
947 | 3161 | ! will be used. | ||
948 | 3096 | nnodes=ikb | 3162 | nnodes=ikb |
949 | 3097 | nprin=l+1 | 3163 | nprin=l+1 |
952 | 3098 | 3164 | ! use eref to avoid overwriting erefkb(,) for next j | |
953 | 3099 | call schro_eq(Zval,rofi,vps(1,l),ve,s,drdi, | 3165 | call schro_eq(Zval,rofi,vp,ve,s,drdi, |
954 | 3100 | . nrlimit,l,a,b,nnodes,nprin, | 3166 | . nrlimit,l,a,b,nnodes,nprin, |
956 | 3101 | . erefkb(ikb,l),rphi(1,ikb)) | 3167 | . eref(ikb,jk),rphi(1,ikb,jk)) |
957 | 3102 | C Normalization of the eigenstates inside a sphere of radius Rmax | 3168 | C Normalization of the eigenstates inside a sphere of radius Rmax |
958 | 3103 | dnrm=0.0d0 | 3169 | dnrm=0.0d0 |
959 | 3104 | do ir=1,nrwf | 3170 | do ir=1,nrwf |
961 | 3105 | dnrm=dnrm+drdi(ir)*rphi(ir,ikb)**2 | 3171 | dnrm=dnrm+drdi(ir)*rphi(ir,ikb,jk)**2 |
962 | 3106 | enddo | 3172 | enddo |
963 | 3107 | dnrm=sqrt(dnrm) | 3173 | dnrm=sqrt(dnrm) |
964 | 3108 | do ir=1,nrwf | 3174 | do ir=1,nrwf |
966 | 3109 | rphi(ir,ikb)=rphi(ir,ikb)/dnrm | 3175 | rphi(ir,ikb,jk)=rphi(ir,ikb,jk)/dnrm |
967 | 3110 | enddo | 3176 | enddo |
968 | 3111 | C | 3177 | C |
969 | 3112 | elseif((erefkb(ikb,l).le.-1.0d3).and. | 3178 | elseif((erefkb(ikb,l).le.-1.0d3).and. |
970 | 3113 | . (ikb.gt.1) ) then | 3179 | . (ikb.gt.1) ) then |
979 | 3114 | C If the energy is specified to be 1000 Ry, the energy derivative | 3180 | ! If the energy is specified to be 1000 Ry, the energy |
980 | 3115 | C of the previous wavefunction will be used | 3181 | ! derivative of the previous wavefunction will be used |
981 | 3116 | C | 3182 | call energ_deriv(a,rofi,rphi(1,ikb-1,jk),vp(1), |
982 | 3117 | call energ_deriv(a,rofi,rphi(1,ikb-1),vps(1,l), | 3183 | . ve,drdi,nrwf,l,eref(ikb-1,jk), |
983 | 3118 | . ve,drdi,nrwf,l,erefkb(ikb-1,l), | 3184 | . rphi(1,ikb,jk),nrval) |
984 | 3119 | . rphi(1,ikb),nrval) | 3185 | eref(ikb,jk)=0.0_dp |
985 | 3120 | erefkb(ikb,l)=0.0d0 | 3186 | |
978 | 3121 | C | ||
986 | 3122 | else | 3187 | else |
990 | 3123 | C If the reference energies have been specified, we just use them | 3188 | ! If the reference energies have been specified, we just |
991 | 3124 | C | 3189 | ! use them |
992 | 3125 | call rphi_vs_e(a,b,rofi,vps(1,l), | 3190 | call rphi_vs_e(a,b,rofi,vp(1), |
993 | 3126 | . ve,nrval,l,erefkb(ikb,l), | 3191 | . ve,nrval,l,erefkb(ikb,l), |
996 | 3127 | . rphi(1,ikb),Rmax) | 3192 | . rphi(1,ikb,jk),Rmax) |
997 | 3128 | C | 3193 | eref(ikb,jk) = erefkb(ikb,l) |
998 | 3129 | endif | 3194 | endif |
1002 | 3130 | C | 3195 | |
1003 | 3131 | C Ghost analysis | 3196 | ! Ghost analysis |
1004 | 3132 | C | 3197 | |
1005 | 3133 | if (nkbl(l).eq.1) then | 3198 | if (nkbl(l).eq.1) then |
1007 | 3134 | call ghost(Zval,rofi,vps(:,l),vlocal, | 3199 | call ghost(Zval,rofi,vp(:),vlocal, |
1008 | 3135 | . ve,s,drdi,nrlimit,l,a,b,nrwf, | 3200 | . ve,s,drdi,nrlimit,l,a,b,nrwf, |
1010 | 3136 | . erefkb(ikb,l),rphi(:,ikb),ighost) | 3201 | . eref(ikb,jk),rphi(:,ikb,jk),ighost) |
1011 | 3137 | else | 3202 | else |
1016 | 3138 | if (ikb.eq.1) | 3203 | multiple_projectors = .true. |
1013 | 3139 | . write(6,'(a,i3,/a)') | ||
1014 | 3140 | . 'KBgen: More than one KB projector for l=',l, | ||
1015 | 3141 | . 'KBgen: ghost states analysis will be not performed' | ||
1017 | 3142 | endif | 3204 | endif |
1035 | 3143 | C | 3205 | |
1036 | 3144 | C KB Projectors | 3206 | ! The projector stack and vii are passed as arguments |
1037 | 3145 | C | 3207 | ! to enable the needed loop ordering |
1038 | 3146 | call KBproj(ikb,rofi,drdi,vps(1,l),vlocal,nrwf,l, | 3208 | call KBproj(ikb,rofi,drdi,vp,vlocal,nrwf,l, |
1039 | 3147 | . rphi(1,ikb),dkbcos(ikb,l),ekb(ikb,l),proj,nrc) | 3209 | . rphi(1,ikb,jk),dkbcos,ekb,proj,nrc, |
1040 | 3148 | 3210 | . rphi2(:,:,jk),vii(:,jk)) | |
1041 | 3149 | C | 3211 | |
1042 | 3150 | rc(ikb,l)=rofi(nrc) | 3212 | rc = rofi(nrc) |
1043 | 3151 | C | 3213 | |
1044 | 3152 | C Common block with the information about the KB projectors | 3214 | ! Store KB projectors in data structure |
1045 | 3153 | C | 3215 | |
1046 | 3154 | call comKB(is,a,b,rofi,proj, | 3216 | call comKB(is,a,b,rofi,proj,l,lj_projs,jk, |
1047 | 3155 | . l,ikb,rc(ikb,l),ekb(ikb,l),nrc, spp) | 3217 | . ikb,rc,ekb,nrc, spp) |
1048 | 3156 | C | 3218 | |
1049 | 3157 | 3219 | write(6,'(a2,1x,a,i2,4(3x,a,f10.6))') jstr, | |
1050 | 3158 | enddo | 3220 | . 'l=',l, 'rc=',rc, 'el=',eref(ikb,jk), |
1051 | 3159 | enddo | 3221 | . 'Ekb=',ekb,'kbcos=',dkbcos |
1052 | 3222 | |||
1053 | 3223 | enddo ! jk | ||
1054 | 3224 | enddo ! ikb:1,nkbl | ||
1055 | 3225 | enddo ! l | ||
1056 | 3226 | deallocate(rphi,rphi2,vii,eref) | ||
1057 | 3160 | 3227 | ||
1058 | 3228 | if (multiple_projectors) then | ||
1059 | 3229 | write(6,'(a,/a)') | ||
1060 | 3230 | . 'KBgen: More than one KB projector for some l shell(s)', | ||
1061 | 3231 | . 'KBgen: ghost-state analysis will not be performed' | ||
1062 | 3232 | endif | ||
1063 | 3161 | if (ighost.eq.1) then | 3233 | if (ighost.eq.1) then |
1064 | 3162 | write(6,"(2a)")'KBgen: WARNING: ', | 3234 | write(6,"(2a)")'KBgen: WARNING: ', |
1065 | 3163 | . 'Ghost states have been detected' | 3235 | . 'Ghost states have been detected' |
1066 | @@ -3169,34 +3241,14 @@ | |||
1067 | 3169 | write(6,"(a)") " KBgen: *** Warning Ignored by User" | 3241 | write(6,"(a)") " KBgen: *** Warning Ignored by User" |
1068 | 3170 | ighost = 0 | 3242 | ighost = 0 |
1069 | 3171 | else | 3243 | else |
1071 | 3172 | call die | 3244 | call die("Ghost states detected") |
1072 | 3173 | endif | 3245 | endif |
1073 | 3174 | endif | 3246 | endif |
1074 | 3175 | 3247 | ||
1099 | 3176 | write(6,'(/,a)')'KBgen: Kleinman-Bylander projectors: ' | 3248 | write(6,'(/,a, i4)') |
1100 | 3177 | do l=0,lmxkb | 3249 | .'KBgen: Total number of Kleinman-Bylander projectors: ', |
1101 | 3178 | do ikb=1, nkbl(l) | 3250 | $ spp%nprojs |
1102 | 3179 | write(6,'(3x,a,i2,4(3x,a,f10.6))') | 3251 | |
1079 | 3180 | . 'l=',l, 'rc=',rc(ikb,l), 'el=',erefkb(ikb,l), | ||
1080 | 3181 | . 'Ekb=',ekb(ikb,l),'kbcos=',dkbcos(ikb,l) | ||
1081 | 3182 | enddo | ||
1082 | 3183 | enddo | ||
1083 | 3184 | C | ||
1084 | 3185 | C Total number of Kleinman-Bylander projectors | ||
1085 | 3186 | C | ||
1086 | 3187 | nkb=0 | ||
1087 | 3188 | do l=0,lmxkb | ||
1088 | 3189 | do ikb=1,nkbl(l) | ||
1089 | 3190 | nkb=nkb+(2*l+1) | ||
1090 | 3191 | enddo | ||
1091 | 3192 | enddo | ||
1092 | 3193 | write(6,'(/,a, i4)') | ||
1093 | 3194 | .'KBgen: Total number of Kleinman-Bylander projectors: ', nkb | ||
1094 | 3195 | if (nkb /= spp%nprojs) then | ||
1095 | 3196 | print *, "spp%nprojs: ", spp%nprojs | ||
1096 | 3197 | call die("Mismatch nkb spp%nprojs") | ||
1097 | 3198 | endif | ||
1098 | 3199 | C | ||
1103 | 3200 | end subroutine KBgen | 3252 | end subroutine KBgen |
1104 | 3201 | ! | 3253 | ! |
1105 | 3202 | subroutine Basis_gen(Zval,is, iz, a,b,rofi,drdi,s, | 3254 | subroutine Basis_gen(Zval,is, iz, a,b,rofi,drdi,s, |
1106 | 3203 | 3255 | ||
1107 | === modified file 'Src/bands.F' | |||
1108 | --- Src/bands.F 2018-04-25 11:33:32 +0000 | |||
1109 | +++ Src/bands.F 2018-04-30 20:53:35 +0000 | |||
1110 | @@ -366,7 +366,7 @@ | |||
1111 | 366 | use atmfuncs, only : symfio, cnfigfio, labelfis, nofis | 366 | use atmfuncs, only : symfio, cnfigfio, labelfis, nofis |
1112 | 367 | use writewave, only : wfs_filename | 367 | use writewave, only : wfs_filename |
1113 | 368 | 368 | ||
1115 | 369 | use m_spin, only: NoMagn, SPpol, NonCol, SpOrb | 369 | use m_spin, only: spin |
1116 | 370 | 370 | ||
1117 | 371 | use m_diag_option, only: ParallelOverK, Serial | 371 | use m_diag_option, only: ParallelOverK, Serial |
1118 | 372 | use m_diag, only: diag_init | 372 | use m_diag, only: diag_init |
1119 | @@ -459,7 +459,7 @@ | |||
1120 | 459 | endif | 459 | endif |
1121 | 460 | 460 | ||
1122 | 461 | C Find the band energies | 461 | C Find the band energies |
1124 | 462 | if (NoMagn .or. SPpol) then | 462 | if ( spin%none .or. spin%Col ) then |
1125 | 463 | C fixspin and qs are not used in diagk, since getD=.false. ... | 463 | C fixspin and qs are not used in diagk, since getD=.false. ... |
1126 | 464 | qs(1) = 0.0_dp | 464 | qs(1) = 0.0_dp |
1127 | 465 | qs(2) = 0.0_dp | 465 | qs(2) = 0.0_dp |
1128 | @@ -488,7 +488,7 @@ | |||
1129 | 488 | ParallelOverK = SaveParallelOverK | 488 | ParallelOverK = SaveParallelOverK |
1130 | 489 | if ( ParallelOverK ) Serial = .true. | 489 | if ( ParallelOverK ) Serial = .true. |
1131 | 490 | 490 | ||
1133 | 491 | elseif ( NonCol ) then | 491 | elseif ( spin%NCol ) then |
1134 | 492 | if (getPSI) then | 492 | if (getPSI) then |
1135 | 493 | if (node==0) then | 493 | if (node==0) then |
1136 | 494 | write(6,*) "No WFS for non-colinear spin, yet..." | 494 | write(6,*) "No WFS for non-colinear spin, yet..." |
1137 | @@ -503,7 +503,7 @@ | |||
1138 | 503 | . Haux, Saux, psi, Haux, Saux, aux, | 503 | . Haux, Saux, psi, Haux, Saux, aux, |
1139 | 504 | . no_u, occtol, 1, no_u ) | 504 | . no_u, occtol, 1, no_u ) |
1140 | 505 | 505 | ||
1142 | 506 | elseif ( SpOrb ) then | 506 | elseif ( spin%SO ) then |
1143 | 507 | if (getPSI) then | 507 | if (getPSI) then |
1144 | 508 | if (node==0) then | 508 | if (node==0) then |
1145 | 509 | write(6,*) "No WFS for spin-orbit, yet..." | 509 | write(6,*) "No WFS for spin-orbit, yet..." |
1146 | 510 | 510 | ||
1147 | === modified file 'Src/basis_io.F' | |||
1148 | --- Src/basis_io.F 2017-12-22 10:26:20 +0000 | |||
1149 | +++ Src/basis_io.F 2018-04-30 20:53:35 +0000 | |||
1150 | @@ -401,8 +401,14 @@ | |||
1151 | 401 | ! KBs | 401 | ! KBs |
1152 | 402 | read(lun,*) | 402 | read(lun,*) |
1153 | 403 | do i=1,spp%n_pjnl | 403 | do i=1,spp%n_pjnl |
1155 | 404 | read(lun,*) | 404 | if (spp%lj_projs) then |
1156 | 405 | read(lun,*) | ||
1157 | 406 | $ spp%pjnl_l(i), spp%pjnl_j(i), spp%pjnl_n(i), | ||
1158 | 407 | $ spp%pjnl_ekb(i) | ||
1159 | 408 | else | ||
1160 | 409 | read(lun,*) | ||
1161 | 405 | $ spp%pjnl_l(i), spp%pjnl_n(i), spp%pjnl_ekb(i) | 410 | $ spp%pjnl_l(i), spp%pjnl_n(i), spp%pjnl_ekb(i) |
1162 | 411 | endif | ||
1163 | 406 | call radial_read_ascii(spp%pjnl(i),lun, | 412 | call radial_read_ascii(spp%pjnl(i),lun, |
1164 | 407 | $ yp1=0.0_dp,ypn=huge(1.0_dp)) | 413 | $ yp1=0.0_dp,ypn=huge(1.0_dp)) |
1165 | 408 | enddo | 414 | enddo |
1166 | @@ -417,6 +423,7 @@ | |||
1167 | 417 | nk = nk+1 | 423 | nk = nk+1 |
1168 | 418 | spp%pj_n(nk) = spp%pjnl_n(i) | 424 | spp%pj_n(nk) = spp%pjnl_n(i) |
1169 | 419 | spp%pj_l(nk) = spp%pjnl_l(i) | 425 | spp%pj_l(nk) = spp%pjnl_l(i) |
1170 | 426 | spp%pj_j(nk) = spp%pjnl_j(i) | ||
1171 | 420 | spp%pj_m(nk) = m | 427 | spp%pj_m(nk) = m |
1172 | 421 | spp%pj_index(nk) = i | 428 | spp%pj_index(nk) = i |
1173 | 422 | enddo | 429 | enddo |
1174 | @@ -450,6 +457,7 @@ | |||
1175 | 450 | integer, intent(in) :: unit | 457 | integer, intent(in) :: unit |
1176 | 451 | 458 | ||
1177 | 452 | character(len=78) line | 459 | character(len=78) line |
1178 | 460 | integer :: iostat | ||
1179 | 453 | 461 | ||
1180 | 454 | read(unit,'(a)') line | 462 | read(unit,'(a)') line |
1181 | 455 | if (trim(line) .eq. '<preamble>') then | 463 | if (trim(line) .eq. '<preamble>') then |
1182 | @@ -465,7 +473,12 @@ | |||
1183 | 465 | read(unit,*) p%mass | 473 | read(unit,*) p%mass |
1184 | 466 | read(unit,*) p%self_energy | 474 | read(unit,*) p%self_energy |
1185 | 467 | read(unit,*) p%lmax_basis, p%n_orbnl | 475 | read(unit,*) p%lmax_basis, p%n_orbnl |
1187 | 468 | read(unit,*) p%lmax_projs, p%n_pjnl | 476 | read(unit,fmt=*,iostat=iostat) p%lmax_projs, p%n_pjnl, p%lj_projs |
1188 | 477 | if (iostat /=0 ) then | ||
1189 | 478 | backspace(unit) | ||
1190 | 479 | read(unit,*) p%lmax_projs, p%n_pjnl | ||
1191 | 480 | p%lj_projs = .false. | ||
1192 | 481 | endif | ||
1193 | 469 | 482 | ||
1194 | 470 | allocate(p%orbnl(p%n_orbnl)) | 483 | allocate(p%orbnl(p%n_orbnl)) |
1195 | 471 | allocate(p%pjnl(p%n_pjnl)) | 484 | allocate(p%pjnl(p%n_pjnl)) |
1196 | @@ -817,9 +830,16 @@ | |||
1197 | 817 | do i=1,spp%n_pjnl | 830 | do i=1,spp%n_pjnl |
1198 | 818 | zeta = spp%pjnl_n(i) | 831 | zeta = spp%pjnl_n(i) |
1199 | 819 | l = spp%pjnl_l(i) | 832 | l = spp%pjnl_l(i) |
1201 | 820 | write(lun,'(2i3,f22.16,2x,a)') | 833 | if (spp%lj_projs) then |
1202 | 834 | write(lun,'(i3,f4.1,i3,f22.16,2x,a)') | ||
1203 | 835 | $ spp%pjnl_l(i), spp%pjnl_j(i), spp%pjnl_n(i), | ||
1204 | 836 | $ spp%pjnl_ekb(i), | ||
1205 | 837 | $ " #kb l, j, n (sequence number), Reference energy" | ||
1206 | 838 | else | ||
1207 | 839 | write(lun,'(2i3,f22.16,2x,a)') | ||
1208 | 821 | $ spp%pjnl_l(i), spp%pjnl_n(i), spp%pjnl_ekb(i), | 840 | $ spp%pjnl_l(i), spp%pjnl_n(i), spp%pjnl_ekb(i), |
1209 | 822 | $ " #kb l, n (sequence number), Reference energy" | 841 | $ " #kb l, n (sequence number), Reference energy" |
1210 | 842 | endif | ||
1211 | 823 | call radial_dump_ascii(spp%pjnl(i),lun) | 843 | call radial_dump_ascii(spp%pjnl(i),lun) |
1212 | 824 | 844 | ||
1213 | 825 | if (write_ion_plot_files) then | 845 | if (write_ion_plot_files) then |
1214 | @@ -949,8 +969,14 @@ | |||
1215 | 949 | write(unit,'(g22.12,4x,a)') p%self_energy, "# Self energy " | 969 | write(unit,'(g22.12,4x,a)') p%self_energy, "# Self energy " |
1216 | 950 | write(unit,'(2i4,22x,a)') p%lmax_basis, p%n_orbnl, | 970 | write(unit,'(2i4,22x,a)') p%lmax_basis, p%n_orbnl, |
1217 | 951 | $ "# Lmax for basis, no. of nl orbitals " | 971 | $ "# Lmax for basis, no. of nl orbitals " |
1220 | 952 | write(unit,'(2i4,22x,a)') p%lmax_projs, p%n_pjnl, | 972 | if (p%lj_projs) then |
1221 | 953 | $ "# Lmax for projectors, no. of nl KB projectors " | 973 | write(unit,'(2i4,1x,l1,20x,a)') p%lmax_projs, p%n_pjnl, |
1222 | 974 | $ p%lj_projs, | ||
1223 | 975 | $ "# Lmax for projectors, no. of nl KB projectors, LJ projs?" | ||
1224 | 976 | else | ||
1225 | 977 | write(unit,'(2i4,22x,a)') p%lmax_projs, p%n_pjnl, | ||
1226 | 978 | $ "# Lmax for projectors, no. of nl KB projectors" | ||
1227 | 979 | endif | ||
1228 | 954 | 980 | ||
1229 | 955 | end subroutine write_header | 981 | end subroutine write_header |
1230 | 956 | 982 | ||
1231 | 957 | 983 | ||
1232 | === modified file 'Src/broadcast_basis.F' | |||
1233 | --- Src/broadcast_basis.F 2016-06-28 05:57:03 +0000 | |||
1234 | +++ Src/broadcast_basis.F 2018-04-30 20:53:35 +0000 | |||
1235 | @@ -104,10 +104,14 @@ | |||
1236 | 104 | $ 0,MPI_Comm_World,MPIerror) | 104 | $ 0,MPI_Comm_World,MPIerror) |
1237 | 105 | call MPI_Bcast(spp%lmax_projs,1,MPI_integer, | 105 | call MPI_Bcast(spp%lmax_projs,1,MPI_integer, |
1238 | 106 | $ 0,MPI_Comm_World,MPIerror) | 106 | $ 0,MPI_Comm_World,MPIerror) |
1239 | 107 | call MPI_Bcast(spp%lj_projs,1,MPI_logical, | ||
1240 | 108 | $ 0,MPI_Comm_World,MPIerror) | ||
1241 | 107 | call MPI_Bcast(spp%pjnl_l,maxn_pjnl,MPI_integer, | 109 | call MPI_Bcast(spp%pjnl_l,maxn_pjnl,MPI_integer, |
1242 | 108 | $ 0,MPI_Comm_World,MPIerror) | 110 | $ 0,MPI_Comm_World,MPIerror) |
1243 | 109 | call MPI_Bcast(spp%pjnl_n,maxn_pjnl,MPI_integer, | 111 | call MPI_Bcast(spp%pjnl_n,maxn_pjnl,MPI_integer, |
1244 | 110 | $ 0,MPI_Comm_World,MPIerror) | 112 | $ 0,MPI_Comm_World,MPIerror) |
1245 | 113 | call MPI_Bcast(spp%pjnl_j,maxn_pjnl,MPI_double_precision, | ||
1246 | 114 | $ 0,MPI_Comm_World,MPIerror) | ||
1247 | 111 | call MPI_Bcast(spp%pjnl_ekb,maxn_pjnl,MPI_double_precision, | 115 | call MPI_Bcast(spp%pjnl_ekb,maxn_pjnl,MPI_double_precision, |
1248 | 112 | $ 0,MPI_Comm_World,MPIerror) | 116 | $ 0,MPI_Comm_World,MPIerror) |
1249 | 113 | 117 | ||
1250 | @@ -134,6 +138,8 @@ | |||
1251 | 134 | $ 0,MPI_Comm_World,MPIerror) | 138 | $ 0,MPI_Comm_World,MPIerror) |
1252 | 135 | call MPI_Bcast(spp%pj_l,maxnprojs,MPI_integer, | 139 | call MPI_Bcast(spp%pj_l,maxnprojs,MPI_integer, |
1253 | 136 | $ 0,MPI_Comm_World,MPIerror) | 140 | $ 0,MPI_Comm_World,MPIerror) |
1254 | 141 | call MPI_Bcast(spp%pj_j,maxnprojs,MPI_double_precision, | ||
1255 | 142 | $ 0,MPI_Comm_World,MPIerror) | ||
1256 | 137 | call MPI_Bcast(spp%pj_m,maxnprojs,MPI_integer, | 143 | call MPI_Bcast(spp%pj_m,maxnprojs,MPI_integer, |
1257 | 138 | $ 0,MPI_Comm_World,MPIerror) | 144 | $ 0,MPI_Comm_World,MPIerror) |
1258 | 139 | 145 | ||
1259 | 140 | 146 | ||
1260 | === modified file 'Src/compute_energies.F90' | |||
1261 | --- Src/compute_energies.F90 2017-12-21 15:49:49 +0000 | |||
1262 | +++ Src/compute_energies.F90 2018-04-30 20:53:35 +0000 | |||
1263 | @@ -47,8 +47,10 @@ | |||
1264 | 47 | lastkb, no_s, rmaxv, indxua, iphorb, lasto, & | 47 | lastkb, no_s, rmaxv, indxua, iphorb, lasto, & |
1265 | 48 | rmaxo, no_l | 48 | rmaxo, no_l |
1266 | 49 | use m_ntm, only: ntm | 49 | use m_ntm, only: ntm |
1269 | 50 | use m_spin, only: NoMagn, SPpol, NonCol, SpOrb | 50 | |
1270 | 51 | use m_spin, only: nspin, h_spin_dim, spinor_dim | 51 | use m_spin, only: spin |
1271 | 52 | use parallel, only: IONode | ||
1272 | 53 | |||
1273 | 52 | use m_dipol, only: dipol | 54 | use m_dipol, only: dipol |
1274 | 53 | use siesta_geom, only: na_u, na_s, xa, isa | 55 | use siesta_geom, only: na_u, na_s, xa, isa |
1275 | 54 | use m_rhog, only: rhog | 56 | use m_rhog, only: rhog |
1276 | @@ -58,22 +60,20 @@ | |||
1277 | 58 | 60 | ||
1278 | 59 | integer, intent(in) :: iscf | 61 | integer, intent(in) :: iscf |
1279 | 60 | 62 | ||
1281 | 61 | integer :: ihmat, ifa, istr, ispin, io | 63 | integer :: ispin, io |
1282 | 62 | #ifdef MPI | 64 | #ifdef MPI |
1283 | 63 | real(dp) :: buffer1 | 65 | real(dp) :: buffer1 |
1284 | 64 | #endif | 66 | #endif |
1285 | 65 | 67 | ||
1286 | 66 | real(dp) :: const | ||
1287 | 67 | real(dp) :: dummy_stress(3,3), dummy_fa(1,1) | ||
1288 | 68 | real(dp) :: dummy_E, g2max, dummy_H(1,1) | ||
1289 | 69 | logical :: mixDM | 68 | logical :: mixDM |
1290 | 70 | 69 | ||
1291 | 70 | |||
1292 | 71 | mixDM = (.not. (mixH .or. mix_charge)) | 71 | mixDM = (.not. (mixH .or. mix_charge)) |
1293 | 72 | 72 | ||
1294 | 73 | ! Compute the band-structure energy | 73 | ! Compute the band-structure energy |
1295 | 74 | 74 | ||
1296 | 75 | call compute_EBS() | 75 | call compute_EBS() |
1298 | 76 | 76 | ||
1299 | 77 | ! These energies were calculated in the latest call to | 77 | ! These energies were calculated in the latest call to |
1300 | 78 | ! setup_hamiltonian, using as ingredient D_in | 78 | ! setup_hamiltonian, using as ingredient D_in |
1301 | 79 | 79 | ||
1302 | @@ -126,36 +126,89 @@ | |||
1303 | 126 | 126 | ||
1304 | 127 | subroutine compute_EBS() | 127 | subroutine compute_EBS() |
1305 | 128 | 128 | ||
1306 | 129 | real(dp) :: Ebs_SO(4) | ||
1307 | 130 | complex(dp) :: Ebs_Daux(2,2), Ebs_Haux(2,2) | ||
1308 | 131 | |||
1309 | 132 | integer :: i, j, ind | ||
1310 | 133 | |||
1311 | 129 | Ebs = 0.0_dp | 134 | Ebs = 0.0_dp |
1327 | 130 | ! const factor takes into account that there are two nondiagonal | 135 | |
1328 | 131 | ! elements in non-collinear spin density matrix, stored as | 136 | ! Modifed for Off-Site Spin-orbit coupling by R. Cuadrado, Feb. 2018 |
1329 | 132 | ! ispin=1 => D11; ispin=2 => D22, ispin=3 => Real(D12); | 137 | ! |
1330 | 133 | ! ispin=4 => Imag(D12) | 138 | !***************************************************************************** |
1331 | 134 | 139 | ! Note about Ebs and E_Harris calculation for the Spin-Orbit: | |
1332 | 135 | if ( SpOrb ) then | 140 | !***************************************************************************** |
1333 | 136 | do io = 1,maxnh | 141 | ! |
1334 | 137 | Ebs = Ebs + H(io,1) * ( Dscf(io,1) ) & | 142 | ! E_bs and E_Harris are calculated by means of the following |
1335 | 138 | + H(io,2) * ( Dscf(io,2) ) & | 143 | ! complex matrix multiplication: |
1336 | 139 | + H(io,3) * ( Dscf(io,7) ) & | 144 | ! |
1337 | 140 | + H(io,4) * ( Dscf(io,8) ) & | 145 | ! E_bs = Re { Tr[ H * DM ] } |
1338 | 141 | - H(io,5) * ( Dscf(io,5) ) & | 146 | ! E_Harris = Re { Tr[ H * (DM-DM_old) ] } |
1339 | 142 | - H(io,6) * ( Dscf(io,6) ) & | 147 | ! |
1340 | 143 | + H(io,7) * ( Dscf(io,3) ) & | 148 | ! In the following: DM/H(1,1) --> up/up <--> uu |
1341 | 144 | + H(io,8) * ( Dscf(io,4) ) | 149 | ! DM/H(2,2) --> down/down <--> dd |
1342 | 150 | ! DM/H(1,2) --> up/down <--> ud | ||
1343 | 151 | ! DM/H(2,1) --> down/up <--> du | ||
1344 | 152 | ! | ||
1345 | 153 | ! Using DM/H components, E_bs would be sum(E_bs(1:4)), where | ||
1346 | 154 | ! | ||
1347 | 155 | ! E_bs(1)=Re{sum_ij(H_ij(1,1)*D_ji(1,1))}=Re{sum_ij(H_ij^uu*(DM_ij^uu)^*)} | ||
1348 | 156 | ! E_bs(2)=Re{sum_ij(H_ij(2,2)*D_ji(2,2))}=Re{sum_ij(H_ij^dd*(DM_ij^dd)^*)} | ||
1349 | 157 | ! E_bs(3)=Re{sum_ij(H_ij(1,2)*D_ji(2,1))}=Re{sum_ij(H_ij^ud*(DM_ij^ud)^*)} | ||
1350 | 158 | ! E_bs(4)=Re{sum_ij(H_ij(2,1)*D_ji(1,2))}=Re{sum_ij(H_ij^du*(DM_ij^du)^*)} | ||
1351 | 159 | ! | ||
1352 | 160 | ! since, due to overall hermiticity, DM_ij^ab = (DM_ji^ba)^* | ||
1353 | 161 | ! | ||
1354 | 162 | ! The trace operation is then an extended dot product over the "ij" | ||
1355 | 163 | ! sparse index, which can also be conveniently done in parallel, as | ||
1356 | 164 | ! each processor handles the same indexes in H and the DM. Only a | ||
1357 | 165 | ! global reduction is needed at the end. | ||
1358 | 166 | |||
1359 | 167 | ! Same comments are valid for the E_Harris calculation. | ||
1360 | 168 | ! | ||
1361 | 169 | !***************************************************************************** | ||
1362 | 170 | ! | ||
1363 | 171 | if ( spin%SO ) then | ||
1364 | 172 | |||
1365 | 173 | Ebs_SO = 0.0_dp | ||
1366 | 174 | Ebs_Daux = dcmplx(0.0_dp, 0.0_dp) | ||
1367 | 175 | Ebs_Haux = dcmplx(0.0_dp, 0.0_dp) | ||
1368 | 176 | |||
1369 | 177 | do io = 1, maxnh | ||
1370 | 178 | |||
1371 | 179 | Ebs_Haux(1,1) = dcmplx(H(io,1),H(io,5)) | ||
1372 | 180 | Ebs_Haux(2,2) = dcmplx(H(io,2),H(io,6)) | ||
1373 | 181 | Ebs_Haux(1,2) = dcmplx(H(io,3),-H(io,4)) | ||
1374 | 182 | Ebs_Haux(2,1) = dcmplx(H(io,7),H(io,8)) | ||
1375 | 183 | |||
1376 | 184 | Ebs_Daux(1,1) = dcmplx(Dscf(io,1),Dscf(io,5)) | ||
1377 | 185 | Ebs_Daux(2,2) = dcmplx(Dscf(io,2),Dscf(io,6)) | ||
1378 | 186 | Ebs_Daux(1,2) = dcmplx(Dscf(io,3),-Dscf(io,4)) | ||
1379 | 187 | Ebs_Daux(2,1) = dcmplx(Dscf(io,7),Dscf(io,8)) | ||
1380 | 188 | |||
1381 | 189 | |||
1382 | 190 | Ebs_SO(1) = Ebs_SO(1) + real( Ebs_Haux(1,1)*dconjg(Ebs_Daux(1,1)) ) | ||
1383 | 191 | Ebs_SO(2) = Ebs_SO(2) + real( Ebs_Haux(2,2)*dconjg(Ebs_Daux(2,2)) ) | ||
1384 | 192 | Ebs_SO(3) = Ebs_SO(3) + real( Ebs_Haux(1,2)*dconjg(Ebs_Daux(1,2)) ) | ||
1385 | 193 | Ebs_SO(4) = Ebs_SO(4) + real( Ebs_Haux(2,1)*dconjg(Ebs_Daux(2,1)) ) | ||
1386 | 194 | |||
1387 | 145 | enddo | 195 | enddo |
1389 | 146 | else if ( NonCol ) then | 196 | |
1390 | 197 | Ebs = sum ( Ebs_SO ) | ||
1391 | 198 | |||
1392 | 199 | else if ( spin%NCol ) then | ||
1393 | 147 | do io = 1,maxnh | 200 | do io = 1,maxnh |
1394 | 148 | Ebs = Ebs + H(io,1) * ( Dscf(io,1) ) & | 201 | Ebs = Ebs + H(io,1) * ( Dscf(io,1) ) & |
1395 | 149 | + H(io,2) * ( Dscf(io,2) ) & | 202 | + H(io,2) * ( Dscf(io,2) ) & |
1396 | 150 | + 2.0_dp * H(io,3) * ( Dscf(io,3) ) & | 203 | + 2.0_dp * H(io,3) * ( Dscf(io,3) ) & |
1397 | 151 | + 2.0_dp * H(io,4) * ( Dscf(io,4) ) | 204 | + 2.0_dp * H(io,4) * ( Dscf(io,4) ) |
1398 | 152 | enddo | 205 | enddo |
1400 | 153 | else if ( SPpol ) then | 206 | else if ( spin%Col ) then |
1401 | 154 | do io = 1,maxnh | 207 | do io = 1,maxnh |
1402 | 155 | Ebs = Ebs + H(io,1) * Dscf(io,1) & | 208 | Ebs = Ebs + H(io,1) * Dscf(io,1) & |
1403 | 156 | + H(io,2) * Dscf(io,2) | 209 | + H(io,2) * Dscf(io,2) |
1404 | 157 | enddo | 210 | enddo |
1406 | 158 | else if ( NoMagn ) then | 211 | else if ( spin%none ) then |
1407 | 159 | do io = 1,maxnh | 212 | do io = 1,maxnh |
1408 | 160 | Ebs = Ebs + H(io,1) * Dscf(io,1) | 213 | Ebs = Ebs + H(io,1) * Dscf(io,1) |
1409 | 161 | enddo | 214 | enddo |
1410 | @@ -170,36 +223,65 @@ | |||
1411 | 170 | 223 | ||
1412 | 171 | subroutine compute_DEharr() | 224 | subroutine compute_DEharr() |
1413 | 172 | 225 | ||
1414 | 226 | real(dp) :: DEharr_SO(4) | ||
1415 | 227 | complex(dp) :: DEharr_Daux(2,2), DEharr_Haux(2,2), DEharr_Daux_old(2,2) | ||
1416 | 228 | |||
1417 | 173 | DEharr = 0.0_dp | 229 | DEharr = 0.0_dp |
1435 | 174 | ! const factor takes into account that there are two nondiagonal | 230 | |
1436 | 175 | ! elements in non-collinear spin density matrix, stored as | 231 | if ( spin%SO ) then |
1437 | 176 | ! ispin=1 => D11; ispin=2 => D22, ispin=3 => Real(D12); | 232 | |
1438 | 177 | ! ispin=4 => Imag(D12) | 233 | DEharr_SO = 0.0_dp |
1439 | 178 | 234 | DEharr_Daux = dcmplx(0.0_dp, 0.0_dp) | |
1440 | 179 | if ( SpOrb ) then | 235 | DEharr_Daux_old = dcmplx(0.0_dp, 0.0_dp) |
1441 | 180 | do io = 1,maxnh | 236 | DEharr_Haux = dcmplx(0.0_dp, 0.0_dp) |
1442 | 181 | DEharr = DEharr + H(io,1) * ( Dscf(io,1) - Dold(io,1) ) & | 237 | |
1443 | 182 | + H(io,2) * ( Dscf(io,2) - Dold(io,2) ) & | 238 | do io = 1, maxnh |
1444 | 183 | + H(io,3) * ( Dscf(io,7) - Dold(io,7) ) & | 239 | |
1445 | 184 | + H(io,4) * ( Dscf(io,8) - Dold(io,8) ) & | 240 | DEharr_Haux(1,1) = dcmplx( H(io,1),H(io,5) ) |
1446 | 185 | - H(io,5) * ( Dscf(io,5) - Dold(io,5) ) & | 241 | DEharr_Haux(2,2) = dcmplx( H(io,2),H(io,6) ) |
1447 | 186 | - H(io,6) * ( Dscf(io,6) - Dold(io,6) ) & | 242 | DEharr_Haux(1,2) = dcmplx( H(io,3),-H(io,4) ) |
1448 | 187 | + H(io,7) * ( Dscf(io,3) - Dold(io,3) ) & | 243 | DEharr_Haux(2,1) = dcmplx( H(io,7),H(io,8) ) |
1449 | 188 | + H(io,8) * ( Dscf(io,4) - Dold(io,4) ) | 244 | |
1450 | 189 | enddo | 245 | DEharr_Daux(1,1) = dcmplx( Dscf(io,1),Dscf(io,5) ) |
1451 | 190 | else if ( NonCol ) then | 246 | DEharr_Daux(2,2) = dcmplx( Dscf(io,2),Dscf(io,6) ) |
1452 | 247 | DEharr_Daux(1,2) = dcmplx( Dscf(io,3),-Dscf(io,4) ) | ||
1453 | 248 | DEharr_Daux(2,1) = dcmplx( Dscf(io,7),Dscf(io,8) ) | ||
1454 | 249 | |||
1455 | 250 | DEharr_Daux_old(1,1) = dcmplx( Dold(io,1),Dold(io,5) ) | ||
1456 | 251 | DEharr_Daux_old(2,2) = dcmplx( Dold(io,2),Dold(io,6) ) | ||
1457 | 252 | DEharr_Daux_old(1,2) = dcmplx( Dold(io,3),-Dold(io,4) ) | ||
1458 | 253 | DEharr_Daux_old(2,1) = dcmplx( Dold(io,7),Dold(io,8) ) | ||
1459 | 254 | |||
1460 | 255 | |||
1461 | 256 | DEharr_SO(1) = DEharr_SO(1) & | ||
1462 | 257 | + real( DEharr_Haux(1,1)*dconjg(DEharr_Daux(1,1)-DEharr_Daux_old(1,1)) ) | ||
1463 | 258 | |||
1464 | 259 | DEharr_SO(2) = DEharr_SO(2) & | ||
1465 | 260 | + real( DEharr_Haux(2,2)*dconjg(DEharr_Daux(2,2)-DEharr_Daux_old(2,2)) ) | ||
1466 | 261 | |||
1467 | 262 | DEharr_SO(3) = DEharr_SO(3) & | ||
1468 | 263 | + real( DEharr_Haux(1,2)*dconjg(DEharr_Daux(1,2)-DEharr_Daux_old(1,2)) ) | ||
1469 | 264 | |||
1470 | 265 | DEharr_SO(4) = DEharr_SO(4) & | ||
1471 | 266 | + real( DEharr_Haux(2,1)*dconjg(DEharr_Daux(2,1)-DEharr_Daux_old(2,1)) ) | ||
1472 | 267 | |||
1473 | 268 | enddo | ||
1474 | 269 | |||
1475 | 270 | DEharr = sum ( DEharr_SO ) | ||
1476 | 271 | |||
1477 | 272 | else if ( spin%NCol ) then | ||
1478 | 191 | do io = 1,maxnh | 273 | do io = 1,maxnh |
1479 | 192 | DEharr = DEharr + H(io,1) * ( Dscf(io,1) - Dold(io,1) ) & | 274 | DEharr = DEharr + H(io,1) * ( Dscf(io,1) - Dold(io,1) ) & |
1480 | 193 | + H(io,2) * ( Dscf(io,2) - Dold(io,2) ) & | 275 | + H(io,2) * ( Dscf(io,2) - Dold(io,2) ) & |
1481 | 194 | + 2.0_dp * H(io,3) * ( Dscf(io,3) - Dold(io,3) ) & | 276 | + 2.0_dp * H(io,3) * ( Dscf(io,3) - Dold(io,3) ) & |
1482 | 195 | + 2.0_dp * H(io,4) * ( Dscf(io,4) - Dold(io,4) ) | 277 | + 2.0_dp * H(io,4) * ( Dscf(io,4) - Dold(io,4) ) |
1483 | 196 | enddo | 278 | enddo |
1485 | 197 | elseif (SPpol) then | 279 | elseif ( spin%Col ) then |
1486 | 198 | do io = 1,maxnh | 280 | do io = 1,maxnh |
1487 | 199 | DEharr = DEharr + H(io,1) * ( Dscf(io,1) - Dold(io,1) ) & | 281 | DEharr = DEharr + H(io,1) * ( Dscf(io,1) - Dold(io,1) ) & |
1488 | 200 | + H(io,2) * ( Dscf(io,2) - Dold(io,2) ) | 282 | + H(io,2) * ( Dscf(io,2) - Dold(io,2) ) |
1489 | 201 | enddo | 283 | enddo |
1491 | 202 | elseif (NoMagn) then | 284 | elseif ( spin%none ) then |
1492 | 203 | do io = 1,maxnh | 285 | do io = 1,maxnh |
1493 | 204 | DEharr = DEharr + H(io,1) * ( Dscf(io,1) - Dold(io,1) ) | 286 | DEharr = DEharr + H(io,1) * ( Dscf(io,1) - Dold(io,1) ) |
1494 | 205 | enddo | 287 | enddo |
1495 | @@ -217,11 +299,21 @@ | |||
1496 | 217 | use files, only : filesOut_t ! derived type for output file names | 299 | use files, only : filesOut_t ! derived type for output file names |
1497 | 218 | use class_dSpData1D, only : val | 300 | use class_dSpData1D, only : val |
1498 | 219 | use class_dSpData2D, only : val | 301 | use class_dSpData2D, only : val |
1500 | 220 | use sparse_matrices, only: H_kin_1D, H_vkb_1D, H_so_2D | 302 | use class_zSpData2D, only : val |
1501 | 303 | use sparse_matrices, only: H_kin_1D, H_vkb_1D | ||
1502 | 304 | use sparse_matrices, only: H_so_on_2D, H_so_off_2D | ||
1503 | 305 | |||
1504 | 221 | 306 | ||
1505 | 222 | type(filesOut_t) :: filesOut ! blank output file names | 307 | type(filesOut_t) :: filesOut ! blank output file names |
1508 | 223 | real(dp), pointer :: H_vkb(:), H_kin(:), H_so(:,:) | 308 | real(dp), pointer :: H_vkb(:), H_kin(:), H_so_on(:,:) |
1509 | 224 | 309 | complex(dp), pointer :: H_so_off(:,:) | |
1510 | 310 | |||
1511 | 311 | |||
1512 | 312 | complex(dp) :: Hc, Dc | ||
1513 | 313 | real(dp) :: dummy_stress(3,3), dummy_fa(1,1) | ||
1514 | 314 | real(dp) :: dummy_E, g2max, dummy_H(1,1) | ||
1515 | 315 | integer :: ihmat, ifa, istr | ||
1516 | 316 | |||
1517 | 225 | ! Compute E_KS(DM_out) | 317 | ! Compute E_KS(DM_out) |
1518 | 226 | 318 | ||
1519 | 227 | g2max = g2cut | 319 | g2max = g2cut |
1520 | @@ -233,7 +325,7 @@ | |||
1521 | 233 | 325 | ||
1522 | 234 | ! Remove unwanted arguments... | 326 | ! Remove unwanted arguments... |
1523 | 235 | 327 | ||
1525 | 236 | call dhscf( nspin, no_s, iaorb, iphorb, no_l, & | 328 | call dhscf( spin%Grid, no_s, iaorb, iphorb, no_l, & |
1526 | 237 | no_u, na_u, na_s, isa, xa, indxua, & | 329 | no_u, na_u, na_s, isa, xa, indxua, & |
1527 | 238 | ntm, ifa, istr, ihmat, filesOut, & | 330 | ntm, ifa, istr, ihmat, filesOut, & |
1528 | 239 | maxnh, numh, listhptr, listh, Dscf, Datm, & | 331 | maxnh, numh, listhptr, listh, Dscf, Datm, & |
1529 | @@ -250,7 +342,7 @@ | |||
1530 | 250 | 342 | ||
1531 | 251 | Ekin = 0.0_dp | 343 | Ekin = 0.0_dp |
1532 | 252 | Enl = 0.0_dp | 344 | Enl = 0.0_dp |
1534 | 253 | do ispin = 1, spinor_dim | 345 | do ispin = 1, spin%spinor |
1535 | 254 | do io = 1,maxnh | 346 | do io = 1,maxnh |
1536 | 255 | Ekin = Ekin + H_kin(io) * Dscf(io,ispin) | 347 | Ekin = Ekin + H_kin(io) * Dscf(io,ispin) |
1537 | 256 | Enl = Enl + H_vkb(io) * Dscf(io,ispin) | 348 | Enl = Enl + H_vkb(io) * Dscf(io,ispin) |
1538 | @@ -266,21 +358,48 @@ | |||
1539 | 266 | #endif | 358 | #endif |
1540 | 267 | 359 | ||
1541 | 268 | Eso = 0._dp | 360 | Eso = 0._dp |
1543 | 269 | if ( SpOrb ) then | 361 | |
1544 | 362 | if ( spin%SO_offsite ) then | ||
1545 | 363 | H_so_off => val(H_so_off_2D) | ||
1546 | 364 | |||
1547 | 365 | ! The computation of the trace is different here, as H_so_off has | ||
1548 | 366 | ! a different structure from H and the DM. | ||
1549 | 367 | do io = 1, maxnh | ||
1550 | 368 | |||
1551 | 369 | !-------- Eso(u,u) | ||
1552 | 370 | Dc = cmplx(Dscf(io,1),Dscf(io,5), dp) | ||
1553 | 371 | Eso = Eso + real( H_so_off(io,1)*Dc, dp) | ||
1554 | 372 | !-------- Eso(d,d) | ||
1555 | 373 | Dc = cmplx(Dscf(io,2),Dscf(io,6), dp) | ||
1556 | 374 | Eso = Eso + real( H_so_off(io,2)*Dc, dp) | ||
1557 | 375 | !-------- Eso(u,d) | ||
1558 | 376 | Dc = cmplx(Dscf(io,3),Dscf(io,4), dp) | ||
1559 | 377 | Eso = Eso + real( H_so_off(io,4)*Dc, dp) | ||
1560 | 378 | !-------- Eso(d,u) | ||
1561 | 379 | Dc = cmplx(Dscf(io,7),-Dscf(io,8), dp) | ||
1562 | 380 | Eso = Eso + real( H_so_off(io,3)*Dc, dp) | ||
1563 | 381 | |||
1564 | 382 | end do | ||
1565 | 383 | |||
1566 | 384 | else if ( spin%SO_onsite ) then | ||
1567 | 270 | ! Sadly some compilers (g95), does | 385 | ! Sadly some compilers (g95), does |
1568 | 271 | ! not allow bounds for pointer assignments :( | 386 | ! not allow bounds for pointer assignments :( |
1570 | 272 | H_so => val(H_so_2D) | 387 | H_so_on => val(H_so_on_2D) |
1571 | 273 | do io = 1,maxnh | 388 | do io = 1,maxnh |
1576 | 274 | Eso = Eso + H_so(io,1)*Dscf(io,7) + H_so(io,2)*Dscf(io,8) & | 389 | Eso = Eso + H_so_on(io,1)*Dscf(io,7) + H_so_on(io,2)*Dscf(io,8) & |
1577 | 275 | + H_so(io,5)*Dscf(io,3) + H_so(io,6)*Dscf(io,4) & | 390 | + H_so_on(io,5)*Dscf(io,3) + H_so_on(io,6)*Dscf(io,4) & |
1578 | 276 | - H_so(io,3)*Dscf(io,5) - H_so(io,4)*Dscf(io,6) | 391 | - H_so_on(io,3)*Dscf(io,5) - H_so_on(io,4)*Dscf(io,6) |
1579 | 277 | end do | 392 | end do |
1580 | 393 | |||
1581 | 394 | end if | ||
1582 | 395 | |||
1583 | 278 | #ifdef MPI | 396 | #ifdef MPI |
1584 | 397 | if (spin%SO) then | ||
1585 | 279 | ! Global reduction of Eso | 398 | ! Global reduction of Eso |
1586 | 280 | call globalize_sum( Eso, buffer1 ) | 399 | call globalize_sum( Eso, buffer1 ) |
1587 | 281 | Eso = buffer1 | 400 | Eso = buffer1 |
1588 | 401 | endif | ||
1589 | 282 | #endif | 402 | #endif |
1590 | 283 | end if | ||
1591 | 284 | 403 | ||
1592 | 285 | ! E0 = Ena + Ekin + Enl + Eso - Eions | 404 | ! E0 = Ena + Ekin + Enl + Eso - Eions |
1593 | 286 | 405 | ||
1594 | 287 | 406 | ||
1595 | === modified file 'Src/dfscf.f' | |||
1596 | --- Src/dfscf.f 2018-04-22 00:13:43 +0000 | |||
1597 | +++ Src/dfscf.f 2018-04-30 20:53:35 +0000 | |||
1598 | @@ -20,6 +20,7 @@ | |||
1599 | 20 | C Adds the SCF contribution to atomic forces and stress. | 20 | C Adds the SCF contribution to atomic forces and stress. |
1600 | 21 | C Written by P.Ordejon, J.M.Soler, and J.Gale. | 21 | C Written by P.Ordejon, J.M.Soler, and J.Gale. |
1601 | 22 | C Last modification by J.M.Soler, October 2000. | 22 | C Last modification by J.M.Soler, October 2000. |
1602 | 23 | C Modifed for Off-Site Spin-orbit coupling by R. Cuadrado, Feb. 2018 | ||
1603 | 23 | C *********************** INPUT ************************************** | 24 | C *********************** INPUT ************************************** |
1604 | 24 | C integer ifa : Are forces required? (1=yes,0=no) | 25 | C integer ifa : Are forces required? (1=yes,0=no) |
1605 | 25 | C integer istr : Is stress required? (1=yes,0=no) | 26 | C integer istr : Is stress required? (1=yes,0=no) |
1606 | @@ -334,7 +335,7 @@ | |||
1607 | 334 | 335 | ||
1608 | 335 | C Factor two for nondiagonal elements for non-collinear spin (and SO) | 336 | C Factor two for nondiagonal elements for non-collinear spin (and SO) |
1609 | 336 | if ( nspin == 4 ) then | 337 | if ( nspin == 4 ) then |
1611 | 337 | V(1:nsp,3:4) = 2.0_dp * V(1:nsp,3:4) | 338 | V(1:nsp,3:4) = 2.0_dp * V(1:nsp,3:4) |
1612 | 338 | end if | 339 | end if |
1613 | 339 | 340 | ||
1614 | 340 | C Loop on first orbital of mesh point | 341 | C Loop on first orbital of mesh point |
1615 | 341 | 342 | ||
1616 | === modified file 'Src/final_H_f_stress.F' | |||
1617 | --- Src/final_H_f_stress.F 2017-11-23 14:17:27 +0000 | |||
1618 | +++ Src/final_H_f_stress.F 2018-04-30 20:53:35 +0000 | |||
1619 | @@ -21,8 +21,9 @@ | |||
1620 | 21 | use siesta_options, only: recompute_H_after_scf | 21 | use siesta_options, only: recompute_H_after_scf |
1621 | 22 | use sparse_matrices, only: numh, listh, listhptr | 22 | use sparse_matrices, only: numh, listh, listhptr |
1622 | 23 | use sparse_matrices, only: H, S, Dscf, Escf, maxnh, xijo | 23 | use sparse_matrices, only: H, S, Dscf, Escf, maxnh, xijo |
1624 | 24 | use sparse_matrices, only: H_ldau_2D | 24 | use sparse_matrices, only: H_ldau_2D, H_so_off_2D |
1625 | 25 | use class_dSpData2D, only: val | 25 | use class_dSpData2D, only: val |
1626 | 26 | use class_zSpData2D, only: val | ||
1627 | 26 | 27 | ||
1628 | 27 | use siesta_geom | 28 | use siesta_geom |
1629 | 28 | use atomlist, only: no_u, iaorb, iphkb, qtot, indxuo, datm, | 29 | use atomlist, only: no_u, iaorb, iphkb, qtot, indxuo, datm, |
1630 | @@ -30,7 +31,7 @@ | |||
1631 | 30 | & rmaxo, no_l, iza | 31 | & rmaxo, no_l, iza |
1632 | 31 | use metaforce, only: lMetaForce, meta | 32 | use metaforce, only: lMetaForce, meta |
1633 | 32 | use molecularmechanics, only : twobody | 33 | use molecularmechanics, only : twobody |
1635 | 33 | use m_nlefsm, only: nlefsm | 34 | use m_nlefsm, only: nlefsm, nlefsm_SO_off |
1636 | 34 | use m_overfsm, only: overfsm | 35 | use m_overfsm, only: overfsm |
1637 | 35 | use m_kinefsm, only: kinefsm | 36 | use m_kinefsm, only: kinefsm |
1638 | 36 | use m_naefs, only: naefs | 37 | use m_naefs, only: naefs |
1639 | @@ -46,8 +47,8 @@ | |||
1640 | 46 | use m_energies | 47 | use m_energies |
1641 | 47 | use m_steps, only: istp | 48 | use m_steps, only: istp |
1642 | 48 | use m_ntm | 49 | use m_ntm |
1645 | 49 | use m_spin, only: spin | 50 | use m_spin, only: spin |
1646 | 50 | use spinorbit, only: spinorb | 51 | use spinorbit, only: spinorb |
1647 | 51 | use m_dipol | 52 | use m_dipol |
1648 | 52 | use m_forces, only: fa | 53 | use m_forces, only: fa |
1649 | 53 | use alloc, only: re_alloc, de_alloc | 54 | use alloc, only: re_alloc, de_alloc |
1650 | @@ -91,6 +92,8 @@ | |||
1651 | 91 | real(dp), pointer :: H_tmp(:,:) => null() | 92 | real(dp), pointer :: H_tmp(:,:) => null() |
1652 | 92 | real(dp), pointer :: S_tmp(:) => null() | 93 | real(dp), pointer :: S_tmp(:) => null() |
1653 | 93 | real(dp), pointer :: H_ldau(:,:) | 94 | real(dp), pointer :: H_ldau(:,:) |
1654 | 95 | complex(dp), pointer :: H_so_off(:,:) | ||
1655 | 96 | |||
1656 | 94 | #ifdef FINAL_CHECK_HS | 97 | #ifdef FINAL_CHECK_HS |
1657 | 95 | real(dp) :: diff_H, diff_S | 98 | real(dp) :: diff_H, diff_S |
1658 | 96 | #endif | 99 | #endif |
1659 | @@ -98,6 +101,7 @@ | |||
1660 | 98 | real(dp) :: stresstmp(3,3) | 101 | real(dp) :: stresstmp(3,3) |
1661 | 99 | real(dp), pointer :: fatmp(:,:) | 102 | real(dp), pointer :: fatmp(:,:) |
1662 | 100 | real(dp) :: buffer1 | 103 | real(dp) :: buffer1 |
1663 | 104 | integer :: MPIerror | ||
1664 | 101 | #endif | 105 | #endif |
1665 | 102 | character(len=label_length+13) :: fname | 106 | character(len=label_length+13) :: fname |
1666 | 103 | integer :: io_istep, io_ia1 | 107 | integer :: io_istep, io_ia1 |
1667 | @@ -106,6 +110,8 @@ | |||
1668 | 106 | type(dict) :: dic_save | 110 | type(dict) :: dic_save |
1669 | 107 | #endif | 111 | #endif |
1670 | 108 | #endif | 112 | #endif |
1671 | 113 | |||
1672 | 114 | |||
1673 | 109 | !------------------------------------------------------------------------- BEGIN | 115 | !------------------------------------------------------------------------- BEGIN |
1674 | 110 | 116 | ||
1675 | 111 | ! Initialize Hamiltonian ........................................ | 117 | ! Initialize Hamiltonian ........................................ |
1676 | @@ -158,28 +164,42 @@ | |||
1677 | 158 | ! .................. | 164 | ! .................. |
1678 | 159 | 165 | ||
1679 | 160 | ! Non-local-pseudop: energy, forces, stress and matrix elements ....... | 166 | ! Non-local-pseudop: energy, forces, stress and matrix elements ....... |
1698 | 161 | call nlefsm( scell, na_u, na_s, isa, xa, indxua, | 167 | |
1699 | 162 | & maxnh, maxnh, lasto, lastkb, iphorb, iphKB, | 168 | Eso = 0.0_dp |
1700 | 163 | & numh, listhptr, listh, numh, listhptr, listh, | 169 | |
1701 | 164 | & spin%spinor, Dscf, Enl, fal, stressl, H_tmp, | 170 | if ( .not.spin%SO_offsite ) then |
1702 | 165 | & matrix_elements_only=.false. ) | 171 | call nlefsm( scell, na_u, na_s, isa, xa, indxua, |
1703 | 166 | 172 | & maxnh, maxnh, lasto, lastkb, iphorb, iphKB, | |
1704 | 167 | #ifdef MPI | 173 | & numh, listhptr, listh, numh, listhptr, listh, |
1705 | 168 | ! Global reduction of energy terms | 174 | & spin%spinor, Dscf, Enl, fal, stressl, H_tmp, |
1706 | 169 | call globalize_sum(Enl,buffer1) | 175 | & matrix_elements_only=.false. ) |
1707 | 170 | Enl = buffer1 | 176 | |
1708 | 171 | #endif | 177 | #ifdef MPI |
1709 | 172 | 178 | ! Global reduction of energy terms | |
1710 | 173 | ! If in the future the spin-orbit routine is able to compute | 179 | call globalize_sum(Enl,buffer1) |
1711 | 174 | ! forces and stresses, then "last" will be needed. If we are not | 180 | Enl = buffer1 |
1712 | 175 | ! computing forces and stresses, calling it in the first iteration | 181 | #endif |
1713 | 176 | ! should be enough | 182 | else |
1714 | 177 | ! | 183 | H_so_off => val(H_so_off_2D) |
1715 | 178 | if ( spin%SO ) then | 184 | call nlefsm_SO_off(scell, na_u, na_s, isa, xa, indxua, |
1716 | 185 | & maxnh, maxnh, lasto, lastkb, iphorb, iphKB, | ||
1717 | 186 | & numh, listhptr, listh, numh, listhptr, listh, | ||
1718 | 187 | & spin%Grid, | ||
1719 | 188 | & Enl, Eso, fal, | ||
1720 | 189 | & stressl, H_tmp, H_so_off, | ||
1721 | 190 | & matrix_elements_only=.false.) | ||
1722 | 191 | #ifdef MPI | ||
1723 | 192 | ! Global reduction of energy terms | ||
1724 | 193 | call globalize_sum(Enl,buffer1) | ||
1725 | 194 | Enl = buffer1 | ||
1726 | 195 | call globalize_sum(Eso,buffer1) | ||
1727 | 196 | Eso = buffer1 | ||
1728 | 197 | #endif | ||
1729 | 198 | endif | ||
1730 | 199 | |||
1731 | 200 | if ( spin%SO_onsite ) then | ||
1732 | 179 | call spinorb(no_u,no_l,iaorb,iphorb,isa,indxuo, | 201 | call spinorb(no_u,no_l,iaorb,iphorb,isa,indxuo, |
1733 | 180 | & maxnh,numh,listhptr,listh,Dscf,H_tmp(:,3:),Eso) | 202 | & maxnh,numh,listhptr,listh,Dscf,H_tmp(:,3:),Eso) |
1734 | 181 | else | ||
1735 | 182 | Eso = 0._dp | ||
1736 | 183 | endif | 203 | endif |
1737 | 184 | 204 | ||
1738 | 185 | ! Non-SCF part of total energy | 205 | ! Non-SCF part of total energy |
1739 | @@ -276,7 +296,8 @@ | |||
1740 | 276 | & diff_S | 296 | & diff_S |
1741 | 277 | end if | 297 | end if |
1742 | 278 | #endif | 298 | #endif |
1744 | 279 | 299 | ||
1745 | 300 | ! TODO I am not sure this works with SO_offsite? | ||
1746 | 280 | if (recompute_H_after_scf) then | 301 | if (recompute_H_after_scf) then |
1747 | 281 | if (ionode) then | 302 | if (ionode) then |
1748 | 282 | write(6,"(a)") ":!: Updating H after scf cycle" // | 303 | write(6,"(a)") ":!: Updating H after scf cycle" // |
1749 | 283 | 304 | ||
1750 | === modified file 'Src/initatom.f' | |||
1751 | --- Src/initatom.f 2018-04-07 19:24:04 +0000 | |||
1752 | +++ Src/initatom.f 2018-04-30 20:53:35 +0000 | |||
1753 | @@ -50,10 +50,10 @@ | |||
1754 | 50 | use ldau_specs, only: ldau_proj_gen | 50 | use ldau_specs, only: ldau_proj_gen |
1755 | 51 | use ldau_specs, only: populate_species_info_ldau | 51 | use ldau_specs, only: populate_species_info_ldau |
1756 | 52 | use pseudopotential, only: pseudo_read | 52 | use pseudopotential, only: pseudo_read |
1758 | 53 | 53 | ||
1759 | 54 | use chemical | 54 | use chemical |
1760 | 55 | 55 | ||
1762 | 56 | use m_spin, only: SpOrb | 56 | use m_spin, only: spin |
1763 | 57 | 57 | ||
1764 | 58 | use atm_types, only: species, species_info, nspecies | 58 | use atm_types, only: species, species_info, nspecies |
1765 | 59 | 59 | ||
1766 | @@ -63,6 +63,7 @@ | |||
1767 | 63 | integer :: is | 63 | integer :: is |
1768 | 64 | logical :: user_basis, user_basis_netcdf | 64 | logical :: user_basis, user_basis_netcdf |
1769 | 65 | logical :: req_init_setup | 65 | logical :: req_init_setup |
1770 | 66 | logical :: lj_projs | ||
1771 | 66 | 67 | ||
1772 | 67 | type(basis_def_t), pointer :: basp | 68 | type(basis_def_t), pointer :: basp |
1773 | 68 | type(species_info), pointer :: spp | 69 | type(species_info), pointer :: spp |
1774 | @@ -106,12 +107,13 @@ | |||
1775 | 106 | call elec_corr_setup() | 107 | call elec_corr_setup() |
1776 | 107 | else if (user_basis) then | 108 | else if (user_basis) then |
1777 | 108 | 109 | ||
1779 | 109 | if ( SpOrb ) then | 110 | if ( spin%SO_onsite ) then |
1780 | 110 | ! We still need to read the pseudopotential information | 111 | ! We still need to read the pseudopotential information |
1782 | 111 | write(6,'(a)') ' initatom: Spin configuration = spin-orbit' | 112 | ! because the .ion files do not contain V_so information |
1783 | 113 | write(6,'(a)') ' initatom: spin-orbit-onsite with user-basis' | ||
1784 | 114 | write(6,'(a)') ' initatom: Still need to read the psf files.' | ||
1785 | 112 | do is = 1 , nsp | 115 | do is = 1 , nsp |
1786 | 113 | basp => basis_parameters(is) | 116 | basp => basis_parameters(is) |
1787 | 114 | |||
1788 | 115 | basp%label = species_label(is) | 117 | basp%label = species_label(is) |
1789 | 116 | call pseudo_read(basp%label,basp%pseudopotential) | 118 | call pseudo_read(basp%label,basp%pseudopotential) |
1790 | 117 | end do | 119 | end do |
1791 | @@ -132,6 +134,8 @@ | |||
1792 | 132 | nspecies = nsp ! For atm_types module | 134 | nspecies = nsp ! For atm_types module |
1793 | 133 | call setup_atom_tables(nsp) | 135 | call setup_atom_tables(nsp) |
1794 | 134 | 136 | ||
1795 | 137 | lj_projs = (spin%SO_offsite) | ||
1796 | 138 | |||
1797 | 135 | allocate(species(nspecies)) | 139 | allocate(species(nspecies)) |
1798 | 136 | do is = 1,nsp | 140 | do is = 1,nsp |
1799 | 137 | call write_basis_specs(6,is) | 141 | call write_basis_specs(6,is) |
1800 | @@ -151,7 +155,8 @@ | |||
1801 | 151 | & qyuk(0:lmaxd,1:nsemx,is), | 155 | & qyuk(0:lmaxd,1:nsemx,is), |
1802 | 152 | & qwid(0:lmaxd,1:nsemx,is), | 156 | & qwid(0:lmaxd,1:nsemx,is), |
1803 | 153 | & split_norm(0:lmaxd,1:nsemx,is), | 157 | & split_norm(0:lmaxd,1:nsemx,is), |
1805 | 154 | & filtercut(0:lmaxd,1:nsemx,is), basp, spp) | 158 | & filtercut(0:lmaxd,1:nsemx,is), basp, spp, |
1806 | 159 | $ lj_projs) | ||
1807 | 155 | ! Generate the projectors for the LDA+U simulations (if requested) | 160 | ! Generate the projectors for the LDA+U simulations (if requested) |
1808 | 156 | call ldau_proj_gen(is) | 161 | call ldau_proj_gen(is) |
1809 | 157 | enddo | 162 | enddo |
1810 | @@ -165,11 +170,12 @@ | |||
1811 | 165 | call elec_corr_setup() | 170 | call elec_corr_setup() |
1812 | 166 | ns = nsp ! Set number of species for main program | 171 | ns = nsp ! Set number of species for main program |
1813 | 167 | 172 | ||
1814 | 173 | call dump_basis_ascii() | ||
1815 | 174 | call dump_basis_netcdf() | ||
1816 | 175 | call dump_basis_xml() | ||
1817 | 176 | |||
1818 | 168 | endif | 177 | endif |
1819 | 169 | 178 | ||
1820 | 170 | call dump_basis_ascii() | ||
1821 | 171 | call dump_basis_netcdf() | ||
1822 | 172 | call dump_basis_xml() | ||
1823 | 173 | 179 | ||
1824 | 174 | if (.not. user_basis .and. .not. user_basis_netcdf) then | 180 | if (.not. user_basis .and. .not. user_basis_netcdf) then |
1825 | 175 | call deallocate_spec_arrays() | 181 | call deallocate_spec_arrays() |
1826 | 176 | 182 | ||
1827 | === modified file 'Src/m_cite.F90' | |||
1828 | --- Src/m_cite.F90 2016-12-29 10:36:10 +0000 | |||
1829 | +++ Src/m_cite.F90 2018-04-30 20:53:35 +0000 | |||
1830 | @@ -74,7 +74,7 @@ | |||
1831 | 74 | ! Increment this after having added a new | 74 | ! Increment this after having added a new |
1832 | 75 | ! citation! | 75 | ! citation! |
1833 | 76 | ! OTHERWISE YOU WILL EXPERIENCE A SEG-FAULT. | 76 | ! OTHERWISE YOU WILL EXPERIENCE A SEG-FAULT. |
1835 | 77 | integer, parameter :: N_citations = 7 | 77 | integer, parameter :: N_citations = 9 |
1836 | 78 | 78 | ||
1837 | 79 | private | 79 | private |
1838 | 80 | 80 | ||
1839 | @@ -242,7 +242,29 @@ | |||
1840 | 242 | cit%issue = "30" | 242 | cit%issue = "30" |
1841 | 243 | cit%cite_key = "Lin2014" | 243 | cit%cite_key = "Lin2014" |
1842 | 244 | ID = 7 | 244 | ID = 7 |
1843 | 245 | |||
1844 | 246 | case ( "10.1088/0953-8984/24/8/086005" ) | ||
1845 | 247 | ! Off-Site Spin-Orbit | ||
1846 | 248 | cit%comment = "Off-Site Spin-Orbit Implementation" | ||
1847 | 249 | cit%doi = "10.1088/0953-8984/24/8/086005" | ||
1848 | 250 | cit%journal = "Journal of Physics: Condensed Matter" | ||
1849 | 251 | cit%year = 2012 | ||
1850 | 252 | cit%volume = "24" | ||
1851 | 253 | cit%issue = "8" | ||
1852 | 254 | cit%cite_key = "Cuadrado2012" | ||
1853 | 255 | ID = 8 | ||
1854 | 245 | 256 | ||
1855 | 257 | case ( "10.1088/0953-8984/18/34/012") | ||
1856 | 258 | ! On-Site Spin-Orbit | ||
1857 | 259 | cit%comment = "On-Site Spin-Orbit Implementation" | ||
1858 | 260 | cit%doi = "10.1088/0953-8984/18/34/012" | ||
1859 | 261 | cit%journal = "Journal of Physics: Condensed Matter" | ||
1860 | 262 | cit%year = 2006 | ||
1861 | 263 | cit%volume = "18" | ||
1862 | 264 | cit%issue = "0" | ||
1863 | 265 | cit%cite_key = "FernandezSeivane2006" | ||
1864 | 266 | ID = 9 | ||
1865 | 267 | |||
1866 | 246 | end select | 268 | end select |
1867 | 247 | 269 | ||
1868 | 248 | ! probably we should error out... | 270 | ! probably we should error out... |
1869 | 249 | 271 | ||
1870 | === modified file 'Src/m_pulay.F90' | |||
1871 | --- Src/m_pulay.F90 2016-06-04 20:06:11 +0000 | |||
1872 | +++ Src/m_pulay.F90 2018-04-30 20:53:35 +0000 | |||
1873 | @@ -8,7 +8,7 @@ | |||
1874 | 8 | module m_pulay | 8 | module m_pulay |
1875 | 9 | 9 | ||
1876 | 10 | use precision, only: dp | 10 | use precision, only: dp |
1878 | 11 | use m_spin, only: h_spin_dim, SpOrb | 11 | use m_spin, only: spin |
1879 | 12 | implicit none | 12 | implicit none |
1880 | 13 | 13 | ||
1881 | 14 | private | 14 | private |
1882 | @@ -48,7 +48,7 @@ | |||
1883 | 48 | if (maxsav .le. 0) then | 48 | if (maxsav .le. 0) then |
1884 | 49 | ! No need for auxiliary arrays | 49 | ! No need for auxiliary arrays |
1885 | 50 | else | 50 | else |
1887 | 51 | nauxpul = sum(numh(1:no_l)) * h_spin_dim * maxsav | 51 | nauxpul = sum(numh(1:no_l)) * spin%H * maxsav |
1888 | 52 | ! | 52 | ! |
1889 | 53 | call re_alloc(auxpul,1,nauxpul,1,2,name="auxpul", & | 53 | call re_alloc(auxpul,1,nauxpul,1,2,name="auxpul", & |
1890 | 54 | routine="pulay") | 54 | routine="pulay") |
1891 | @@ -370,8 +370,8 @@ | |||
1892 | 370 | ! B(i,i) = dot_product(Res(i)*Res(i)) | 370 | ! B(i,i) = dot_product(Res(i)*Res(i)) |
1893 | 371 | b(i,i) = 0.0_dp | 371 | b(i,i) = 0.0_dp |
1894 | 372 | ssum=0.0_dp | 372 | ssum=0.0_dp |
1897 | 373 | ! CC RC Added for on-site SO | 373 | |
1898 | 374 | if ( .not. SpOrb ) then | 374 | if ( .not. spin%SO ) then |
1899 | 375 | do is=1,nspin | 375 | do is=1,nspin |
1900 | 376 | do ii=1,no_l | 376 | do ii=1,no_l |
1901 | 377 | do jj=1,numd(ii) | 377 | do jj=1,numd(ii) |
1902 | @@ -380,7 +380,7 @@ | |||
1903 | 380 | enddo | 380 | enddo |
1904 | 381 | enddo | 381 | enddo |
1905 | 382 | enddo | 382 | enddo |
1907 | 383 | elseif ( SpOrb ) then | 383 | elseif ( spin%SO ) then |
1908 | 384 | do ii=1,no_l | 384 | do ii=1,no_l |
1909 | 385 | do jj=1,numd(ii) | 385 | do jj=1,numd(ii) |
1910 | 386 | ind = listdptr(ii) + jj | 386 | ind = listdptr(ii) + jj |
1911 | @@ -393,7 +393,6 @@ | |||
1912 | 393 | enddo | 393 | enddo |
1913 | 394 | enddo | 394 | enddo |
1914 | 395 | endif | 395 | endif |
1915 | 396 | ! CC RC | ||
1916 | 397 | 396 | ||
1917 | 398 | b(i,i)=ssum | 397 | b(i,i)=ssum |
1918 | 399 | ! | 398 | ! |
1919 | @@ -414,7 +413,7 @@ | |||
1920 | 414 | 413 | ||
1921 | 415 | b(i,j)=0.0_dp | 414 | b(i,j)=0.0_dp |
1922 | 416 | ssum=0.0_dp | 415 | ssum=0.0_dp |
1924 | 417 | if ( .not. SpOrb ) then | 416 | if ( .not. spin%SO ) then |
1925 | 418 | do is=1,nspin | 417 | do is=1,nspin |
1926 | 419 | do ii=1,no_l | 418 | do ii=1,no_l |
1927 | 420 | do jj=1,numd(ii) | 419 | do jj=1,numd(ii) |
1928 | @@ -423,7 +422,7 @@ | |||
1929 | 423 | enddo | 422 | enddo |
1930 | 424 | enddo | 423 | enddo |
1931 | 425 | enddo | 424 | enddo |
1933 | 426 | elseif ( SpOrb ) then | 425 | elseif ( spin%SO ) then |
1934 | 427 | do ii=1,no_l | 426 | do ii=1,no_l |
1935 | 428 | do jj=1,numd(ii) | 427 | do jj=1,numd(ii) |
1936 | 429 | ind = listdptr(ii) + jj | 428 | ind = listdptr(ii) + jj |
1937 | 430 | 429 | ||
1938 | === modified file 'Src/m_spin.F90' | |||
1939 | --- Src/m_spin.F90 2018-02-27 21:05:45 +0000 | |||
1940 | +++ Src/m_spin.F90 2018-04-30 20:53:35 +0000 | |||
1941 | @@ -7,13 +7,16 @@ | |||
1942 | 7 | ! --- | 7 | ! --- |
1943 | 8 | module t_spin | 8 | module t_spin |
1944 | 9 | 9 | ||
1945 | 10 | use precision, only: dp | ||
1946 | 11 | |||
1947 | 10 | implicit none | 12 | implicit none |
1949 | 11 | 13 | private | |
1950 | 14 | |||
1951 | 12 | !> Type containing a simulations spin configuration | 15 | !> Type containing a simulations spin configuration |
1952 | 13 | !! | 16 | !! |
1953 | 14 | !! Thus this type contains _all_ relevant information | 17 | !! Thus this type contains _all_ relevant information |
1954 | 15 | !! regarding the spin-configuration. | 18 | !! regarding the spin-configuration. |
1956 | 16 | type tSpin | 19 | type, public :: tSpin |
1957 | 17 | 20 | ||
1958 | 18 | !> Dimensionality of the Hamiltonian | 21 | !> Dimensionality of the Hamiltonian |
1959 | 19 | integer :: H = 1 | 22 | integer :: H = 1 |
1960 | @@ -37,8 +40,9 @@ | |||
1961 | 37 | !> Spin-orbit coupling | 40 | !> Spin-orbit coupling |
1962 | 38 | logical :: SO = .false. | 41 | logical :: SO = .false. |
1963 | 39 | 42 | ||
1966 | 40 | !> If .true. the spin-orbit is using the off-site implementation (else the on-site) | 43 | !> Flavors of off-site implementation |
1967 | 41 | logical :: SO_off = .false. | 44 | logical :: SO_offsite = .false. |
1968 | 45 | logical :: SO_onsite = .false. | ||
1969 | 42 | 46 | ||
1970 | 43 | ! Perhaps one could argue that one may | 47 | ! Perhaps one could argue that one may |
1971 | 44 | ! associate a symmetry to the spin which | 48 | ! associate a symmetry to the spin which |
1972 | @@ -110,6 +114,10 @@ | |||
1973 | 110 | use fdf, only : fdf_get, leqi, fdf_deprecated | 114 | use fdf, only : fdf_get, leqi, fdf_deprecated |
1974 | 111 | use alloc, only: re_alloc | 115 | use alloc, only: re_alloc |
1975 | 112 | 116 | ||
1976 | 117 | use m_cite, only: add_citation | ||
1977 | 118 | use files, only: slabel | ||
1978 | 119 | use parallel, only: IONode | ||
1979 | 120 | |||
1980 | 113 | character(len=32) :: opt | 121 | character(len=32) :: opt |
1981 | 114 | 122 | ||
1982 | 115 | ! Create pointer assignments... | 123 | ! Create pointer assignments... |
1983 | @@ -127,14 +135,14 @@ | |||
1984 | 127 | ! Time reversal symmetry | 135 | ! Time reversal symmetry |
1985 | 128 | TrSym = .true. | 136 | TrSym = .true. |
1986 | 129 | 137 | ||
1989 | 130 | ! All components of the 'spin' variable | 138 | ! Initialize all components of the 'spin' variable |
1988 | 131 | ! is initially correct... | ||
1990 | 132 | spin%none = .false. | 139 | spin%none = .false. |
1991 | 133 | spin%Col = .false. | 140 | spin%Col = .false. |
1992 | 134 | spin%NCol = .false. | 141 | spin%NCol = .false. |
1993 | 135 | spin%SO = .false. | 142 | spin%SO = .false. |
1996 | 136 | spin%SO_off = .false. | 143 | spin%SO_offsite = .false. |
1997 | 137 | 144 | spin%SO_onsite = .false. | |
1998 | 145 | |||
1999 | 138 | ! Read in old flags (discouraged) | 146 | ! Read in old flags (discouraged) |
2000 | 139 | spin%Col = fdf_get('SpinPolarized',.false.) | 147 | spin%Col = fdf_get('SpinPolarized',.false.) |
2001 | 140 | spin%NCol = fdf_get('NonCollinearSpin',.false.) | 148 | spin%NCol = fdf_get('NonCollinearSpin',.false.) |
2002 | @@ -149,7 +157,7 @@ | |||
2003 | 149 | if ( spin%SO ) then | 157 | if ( spin%SO ) then |
2004 | 150 | opt = 'spin-orbit' | 158 | opt = 'spin-orbit' |
2005 | 151 | else if ( spin%NCol ) then | 159 | else if ( spin%NCol ) then |
2007 | 152 | opt = 'non-colinear' | 160 | opt = 'non-collinear' |
2008 | 153 | else if ( spin%Col ) then | 161 | else if ( spin%Col ) then |
2009 | 154 | opt = 'collinear' | 162 | opt = 'collinear' |
2010 | 155 | else | 163 | else |
2011 | @@ -173,52 +181,41 @@ | |||
2012 | 173 | 181 | ||
2013 | 174 | spin%Col = .true. | 182 | spin%Col = .true. |
2014 | 175 | 183 | ||
2016 | 176 | else if ( leqi(opt, 'non-collinear') .or. leqi(opt, 'non-colinear') .or. & | 184 | else if ( leqi(opt, 'non-collinear') .or. leqi(opt, 'non-colinear') .or. & |
2017 | 177 | leqi(opt, 'NC') .or. leqi(opt, 'N-C') ) then | 185 | leqi(opt, 'NC') .or. leqi(opt, 'N-C') ) then |
2018 | 178 | 186 | ||
2019 | 179 | spin%NCol = .true. | 187 | spin%NCol = .true. |
2020 | 180 | 188 | ||
2021 | 181 | else if ( leqi(opt, 'spin-orbit') .or. leqi(opt, 'S-O') .or. & | 189 | else if ( leqi(opt, 'spin-orbit') .or. leqi(opt, 'S-O') .or. & |
2039 | 182 | leqi(opt, 'SOC') .or. leqi(opt, 'SO') ) then | 190 | leqi(opt, 'SOC') .or. leqi(opt, 'SO') .or. & |
2040 | 183 | ! Spin-orbit is the same as using the off-site implementation | 191 | leqi(opt, 'spin-orbit+offsite') .or. leqi(opt, 'S-O+offsite') .or. & |
2041 | 184 | 192 | leqi(opt, 'SOC+offsite') .or. leqi(opt, 'SO+offsite') ) then | |
2042 | 185 | spin%SO = .true. | 193 | ! Spin-orbit defaults to the off-site implementation |
2043 | 186 | spin%SO_off = .true. | 194 | |
2044 | 187 | 195 | spin%SO = .true. | |
2045 | 188 | else if ( leqi(opt, 'spin-orbit+off') .or. leqi(opt, 'S-O+off') .or. & | 196 | spin%SO_offsite = .true. |
2046 | 189 | leqi(opt, 'SOC+off') .or. leqi(opt, 'SO+off') ) then | 197 | |
2047 | 190 | 198 | else if ( leqi(opt, 'spin-orbit+onsite') .or. leqi(opt, 'S-O+onsite') .or. & | |
2048 | 191 | spin%SO = .true. | 199 | leqi(opt, 'SOC+onsite') .or. leqi(opt, 'SO+onsite') ) then |
2049 | 192 | spin%SO_off = .true. | 200 | |
2050 | 193 | 201 | spin%SO = .true. | |
2051 | 194 | else if ( leqi(opt, 'spin-orbit+on') .or. leqi(opt, 'S-O+on') .or. & | 202 | spin%SO_onsite = .true. |
2035 | 195 | leqi(opt, 'SOC+on') .or. leqi(opt, 'SO+on') ) then | ||
2036 | 196 | |||
2037 | 197 | spin%SO = .true. | ||
2038 | 198 | spin%SO_off = .false. | ||
2052 | 199 | 203 | ||
2053 | 200 | else | 204 | else |
2054 | 201 | write(*,*) 'Unknown spin flag: ', trim(opt) | 205 | write(*,*) 'Unknown spin flag: ', trim(opt) |
2055 | 202 | call die('Spin: unknown flag, please assert the correct input.') | 206 | call die('Spin: unknown flag, please assert the correct input.') |
2056 | 203 | end if | 207 | end if |
2057 | 204 | 208 | ||
2075 | 205 | ! TODO once off-site is fully implemented | 209 | if ( spin%SO_offsite ) then |
2076 | 206 | ! this should be removed to enable the off-site code | 210 | call add_citation("10.1088/0953-8984/24/8/086005") |
2077 | 207 | ! fully! | 211 | end if |
2078 | 208 | spin%SO_off = .false. | 212 | if ( spin%SO_onsite ) then |
2079 | 209 | 213 | call add_citation("10.1088/0953-8984/18/34/012") | |
2080 | 210 | ! Note that, in what follows, | 214 | end if |
2081 | 211 | ! spinor_dim = min(h_spin_dim,2) | 215 | |
2082 | 212 | ! e_spin_dim = min(h_spin_dim,4) | 216 | ! These are useful for fine control beyond the old "nspin". Some routines expect |
2083 | 213 | ! nspin = min(h_spin_dim,4) ! Relevant for dhscf, local DM | 217 | ! an argument 'nspin' which might really mean 'spin%spinor' (like diagon), |
2084 | 214 | ! should probably be called nspin_grid | 218 | ! 'spin%Grid' (like dhscf), etc. |
2068 | 215 | ! | ||
2069 | 216 | ! so everything can be determined if h_spin_dim is known. | ||
2070 | 217 | ! It is tempting to go back to the old 'nspin' overloading, | ||
2071 | 218 | ! making 'nspin' mean again 'h_spin_dim'. | ||
2072 | 219 | ! But this has to be done carefully, as some routines expect | ||
2073 | 220 | ! an argument 'nspin' which really means 'spinor_dim' (like diagon), | ||
2074 | 221 | ! and others (such as dhscf) expect 'nspin' to mean 'nspin_grid'. | ||
2085 | 222 | 219 | ||
2086 | 223 | if ( spin%SO ) then | 220 | if ( spin%SO ) then |
2087 | 224 | ! Spin-orbit case | 221 | ! Spin-orbit case |
2088 | @@ -235,9 +232,10 @@ | |||
2089 | 235 | spin%Col = .false. | 232 | spin%Col = .false. |
2090 | 236 | spin%NCol = .false. | 233 | spin%NCol = .false. |
2091 | 237 | spin%SO = .true. | 234 | spin%SO = .true. |
2092 | 235 | ! off/on MUST already be set! | ||
2093 | 238 | 236 | ||
2094 | 239 | ! should be moved... | 237 | ! should be moved... |
2096 | 240 | TRSym = .false. | 238 | TRSym = .false. ! Cannot be changed ! |
2097 | 241 | 239 | ||
2098 | 242 | else if ( spin%NCol ) then | 240 | else if ( spin%NCol ) then |
2099 | 243 | ! Non-collinear case | 241 | ! Non-collinear case |
2100 | @@ -250,13 +248,15 @@ | |||
2101 | 250 | spin%spinor = 2 | 248 | spin%spinor = 2 |
2102 | 251 | 249 | ||
2103 | 252 | ! Flags | 250 | ! Flags |
2108 | 253 | spin%none = .false. | 251 | spin%none = .false. |
2109 | 254 | spin%Col = .false. | 252 | spin%Col = .false. |
2110 | 255 | spin%NCol = .true. | 253 | spin%NCol = .true. |
2111 | 256 | spin%SO = .false. | 254 | spin%SO = .false. |
2112 | 255 | spin%SO_onsite = .false. | ||
2113 | 256 | spin%SO_offsite = .false. | ||
2114 | 257 | 257 | ||
2115 | 258 | ! should be moved... | 258 | ! should be moved... |
2117 | 259 | TRSym = .false. | 259 | TRSym = .false. ! Cannot be changed ! |
2118 | 260 | 260 | ||
2119 | 261 | else if ( spin%Col ) then | 261 | else if ( spin%Col ) then |
2120 | 262 | ! Collinear case | 262 | ! Collinear case |
2121 | @@ -269,13 +269,17 @@ | |||
2122 | 269 | spin%spinor = 2 | 269 | spin%spinor = 2 |
2123 | 270 | 270 | ||
2124 | 271 | ! Flags | 271 | ! Flags |
2129 | 272 | spin%none = .false. | 272 | spin%none = .false. |
2130 | 273 | spin%Col = .true. | 273 | spin%Col = .true. |
2131 | 274 | spin%NCol = .false. | 274 | spin%NCol = .false. |
2132 | 275 | spin%SO = .false. | 275 | spin%SO = .false. |
2133 | 276 | spin%SO_onsite = .false. | ||
2134 | 277 | spin%SO_offsite = .false. | ||
2135 | 276 | 278 | ||
2136 | 277 | ! should be moved... | 279 | ! should be moved... |
2138 | 278 | TRSym = .true. | 280 | TRSym = .true. |
2139 | 281 | ! Allow the user to choose not to have TRS | ||
2140 | 282 | TRSym = fdf_get('TimeReversalSymmetry',TrSym) | ||
2141 | 279 | 283 | ||
2142 | 280 | else if ( spin%none ) then | 284 | else if ( spin%none ) then |
2143 | 281 | ! No spin configuration... | 285 | ! No spin configuration... |
2144 | @@ -288,18 +292,20 @@ | |||
2145 | 288 | spin%spinor = 1 | 292 | spin%spinor = 1 |
2146 | 289 | 293 | ||
2147 | 290 | ! Flags | 294 | ! Flags |
2152 | 291 | spin%none = .true. | 295 | spin%none = .true. |
2153 | 292 | spin%Col = .false. | 296 | spin%Col = .false. |
2154 | 293 | spin%NCol = .false. | 297 | spin%NCol = .false. |
2155 | 294 | spin%SO = .false. | 298 | spin%SO = .false. |
2156 | 299 | spin%SO_onsite = .false. | ||
2157 | 300 | spin%SO_offsite = .false. | ||
2158 | 295 | 301 | ||
2159 | 296 | ! should be moved... | 302 | ! should be moved... |
2161 | 297 | TRSym = .true. | 303 | TRSym = .true. |
2162 | 304 | ! Allow the user to choose not to have TRS | ||
2163 | 305 | TRSym = fdf_get('TimeReversalSymmetry',TrSym) | ||
2164 | 298 | 306 | ||
2165 | 299 | end if | 307 | end if |
2166 | 300 | 308 | ||
2167 | 301 | ! Get true time reversal symmetry | ||
2168 | 302 | TRSym = fdf_get('TimeReversalSymmetry',TrSym) | ||
2169 | 303 | 309 | ||
2170 | 304 | contains | 310 | contains |
2171 | 305 | 311 | ||
2172 | @@ -331,10 +337,10 @@ | |||
2173 | 331 | if ( .not. IONode ) return | 337 | if ( .not. IONode ) return |
2174 | 332 | 338 | ||
2175 | 333 | if ( spin%SO ) then | 339 | if ( spin%SO ) then |
2178 | 334 | if ( spin%SO_off ) then | 340 | if ( spin%SO_offsite ) then |
2179 | 335 | opt = 'spin-orbit+off' | 341 | opt = 'spin-orbit+offsite' |
2180 | 336 | else | 342 | else |
2182 | 337 | opt = 'spin-orbit+on' | 343 | opt = 'spin-orbit+onsite' |
2183 | 338 | end if | 344 | end if |
2184 | 339 | else if ( spin%NCol ) then | 345 | else if ( spin%NCol ) then |
2185 | 340 | opt = 'non-collinear' | 346 | opt = 'non-collinear' |
2186 | 341 | 347 | ||
2187 | === modified file 'Src/mixer.F' | |||
2188 | --- Src/mixer.F 2018-04-17 13:06:00 +0000 | |||
2189 | +++ Src/mixer.F 2018-04-30 20:53:35 +0000 | |||
2190 | @@ -30,7 +30,7 @@ | |||
2191 | 30 | use m_mixing_scf, only: scf_mix | 30 | use m_mixing_scf, only: scf_mix |
2192 | 31 | use m_mixing, only: mixing | 31 | use m_mixing, only: mixing |
2193 | 32 | 32 | ||
2195 | 33 | use m_spin, only: h_spin_dim, SpOrb | 33 | use m_spin, only: spin |
2196 | 34 | use parallel, only: IONode | 34 | use parallel, only: IONode |
2197 | 35 | 35 | ||
2198 | 36 | implicit none | 36 | implicit none |
2199 | @@ -60,7 +60,7 @@ | |||
2200 | 60 | 60 | ||
2201 | 61 | 61 | ||
2202 | 62 | ! Create residual function to minimize | 62 | ! Create residual function to minimize |
2204 | 63 | allocate(F(maxnh,h_spin_dim)) | 63 | allocate(F(maxnh,spin%H)) |
2205 | 64 | 64 | ||
2206 | 65 | !$OMP parallel default(shared), private(dtmp,i) | 65 | !$OMP parallel default(shared), private(dtmp,i) |
2207 | 66 | 66 | ||
2208 | @@ -103,15 +103,15 @@ | |||
2209 | 103 | ! Upon exit Xout contains the mixed quantity | 103 | ! Upon exit Xout contains the mixed quantity |
2210 | 104 | select case ( mix_spin ) | 104 | select case ( mix_spin ) |
2211 | 105 | case ( MIX_SPIN_ALL ) | 105 | case ( MIX_SPIN_ALL ) |
2213 | 106 | call mixing( scf_mix, maxnh, h_spin_dim, Xin, F, Xout) | 106 | call mixing( scf_mix, maxnh, spin%H, Xin, F, Xout) |
2214 | 107 | case ( MIX_SPIN_SPINOR ) | 107 | case ( MIX_SPIN_SPINOR ) |
2216 | 108 | call mixing( scf_mix, maxnh, h_spin_dim, Xin, F, Xout, | 108 | call mixing( scf_mix, maxnh, spin%H, Xin, F, Xout, |
2217 | 109 | & nsub=2) | 109 | & nsub=2) |
2218 | 110 | case ( MIX_SPIN_SUM ) | 110 | case ( MIX_SPIN_SUM ) |
2220 | 111 | call mixing( scf_mix, maxnh, h_spin_dim, Xin, F, Xout, | 111 | call mixing( scf_mix, maxnh, spin%H, Xin, F, Xout, |
2221 | 112 | & nsub=1) | 112 | & nsub=1) |
2222 | 113 | case ( MIX_SPIN_SUM_DIFF ) | 113 | case ( MIX_SPIN_SUM_DIFF ) |
2224 | 114 | call mixing( scf_mix, maxnh, h_spin_dim, Xin, F, Xout, | 114 | call mixing( scf_mix, maxnh, spin%H, Xin, F, Xout, |
2225 | 115 | & nsub=2) | 115 | & nsub=2) |
2226 | 116 | end select | 116 | end select |
2227 | 117 | 117 | ||
2228 | @@ -188,15 +188,15 @@ | |||
2229 | 188 | 188 | ||
2230 | 189 | if (muldeb .and. (.not. MixH) ) then | 189 | if (muldeb .and. (.not. MixH) ) then |
2231 | 190 | if (IONode) write (6,"(/a)") 'Using DM after mixing:' | 190 | if (IONode) write (6,"(/a)") 'Using DM after mixing:' |
2233 | 191 | if ( SpOrb .and. orbmoms) then | 191 | if ( spin%SO .and. orbmoms) then |
2234 | 192 | call moments( 1, na_u, no_u, maxnh, numh, listhptr, | 192 | call moments( 1, na_u, no_u, maxnh, numh, listhptr, |
2235 | 193 | . listh, S, Dscf, isa, lasto, iaorb, iphorb, | 193 | . listh, S, Dscf, isa, lasto, iaorb, iphorb, |
2236 | 194 | . indxuo ) | 194 | . indxuo ) |
2237 | 195 | endif | 195 | endif |
2238 | 196 | ! Call this unconditionally | 196 | ! Call this unconditionally |
2239 | 197 | call mulliken( mullipop, na_u, no_u, maxnh, | 197 | call mulliken( mullipop, na_u, no_u, maxnh, |
2242 | 198 | & numh, listhptr, listh, S, Dscf, isa, | 198 | & numh, listhptr, listh, S, Dscf, isa, |
2243 | 199 | & lasto, iaorb, iphorb ) | 199 | & lasto, iaorb, iphorb ) |
2244 | 200 | endif | 200 | endif |
2245 | 201 | 201 | ||
2246 | 202 | call timer( 'MIXER', 2 ) | 202 | call timer( 'MIXER', 2 ) |
2247 | 203 | 203 | ||
2248 | === modified file 'Src/moments.F' | |||
2249 | --- Src/moments.F 2018-04-17 13:06:00 +0000 | |||
2250 | +++ Src/moments.F 2018-04-30 20:53:35 +0000 | |||
2251 | @@ -296,4 +296,3 @@ | |||
2252 | 296 | deallocate(l_orb) | 296 | deallocate(l_orb) |
2253 | 297 | 297 | ||
2254 | 298 | end subroutine moments | 298 | end subroutine moments |
2255 | 299 | |||
2256 | 300 | 299 | ||
2257 | === modified file 'Src/nlefsm.f' | |||
2258 | --- Src/nlefsm.f 2016-11-04 14:10:50 +0000 | |||
2259 | +++ Src/nlefsm.f 2018-04-30 20:53:35 +0000 | |||
2260 | @@ -7,9 +7,11 @@ | |||
2261 | 7 | ! | 7 | ! |
2262 | 8 | module m_nlefsm | 8 | module m_nlefsm |
2263 | 9 | 9 | ||
2264 | 10 | use precision, only : dp | ||
2265 | 11 | |||
2266 | 10 | implicit none | 12 | implicit none |
2267 | 11 | 13 | ||
2269 | 12 | public :: nlefsm | 14 | public :: nlefsm, nlefsm_SO_off |
2270 | 13 | 15 | ||
2271 | 14 | private | 16 | private |
2272 | 15 | 17 | ||
2273 | @@ -53,7 +55,7 @@ | |||
2274 | 53 | C hamiltonian matrix | 55 | C hamiltonian matrix |
2275 | 54 | C integer listh(maxnh) : Nonzero hamiltonian-matrix element column | 56 | C integer listh(maxnh) : Nonzero hamiltonian-matrix element column |
2276 | 55 | C indexes for each matrix row | 57 | C indexes for each matrix row |
2278 | 56 | C integer nspin : Number of spin components of Dscf and H | 58 | C integer nspin : Number of spinor components (really min(nspin,2)) |
2279 | 57 | C If computing only matrix elements, it | 59 | C If computing only matrix elements, it |
2280 | 58 | C can be set to 1. | 60 | C can be set to 1. |
2281 | 59 | C logical matrix_elements_only: | 61 | C logical matrix_elements_only: |
2282 | @@ -301,8 +303,6 @@ | |||
2283 | 301 | kg = kbproj_gindex(ks,koa) | 303 | kg = kbproj_gindex(ks,koa) |
2284 | 302 | call new_MATEL( 'S', kg, ig, xki(1:3,ina), | 304 | call new_MATEL( 'S', kg, ig, xki(1:3,ina), |
2285 | 303 | & Ski(ikb,nno), grSki(1:3,ikb,nno) ) | 305 | & Ski(ikb,nno), grSki(1:3,ikb,nno) ) |
2286 | 304 | ! Maybe: Ski = epskb_sqrt * Ski | ||
2287 | 305 | ! grSki = epskb_sqrt * grSki | ||
2288 | 306 | enddo | 306 | enddo |
2289 | 307 | 307 | ||
2290 | 308 | enddo ! loop over orbitals | 308 | enddo ! loop over orbitals |
2291 | @@ -330,7 +330,7 @@ | |||
2292 | 330 | jo = listh(ind) | 330 | jo = listh(ind) |
2293 | 331 | listed(jo) = .true. | 331 | listed(jo) = .true. |
2294 | 332 | if (.not. matrix_elements_only) then | 332 | if (.not. matrix_elements_only) then |
2296 | 333 | do ispin = 1,nspin ! Both spins add up... | 333 | do ispin = 1, nspin ! Both spins add up... (nspin=spin%spinor here) |
2297 | 334 | Di(jo) = Di(jo) + Dscf(ind,ispin) | 334 | Di(jo) = Di(jo) + Dscf(ind,ispin) |
2298 | 335 | enddo | 335 | enddo |
2299 | 336 | endif | 336 | endif |
2300 | @@ -381,7 +381,7 @@ | |||
2301 | 381 | do j = 1,numh(iio) | 381 | do j = 1,numh(iio) |
2302 | 382 | ind = listhptr(iio)+j | 382 | ind = listhptr(iio)+j |
2303 | 383 | jo = listh(ind) | 383 | jo = listh(ind) |
2305 | 384 | do ispin = 1,nspin | 384 | do ispin = 1,nspin ! Only diagonal parts |
2306 | 385 | H(ind,ispin) = H(ind,ispin) + Vi(jo) | 385 | H(ind,ispin) = H(ind,ispin) + Vi(jo) |
2307 | 386 | enddo | 386 | enddo |
2308 | 387 | Vi(jo) = 0.0d0 ! See initial zero-out at top | 387 | Vi(jo) = 0.0d0 ! See initial zero-out at top |
2309 | @@ -441,4 +441,613 @@ | |||
2310 | 441 | 441 | ||
2311 | 442 | end subroutine nlefsm | 442 | end subroutine nlefsm |
2312 | 443 | 443 | ||
2313 | 444 | C nlefsm_SO_off calculates the KB elements to the total Hamiltonian | ||
2314 | 445 | C (including the SO contribution) | ||
2315 | 446 | C when Off-Site Spin Orbit is included in the calculation | ||
2316 | 447 | subroutine nlefsm_SO_off( scell, nua, na, isa, xa, indxua, | ||
2317 | 448 | . maxnh, maxnd, lasto, lastkb, iphorb, | ||
2318 | 449 | . iphKB, numd, listdptr, listd, numh, | ||
2319 | 450 | . listhptr, listh, nspin, Enl, Enl_offsiteSO, | ||
2320 | 451 | . fa, stress, H0 , H0_off, | ||
2321 | 452 | & matrix_elements_only) | ||
2322 | 453 | |||
2323 | 454 | |||
2324 | 455 | C ********************************************************************* | ||
2325 | 456 | C Calculates non-local (NL) pseudopotential contribution to total | ||
2326 | 457 | C energy, atomic forces, stress and hamiltonian matrix elements. | ||
2327 | 458 | C Energies in Ry. Lengths in Bohr. | ||
2328 | 459 | C Writen by J.Soler and P.Ordejon, June 1997. | ||
2329 | 460 | C Modified by R. Cuadrado and J. I. Cerda for the | ||
2330 | 461 | C off-site Spin-Orbit, January 2017. | ||
2331 | 462 | C **************************** INPUT ********************************** | ||
2332 | 463 | C real*8 scell(3,3) : Supercell vectors SCELL(IXYZ,IVECT) | ||
2333 | 464 | C integer nua : Number of atoms in unit cell | ||
2334 | 465 | C integer na : Number of atoms in supercell | ||
2335 | 466 | C integer isa(na) : Species index of each atom | ||
2336 | 467 | C real*8 xa(3,na) : Atomic positions in cartesian coordinates | ||
2337 | 468 | C integer indxua(na) : Index of equivalent atom in unit cell | ||
2338 | 469 | C integer maxnh : First dimension of H and listh | ||
2339 | 470 | C integer maxnd : Maximum number of elements of the | ||
2340 | 471 | C density matrix | ||
2341 | 472 | C integer lasto(0:na) : Position of last orbital of each atom | ||
2342 | 473 | C integer lastkb(0:na) : Position of last KB projector of each atom | ||
2343 | 474 | C integer iphorb(no) : Orbital index of each orbital in its atom, | ||
2344 | 475 | C where no=lasto(na) | ||
2345 | 476 | C integer iphKB(nokb) : Index of each KB projector in its atom, | ||
2346 | 477 | C where nokb=lastkb(na) | ||
2347 | 478 | C integer numd(nuo) : Number of nonzero elements of each row of the | ||
2348 | 479 | C density matrix | ||
2349 | 480 | C integer listdptr(nuo) : Pointer to the start of each row (-1) of the | ||
2350 | 481 | C density matrix | ||
2351 | 482 | C integer listd(maxnd) : Nonzero hamiltonian-matrix element column | ||
2352 | 483 | C indexes for each matrix row | ||
2353 | 484 | C integer numh(nuo) : Number of nonzero elements of each row of the | ||
2354 | 485 | C hamiltonian matrix | ||
2355 | 486 | C integer listhptr(nuo) : Pointer to the start of each row (-1) of the | ||
2356 | 487 | C hamiltonian matrix | ||
2357 | 488 | C integer listh(maxnh) : Nonzero hamiltonian-matrix element column | ||
2358 | 489 | C indexes for each matrix row | ||
2359 | 490 | C integer nspin : Number of spin_grid components (really min(nspin,4)) | ||
2360 | 491 | C If computing only matrix elements, it | ||
2361 | 492 | C can be set to 1. | ||
2362 | 493 | C logical matrix_elements_only: | ||
2363 | 494 | C integer Dscf(maxnd,nspin): Density matrix. Not touched if computing | ||
2364 | 495 | C only matrix elements. | ||
2365 | 496 | C ******************* INPUT and OUTPUT ********************************* | ||
2366 | 497 | C real*8 fa(3,na) : NL forces (added to input fa) | ||
2367 | 498 | C real*8 stress(3,3) : NL stress (added to input stress) | ||
2368 | 499 | C real*8 H0(maxnh,nspin) : NL Hamiltonian (added to input H) | ||
2369 | 500 | C complex*16 H0_off(maxnh,nspin) : NL off-site Hamiltonian (added to input H) | ||
2370 | 501 | C **************************** OUTPUT ********************************* | ||
2371 | 502 | C real*8 Enl : NL energy | ||
2372 | 503 | C ********************************************************************* | ||
2373 | 504 | C | ||
2374 | 505 | C Modules | ||
2375 | 506 | C | ||
2376 | 507 | use parallel, only : Node, Nodes | ||
2377 | 508 | use parallelsubs, only : GetNodeOrbs, LocalToGlobalOrb | ||
2378 | 509 | use parallelsubs, only : GlobalToLocalOrb | ||
2379 | 510 | use atmfuncs, only : rcut, orb_gindex, kbproj_gindex | ||
2380 | 511 | use atmfuncs, only : epskb | ||
2381 | 512 | use neighbour, only : iana=>jan, r2ki=>r2ij, xki=>xij | ||
2382 | 513 | use neighbour, only : mneighb, reset_neighbour_arrays | ||
2383 | 514 | use alloc, only : re_alloc, de_alloc | ||
2384 | 515 | use m_new_matel, only : new_matel | ||
2385 | 516 | use atm_types, only: species_info, species | ||
2386 | 517 | use sparse_matrices, only: Dscf, xijo | ||
2387 | 518 | |||
2388 | 519 | integer, intent(in) :: | ||
2389 | 520 | . maxnh, na, maxnd, nspin, nua | ||
2390 | 521 | |||
2391 | 522 | integer, intent(in) :: | ||
2392 | 523 | . indxua(na), iphKB(*), iphorb(*), isa(na), | ||
2393 | 524 | . lasto(0:na), lastkb(0:na), listd(maxnd), listh(maxnh), | ||
2394 | 525 | . numd(*), numh(*), listdptr(*), listhptr(*) | ||
2395 | 526 | |||
2396 | 527 | real(dp), intent(in) :: scell(3,3), xa(3,na) | ||
2397 | 528 | real(dp), intent(inout) :: fa(3,nua), stress(3,3) | ||
2398 | 529 | real(dp), intent(inout) :: H0(maxnh) | ||
2399 | 530 | complex(dp), intent(inout) :: H0_off(maxnh,4) | ||
2400 | 531 | |||
2401 | 532 | real(dp), intent(out) :: Enl, Enl_offsiteSO | ||
2402 | 533 | logical, intent(in) :: matrix_elements_only | ||
2403 | 534 | |||
2404 | 535 | real(dp) :: volcel | ||
2405 | 536 | external :: timer, volcel | ||
2406 | 537 | |||
2407 | 538 | C Internal variables ................................................ | ||
2408 | 539 | C maxno = maximum number of basis orbitals overlapping a KB projector | ||
2409 | 540 | |||
2410 | 541 | integer, save :: maxno = 2000 | ||
2411 | 542 | |||
2412 | 543 | integer | ||
2413 | 544 | . ia, ikb, ina, ind, ino, indt, | ||
2414 | 545 | . io, iio, ioa, is, ispin, ix, ig, kg, | ||
2415 | 546 | . j, jno, jo, jx, ka, ko, koa, ks, kua, | ||
2416 | 547 | . nkb, nna, nno, no, nuo, nuotot, maxkba | ||
2417 | 548 | |||
2418 | 549 | integer :: l, koa1, koa2, i | ||
2419 | 550 | |||
2420 | 551 | integer, dimension(:), pointer :: iano, iono | ||
2421 | 552 | |||
2422 | 553 | real(dp) | ||
2423 | 554 | . Cijk, fik, rki, rmax, rmaxkb, rmaxo, | ||
2424 | 555 | . volume, CVj, epsk(2), Vit | ||
2425 | 556 | |||
2426 | 557 | real(dp) :: r1(3), r2(3) | ||
2427 | 558 | |||
2428 | 559 | real(dp), dimension(:), pointer :: Di, Vi ! This is Vion | ||
2429 | 560 | real(dp), dimension(:,:), pointer :: Ski, xno | ||
2430 | 561 | real(dp), dimension(:,:,:), pointer :: grSki | ||
2431 | 562 | |||
2432 | 563 | complex(dp) :: V_sot(2,2), F_so(3,2,2) | ||
2433 | 564 | complex(dp), pointer :: V_so(:,:,:), Ds(:,:,:) | ||
2434 | 565 | |||
2435 | 566 | |||
2436 | 567 | logical :: within | ||
2437 | 568 | logical, dimension(:), pointer :: listed, listedall | ||
2438 | 569 | |||
2439 | 570 | complex(dp) :: E_offsiteSO(4) | ||
2440 | 571 | |||
2441 | 572 | type(species_info), pointer :: spp | ||
2442 | 573 | |||
2443 | 574 | integer :: nd, ndn | ||
2444 | 575 | |||
2445 | 576 | C ------------------------------------------------------------ | ||
2446 | 577 | |||
2447 | 578 | C Start time counte | ||
2448 | 579 | call timer( 'nlefsm', 1 ) | ||
2449 | 580 | |||
2450 | 581 | C Find unit cell volume | ||
2451 | 582 | volume = volcel( scell ) * nua / na | ||
2452 | 583 | |||
2453 | 584 | C Find maximum range | ||
2454 | 585 | rmaxo = 0.0d0 | ||
2455 | 586 | rmaxkb = 0.0d0 | ||
2456 | 587 | do ia = 1,na | ||
2457 | 588 | is = isa(ia) | ||
2458 | 589 | do ikb = lastkb(ia-1)+1,lastkb(ia) | ||
2459 | 590 | ioa = iphKB(ikb) | ||
2460 | 591 | rmaxkb = max( rmaxkb, rcut(is,ioa) ) | ||
2461 | 592 | enddo | ||
2462 | 593 | do io = lasto(ia-1)+1,lasto(ia) | ||
2463 | 594 | ioa = iphorb(io) | ||
2464 | 595 | rmaxo = max( rmaxo, rcut(is,ioa) ) | ||
2465 | 596 | enddo | ||
2466 | 597 | enddo | ||
2467 | 598 | rmax = rmaxo + rmaxkb | ||
2468 | 599 | |||
2469 | 600 | C Initialize arrays Di and Vi only once | ||
2470 | 601 | no = lasto(na) | ||
2471 | 602 | nuotot = lasto(nua) | ||
2472 | 603 | |||
2473 | 604 | call GetNodeOrbs(nuotot,Node,Nodes,nuo) | ||
2474 | 605 | |||
2475 | 606 | C Allocate local memory | ||
2476 | 607 | |||
2477 | 608 | nullify( Vi ) ! This is Vion | ||
2478 | 609 | call re_alloc( Vi, 1, no, 'Vi', 'nlefsm_SO_off' ) | ||
2479 | 610 | Vi(1:no) = 0.0_dp | ||
2480 | 611 | |||
2481 | 612 | nullify( listed ) | ||
2482 | 613 | call re_alloc( listed, 1, no, 'listed', 'nlefsm_SO_off' ) | ||
2483 | 614 | listed(1:no) = .false. | ||
2484 | 615 | nullify( listedall ) | ||
2485 | 616 | call re_alloc( listedall, 1, no, 'listedall', 'nlefsm_SO_off' ) | ||
2486 | 617 | listedall(1:no) = .false. | ||
2487 | 618 | |||
2488 | 619 | allocate( V_so(2,2,no) ) | ||
2489 | 620 | |||
2490 | 621 | if (.not. matrix_elements_only) then | ||
2491 | 622 | nullify( Di ) | ||
2492 | 623 | call re_alloc( Di, 1, no, 'Di', 'nlefsm_SO_off' ) | ||
2493 | 624 | Di(1:no) = 0.0_dp | ||
2494 | 625 | allocate( Ds(2,2,no) ) | ||
2495 | 626 | endif | ||
2496 | 627 | |||
2497 | 628 | C Make list of all orbitals needed for this node | ||
2498 | 629 | |||
2499 | 630 | do io = 1,nuo | ||
2500 | 631 | call LocalToGlobalOrb(io,Node,Nodes,iio) | ||
2501 | 632 | listedall(iio) = .true. | ||
2502 | 633 | do j = 1,numh(io) | ||
2503 | 634 | jo = listh(listhptr(io)+j) | ||
2504 | 635 | listedall(jo) = .true. | ||
2505 | 636 | enddo | ||
2506 | 637 | enddo | ||
2507 | 638 | |||
2508 | 639 | C Find maximum number of KB projectors of one atom = maxkba | ||
2509 | 640 | maxkba = 0 | ||
2510 | 641 | do ka = 1,na | ||
2511 | 642 | nkb = lastkb(ka) - lastkb(ka-1) | ||
2512 | 643 | maxkba = max(maxkba,nkb) | ||
2513 | 644 | enddo | ||
2514 | 645 | |||
2515 | 646 | C Allocate local arrays that depend on saved parameters | ||
2516 | 647 | nullify( iano ) | ||
2517 | 648 | call re_alloc( iano, 1, maxno, 'iano', 'nlefsm_SO_off' ) | ||
2518 | 649 | nullify( iono ) | ||
2519 | 650 | call re_alloc( iono, 1, maxno, 'iono', 'nlefsm_SO_off' ) | ||
2520 | 651 | nullify( xno ) | ||
2521 | 652 | call re_alloc( xno, 1, 3, 1, maxno, 'xno', 'nlefsm_SO_off' ) | ||
2522 | 653 | nullify( Ski ) | ||
2523 | 654 | call re_alloc( Ski, 1, maxkba, 1, maxno, 'Ski','nlefsm_SO_off') | ||
2524 | 655 | nullify( grSki ) | ||
2525 | 656 | call re_alloc( grSki, 1, 3, 1, maxkba, 1, maxno, 'grSki', | ||
2526 | 657 | & 'nlefsm_SO_off' ) | ||
2527 | 658 | |||
2528 | 659 | C Initialize neighb subroutine | ||
2529 | 660 | call mneighb( scell, rmax, na, xa, 0, 0, nna ) | ||
2530 | 661 | |||
2531 | 662 | nd= 0; ndn= 0 | ||
2532 | 663 | Enl = 0.0d0; E_offsiteSO(1:4)=dcmplx(0.0d0,0.0d0) | ||
2533 | 664 | Enl_offsiteSO = 0.0d0 | ||
2534 | 665 | C Loop on atoms with KB projectors | ||
2535 | 666 | do ka = 1,na ! Supercell atoms | ||
2536 | 667 | kua = indxua(ka) ! Equivalent atom in the UC | ||
2537 | 668 | ks = isa(ka) ! Specie index of atom ka | ||
2538 | 669 | nkb = lastkb(ka) - lastkb(ka-1) ! number of KB projs of atom ka | ||
2539 | 670 | |||
2540 | 671 | C Find neighbour atoms | ||
2541 | 672 | call mneighb( scell, rmax, na, xa, ka, 0, nna ) | ||
2542 | 673 | |||
2543 | 674 | C Find neighbour orbitals | ||
2544 | 675 | Ski(:,:) = 0.0_dp | ||
2545 | 676 | nno = 0; ; iano(:)=0; iono(:)=0 | ||
2546 | 677 | do ina = 1,nna ! Neighbour atoms | ||
2547 | 678 | ia = iana(ina) ! Atom index of ina (the neighbour to ka) | ||
2548 | 679 | is = isa(ia) ! Specie index of atom ia | ||
2549 | 680 | rki = sqrt(r2ki(ina)) ! Square distance | ||
2550 | 681 | |||
2551 | 682 | do io = lasto(ia-1)+1,lasto(ia) ! Orbitals of atom ia | ||
2552 | 683 | |||
2553 | 684 | C Only calculate if needed locally | ||
2554 | 685 | |||
2555 | 686 | if (listedall(io)) then | ||
2556 | 687 | ioa = iphorb(io) ! Orbital index of orbital io in | ||
2557 | 688 | C neighbour atom ina | ||
2558 | 689 | |||
2559 | 690 | C Find if orbital is within range | ||
2560 | 691 | within = .false. | ||
2561 | 692 | do ko = lastkb(ka-1)+1,lastkb(ka) | ||
2562 | 693 | koa = iphKB(ko) | ||
2563 | 694 | if ( rki .lt. rcut(is,ioa)+rcut(ks,koa) ) | ||
2564 | 695 | & within = .true. | ||
2565 | 696 | enddo | ||
2566 | 697 | |||
2567 | 698 | C Find overlap between neighbour orbitals and KB projectors | ||
2568 | 699 | if (within) then | ||
2569 | 700 | C Check maxno - if too small then increase array sizes | ||
2570 | 701 | if (nno.eq.maxno) then | ||
2571 | 702 | maxno = maxno + 100 | ||
2572 | 703 | call re_alloc( iano, 1, maxno, 'iano', 'nlefsm_SO_off', | ||
2573 | 704 | & .true. ) | ||
2574 | 705 | call re_alloc( iono, 1, maxno, 'iono', 'nlefsm_SO_off', | ||
2575 | 706 | & .true. ) | ||
2576 | 707 | call re_alloc( xno, 1, 3, 1, maxno,'xno','nlefsm_SO_off', | ||
2577 | 708 | & .true. ) | ||
2578 | 709 | call re_alloc( Ski, 1, maxkba, 1, maxno, 'Ski', | ||
2579 | 710 | & 'nlefsm_SO_off', .true. ) | ||
2580 | 711 | call re_alloc( grSki, 1, 3, 1, maxkba, 1, maxno, | ||
2581 | 712 | & 'grSki', 'nlefsm_SO_off', .true. ) | ||
2582 | 713 | endif | ||
2583 | 714 | nno = nno + 1 ! Number of neighbour orbitals | ||
2584 | 715 | iono(nno) = io ! io orbital of atom ina (neighbour to ka) | ||
2585 | 716 | iano(nno) = ia ! atom index of the neighbour ina | ||
2586 | 717 | xno(1:3,nno) = xki(1:3,ina) | ||
2587 | 718 | ikb = 0 | ||
2588 | 719 | do ko = lastkb(ka-1)+1,lastkb(ka) !Generic positions of kb's | ||
2589 | 720 | ikb = ikb + 1 | ||
2590 | 721 | ioa = iphorb(io) | ||
2591 | 722 | koa = iphKB(ko) ! koa = -ikb | ||
2592 | 723 | |||
2593 | 724 | if ( koa.ne.-ikb ) then | ||
2594 | 725 | write(6,*) 'koa ERROR: koa,ikb=',koa,ikb | ||
2595 | 726 | stop | ||
2596 | 727 | endif | ||
2597 | 728 | kg = kbproj_gindex(ks,koa) | ||
2598 | 729 | ig = orb_gindex(is,ioa) | ||
2599 | 730 | call new_MATEL( 'S', kg, ig, xki(1:3,ina), | ||
2600 | 731 | & Ski(ikb,nno), grSki(1:3,ikb,nno) ) | ||
2601 | 732 | enddo | ||
2602 | 733 | endif ! Within | ||
2603 | 734 | |||
2604 | 735 | endif | ||
2605 | 736 | enddo ! neighbour AO | ||
2606 | 737 | enddo ! neighbour atoms | ||
2607 | 738 | |||
2608 | 739 | C----- Loop on neighbour orbitals | ||
2609 | 740 | do ino = 1,nno | ||
2610 | 741 | io = iono(ino) | ||
2611 | 742 | ia = iano(ino) | ||
2612 | 743 | |||
2613 | 744 | call GlobalToLocalOrb(io,Node,Nodes,iio) | ||
2614 | 745 | |||
2615 | 746 | if (iio.gt.0) then | ||
2616 | 747 | C Valid orbital | ||
2617 | 748 | if (ia .le. nua) then | ||
2618 | 749 | if (.not. matrix_elements_only) then | ||
2619 | 750 | !Scatter density matrix row of orbital io | ||
2620 | 751 | Ds(1:2,1:2,1:no) = dcmplx(0.0d0,0.0d0) | ||
2621 | 752 | do j = 1,numh(iio) | ||
2622 | 753 | ind = listhptr(iio)+j ! jptr | ||
2623 | 754 | jo = listh(ind) ! j | ||
2624 | 755 | Di(jo) = 0.0_dp | ||
2625 | 756 | do ispin = 1,min(2,nspin) ! Only diagonal parts | ||
2626 | 757 | Di(jo) = Di(jo) + Dscf(ind,ispin) | ||
2627 | 758 | enddo | ||
2628 | 759 | Ds(1,1,jo) = dcmplx(Dscf(ind,1), Dscf(ind,5)) ! D(ju,iu) | ||
2629 | 760 | Ds(2,2,jo) = dcmplx(Dscf(ind,2), Dscf(ind,6)) ! D(jd,id) | ||
2630 | 761 | Ds(1,2,jo) = dcmplx(Dscf(ind,3), Dscf(ind,4)) ! D(ju,id) | ||
2631 | 762 | Ds(2,1,jo) = dcmplx(Dscf(ind,7),-Dscf(ind,8)) ! D(jd,iu) | ||
2632 | 763 | enddo | ||
2633 | 764 | endif | ||
2634 | 765 | |||
2635 | 766 | C-------- Scatter filter of desired matrix elements | ||
2636 | 767 | do j = 1,numh(iio) | ||
2637 | 768 | jo = listh(listhptr(iio)+j) | ||
2638 | 769 | listed(jo) = .true. | ||
2639 | 770 | enddo | ||
2640 | 771 | |||
2641 | 772 | C Loading V_ion/V_so | ||
2642 | 773 | Vi(1:no) = 0.0_dp | ||
2643 | 774 | V_so(1:2,1:2,1:no) = dcmplx(0.0d0,0.0d0) | ||
2644 | 775 | |||
2645 | 776 | C-------- Find matrix elements with other neighbour orbitals | ||
2646 | 777 | do jno = 1,nno | ||
2647 | 778 | jo = iono(jno) | ||
2648 | 779 | |||
2649 | 780 | if (listed(jo)) then | ||
2650 | 781 | |||
2651 | 782 | C---------- Loop on KB projectors | ||
2652 | 783 | ko = lastkb(ka-1) | ||
2653 | 784 | KB_loop: do | ||
2654 | 785 | koa = -iphKB(ko+1) | ||
2655 | 786 | spp => species(ks) | ||
2656 | 787 | l = spp%pj_l(koa) | ||
2657 | 788 | |||
2658 | 789 | c----------- Compute Vion | ||
2659 | 790 | if ( l.eq.0 ) then | ||
2660 | 791 | epsk(1) = epskb(ks,koa) | ||
2661 | 792 | Vit = epsk(1) * Ski(koa,ino) * Ski(koa,jno) | ||
2662 | 793 | Vi(jo) = Vi(jo) + Vit | ||
2663 | 794 | if (.not. matrix_elements_only) then | ||
2664 | 795 | Enl = Enl + Di(jo) * Vit | ||
2665 | 796 | CVj = epsk(1) * Ski(koa,jno) | ||
2666 | 797 | Cijk = 2.0_dp * Di(jo) * CVj | ||
2667 | 798 | do ix = 1,3 | ||
2668 | 799 | fik = Cijk * grSki(ix,koa,ino) | ||
2669 | 800 | fa(ix,ia) = fa(ix,ia) - fik | ||
2670 | 801 | fa(ix,kua) = fa(ix,kua) + fik | ||
2671 | 802 | do jx = 1,3 | ||
2672 | 803 | stress(jx,ix) = stress(jx,ix) + | ||
2673 | 804 | & xno(jx,ino) * fik / volume | ||
2674 | 805 | enddo | ||
2675 | 806 | enddo | ||
2676 | 807 | endif | ||
2677 | 808 | ko = ko + 1 | ||
2678 | 809 | |||
2679 | 810 | c----------- Compute Vion from j+/-1/2 and V_so | ||
2680 | 811 | else | ||
2681 | 812 | koa1 = -iphKB(ko+1) | ||
2682 | 813 | koa2 = -iphKB(ko+2*(2*l+1)) | ||
2683 | 814 | epsk(1) = epskb(ks,koa1) | ||
2684 | 815 | epsk(2) = epskb(ks,koa2) | ||
2685 | 816 | |||
2686 | 817 | call calc_Vj_offsiteSO( l, epsk, Ski(koa1:koa2,ino), | ||
2687 | 818 | & Ski(koa1:koa2,jno), grSki(:,koa1:koa2,ino), | ||
2688 | 819 | & grSki(:,koa1:koa2,jno), Vit, V_sot, F_so ) | ||
2689 | 820 | Vi(jo) = Vi(jo) + Vit | ||
2690 | 821 | V_so(1:2,1:2,jo)= V_so(1:2,1:2,jo) + V_sot(1:2,1:2) | ||
2691 | 822 | |||
2692 | 823 | c------------ Forces & SO contribution to E_NL | ||
2693 | 824 | if (.not. matrix_elements_only) then | ||
2694 | 825 | Enl = Enl + Di(jo) * Vit | ||
2695 | 826 | |||
2696 | 827 | E_offsiteSO(1) = E_offsiteSO(1) + V_sot(1,1)*Ds(1,1,jo) ! V(iu,ju)*D(ju,iu) | ||
2697 | 828 | E_offsiteSO(2) = E_offsiteSO(2) + V_sot(2,2)*Ds(2,2,jo) ! V(id,jd)*D(jd,id) | ||
2698 | 829 | E_offsiteSO(3) = E_offsiteSO(3) + V_sot(1,2)*Ds(2,1,jo) ! V(iu,jd)*D(jd,iu) | ||
2699 | 830 | E_offsiteSO(4) = E_offsiteSO(4) + V_sot(2,1)*Ds(1,2,jo) ! V(id,ju)*D(ju,id) | ||
2700 | 831 | |||
2701 | 832 | ! These forces include both the 'ion' and 'SO' parts | ||
2702 | 833 | do ix = 1,3 | ||
2703 | 834 | fik = 2.0_dp*dreal(Ds(1,1,jo)*F_so(ix,1,1) + | ||
2704 | 835 | & Ds(2,2,jo)*F_so(ix,2,2) + | ||
2705 | 836 | & Ds(2,1,jo)*F_so(ix,1,2) + | ||
2706 | 837 | & Ds(1,2,jo)*F_so(ix,2,1) ) | ||
2707 | 838 | fa(ix,ia) = fa(ix,ia) - fik | ||
2708 | 839 | fa(ix,kua) = fa(ix,kua) + fik | ||
2709 | 840 | do jx = 1,3 | ||
2710 | 841 | stress(jx,ix) = stress(jx,ix) + | ||
2711 | 842 | & xno(jx,ino) * fik / volume | ||
2712 | 843 | enddo | ||
2713 | 844 | enddo | ||
2714 | 845 | endif | ||
2715 | 846 | ko = ko+2*(2*l+1) | ||
2716 | 847 | endif | ||
2717 | 848 | if ( ko.ge.lastkb(ka) ) exit KB_loop | ||
2718 | 849 | enddo KB_loop | ||
2719 | 850 | |||
2720 | 851 | endif ! listed | ||
2721 | 852 | enddo ! jno orbitals | ||
2722 | 853 | |||
2723 | 854 | C-------- Pick up contributions to H and restore Di and Vi | ||
2724 | 855 | do j = 1,numh(iio) | ||
2725 | 856 | ind = listhptr(iio)+j | ||
2726 | 857 | jo = listh(ind) | ||
2727 | 858 | H0(ind) = H0(ind) + Vi(jo) | ||
2728 | 859 | H0_off(ind,1) = H0_off(ind,1) + V_so(1,1,jo) | ||
2729 | 860 | H0_off(ind,2) = H0_off(ind,2) + V_so(2,2,jo) | ||
2730 | 861 | H0_off(ind,3) = H0_off(ind,3) + V_so(1,2,jo) | ||
2731 | 862 | H0_off(ind,4) = H0_off(ind,4) + V_so(2,1,jo) | ||
2732 | 863 | |||
2733 | 864 | |||
2734 | 865 | C Careful with this Vi() | ||
2735 | 866 | Vi(jo) = 0.0d0 | ||
2736 | 867 | listed(jo) = .false. | ||
2737 | 868 | enddo | ||
2738 | 869 | endif ! Atom in UC? | ||
2739 | 870 | |||
2740 | 871 | endif ! iio .gt. 0 | ||
2741 | 872 | enddo ! ino AOs | ||
2742 | 873 | enddo ! atoms with KB projectors loop | ||
2743 | 874 | |||
2744 | 875 | if (.not. matrix_elements_only) then | ||
2745 | 876 | Enl_offsiteSO = sum( dreal(E_offsiteSO(1:4)) ) | ||
2746 | 877 | endif | ||
2747 | 878 | |||
2748 | 879 | C Deallocate local memory | ||
2749 | 880 | |||
2750 | 881 | call reset_neighbour_arrays( ) | ||
2751 | 882 | call de_alloc( grSki, 'grSki', 'nlefsm_SO_off' ) | ||
2752 | 883 | call de_alloc( Ski, 'Ski', 'nlefsm_SO_off' ) | ||
2753 | 884 | call de_alloc( xno, 'xno', 'nlefsm_SO_off' ) | ||
2754 | 885 | call de_alloc( iono, 'iono', 'nlefsm_SO_off' ) | ||
2755 | 886 | call de_alloc( iano, 'iano', 'nlefsm_SO_off' ) | ||
2756 | 887 | |||
2757 | 888 | call de_alloc( listedall, 'listedall', 'nlefsm_SO_off' ) | ||
2758 | 889 | call de_alloc( listed, 'listed', 'nlefsm_SO_off' ) | ||
2759 | 890 | call de_alloc( Vi, 'Vi', 'nlefsm_SO_off' ) | ||
2760 | 891 | deallocate( V_so ) | ||
2761 | 892 | |||
2762 | 893 | if (.not. matrix_elements_only) then | ||
2763 | 894 | call de_alloc( Di, 'Di', 'nlefsm_SO_off' ) | ||
2764 | 895 | deallocate( Ds ) | ||
2765 | 896 | endif | ||
2766 | 897 | |||
2767 | 898 | call timer( 'nlefsm', 2 ) | ||
2768 | 899 | |||
2769 | 900 | end subroutine nlefsm_SO_off | ||
2770 | 901 | |||
2771 | 902 | c----------------------------------------------------------------------- | ||
2772 | 903 | c | ||
2773 | 904 | !> Evaluates: | ||
2774 | 905 | !! <i|V_NL|j>, where V_NL= Sum_{j,mj} |V,j,mj><V,j,mj| | ||
2775 | 906 | c | ||
2776 | 907 | c----------------------------------------------------------------------- | ||
2777 | 908 | subroutine calc_Vj_offsiteSO( l, epskb, Ski, Skj, grSki, grSkj, | ||
2778 | 909 | & V_ion, V_so, F_so ) | ||
2779 | 910 | |||
2780 | 911 | implicit none | ||
2781 | 912 | |||
2782 | 913 | integer , intent(in) :: l | ||
2783 | 914 | real(dp) , intent(in) :: epskb(2) | ||
2784 | 915 | real(dp) , intent(in) :: Ski(-l:l,2), Skj(-l:l,2) | ||
2785 | 916 | real(dp) , intent(in) :: grSki(3,-l:l,2), grSkj(3,-l:l,2) | ||
2786 | 917 | real(dp) , intent(out) :: V_ion | ||
2787 | 918 | complex(dp) , intent(out) :: F_so(3,2,2) | ||
2788 | 919 | complex(dp) , intent(out) :: V_so(2,2) | ||
2789 | 920 | |||
2790 | 921 | |||
2791 | 922 | integer :: J, ij, imj, m, is | ||
2792 | 923 | real(dp) :: aj, amj, al, a2l1, fac, facm, | ||
2793 | 924 | & epskpm, V_iont, cp, cm, facpm | ||
2794 | 925 | |||
2795 | 926 | real(dp) :: cg(2*(2*l+1),2) | ||
2796 | 927 | complex(dp):: u(-l:l,-l:l) | ||
2797 | 928 | complex(dp):: SVi(2), SVj(2), grSVi(3,2) | ||
2798 | 929 | |||
2799 | 930 | external :: die | ||
2800 | 931 | c----------------------------------------------------------------------- | ||
2801 | 932 | |||
2802 | 933 | c---- set constants and factors | ||
2803 | 934 | al = dble(l) | ||
2804 | 935 | a2l1 = dble( 2*l+1 ) | ||
2805 | 936 | |||
2806 | 937 | c---- load Clebsch-Gordan coefficients; cg(J,+-) | ||
2807 | 938 | J = 0 | ||
2808 | 939 | cg(:,:) = 0.0_dp | ||
2809 | 940 | do ij = 1, 2 | ||
2810 | 941 | aj = al + (2*ij-3)*0.5d0 ! j(ij=1)=l-1/2; j(ij=2)=l+1/2 | ||
2811 | 942 | facpm= (-1.0d0)**(aj-al-0.5d0) ! +/- sign | ||
2812 | 943 | do imj = 1, nint(2*aj)+1 ! Degeneracy for j | ||
2813 | 944 | amj = -aj + dfloat(imj-1) ! mj value | ||
2814 | 945 | J = J+1 ! (j,mj) index | ||
2815 | 946 | |||
2816 | 947 | cp = sqrt( (al+0.5d0+amj)/a2l1 ) | ||
2817 | 948 | cm = sqrt( (al+0.5d0-amj)/a2l1 ) | ||
2818 | 949 | if ( ij.eq. 1 ) then | ||
2819 | 950 | cg(J,1) = cm*facpm ! <j-|up> | ||
2820 | 951 | cg(J,2) = cp ! <j-|down> | ||
2821 | 952 | else | ||
2822 | 953 | cg(J,1) = cp*facpm ! <j+|up> | ||
2823 | 954 | cg(J,2) = cm ! <j+|down> | ||
2824 | 955 | endif | ||
2825 | 956 | enddo | ||
2826 | 957 | enddo | ||
2827 | 958 | |||
2828 | 959 | c---- Ski(M)= <l,M|i> ; Si(m)= <l,m|i> = u(m,-M)*Ski(-M) + u(m,M)*Ski(M) | ||
2829 | 960 | fac = 1.0d0/sqrt(2.0d0) | ||
2830 | 961 | u(:,:) = cmplx(0.0d0,0.0d0) | ||
2831 | 962 | u(0,0)= cmplx(1.0d0,0.0d0) | ||
2832 | 963 | do m = 1, l | ||
2833 | 964 | facm = fac*(-1.0d0)**m | ||
2834 | 965 | u(-m,+M) = cmplx(1.0d0,0.0d0)*fac | ||
2835 | 966 | u(-m,-M) = cmplx(0.0d0,1.0d0)*fac ! J. Cerda | ||
2836 | 967 | u(+m,+M) = cmplx(1.0d0,0.0d0)*facm | ||
2837 | 968 | u(+m,-M) =-cmplx(0.0d0,1.0d0)*facm ! J. Cerda | ||
2838 | 969 | enddo | ||
2839 | 970 | |||
2840 | 971 | c---- Load V_so | ||
2841 | 972 | V_so= cmplx(0.0d0,0.0d0); F_so= cmplx(0.0d0,0.0d0) | ||
2842 | 973 | J = 0 | ||
2843 | 974 | do ij = 1, 2 | ||
2844 | 975 | aj = al + (2*ij-3)*0.5d0 ! j value | ||
2845 | 976 | do imj = 1, nint(2*aj)+1 ! Degeneracy for j | ||
2846 | 977 | amj = -aj + dfloat(imj-1) ! mj value | ||
2847 | 978 | J = J+1 ! (j,mj) index | ||
2848 | 979 | |||
2849 | 980 | SVi(1:2)= cmplx(0.0d0,0.0d0); SVj(1:2)= cmplx(0.0d0,0.0d0) | ||
2850 | 981 | grSVi(1:3,1:2)= cmplx(0.0d0,0.0d0) | ||
2851 | 982 | do is = 1, 2 ! spin loop | ||
2852 | 983 | |||
2853 | 984 | c select correct m | ||
2854 | 985 | if ( is.eq.1 ) then | ||
2855 | 986 | m = nint(amj-0.5d0) ! up => m=mj-1/2 | ||
2856 | 987 | else | ||
2857 | 988 | m = nint(amj+0.5d0) ! down => m=mj+1/2 | ||
2858 | 989 | endif | ||
2859 | 990 | |||
2860 | 991 | if ( iabs(m).le.l ) then | ||
2861 | 992 | SVi(is)= Ski(+M,ij)*u(+m,M) | ||
2862 | 993 | SVj(is)= Skj(+M,ij)*u(+m,M) | ||
2863 | 994 | grSVi(1:3,is)= grSki(1:3,+M,ij)*u(+m,M) | ||
2864 | 995 | if ( m.ne.0 ) then | ||
2865 | 996 | SVi(is)= SVi(is) + Ski(-M,ij)*u(+m,-M) | ||
2866 | 997 | SVj(is)= SVj(is) + Skj(-M,ij)*u(+m,-M) | ||
2867 | 998 | grSVi(1:3,is)= grSVi(1:3,is) + | ||
2868 | 999 | & grSki(1:3,-M,ij)*u(+m,-M) | ||
2869 | 1000 | endif | ||
2870 | 1001 | SVi(is) = SVi(is) * cg(J,is) | ||
2871 | 1002 | SVj(is) = SVj(is) * cg(J,is) | ||
2872 | 1003 | |||
2873 | 1004 | grSVi(1:3,is) = grSVi(1:3,is) * cg(J,is) | ||
2874 | 1005 | endif | ||
2875 | 1006 | enddo ! is | ||
2876 | 1007 | |||
2877 | 1008 | c up-up = <i,+|V,J><V,J|j,+> | ||
2878 | 1009 | V_so(1,1) = V_so(1,1) + SVi(1) * epskb(ij) * conjg(SVj(1)) | ||
2879 | 1010 | F_so(:,1,1)= F_so(:,1,1)+ grSVi(:,1) * epskb(ij) * conjg(SVj(1)) | ||
2880 | 1011 | |||
2881 | 1012 | c down-down = <i,-|V,J><V,J|j,-> | ||
2882 | 1013 | V_so(2,2) = V_so(2,2) + SVi(2) * epskb(ij) * conjg(SVj(2)) | ||
2883 | 1014 | F_so(:,2,2)= F_so(:,2,2)+ grSVi(:,2) * epskb(ij) * conjg(SVj(2)) | ||
2884 | 1015 | |||
2885 | 1016 | c up-down = <i,+|V,J><V,J|j,-> | ||
2886 | 1017 | V_so(1,2) = V_so(1,2) + SVi(1) * epskb(ij) * conjg(SVj(2)) | ||
2887 | 1018 | F_so(:,1,2)= F_so(:,1,2)+ grSVi(:,1) * epskb(ij) * conjg(SVj(2)) | ||
2888 | 1019 | |||
2889 | 1020 | c down-up= <i,-|V,J><V,J|j,+> | ||
2890 | 1021 | V_so(2,1) = V_so(2,1) + SVi(2) * epskb(ij) * conjg(SVj(1)) | ||
2891 | 1022 | F_so(:,2,1)= F_so(:,2,1)+ grSVi(:,2) * epskb(ij) * conjg(SVj(1)) | ||
2892 | 1023 | |||
2893 | 1024 | enddo ! mj | ||
2894 | 1025 | enddo ! ij | ||
2895 | 1026 | |||
2896 | 1027 | cc--- debugging | ||
2897 | 1028 | if ( cdabs(V_so(1,2)+conjg(V_so(2,1))).gt.1.0d-4 ) then | ||
2898 | 1029 | write(6,'(a,2f12.6)') 'V_so(1,2)=',V_so(1,2) | ||
2899 | 1030 | write(6,'(a,2f12.6)') 'V_so(2,1)=',V_so(2,1) | ||
2900 | 1031 | call die('calc_Vj_LS: ERROR') | ||
2901 | 1032 | endif | ||
2902 | 1033 | |||
2903 | 1034 | c---- substract out V_ion | ||
2904 | 1035 | epskpm = sqrt( epskb(1)*epskb(2) ) | ||
2905 | 1036 | epskpm = sign(epskpm,epskb(1)) | ||
2906 | 1037 | |||
2907 | 1038 | V_ion = 0.0d0 | ||
2908 | 1039 | do M = -l, l | ||
2909 | 1040 | V_iont = ( l**2 * Ski(M,1)*epskb(1)*Skj(M,1) | ||
2910 | 1041 | & + (l+1)**2 * Ski(M,2)*epskb(2)*Skj(M,2) | ||
2911 | 1042 | & + l*(l+1) * Ski(M,1)*epskpm *Skj(M,2) | ||
2912 | 1043 | & + l*(l+1) * Ski(M,2)*epskpm *Skj(M,1) )/(a2l1**2) | ||
2913 | 1044 | V_ion = V_ion + V_iont | ||
2914 | 1045 | enddo | ||
2915 | 1046 | |||
2916 | 1047 | V_so(1,1) = V_so(1,1) - cmplx(1.0d0,0.0d0)*V_ion | ||
2917 | 1048 | V_so(2,2) = V_so(2,2) - cmplx(1.0d0,0.0d0)*V_ion | ||
2918 | 1049 | |||
2919 | 1050 | return | ||
2920 | 1051 | end subroutine calc_Vj_offsiteSO | ||
2921 | 1052 | |||
2922 | 444 | end module m_nlefsm | 1053 | end module m_nlefsm |
2923 | 445 | 1054 | ||
2924 | === modified file 'Src/setup_H0.F' | |||
2925 | --- Src/setup_H0.F 2017-06-23 19:49:18 +0000 | |||
2926 | +++ Src/setup_H0.F 2018-04-30 20:53:35 +0000 | |||
2927 | @@ -17,9 +17,12 @@ | |||
2928 | 17 | 17 | ||
2929 | 18 | USE siesta_options, only: g2cut | 18 | USE siesta_options, only: g2cut |
2930 | 19 | use sparse_matrices, only: H_kin_1D, H_vkb_1D | 19 | use sparse_matrices, only: H_kin_1D, H_vkb_1D |
2932 | 20 | use sparse_matrices, only: H_so_2D | 20 | use sparse_matrices, only: H_so_on_2D, H_so_off_2D |
2933 | 21 | use sparse_matrices, only: Dscf | 21 | use sparse_matrices, only: Dscf |
2934 | 22 | 22 | ||
2935 | 23 | use m_nlefsm, only: nlefsm_SO_off | ||
2936 | 24 | use m_spin, only: spin | ||
2937 | 25 | |||
2938 | 23 | use sparse_matrices, only: listh, listhptr, numh, maxnh | 26 | use sparse_matrices, only: listh, listhptr, numh, maxnh |
2939 | 24 | use siesta_geom | 27 | use siesta_geom |
2940 | 25 | use atmfuncs, only: uion | 28 | use atmfuncs, only: uion |
2941 | @@ -40,6 +43,7 @@ | |||
2942 | 40 | use alloc, only: re_alloc, de_alloc | 43 | use alloc, only: re_alloc, de_alloc |
2943 | 41 | use class_dSpData1D, only: val | 44 | use class_dSpData1D, only: val |
2944 | 42 | use class_dSpData2D, only: val | 45 | use class_dSpData2D, only: val |
2945 | 46 | use class_zSpData2D, only: val | ||
2946 | 43 | 47 | ||
2947 | 44 | #ifdef MPI | 48 | #ifdef MPI |
2948 | 45 | use m_mpi_utils, only: globalize_sum | 49 | use m_mpi_utils, only: globalize_sum |
2949 | @@ -52,7 +56,16 @@ | |||
2950 | 52 | real(dp) :: dummy_E | 56 | real(dp) :: dummy_E |
2951 | 53 | integer :: ia, is | 57 | integer :: ia, is |
2952 | 54 | 58 | ||
2954 | 55 | real(dp), pointer :: H_val(:), H_so(:,:) | 59 | real(dp) :: dummy_Eso |
2955 | 60 | integer :: ispin, i, j | ||
2956 | 61 | complex(dp) :: Dc | ||
2957 | 62 | #ifdef MPI | ||
2958 | 63 | real(dp) :: buffer1 | ||
2959 | 64 | #endif | ||
2960 | 65 | |||
2961 | 66 | real(dp), pointer :: H_val(:), H_so_on(:,:) | ||
2962 | 67 | complex(dp), pointer :: H_so_off(:,:) | ||
2963 | 68 | |||
2964 | 56 | 69 | ||
2965 | 57 | #ifdef DEBUG | 70 | #ifdef DEBUG |
2966 | 58 | call write_debug( ' PRE setup_H0' ) | 71 | call write_debug( ' PRE setup_H0' ) |
2967 | @@ -113,15 +126,59 @@ | |||
2968 | 113 | !$OMP parallel workshare default(shared) | 126 | !$OMP parallel workshare default(shared) |
2969 | 114 | H_val(:) = 0.0_dp | 127 | H_val(:) = 0.0_dp |
2970 | 115 | !$OMP end parallel workshare | 128 | !$OMP end parallel workshare |
2980 | 116 | call nlefsm(scell, na_u, na_s, isa, xa, indxua, | 129 | |
2981 | 117 | & maxnh, maxnh, lasto, lastkb, iphorb, iphKB, | 130 | Eso = 0.0d0 |
2982 | 118 | & numh, listhptr, listh, numh, listhptr, listh, | 131 | |
2983 | 119 | & 1, | 132 | if ( .not.spin%SO_offsite ) then |
2984 | 120 | & dummy_dm, dummy_E, dummy_fa, dummy_stress, | 133 | call nlefsm(scell, na_u, na_s, isa, xa, indxua, |
2985 | 121 | & H_val, | 134 | & maxnh, maxnh, lasto, lastkb, iphorb, iphKB, |
2986 | 122 | & matrix_elements_only=.true.) | 135 | & numh, listhptr, listh, numh, listhptr, listh, |
2987 | 123 | 136 | & 1, | |
2988 | 124 | 137 | & dummy_dm, dummy_E, dummy_fa, dummy_stress, | |
2989 | 138 | & H_val, | ||
2990 | 139 | & matrix_elements_only=.true.) | ||
2991 | 140 | else | ||
2992 | 141 | H_so_off => val(H_so_off_2D) | ||
2993 | 142 | H_so_off = dcmplx(0._dp, 0._dp) | ||
2994 | 143 | call nlefsm_SO_off(scell, na_u, na_s, isa, xa, indxua, | ||
2995 | 144 | & maxnh, maxnh, lasto, lastkb, iphorb, iphKB, | ||
2996 | 145 | & numh, listhptr, listh, numh, listhptr, listh, | ||
2997 | 146 | & spin%Grid, | ||
2998 | 147 | & dummy_E, dummy_Eso, dummy_fa, | ||
2999 | 148 | & dummy_stress, H_val, H_so_off, | ||
3000 | 149 | & matrix_elements_only=.true.) | ||
3001 | 150 | |||
3002 | 151 | |||
3003 | 152 | ! | ||
3004 | 153 | ! Dc IS NOT the dense matrix, it is just a complex number | ||
3005 | 154 | ! (per each io index) used as an artifact to multiply the | ||
3006 | 155 | ! elements of the H_SO times the corresponding elements of | ||
3007 | 156 | ! DM in a such way that the result gives Re{Tr[H_SO*DM]}. | ||
3008 | 157 | ! | ||
3009 | 158 | |||
3010 | 159 | do i = 1, maxnh | ||
3011 | 160 | |||
3012 | 161 | !-------- Eso(u,u) | ||
3013 | 162 | Dc = cmplx(Dscf(i,1),Dscf(i,5), dp) | ||
3014 | 163 | Eso = Eso + real( H_so_off(i,1)*Dc, dp) | ||
3015 | 164 | !-------- Eso(d,d) | ||
3016 | 165 | Dc = cmplx(Dscf(i,2),Dscf(i,6),dp) | ||
3017 | 166 | Eso = Eso + real( H_so_off(i,2)*Dc, dp) | ||
3018 | 167 | !-------- Eso(u,d) | ||
3019 | 168 | Dc = cmplx(Dscf(i,3),Dscf(i,4), dp) | ||
3020 | 169 | Eso = Eso + real( H_so_off(i,4)*Dc, dp) | ||
3021 | 170 | !-------- Eso(d,u) | ||
3022 | 171 | Dc = cmplx(Dscf(i,7),-Dscf(i,8), dp) | ||
3023 | 172 | Eso = Eso + real( H_so_off(i,3)*Dc, dp) | ||
3024 | 173 | |||
3025 | 174 | enddo | ||
3026 | 175 | |||
3027 | 176 | #ifdef MPI | ||
3028 | 177 | ! Global reduction of Eso | ||
3029 | 178 | call globalize_sum(Eso,buffer1) | ||
3030 | 179 | Eso = buffer1 | ||
3031 | 180 | #endif | ||
3032 | 181 | endif | ||
3033 | 125 | ! .................. | 182 | ! .................. |
3034 | 126 | 183 | ||
3035 | 127 | ! If in the future the spin-orbit routine is able to compute | 184 | ! If in the future the spin-orbit routine is able to compute |
3036 | @@ -129,17 +186,14 @@ | |||
3037 | 129 | ! computing forces and stresses, calling it in the first iteration | 186 | ! computing forces and stresses, calling it in the first iteration |
3038 | 130 | ! should be enough | 187 | ! should be enough |
3039 | 131 | ! | 188 | ! |
3042 | 132 | if ( spin%SO ) then | 189 | if ( spin%SO_onsite ) then |
3043 | 133 | H_so => val(H_so_2D) | 190 | H_so_on => val(H_so_on_2D) |
3044 | 134 | !$OMP parallel workshare default(shared) | 191 | !$OMP parallel workshare default(shared) |
3046 | 135 | H_so = 0._dp | 192 | H_so_on(:,:) = 0._dp |
3047 | 136 | !$OMP end parallel workshare | 193 | !$OMP end parallel workshare |
3048 | 137 | call spinorb(no_u,no_l,iaorb,iphorb,isa,indxuo, | 194 | call spinorb(no_u,no_l,iaorb,iphorb,isa,indxuo, |
3052 | 138 | & maxnh,numh,listhptr,listh,Dscf,H_so,Eso) | 195 | & maxnh,numh,listhptr,listh,Dscf,H_so_on,Eso) |
3050 | 139 | else | ||
3051 | 140 | Eso = 0._dp | ||
3053 | 141 | end if | 196 | end if |
3054 | 142 | |||
3055 | 143 | 197 | ||
3056 | 144 | C This will take care of possible changes to the mesh and atomic-related | 198 | C This will take care of possible changes to the mesh and atomic-related |
3057 | 145 | C mesh structures for geometry changes | 199 | C mesh structures for geometry changes |
3058 | @@ -150,7 +204,7 @@ | |||
3059 | 150 | & mscell, G2max, ntm, | 204 | & mscell, G2max, ntm, |
3060 | 151 | & maxnh, numh, listhptr, listh, datm, | 205 | & maxnh, numh, listhptr, listh, datm, |
3061 | 152 | & dummy_fa, dummy_stress) | 206 | & dummy_fa, dummy_stress) |
3063 | 153 | 207 | ||
3064 | 154 | call timer('Setup_H0',2) | 208 | call timer('Setup_H0',2) |
3065 | 155 | 209 | ||
3066 | 156 | #ifdef DEBUG | 210 | #ifdef DEBUG |
3067 | 157 | 211 | ||
3068 | === modified file 'Src/setup_hamiltonian.F' | |||
3069 | --- Src/setup_hamiltonian.F 2018-03-30 23:16:29 +0000 | |||
3070 | +++ Src/setup_hamiltonian.F 2018-04-30 20:53:35 +0000 | |||
3071 | @@ -14,12 +14,14 @@ | |||
3072 | 14 | 14 | ||
3073 | 15 | USE siesta_options | 15 | USE siesta_options |
3074 | 16 | use sparse_matrices, only: H_kin_1D, H_vkb_1D | 16 | use sparse_matrices, only: H_kin_1D, H_vkb_1D |
3076 | 17 | use sparse_matrices, only: H_ldau_2D, H_so_2D | 17 | use sparse_matrices, only: H_ldau_2D |
3077 | 18 | use sparse_matrices, only: H_so_on_2D, H_so_off_2D | ||
3078 | 18 | use sparse_matrices, only: listh, listhptr, numh, maxnh | 19 | use sparse_matrices, only: listh, listhptr, numh, maxnh |
3079 | 19 | use sparse_matrices, only: H, S, Hold | 20 | use sparse_matrices, only: H, S, Hold |
3080 | 20 | use sparse_matrices, only: Dscf, Escf, xijo | 21 | use sparse_matrices, only: Dscf, Escf, xijo |
3081 | 21 | use class_dSpData1D, only: val | 22 | use class_dSpData1D, only: val |
3082 | 22 | use class_dSpData2D, only: val | 23 | use class_dSpData2D, only: val |
3083 | 24 | use class_zSpData2D, only: val | ||
3084 | 23 | 25 | ||
3085 | 24 | use siesta_geom | 26 | use siesta_geom |
3086 | 25 | use atmfuncs, only: uion | 27 | use atmfuncs, only: uion |
3087 | @@ -40,7 +42,9 @@ | |||
3088 | 40 | use parallel, only: Node | 42 | use parallel, only: Node |
3089 | 41 | use m_steps, only: istp | 43 | use m_steps, only: istp |
3090 | 42 | use m_ntm | 44 | use m_ntm |
3092 | 43 | use m_spin, only: spin | 45 | |
3093 | 46 | use m_spin, only: spin | ||
3094 | 47 | |||
3095 | 44 | use m_dipol | 48 | use m_dipol |
3096 | 45 | use alloc, only: re_alloc, de_alloc | 49 | use alloc, only: re_alloc, de_alloc |
3097 | 46 | use m_gamma | 50 | use m_gamma |
3098 | @@ -68,7 +72,12 @@ | |||
3099 | 68 | type(filesOut_t) :: filesOut ! blank output file names | 72 | type(filesOut_t) :: filesOut ! blank output file names |
3100 | 69 | logical :: use_rhog_in | 73 | logical :: use_rhog_in |
3101 | 70 | 74 | ||
3103 | 71 | real(dp), pointer :: H_vkb(:), H_kin(:), H_ldau(:,:), H_so(:,:) | 75 | real(dp), pointer :: H_vkb(:), H_kin(:), H_ldau(:,:) |
3104 | 76 | real(dp), pointer :: H_so_on(:,:) | ||
3105 | 77 | complex(dp), pointer:: H_so_off(:,:) | ||
3106 | 78 | |||
3107 | 79 | complex(dp):: Dc | ||
3108 | 80 | integer :: ind, i, j | ||
3109 | 72 | 81 | ||
3110 | 73 | !------------------------------------------------------------------------- BEGIN | 82 | !------------------------------------------------------------------------- BEGIN |
3111 | 74 | 83 | ||
3112 | @@ -84,53 +93,53 @@ | |||
3113 | 84 | do ispin = 1, spin%H | 93 | do ispin = 1, spin%H |
3114 | 85 | do io = 1,maxnh | 94 | do io = 1,maxnh |
3115 | 86 | Hold(io,ispin) = H(io,ispin) | 95 | Hold(io,ispin) = H(io,ispin) |
3118 | 87 | enddo | 96 | end do |
3119 | 88 | enddo | 97 | end do |
3120 | 89 | !$OMP end do | 98 | !$OMP end do |
3121 | 90 | 99 | ||
3122 | 91 | !$OMP single | 100 | !$OMP single |
3123 | 92 | H_kin => val(H_kin_1D) | 101 | H_kin => val(H_kin_1D) |
3124 | 93 | H_vkb => val(H_vkb_1D) | 102 | H_vkb => val(H_vkb_1D) |
3129 | 94 | if ( spin%SO ) then | 103 | |
3130 | 95 | ! Sadly some compilers (g95), does | 104 | if ( spin%SO_onsite ) then |
3131 | 96 | ! not allow bounds for pointer assignments :( | 105 | ! Sadly some compilers (g95), does |
3132 | 97 | H_so => val(H_so_2D) | 106 | ! not allow bounds for pointer assignments :( |
3133 | 107 | H_so_on => val(H_so_on_2D) | ||
3134 | 108 | |||
3135 | 109 | else if ( spin%SO_offsite ) then | ||
3136 | 110 | H_so_off => val(H_so_off_2D) | ||
3137 | 111 | |||
3138 | 98 | end if | 112 | end if |
3139 | 99 | !$OMP end single ! keep wait | 113 | !$OMP end single ! keep wait |
3140 | 100 | 114 | ||
3146 | 101 | ! We do not need to set the non-spinor components | 115 | ! Initialize diagonal Hamiltonian |
3142 | 102 | ! For non-colinear they are set down below, | ||
3143 | 103 | ! while for spin-orbit they are set to the H_so initial | ||
3144 | 104 | ! spin-orbit. | ||
3145 | 105 | |||
3147 | 106 | do ispin = 1, spin%spinor | 116 | do ispin = 1, spin%spinor |
3148 | 107 | !$OMP do | 117 | !$OMP do |
3152 | 108 | do io = 1,maxnh | 118 | do io = 1,maxnh |
3153 | 109 | H(io,ispin) = H_kin(io) + H_vkb(io) | 119 | H(io,ispin) = H_kin(io) + H_vkb(io) |
3154 | 110 | end do | 120 | end do |
3155 | 111 | !$OMP end do nowait | 121 | !$OMP end do nowait |
3156 | 112 | end do | 122 | end do |
3157 | 113 | 123 | ||
3178 | 114 | if ( spin%NCol ) then | 124 | if ( spin%SO_onsite ) then |
3179 | 115 | 125 | !$OMP do collapse(2) | |
3180 | 116 | !$OMP do collapse(2) | 126 | do ispin = 3 , spin%H |
3181 | 117 | do ispin = 3 , spin%H | 127 | do io = 1,maxnh |
3182 | 118 | do io = 1, maxnh | 128 | H(io,ispin) = H_so_on(io,ispin-2) |
3183 | 119 | H(io,ispin) = 0._dp | 129 | end do |
3184 | 120 | end do | 130 | end do |
3185 | 121 | end do | 131 | !$OMP end do nowait |
3186 | 122 | !$OMP end do nowait | 132 | |
3187 | 123 | 133 | else | |
3188 | 124 | else if ( spin%SO ) then | 134 | |
3189 | 125 | 135 | !$OMP do collapse(2) | |
3190 | 126 | !$OMP do collapse(2) | 136 | do ispin = 3 , spin%H |
3191 | 127 | do ispin = 3 , spin%H | 137 | do io = 1,maxnh |
3192 | 128 | do io = 1, maxnh | 138 | H(io,ispin) = 0._dp |
3193 | 129 | H(io,ispin) = H_so(io,ispin-2) | 139 | end do |
3194 | 130 | end do | 140 | end do |
3195 | 131 | end do | 141 | !$OMP end do nowait |
3196 | 132 | !$OMP end do nowait | 142 | |
3177 | 133 | |||
3197 | 134 | end if | 143 | end if |
3198 | 135 | 144 | ||
3199 | 136 | ! .................. | 145 | ! .................. |
3200 | @@ -146,6 +155,7 @@ | |||
3201 | 146 | !$OMP single | 155 | !$OMP single |
3202 | 147 | Ekin = 0.0_dp | 156 | Ekin = 0.0_dp |
3203 | 148 | Enl = 0.0_dp | 157 | Enl = 0.0_dp |
3204 | 158 | Eso = 0.0_dp | ||
3205 | 149 | !$OMP end single ! keep wait | 159 | !$OMP end single ! keep wait |
3206 | 150 | 160 | ||
3207 | 151 | !$OMP do collapse(2), reduction(+:Ekin,Enl) | 161 | !$OMP do collapse(2), reduction(+:Ekin,Enl) |
3208 | @@ -157,21 +167,46 @@ | |||
3209 | 157 | end do | 167 | end do |
3210 | 158 | !$OMP end do nowait | 168 | !$OMP end do nowait |
3211 | 159 | 169 | ||
3216 | 160 | !$OMP single | 170 | ! |
3217 | 161 | Eso = 0._dp | 171 | ! Dc IS NOT the dense matrix, it is just a complex number |
3218 | 162 | !$OMP end single | 172 | ! (per each io index) used as an artifact to multiply the |
3219 | 163 | if ( spin%SO ) then | 173 | ! elements of the H_SO times the corresponding elements of |
3220 | 174 | ! DM in a such way that the result gives Re{Tr[H_SO*DM]}. | ||
3221 | 175 | ! | ||
3222 | 176 | |||
3223 | 177 | if ( spin%SO_offsite ) then | ||
3224 | 178 | do io = 1, maxnh | ||
3225 | 179 | |||
3226 | 180 | !-------- Eso(u,u) | ||
3227 | 181 | Dc = cmplx(Dscf(io,1),Dscf(io,5), dp) | ||
3228 | 182 | Eso = Eso + real( H_so_off(io,1)*Dc, dp) | ||
3229 | 183 | !-------- Eso(d,d) | ||
3230 | 184 | Dc = cmplx(Dscf(io,2),Dscf(io,6), dp) | ||
3231 | 185 | Eso = Eso + real( H_so_off(io,2)*Dc, dp) | ||
3232 | 186 | !-------- Eso(u,d) | ||
3233 | 187 | Dc = cmplx(Dscf(io,3),Dscf(io,4), dp) | ||
3234 | 188 | Eso = Eso + real( H_so_off(io,4)*Dc, dp) | ||
3235 | 189 | !-------- Eso(d,u) | ||
3236 | 190 | Dc = cmplx(Dscf(io,7),-Dscf(io,8), dp) | ||
3237 | 191 | Eso = Eso + real( H_so_off(io,3)*Dc, dp) | ||
3238 | 192 | |||
3239 | 193 | end do | ||
3240 | 194 | |||
3241 | 195 | else if ( spin%SO_onsite ) then | ||
3242 | 196 | |||
3243 | 164 | !$OMP do reduction(+:Eso) | 197 | !$OMP do reduction(+:Eso) |
3244 | 165 | do io = 1, maxnh | 198 | do io = 1, maxnh |
3248 | 166 | Eso = Eso + H_so(io,1)*Dscf(io,7) + H_so(io,2)*Dscf(io,8) | 199 | Eso = Eso + H_so_on(io,1)*Dscf(io,7) + |
3249 | 167 | . + H_so(io,5)*Dscf(io,3) + H_so(io,6)*Dscf(io,4) | 200 | & H_so_on(io,2)*Dscf(io,8)+ H_so_on(io,5)*Dscf(io,3) + |
3250 | 168 | . - H_so(io,3)*Dscf(io,5) - H_so(io,4)*Dscf(io,6) | 201 | & H_so_on(io,6)*Dscf(io,4)- H_so_on(io,3)*Dscf(io,5) - |
3251 | 202 | & H_so_on(io,4)*Dscf(io,6) | ||
3252 | 169 | end do | 203 | end do |
3253 | 170 | !$OMP end do nowait | 204 | !$OMP end do nowait |
3255 | 171 | end if | 205 | |
3256 | 206 | end if | ||
3257 | 172 | 207 | ||
3258 | 173 | !$OMP end parallel | 208 | !$OMP end parallel |
3260 | 174 | 209 | ||
3261 | 175 | #ifdef MPI | 210 | #ifdef MPI |
3262 | 176 | ! Global reduction of Ekin, Enl | 211 | ! Global reduction of Ekin, Enl |
3263 | 177 | call globalize_sum(Ekin,buffer1) | 212 | call globalize_sum(Ekin,buffer1) |
3264 | @@ -191,7 +226,7 @@ | |||
3265 | 191 | ! Hubbard term for LDA+U: energy, forces, stress and matrix elements .... | 226 | ! Hubbard term for LDA+U: energy, forces, stress and matrix elements .... |
3266 | 192 | if( switch_ldau ) then | 227 | if( switch_ldau ) then |
3267 | 193 | if ( spin%NCol ) then | 228 | if ( spin%NCol ) then |
3269 | 194 | call die('LDA+U cannot be used with non-colinear spin.') | 229 | call die('LDA+U cannot be used with non-collinear spin.') |
3270 | 195 | end if | 230 | end if |
3271 | 196 | if ( spin%SO ) then | 231 | if ( spin%SO ) then |
3272 | 197 | call die('LDA+U cannot be used with spin-orbit coupling.') | 232 | call die('LDA+U cannot be used with spin-orbit coupling.') |
3273 | @@ -243,6 +278,25 @@ | |||
3274 | 243 | . Exc, Dxc, dipol, stress, fal, stressl, | 278 | . Exc, Dxc, dipol, stress, fal, stressl, |
3275 | 244 | . use_rhog_in) | 279 | . use_rhog_in) |
3276 | 245 | 280 | ||
3277 | 281 | if ( spin%SO_offsite ) then | ||
3278 | 282 | |||
3279 | 283 | ! H(:, [5, 6]) are not updated in dhscf, see vmat for details. | ||
3280 | 284 | |||
3281 | 285 | !------- H(u,u) | ||
3282 | 286 | H(:,1) = H(:,1) + real(H_so_off(:,1), dp) | ||
3283 | 287 | H(:,5) = dimag(H_so_off(:,1)) | ||
3284 | 288 | !------- H(d,d) | ||
3285 | 289 | H(:,2) = H(:,2) + real(H_so_off(:,2), dp) | ||
3286 | 290 | H(:,6) = dimag(H_so_off(:,2)) | ||
3287 | 291 | !------- H(u,d) | ||
3288 | 292 | H(:,3) = H(:,3) + real(H_so_off(:,3), dp) | ||
3289 | 293 | H(:,4) = H(:,4) +dimag(H_so_off(:,3)) | ||
3290 | 294 | !------- H(d,u) | ||
3291 | 295 | H(:,7) = H(:,7) + real(H_so_off(:,4), dp) | ||
3292 | 296 | H(:,8) = H(:,8) -dimag(H_so_off(:,4)) | ||
3293 | 297 | |||
3294 | 298 | endif | ||
3295 | 299 | |||
3296 | 246 | ! This statement will apply to iscf = 1, for example, when | 300 | ! This statement will apply to iscf = 1, for example, when |
3297 | 247 | ! we do not use rhog_in. Rhog here is always the charge used to | 301 | ! we do not use rhog_in. Rhog here is always the charge used to |
3298 | 248 | ! build H, that is, rhog_in. | 302 | ! build H, that is, rhog_in. |
3299 | 249 | 303 | ||
3300 | === modified file 'Src/siesta_options.F90' | |||
3301 | --- Src/siesta_options.F90 2018-04-17 13:07:32 +0000 | |||
3302 | +++ Src/siesta_options.F90 2018-04-30 20:53:35 +0000 | |||
3303 | @@ -27,7 +27,6 @@ | |||
3304 | 27 | ! -- pre 4.0 coordinate output logic -- to be implemented | 27 | ! -- pre 4.0 coordinate output logic -- to be implemented |
3305 | 28 | logical :: compat_pre_v4_dynamics ! General switch | 28 | logical :: compat_pre_v4_dynamics ! General switch |
3306 | 29 | 29 | ||
3307 | 30 | |||
3308 | 31 | logical :: mix_scf_first ! Mix first SCF step? | 30 | logical :: mix_scf_first ! Mix first SCF step? |
3309 | 32 | logical :: mix_charge ! New: mix fourier components of rho | 31 | logical :: mix_charge ! New: mix fourier components of rho |
3310 | 33 | logical :: mixH ! Mix H instead of DM | 32 | logical :: mixH ! Mix H instead of DM |
3311 | @@ -234,7 +233,7 @@ | |||
3312 | 234 | real(dp) :: total_spin ! Total spin used in spin-polarized calculations | 233 | real(dp) :: total_spin ! Total spin used in spin-polarized calculations |
3313 | 235 | real(dp) :: tt ! Target temperature. Read in redata. Used in dynamics rout. | 234 | real(dp) :: tt ! Target temperature. Read in redata. Used in dynamics rout. |
3314 | 236 | real(dp) :: wmix ! Mixing weight for DM in SCF iteration | 235 | real(dp) :: wmix ! Mixing weight for DM in SCF iteration |
3316 | 237 | real(dp) :: wmixkick ! Mixing weight for DM in special 'kick' SCF steps | 236 | real(dp) :: wmixkick ! Mixing weight for DM in special 'kick' SCF steps |
3317 | 238 | 237 | ||
3318 | 239 | character(len=164) :: sname ! System name, used to initialise read | 238 | character(len=164) :: sname ! System name, used to initialise read |
3319 | 240 | 239 | ||
3320 | @@ -250,5 +249,5 @@ | |||
3321 | 250 | ! LUA-handle | 249 | ! LUA-handle |
3322 | 251 | type(luaState) :: LUA | 250 | type(luaState) :: LUA |
3323 | 252 | #endif | 251 | #endif |
3325 | 253 | 252 | ||
3326 | 254 | END MODULE siesta_options | 253 | END MODULE siesta_options |
3327 | 255 | 254 | ||
3328 | === modified file 'Src/sparse_matrices.F' | |||
3329 | --- Src/sparse_matrices.F 2016-08-18 10:36:36 +0000 | |||
3330 | +++ Src/sparse_matrices.F 2018-04-30 20:53:35 +0000 | |||
3331 | @@ -9,6 +9,7 @@ | |||
3332 | 9 | use precision | 9 | use precision |
3333 | 10 | use class_dSpData1D | 10 | use class_dSpData1D |
3334 | 11 | use class_dSpData2D | 11 | use class_dSpData2D |
3335 | 12 | use class_zSpData2D | ||
3336 | 12 | use class_Sparsity | 13 | use class_Sparsity |
3337 | 13 | use class_OrbitalDistribution | 14 | use class_OrbitalDistribution |
3338 | 14 | use class_Fstack_Pair_Geometry_dSpData2D | 15 | use class_Fstack_Pair_Geometry_dSpData2D |
3339 | @@ -31,12 +32,16 @@ | |||
3340 | 31 | 32 | ||
3341 | 32 | real(dp), public, pointer :: xijo(:,:)=>null() | 33 | real(dp), public, pointer :: xijo(:,:)=>null() |
3342 | 33 | 34 | ||
3343 | 35 | complex(dp), public, pointer :: H0_offsiteSO(:,:) => null() | ||
3344 | 34 | 36 | ||
3345 | 35 | ! Pieces of H that do not depend on the SCF density matrix | 37 | ! Pieces of H that do not depend on the SCF density matrix |
3346 | 36 | ! Formerly there was a single array H0 for this | 38 | ! Formerly there was a single array H0 for this |
3347 | 37 | type(dSpData1D), public, save :: H_vkb_1D, H_kin_1D | 39 | type(dSpData1D), public, save :: H_vkb_1D, H_kin_1D |
3348 | 38 | ! LDA+U and spin-orbit coupling Hamiltonian | 40 | ! LDA+U and spin-orbit coupling Hamiltonian |
3350 | 39 | type(dSpData2D), public, save :: H_ldau_2D, H_so_2D | 41 | type(dSpData2D), public, save :: H_ldau_2D, H_so_on_2D |
3351 | 42 | ! Spin-orbit off-site | ||
3352 | 43 | type(zSpData2D), public, save :: H_so_off_2D | ||
3353 | 44 | |||
3354 | 40 | 45 | ||
3355 | 41 | ! New interface data | 46 | ! New interface data |
3356 | 42 | type(Sparsity), public, save :: sparse_pattern | 47 | type(Sparsity), public, save :: sparse_pattern |
3357 | @@ -54,7 +59,7 @@ | |||
3358 | 54 | CONTAINS | 59 | CONTAINS |
3359 | 55 | 60 | ||
3360 | 56 | subroutine resetSparseMatrices( ) | 61 | subroutine resetSparseMatrices( ) |
3362 | 57 | use alloc, only : de_alloc | 62 | use alloc, only : de_alloc |
3363 | 58 | 63 | ||
3364 | 59 | implicit none | 64 | implicit none |
3365 | 60 | 65 | ||
3366 | @@ -65,7 +70,8 @@ | |||
3367 | 65 | call delete( H_kin_1D ) | 70 | call delete( H_kin_1D ) |
3368 | 66 | call delete( H_vkb_1D ) | 71 | call delete( H_vkb_1D ) |
3369 | 67 | call delete( H_ldau_2D ) | 72 | call delete( H_ldau_2D ) |
3371 | 68 | call delete( H_so_2D ) | 73 | call delete( H_so_on_2D ) |
3372 | 74 | call delete( H_so_off_2D ) | ||
3373 | 69 | 75 | ||
3374 | 70 | call delete( DM_2D ) ; nullify(Dscf) | 76 | call delete( DM_2D ) ; nullify(Dscf) |
3375 | 71 | call delete( EDM_2D ) ; nullify(Escf) | 77 | call delete( EDM_2D ) ; nullify(Escf) |
3376 | 72 | 78 | ||
3377 | === modified file 'Src/spinorbit.f' | |||
3378 | --- Src/spinorbit.f 2017-10-26 10:42:57 +0000 | |||
3379 | +++ Src/spinorbit.f 2018-04-30 20:53:35 +0000 | |||
3380 | @@ -38,7 +38,6 @@ | |||
3381 | 38 | use precision, only: dp | 38 | use precision, only: dp |
3382 | 39 | use atmfuncs | 39 | use atmfuncs |
3383 | 40 | use atm_types | 40 | use atm_types |
3384 | 41 | use fdf, only: fdf_get | ||
3385 | 42 | use parallel, only: Node, Nodes | 41 | use parallel, only: Node, Nodes |
3386 | 43 | use parallelsubs, only: LocalToGlobalOrb | 42 | use parallelsubs, only: LocalToGlobalOrb |
3387 | 44 | 43 | ||
3388 | @@ -53,7 +52,6 @@ | |||
3389 | 53 | ! indexing technology) | 52 | ! indexing technology) |
3390 | 54 | 53 | ||
3391 | 55 | logical, save :: vso_setup = .false. | 54 | logical, save :: vso_setup = .false. |
3392 | 56 | real(dp), save :: so_strength = 1.0_dp | ||
3393 | 57 | 55 | ||
3394 | 58 | integer, pointer, save :: nr(:) | 56 | integer, pointer, save :: nr(:) |
3395 | 59 | real(dp), pointer, save :: vso(:,:,:) | 57 | real(dp), pointer, save :: vso(:,:,:) |
3396 | @@ -73,7 +71,6 @@ | |||
3397 | 73 | use atmparams, only: lmaxd | 71 | use atmparams, only: lmaxd |
3398 | 74 | use parallel, only: Node | 72 | use parallel, only: Node |
3399 | 75 | use m_mpi_utils, only: broadcast | 73 | use m_mpi_utils, only: broadcast |
3400 | 76 | use sys, only: die | ||
3401 | 77 | 74 | ||
3402 | 78 | integer :: is, mx_nrval, li, ir, iup | 75 | integer :: is, mx_nrval, li, ir, iup |
3403 | 79 | real(dp) :: a, b, rpb, ea | 76 | real(dp) :: a, b, rpb, ea |
3404 | @@ -132,7 +129,8 @@ | |||
3405 | 132 | enddo | 129 | enddo |
3406 | 133 | write(6,"(/)") | 130 | write(6,"(/)") |
3407 | 134 | if (.not. there_are_so_potentials) then | 131 | if (.not. there_are_so_potentials) then |
3409 | 135 | call die("No spin-orbit components for any species!!") | 132 | write(6,"(a)") "*** WARNING: No spin-orbit components " // |
3410 | 133 | $ "for any species... " | ||
3411 | 136 | endif | 134 | endif |
3412 | 137 | endif | 135 | endif |
3413 | 138 | 136 | ||
3414 | @@ -140,8 +138,6 @@ | |||
3415 | 140 | call broadcast(r) | 138 | call broadcast(r) |
3416 | 141 | call broadcast(drdi) | 139 | call broadcast(drdi) |
3417 | 142 | 140 | ||
3418 | 143 | so_strength = fdf_get('SpinOrbitStrength',1.0_dp) | ||
3419 | 144 | |||
3420 | 145 | end subroutine init_vso | 141 | end subroutine init_vso |
3421 | 146 | 142 | ||
3422 | 147 | !------------------------------------------------ | 143 | !------------------------------------------------ |
3423 | @@ -174,6 +170,7 @@ | |||
3424 | 174 | C ********************************************************************* | 170 | C ********************************************************************* |
3425 | 175 | C | 171 | C |
3426 | 176 | use m_mpi_utils, only: globalize_sum | 172 | use m_mpi_utils, only: globalize_sum |
3427 | 173 | |||
3428 | 177 | implicit none | 174 | implicit none |
3429 | 178 | 175 | ||
3430 | 179 | C Arguments | 176 | C Arguments |
3431 | @@ -238,7 +235,7 @@ | |||
3432 | 238 | 235 | ||
3433 | 239 | call int_so_rad(is, li, joa, ioa, int_rad) | 236 | call int_so_rad(is, li, joa, ioa, int_rad) |
3434 | 240 | call int_so_ang(li, mj, mi, int_ang(:)) | 237 | call int_so_ang(li, mj, mi, int_ang(:)) |
3436 | 241 | Hso_ji(:)=so_strength*int_rad*int_ang(:) | 238 | Hso_ji(:) = int_rad * int_ang(:) |
3437 | 242 | 239 | ||
3438 | 243 | H(ind,3) = H(ind,3) + Hso_ji(2) | 240 | H(ind,3) = H(ind,3) + Hso_ji(2) |
3439 | 244 | H(ind,4) = H(ind,4) + Hso_ji(3) | 241 | H(ind,4) = H(ind,4) + Hso_ji(3) |
3440 | 245 | 242 | ||
3441 | === modified file 'Src/state_analysis.F' | |||
3442 | --- Src/state_analysis.F 2018-04-19 08:46:09 +0000 | |||
3443 | +++ Src/state_analysis.F 2018-04-30 20:53:35 +0000 | |||
3444 | @@ -22,7 +22,7 @@ | |||
3445 | 22 | & CartesianForce_to_ZmatForce | 22 | & CartesianForce_to_ZmatForce |
3446 | 23 | use atomlist, only : iaorb, iphorb, amass, no_u, lasto | 23 | use atomlist, only : iaorb, iphorb, amass, no_u, lasto |
3447 | 24 | use atomlist, only : indxuo | 24 | use atomlist, only : indxuo |
3449 | 25 | use m_spin, only : nspin, SpOrb | 25 | use m_spin, only : spin |
3450 | 26 | use m_fixed, only : fixed | 26 | use m_fixed, only : fixed |
3451 | 27 | use sparse_matrices | 27 | use sparse_matrices |
3452 | 28 | use siesta_geom | 28 | use siesta_geom |
3453 | @@ -167,7 +167,7 @@ | |||
3454 | 167 | endif | 167 | endif |
3455 | 168 | 168 | ||
3456 | 169 | ! Population and moment analysis | 169 | ! Population and moment analysis |
3458 | 170 | if ( SpOrb .and. orbmoms) then | 170 | if ( spin%SO .and. orbmoms) then |
3459 | 171 | call moments( 1, na_u, no_u, maxnh, numh, listhptr, | 171 | call moments( 1, na_u, no_u, maxnh, numh, listhptr, |
3460 | 172 | . listh, S, Dscf, isa, lasto, iaorb, iphorb, | 172 | . listh, S, Dscf, isa, lasto, iaorb, iphorb, |
3461 | 173 | . indxuo ) | 173 | . indxuo ) |
3462 | 174 | 174 | ||
3463 | === modified file 'Src/state_init.F' | |||
3464 | --- Src/state_init.F 2018-04-15 14:49:37 +0000 | |||
3465 | +++ Src/state_init.F 2018-04-30 20:53:35 +0000 | |||
3466 | @@ -27,7 +27,8 @@ | |||
3467 | 27 | use sparse_matrices, only: S , S_1D | 27 | use sparse_matrices, only: S , S_1D |
3468 | 28 | 28 | ||
3469 | 29 | use sparse_matrices, only: H_kin_1D, H_vkb_1D | 29 | use sparse_matrices, only: H_kin_1D, H_vkb_1D |
3471 | 30 | use sparse_matrices, only: H_ldau_2D, H_so_2D | 30 | use sparse_matrices, only: H_ldau_2D |
3472 | 31 | use sparse_matrices, only: H_so_on_2D, H_so_off_2D | ||
3473 | 31 | 32 | ||
3474 | 32 | use sparse_matrices, only: sparse_pattern | 33 | use sparse_matrices, only: sparse_pattern |
3475 | 33 | use sparse_matrices, only: block_dist, single_dist | 34 | use sparse_matrices, only: block_dist, single_dist |
3476 | @@ -98,6 +99,7 @@ | |||
3477 | 98 | use class_Sparsity | 99 | use class_Sparsity |
3478 | 99 | use class_dSpData1D | 100 | use class_dSpData1D |
3479 | 100 | use class_dSpData2D | 101 | use class_dSpData2D |
3480 | 102 | use class_zSpData2D | ||
3481 | 101 | use class_dData2D | 103 | use class_dData2D |
3482 | 102 | #ifdef TEST_IO | 104 | #ifdef TEST_IO |
3483 | 103 | use m_test_io | 105 | use m_test_io |
3484 | @@ -138,7 +140,6 @@ | |||
3485 | 138 | type(dData2D) :: tmp_2D | 140 | type(dData2D) :: tmp_2D |
3486 | 139 | real(dp) :: dummy_qspin(8) | 141 | real(dp) :: dummy_qspin(8) |
3487 | 140 | 142 | ||
3488 | 141 | |||
3489 | 142 | !------------------------------------------------------------------- BEGIN | 143 | !------------------------------------------------------------------- BEGIN |
3490 | 143 | call timer( 'IterGeom', 1 ) | 144 | call timer( 'IterGeom', 1 ) |
3491 | 144 | #ifdef DEBUG | 145 | #ifdef DEBUG |
3492 | @@ -339,6 +340,7 @@ | |||
3493 | 339 | ! be higher than 1, hence we need to create "fake" | 340 | ! be higher than 1, hence we need to create "fake" |
3494 | 340 | ! containers and let the new<class> delete the old | 341 | ! containers and let the new<class> delete the old |
3495 | 341 | ! sparsity pattern | 342 | ! sparsity pattern |
3496 | 343 | |||
3497 | 342 | nullify(numh,listhptr,listh) | 344 | nullify(numh,listhptr,listh) |
3498 | 343 | allocate(numh(no_l),listhptr(no_l)) | 345 | allocate(numh(no_l),listhptr(no_l)) |
3499 | 344 | ! We do not need to allocate listh | 346 | ! We do not need to allocate listh |
3500 | @@ -562,11 +564,15 @@ | |||
3501 | 562 | end if | 564 | end if |
3502 | 563 | end if | 565 | end if |
3503 | 564 | 566 | ||
3509 | 565 | if ( spin%SO ) then | 567 | if ( spin%SO_onsite ) then |
3510 | 566 | write(oname,"(a,i0)") "H_so at geom step ", istep | 568 | write(oname,"(a,i0)") "H_so (onsite) at geom step ", istep |
3511 | 567 | call newdSpData2D(sparse_pattern,spin%H - 2, | 569 | call newdSpData2D(sparse_pattern,spin%H - 2, |
3512 | 568 | & block_dist,H_so_2D,name=oname) | 570 | & block_dist,H_so_on_2D,name=oname) |
3513 | 569 | end if | 571 | else if ( spin%SO_offsite ) then |
3514 | 572 | write(oname,"(a,i0)") "H_so (offsite) at geom step ", istep | ||
3515 | 573 | call newzSpData2D(sparse_pattern,4, | ||
3516 | 574 | & block_dist,H_so_off_2D,name=oname) | ||
3517 | 575 | endif | ||
3518 | 570 | 576 | ||
3519 | 571 | write(oname,"(a,i0)") "S at geom step ", istep | 577 | write(oname,"(a,i0)") "S at geom step ", istep |
3520 | 572 | call newdSpData1D(sparse_pattern,block_dist,S_1D,name=oname) | 578 | call newdSpData1D(sparse_pattern,block_dist,S_1D,name=oname) |
3521 | @@ -585,6 +591,7 @@ | |||
3522 | 585 | ! Initialize density matrix | 591 | ! Initialize density matrix |
3523 | 586 | ! The resizing of Dscf is done inside new_dm | 592 | ! The resizing of Dscf is done inside new_dm |
3524 | 587 | call new_DM(auxchanged, DM_history, DM_2D, EDM_2D) | 593 | call new_DM(auxchanged, DM_history, DM_2D, EDM_2D) |
3525 | 594 | |||
3526 | 588 | Dscf => val(DM_2D) | 595 | Dscf => val(DM_2D) |
3527 | 589 | Escf => val(EDM_2D) | 596 | Escf => val(EDM_2D) |
3528 | 590 | if (spin%H > 1) call print_spin(dummy_qspin) | 597 | if (spin%H > 1) call print_spin(dummy_qspin) |
3529 | 591 | 598 | ||
3530 | === added directory 'Tests/FePt_soc' | |||
3531 | === added file 'Tests/FePt_soc/FePt_soc.fdf' | |||
3532 | --- Tests/FePt_soc/FePt_soc.fdf 1970-01-01 00:00:00 +0000 | |||
3533 | +++ Tests/FePt_soc/FePt_soc.fdf 2018-04-30 20:53:35 +0000 | |||
3534 | @@ -0,0 +1,65 @@ | |||
3535 | 1 | # | ||
3536 | 2 | # -- Caution: quality parameters set artificially low ! | ||
3537 | 3 | # | ||
3538 | 4 | SystemName FePt distorted bulk structure -- soc test | ||
3539 | 5 | SystemLabel FePt_soc | ||
3540 | 6 | NumberOfAtoms 2 | ||
3541 | 7 | NumberOfSpecies 2 | ||
3542 | 8 | %block Chemical_Species_label | ||
3543 | 9 | 1 26 Fe_fept_SOC | ||
3544 | 10 | 2 78 Pt_fept_SOC | ||
3545 | 11 | %endblock Chemical_Species_label | ||
3546 | 12 | |||
3547 | 13 | Spin SO | ||
3548 | 14 | |||
3549 | 15 | %block DM.InitSpin | ||
3550 | 16 | 1 +2. 90. 90. | ||
3551 | 17 | 2 +1. 90. 90. | ||
3552 | 18 | %endblock DM.InitSpin | ||
3553 | 19 | |||
3554 | 20 | LatticeConstant 1.0 Ang | ||
3555 | 21 | %block LatticeVectors | ||
3556 | 22 | 2.793068700 0.000000000 0.000000000 | ||
3557 | 23 | 0.000000000 2.70 0.000000000 | ||
3558 | 24 | 0.000000000 0.000000000 3.792000000 | ||
3559 | 25 | %endblock LatticeVectors | ||
3560 | 26 | |||
3561 | 27 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
3562 | 28 | %block AtomicCoordinatesAndAtomicSpecies | ||
3563 | 29 | 1.396535500 1.45 0.000000000 1 | ||
3564 | 30 | 0.000000000 0.000000000 1.896000000 2 | ||
3565 | 31 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
3566 | 32 | |||
3567 | 33 | %Block PAO.Basis | ||
3568 | 34 | Fe_fept_SOC 2 | ||
3569 | 35 | n=4 0 2 P | ||
3570 | 36 | 0.0 0.0 | ||
3571 | 37 | n=3 2 2 | ||
3572 | 38 | 0.0 0.0 | ||
3573 | 39 | Pt_fept_SOC 2 | ||
3574 | 40 | n=6 0 2 P | ||
3575 | 41 | 0.0 0.0 | ||
3576 | 42 | n=5 2 2 | ||
3577 | 43 | 0.0 0.0 | ||
3578 | 44 | %EndBlock PAO.Basis | ||
3579 | 45 | |||
3580 | 46 | %block kgrid_Monkhorst_Pack | ||
3581 | 47 | 3 0 0 0.0 | ||
3582 | 48 | 0 5 0 0.0 | ||
3583 | 49 | 0 0 5 0.0 | ||
3584 | 50 | %endblock kgrid_Monkhorst_Pack | ||
3585 | 51 | |||
3586 | 52 | xc.functional GGA | ||
3587 | 53 | xc.authors PBE | ||
3588 | 54 | MeshCutoff 400. Ry | ||
3589 | 55 | SolutionMethod diagon | ||
3590 | 56 | |||
3591 | 57 | DM.Tolerance 1.0E-4 | ||
3592 | 58 | MaxSCFIterations 6 | ||
3593 | 59 | scf-must-converge F | ||
3594 | 60 | DM.MixingWeight 0.01 | ||
3595 | 61 | DM.NumberPulay 4 | ||
3596 | 62 | scf-mix-spin all | ||
3597 | 63 | |||
3598 | 64 | MullikenInSCF T | ||
3599 | 65 | WriteForces T | ||
3600 | 0 | 66 | ||
3601 | === added file 'Tests/FePt_soc/FePt_soc.pseudos' | |||
3602 | --- Tests/FePt_soc/FePt_soc.pseudos 1970-01-01 00:00:00 +0000 | |||
3603 | +++ Tests/FePt_soc/FePt_soc.pseudos 2018-04-30 20:53:35 +0000 | |||
3604 | @@ -0,0 +1,2 @@ | |||
3605 | 1 | Fe_fept_SOC | ||
3606 | 2 | Pt_fept_SOC | ||
3607 | 0 | 3 | ||
3608 | === added file 'Tests/FePt_soc/makefile' | |||
3609 | --- Tests/FePt_soc/makefile 1970-01-01 00:00:00 +0000 | |||
3610 | +++ Tests/FePt_soc/makefile 2018-04-30 20:53:35 +0000 | |||
3611 | @@ -0,0 +1,2 @@ | |||
3612 | 1 | name=FePt_soc | ||
3613 | 2 | include ../test.mk | ||
3614 | 0 | 3 | ||
3615 | === modified file 'Tests/Makefile' | |||
3616 | --- Tests/Makefile 2018-04-25 11:39:40 +0000 | |||
3617 | +++ Tests/Makefile 2018-04-30 20:53:35 +0000 | |||
3618 | @@ -28,7 +28,7 @@ | |||
3619 | 28 | # for a serial run. | 28 | # for a serial run. |
3620 | 29 | # | 29 | # |
3621 | 30 | # It is also possible to have separate working directories, | 30 | # It is also possible to have separate working directories, |
3623 | 31 | # by using the a "label". For example: | 31 | # by using a "label". For example: |
3624 | 32 | # | 32 | # |
3625 | 33 | # make label=finer | 33 | # make label=finer |
3626 | 34 | # | 34 | # |
3627 | @@ -75,12 +75,8 @@ | |||
3628 | 75 | # sih-pexsi-spin | 75 | # sih-pexsi-spin |
3629 | 76 | # TranSiesta-TBTrans | 76 | # TranSiesta-TBTrans |
3630 | 77 | 77 | ||
3637 | 78 | # These tests are extremely time consuming and | 78 | # SOC tests |
3638 | 79 | # should only be runned sometimes | 79 | tests_soc = ge_soc_bands Pt_dimer_soc FePt_soc |
3633 | 80 | # Currently they may be runned individually. | ||
3634 | 81 | # SOC_FePt_xx SOC_FePt_xz SOC_FePt_zy SOC_FePt_zz | ||
3635 | 82 | tests_soc = SOC_Pt2_xx SOC_Pt2_xz SOC_Pt2_zy SOC_Pt2_zz | ||
3636 | 83 | tests_soc += SOC_FePt_xx SOC_FePt_xz SOC_FePt_zy SOC_FePt_zz | ||
3639 | 84 | 80 | ||
3640 | 85 | # Tests only applicable for LUA | 81 | # Tests only applicable for LUA |
3641 | 86 | tests_lua = lua_si111 lua_h2o | 82 | tests_lua = lua_si111 lua_h2o |
3642 | 87 | 83 | ||
3643 | === added directory 'Tests/More_SOC_Examples' | |||
3644 | === added file 'Tests/More_SOC_Examples/README' | |||
3645 | --- Tests/More_SOC_Examples/README 1970-01-01 00:00:00 +0000 | |||
3646 | +++ Tests/More_SOC_Examples/README 2018-04-30 20:53:35 +0000 | |||
3647 | @@ -0,0 +1,10 @@ | |||
3648 | 1 | These are examples of computation of the Magnetic Anisotropy Energy (MAE) | ||
3649 | 2 | and other checks for two systems: a Pt dimer, and a FePt bulk structure. | ||
3650 | 3 | |||
3651 | 4 | Note that to run the tests automatically you have to move a specific directory | ||
3652 | 5 | one level up in the hierarchy: | ||
3653 | 6 | |||
3654 | 7 | mv offsite_SOC_FePt_xz .. | ||
3655 | 8 | cd ../offsite_SOC_FePt_xz | ||
3656 | 9 | make | ||
3657 | 10 | |||
3658 | 0 | 11 | ||
3659 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx' | |||
3660 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx/FePtxx.fdf' | |||
3661 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xx/FePtxx.fdf 1970-01-01 00:00:00 +0000 | |||
3662 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xx/FePtxx.fdf 2018-04-30 20:53:35 +0000 | |||
3663 | @@ -0,0 +1,72 @@ | |||
3664 | 1 | SystemName FePt-L1_0 | ||
3665 | 2 | SystemLabel FePtxx | ||
3666 | 3 | NumberOfAtoms 2 | ||
3667 | 4 | NumberOfSpecies 2 | ||
3668 | 5 | %block Chemical_Species_label | ||
3669 | 6 | 1 26 Fe_fept_SOC | ||
3670 | 7 | 2 78 Pt_fept_SOC | ||
3671 | 8 | %endblock Chemical_Species_label | ||
3672 | 9 | |||
3673 | 10 | PAO.EnergyShift 100 meV | ||
3674 | 11 | PAO.SplitNorm 0.15 | ||
3675 | 12 | PAO.OldStylePolOrbs F | ||
3676 | 13 | Restricted.Radial.Grid F | ||
3677 | 14 | %Block PAO.Basis | ||
3678 | 15 | Fe_fept_SOC 2 | ||
3679 | 16 | n=4 0 2 P | ||
3680 | 17 | 0.0 0.0 | ||
3681 | 18 | n=3 2 2 | ||
3682 | 19 | 0.0 0.0 | ||
3683 | 20 | Pt_fept_SOC 2 | ||
3684 | 21 | n=6 0 2 P | ||
3685 | 22 | 0.0 0.0 | ||
3686 | 23 | n=5 2 2 | ||
3687 | 24 | 0.0 0.0 | ||
3688 | 25 | %EndBlock PAO.Basis | ||
3689 | 26 | |||
3690 | 27 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
3691 | 28 | %block LatticeVectors | ||
3692 | 29 | 3.792000000 0.000000000 0.000000000 | ||
3693 | 30 | 0.000000000 2.793068700 0.000000000 | ||
3694 | 31 | 0.000000000 0.000000000 2.793068700 | ||
3695 | 32 | %endblock LatticeVectors | ||
3696 | 33 | LatticeConstant 1.0 Ang | ||
3697 | 34 | |||
3698 | 35 | %block AtomicCoordinatesAndAtomicSpecies | ||
3699 | 36 | 0.000000000 1.396535500 1.396535500 1 | ||
3700 | 37 | 1.896000000 0.000000000 0.000000000 2 | ||
3701 | 38 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
3702 | 39 | |||
3703 | 40 | Spin SO | ||
3704 | 41 | |||
3705 | 42 | %block DM.InitSpin | ||
3706 | 43 | 1 +2. 90. 0. | ||
3707 | 44 | 2 +1. 90. 0. | ||
3708 | 45 | %endblock DM.InitSpin | ||
3709 | 46 | |||
3710 | 47 | |||
3711 | 48 | %block kgrid_Monkhorst_Pack | ||
3712 | 49 | 11 0 0 0.0 | ||
3713 | 50 | 0 21 0 0.0 | ||
3714 | 51 | 0 0 21 0.0 | ||
3715 | 52 | %endblock kgrid_Monkhorst_Pack | ||
3716 | 53 | |||
3717 | 54 | xc.functional GGA | ||
3718 | 55 | xc.authors PBE | ||
3719 | 56 | MeshCutoff 1400. Ry | ||
3720 | 57 | SolutionMethod diagon | ||
3721 | 58 | ElectronicTemperature 1 meV | ||
3722 | 59 | |||
3723 | 60 | DM.Tolerance 1.0E-5 | ||
3724 | 61 | MaxSCFIterations 600 | ||
3725 | 62 | DM.MixingWeight 0.005 | ||
3726 | 63 | DM.NumberPulay 8 | ||
3727 | 64 | DM.UseSaveDM T | ||
3728 | 65 | DM.MixSCF1 F | ||
3729 | 66 | DM.NumberKick 25 | ||
3730 | 67 | #Diag.DivideAndConquer F | ||
3731 | 68 | MixHamiltonian T | ||
3732 | 69 | |||
3733 | 70 | MullikenInSCF T | ||
3734 | 71 | WriteForces T | ||
3735 | 72 | WriteCoorStep T | ||
3736 | 0 | 73 | ||
3737 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx/FePtxx.pseudos' | |||
3738 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xx/FePtxx.pseudos 1970-01-01 00:00:00 +0000 | |||
3739 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xx/FePtxx.pseudos 2018-04-30 20:53:35 +0000 | |||
3740 | @@ -0,0 +1,2 @@ | |||
3741 | 1 | Fe_fept_SOC | ||
3742 | 2 | Pt_fept_SOC | ||
3743 | 0 | 3 | ||
3744 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx/README' | |||
3745 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xx/README 1970-01-01 00:00:00 +0000 | |||
3746 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xx/README 2018-04-30 20:53:35 +0000 | |||
3747 | @@ -0,0 +1,33 @@ | |||
3748 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
3749 | 2 | |||
3750 | 3 | The present test performs fully-relativistic simulation of FePt-L1_0 structure | ||
3751 | 4 | placed with the (001) axis along X and Z, X-alignment and Z-alignment, respectively. | ||
3752 | 5 | By means of the calculation of the total selfconsistent energy it is possible to | ||
3753 | 6 | obtain the magnetic anisotropy energy (MAE) checking in addition that: | ||
3754 | 7 | |||
3755 | 8 | * X-alignment: | ||
3756 | 9 | |||
3757 | 10 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
3758 | 11 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
3759 | 12 | |||
3760 | 13 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
3761 | 14 | same value and they are larger than x-axis SC total energy: | ||
3762 | 15 | E_y = E_z => y/z-axis = Hard axes | ||
3763 | 16 | |||
3764 | 17 | * Z-alignment: | ||
3765 | 18 | |||
3766 | 19 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
3767 | 20 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
3768 | 21 | |||
3769 | 22 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
3770 | 23 | same value and they are larger than z-axis SC total energy: | ||
3771 | 24 | E_x = E_y => x/y-axis = Hard axes | ||
3772 | 25 | |||
3773 | 26 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
3774 | 27 | configurations have to have the same values when the system is rotated in space: | ||
3775 | 28 | |||
3776 | 29 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
3777 | 30 | E_y(X-alignment) = E_x(Z-alignment) | ||
3778 | 31 | E_z(X-alignment) = E_y(Z-alignment) | ||
3779 | 32 | |||
3780 | 33 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
3781 | 0 | 34 | ||
3782 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx/makefile' | |||
3783 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xx/makefile 1970-01-01 00:00:00 +0000 | |||
3784 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xx/makefile 2018-04-30 20:53:35 +0000 | |||
3785 | @@ -0,0 +1,2 @@ | |||
3786 | 1 | name=FePtxx | ||
3787 | 2 | include ../test.mk | ||
3788 | 0 | 3 | ||
3789 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx' | |||
3790 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.fdf' | |||
3791 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.fdf 1970-01-01 00:00:00 +0000 | |||
3792 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.fdf 2018-04-30 20:53:35 +0000 | |||
3793 | @@ -0,0 +1,74 @@ | |||
3794 | 1 | SystemName SOC FePt X-alignment x | ||
3795 | 2 | SystemLabel FePtxx | ||
3796 | 3 | |||
3797 | 4 | Spin SO | ||
3798 | 5 | %block DM.InitSpin | ||
3799 | 6 | 1 +2. 90. 0. | ||
3800 | 7 | 2 +1. 90. 0. | ||
3801 | 8 | %endblock DM.InitSpin | ||
3802 | 9 | |||
3803 | 10 | NumberOfAtoms 2 | ||
3804 | 11 | NumberOfSpecies 2 | ||
3805 | 12 | %block Chemical_Species_label | ||
3806 | 13 | 1 26 Fe | ||
3807 | 14 | 2 78 Pt | ||
3808 | 15 | %endblock Chemical_Species_label | ||
3809 | 16 | |||
3810 | 17 | PAO.EnergyShift 100 meV | ||
3811 | 18 | PAO.SplitNorm 0.15 | ||
3812 | 19 | PAO.OldStylePolOrbs F | ||
3813 | 20 | Restricted.Radial.Grid F | ||
3814 | 21 | %Block PAO.Basis | ||
3815 | 22 | Fe 2 | ||
3816 | 23 | n=4 0 2 P | ||
3817 | 24 | 0.0 0.0 | ||
3818 | 25 | n=3 2 2 | ||
3819 | 26 | 0.0 0.0 | ||
3820 | 27 | Pt 2 | ||
3821 | 28 | n=6 0 2 P | ||
3822 | 29 | 0.00000 0.00000 | ||
3823 | 30 | n=5 2 2 | ||
3824 | 31 | 0.00000 0.00000 | ||
3825 | 32 | %EndBlock PAO.Basis | ||
3826 | 33 | |||
3827 | 34 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
3828 | 35 | LatticeConstant 1.0 Ang | ||
3829 | 36 | %block LatticeVectors | ||
3830 | 37 | 3.792000000 0.000000000 0.000000000 | ||
3831 | 38 | 0.000000000 2.793068700 0.000000000 | ||
3832 | 39 | 0.000000000 0.000000000 2.793068700 | ||
3833 | 40 | %endblock LatticeVectors | ||
3834 | 41 | |||
3835 | 42 | %block AtomicCoordinatesAndAtomicSpecies | ||
3836 | 43 | 0.000000000 1.396535500 1.396535500 1 | ||
3837 | 44 | 1.896000000 0.000000000 0.000000000 2 | ||
3838 | 45 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
3839 | 46 | |||
3840 | 47 | %block kgrid_Monkhorst_Pack | ||
3841 | 48 | 11 0 0 0.0 | ||
3842 | 49 | 0 21 0 0.0 | ||
3843 | 50 | 0 0 21 0.0 | ||
3844 | 51 | %endblock kgrid_Monkhorst_Pack | ||
3845 | 52 | |||
3846 | 53 | XC.functional GGA | ||
3847 | 54 | XC.authors PBE | ||
3848 | 55 | |||
3849 | 56 | MeshCutoff 1400. Ry | ||
3850 | 57 | |||
3851 | 58 | SolutionMethod diagon | ||
3852 | 59 | |||
3853 | 60 | ElectronicTemperature 1 meV | ||
3854 | 61 | |||
3855 | 62 | DM.Tolerance 1.0E-5 | ||
3856 | 63 | |||
3857 | 64 | MaxSCFIterations 1000 | ||
3858 | 65 | |||
3859 | 66 | DM.MixingWeight 0.005 | ||
3860 | 67 | DM.NumberPulay 8 | ||
3861 | 68 | DM.UseSaveDM T | ||
3862 | 69 | DM.NumberKick 25 | ||
3863 | 70 | DM.MixSCF1 F | ||
3864 | 71 | |||
3865 | 72 | WriteMullikenPop 1 | ||
3866 | 73 | WriteForces T | ||
3867 | 74 | WriteCoorStep T | ||
3868 | 0 | 75 | ||
3869 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.pseudos' | |||
3870 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.pseudos 1970-01-01 00:00:00 +0000 | |||
3871 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/FePtxx.pseudos 2018-04-30 20:53:35 +0000 | |||
3872 | @@ -0,0 +1,2 @@ | |||
3873 | 1 | Fe_SOC | ||
3874 | 2 | Pt_SOC | ||
3875 | 0 | 3 | ||
3876 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/README' | |||
3877 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/README 1970-01-01 00:00:00 +0000 | |||
3878 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/README 2018-04-30 20:53:35 +0000 | |||
3879 | @@ -0,0 +1,33 @@ | |||
3880 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
3881 | 2 | |||
3882 | 3 | The present test performs fully-relativistic simulation of FePt-L1_0 structure | ||
3883 | 4 | placed with the (001) axis along X and Z, X-alignment and Z-alignment, respectively. | ||
3884 | 5 | By means of the calculation of the total selfconsistent energy it is possible to | ||
3885 | 6 | obtain the magnetic anisotropy energy (MAE) checking in addition that: | ||
3886 | 7 | |||
3887 | 8 | * X-alignment: | ||
3888 | 9 | |||
3889 | 10 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
3890 | 11 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
3891 | 12 | |||
3892 | 13 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
3893 | 14 | same value and they are larger than x-axis SC total energy: | ||
3894 | 15 | E_y = E_z => y/z-axis = Hard axes | ||
3895 | 16 | |||
3896 | 17 | * Z-alignment: | ||
3897 | 18 | |||
3898 | 19 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
3899 | 20 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
3900 | 21 | |||
3901 | 22 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
3902 | 23 | same value and they are larger than z-axis SC total energy: | ||
3903 | 24 | E_x = E_y => x/y-axis = Hard axes | ||
3904 | 25 | |||
3905 | 26 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
3906 | 27 | configurations have to have the same values when the system is rotated in space: | ||
3907 | 28 | |||
3908 | 29 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
3909 | 30 | E_y(X-alignment) = E_x(Z-alignment) | ||
3910 | 31 | E_z(X-alignment) = E_y(Z-alignment) | ||
3911 | 32 | |||
3912 | 33 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
3913 | 0 | 34 | ||
3914 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/makefile' | |||
3915 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/makefile 1970-01-01 00:00:00 +0000 | |||
3916 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xx/offsite_SOC_FePt_xx/makefile 2018-04-30 20:53:35 +0000 | |||
3917 | @@ -0,0 +1,2 @@ | |||
3918 | 1 | name=FePtxx | ||
3919 | 2 | include ../test.mk | ||
3920 | 0 | 3 | ||
3921 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz' | |||
3922 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz/FePtxz.fdf' | |||
3923 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xz/FePtxz.fdf 1970-01-01 00:00:00 +0000 | |||
3924 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xz/FePtxz.fdf 2018-04-30 20:53:35 +0000 | |||
3925 | @@ -0,0 +1,72 @@ | |||
3926 | 1 | SystemName FePt-L1_0 | ||
3927 | 2 | SystemLabel FePtxz | ||
3928 | 3 | NumberOfAtoms 2 | ||
3929 | 4 | NumberOfSpecies 2 | ||
3930 | 5 | %block Chemical_Species_label | ||
3931 | 6 | 1 26 Fe_fept_SOC | ||
3932 | 7 | 2 78 Pt_fept_SOC | ||
3933 | 8 | %endblock Chemical_Species_label | ||
3934 | 9 | |||
3935 | 10 | PAO.EnergyShift 100 meV | ||
3936 | 11 | PAO.SplitNorm 0.15 | ||
3937 | 12 | PAO.OldStylePolOrbs F | ||
3938 | 13 | Restricted.Radial.Grid F | ||
3939 | 14 | %Block PAO.Basis | ||
3940 | 15 | Fe_fept_SOC 2 | ||
3941 | 16 | n=4 0 2 P | ||
3942 | 17 | 0.0 0.0 | ||
3943 | 18 | n=3 2 2 | ||
3944 | 19 | 0.0 0.0 | ||
3945 | 20 | Pt_fept_SOC 2 | ||
3946 | 21 | n=6 0 2 P | ||
3947 | 22 | 0.0 0.0 | ||
3948 | 23 | n=5 2 2 | ||
3949 | 24 | 0.0 0.0 | ||
3950 | 25 | %EndBlock PAO.Basis | ||
3951 | 26 | |||
3952 | 27 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
3953 | 28 | %block LatticeVectors | ||
3954 | 29 | 3.792000000 0.000000000 0.000000000 | ||
3955 | 30 | 0.000000000 2.793068700 0.000000000 | ||
3956 | 31 | 0.000000000 0.000000000 2.793068700 | ||
3957 | 32 | %endblock LatticeVectors | ||
3958 | 33 | LatticeConstant 1.0 Ang | ||
3959 | 34 | |||
3960 | 35 | %block AtomicCoordinatesAndAtomicSpecies | ||
3961 | 36 | 0.000000000 1.396535500 1.396535500 1 | ||
3962 | 37 | 1.896000000 0.000000000 0.000000000 2 | ||
3963 | 38 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
3964 | 39 | |||
3965 | 40 | Spin SO | ||
3966 | 41 | |||
3967 | 42 | #%block DM.InitSpin | ||
3968 | 43 | # 1 +2. 0. 0. | ||
3969 | 44 | # 2 +1. 0. 0. | ||
3970 | 45 | #%endblock DM.InitSpin | ||
3971 | 46 | |||
3972 | 47 | |||
3973 | 48 | %block kgrid_Monkhorst_Pack | ||
3974 | 49 | 11 0 0 0.0 | ||
3975 | 50 | 0 21 0 0.0 | ||
3976 | 51 | 0 0 21 0.0 | ||
3977 | 52 | %endblock kgrid_Monkhorst_Pack | ||
3978 | 53 | |||
3979 | 54 | xc.functional GGA | ||
3980 | 55 | xc.authors PBE | ||
3981 | 56 | MeshCutoff 1400. Ry | ||
3982 | 57 | SolutionMethod diagon | ||
3983 | 58 | ElectronicTemperature 1 meV | ||
3984 | 59 | |||
3985 | 60 | DM.Tolerance 1.0E-5 | ||
3986 | 61 | MaxSCFIterations 600 | ||
3987 | 62 | DM.MixingWeight 0.005 | ||
3988 | 63 | DM.NumberPulay 8 | ||
3989 | 64 | DM.UseSaveDM T | ||
3990 | 65 | DM.MixSCF1 F | ||
3991 | 66 | DM.NumberKick 25 | ||
3992 | 67 | #Diag.DivideAndConquer F | ||
3993 | 68 | MixHamiltonian T | ||
3994 | 69 | |||
3995 | 70 | MullikenInSCF T | ||
3996 | 71 | WriteForces T | ||
3997 | 72 | WriteCoorStep T | ||
3998 | 0 | 73 | ||
3999 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz/FePtxz.pseudos' | |||
4000 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xz/FePtxz.pseudos 1970-01-01 00:00:00 +0000 | |||
4001 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xz/FePtxz.pseudos 2018-04-30 20:53:35 +0000 | |||
4002 | @@ -0,0 +1,2 @@ | |||
4003 | 1 | Fe_fept_SOC | ||
4004 | 2 | Pt_fept_SOC | ||
4005 | 0 | 3 | ||
4006 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz/README' | |||
4007 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xz/README 1970-01-01 00:00:00 +0000 | |||
4008 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xz/README 2018-04-30 20:53:35 +0000 | |||
4009 | @@ -0,0 +1,33 @@ | |||
4010 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
4011 | 2 | |||
4012 | 3 | The present test performs fully-relativistic simulation of FePt-L1_0 structure | ||
4013 | 4 | placed with the (001) axis along X and Z, X-alignment and Z-alignment, respectively. | ||
4014 | 5 | By means of the calculation of the total selfconsistent energy it is possible to | ||
4015 | 6 | obtain the magnetic anisotropy energy (MAE) checking in addition that: | ||
4016 | 7 | |||
4017 | 8 | * X-alignment: | ||
4018 | 9 | |||
4019 | 10 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
4020 | 11 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
4021 | 12 | |||
4022 | 13 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
4023 | 14 | same value and they are larger than x-axis SC total energy: | ||
4024 | 15 | E_y = E_z => y/z-axis = Hard axes | ||
4025 | 16 | |||
4026 | 17 | * Z-alignment: | ||
4027 | 18 | |||
4028 | 19 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
4029 | 20 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
4030 | 21 | |||
4031 | 22 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
4032 | 23 | same value and they are larger than z-axis SC total energy: | ||
4033 | 24 | E_x = E_y => x/y-axis = Hard axes | ||
4034 | 25 | |||
4035 | 26 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
4036 | 27 | configurations have to have the same values when the system is rotated in space: | ||
4037 | 28 | |||
4038 | 29 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
4039 | 30 | E_y(X-alignment) = E_x(Z-alignment) | ||
4040 | 31 | E_z(X-alignment) = E_y(Z-alignment) | ||
4041 | 32 | |||
4042 | 33 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
4043 | 0 | 34 | ||
4044 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz/makefile' | |||
4045 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xz/makefile 1970-01-01 00:00:00 +0000 | |||
4046 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xz/makefile 2018-04-30 20:53:35 +0000 | |||
4047 | @@ -0,0 +1,2 @@ | |||
4048 | 1 | name=FePtxz | ||
4049 | 2 | include ../test.mk | ||
4050 | 0 | 3 | ||
4051 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz' | |||
4052 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.fdf' | |||
4053 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.fdf 1970-01-01 00:00:00 +0000 | |||
4054 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.fdf 2018-04-30 20:53:35 +0000 | |||
4055 | @@ -0,0 +1,70 @@ | |||
4056 | 1 | SystemName SOC FePt X-alignment z | ||
4057 | 2 | SystemLabel FePtxz | ||
4058 | 3 | |||
4059 | 4 | Spin SO | ||
4060 | 5 | |||
4061 | 6 | NumberOfAtoms 2 | ||
4062 | 7 | NumberOfSpecies 2 | ||
4063 | 8 | %block Chemical_Species_label | ||
4064 | 9 | 1 26 Fe | ||
4065 | 10 | 2 78 Pt | ||
4066 | 11 | %endblock Chemical_Species_label | ||
4067 | 12 | |||
4068 | 13 | PAO.EnergyShift 100 meV | ||
4069 | 14 | PAO.SplitNorm 0.15 | ||
4070 | 15 | PAO.OldStylePolOrbs F | ||
4071 | 16 | Restricted.Radial.Grid F | ||
4072 | 17 | %Block PAO.Basis | ||
4073 | 18 | Fe 2 | ||
4074 | 19 | n=4 0 2 P | ||
4075 | 20 | 0.0 0.0 | ||
4076 | 21 | n=3 2 2 | ||
4077 | 22 | 0.0 0.0 | ||
4078 | 23 | Pt 2 | ||
4079 | 24 | n=6 0 2 P | ||
4080 | 25 | 0.00000 0.00000 | ||
4081 | 26 | n=5 2 2 | ||
4082 | 27 | 0.00000 0.00000 | ||
4083 | 28 | %EndBlock PAO.Basis | ||
4084 | 29 | |||
4085 | 30 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
4086 | 31 | LatticeConstant 1.0 Ang | ||
4087 | 32 | %block LatticeVectors | ||
4088 | 33 | 3.792000000 0.000000000 0.000000000 | ||
4089 | 34 | 0.000000000 2.793068700 0.000000000 | ||
4090 | 35 | 0.000000000 0.000000000 2.793068700 | ||
4091 | 36 | %endblock LatticeVectors | ||
4092 | 37 | |||
4093 | 38 | %block AtomicCoordinatesAndAtomicSpecies | ||
4094 | 39 | 0.000000000 1.396535500 1.396535500 1 | ||
4095 | 40 | 1.896000000 0.000000000 0.000000000 2 | ||
4096 | 41 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
4097 | 42 | |||
4098 | 43 | %block kgrid_Monkhorst_Pack | ||
4099 | 44 | 11 0 0 0.5 | ||
4100 | 45 | 0 21 0 0.0 | ||
4101 | 46 | 0 0 21 0.0 | ||
4102 | 47 | %endblock kgrid_Monkhorst_Pack | ||
4103 | 48 | |||
4104 | 49 | XC.functional GGA | ||
4105 | 50 | XC.authors PBE | ||
4106 | 51 | |||
4107 | 52 | MeshCutoff 1400. Ry | ||
4108 | 53 | |||
4109 | 54 | SolutionMethod diagon | ||
4110 | 55 | |||
4111 | 56 | ElectronicTemperature 1 meV | ||
4112 | 57 | |||
4113 | 58 | DM.Tolerance 1.0E-5 | ||
4114 | 59 | |||
4115 | 60 | MaxSCFIterations 1000 | ||
4116 | 61 | |||
4117 | 62 | DM.MixingWeight 0.005 | ||
4118 | 63 | DM.NumberPulay 8 | ||
4119 | 64 | DM.UseSaveDM T | ||
4120 | 65 | DM.NumberKick 25 | ||
4121 | 66 | DM.MixSCF1 F | ||
4122 | 67 | |||
4123 | 68 | WriteMullikenPop 1 | ||
4124 | 69 | WriteForces T | ||
4125 | 70 | WriteCoorStep T | ||
4126 | 0 | 71 | ||
4127 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.pseudos' | |||
4128 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.pseudos 1970-01-01 00:00:00 +0000 | |||
4129 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/FePtxz.pseudos 2018-04-30 20:53:35 +0000 | |||
4130 | @@ -0,0 +1,2 @@ | |||
4131 | 1 | Fe_SOC | ||
4132 | 2 | Pt_SOC | ||
4133 | 0 | 3 | ||
4134 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/README' | |||
4135 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/README 1970-01-01 00:00:00 +0000 | |||
4136 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/README 2018-04-30 20:53:35 +0000 | |||
4137 | @@ -0,0 +1,33 @@ | |||
4138 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
4139 | 2 | |||
4140 | 3 | The present test performs fully-relativistic simulation of FePt-L1_0 structure | ||
4141 | 4 | placed with the (001) axis along X and Z, X-alignment and Z-alignment, respectively. | ||
4142 | 5 | By means of the calculation of the total selfconsistent energy it is possible to | ||
4143 | 6 | obtain the magnetic anisotropy energy (MAE) checking in addition that: | ||
4144 | 7 | |||
4145 | 8 | * X-alignment: | ||
4146 | 9 | |||
4147 | 10 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
4148 | 11 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
4149 | 12 | |||
4150 | 13 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
4151 | 14 | same value and they are larger than x-axis SC total energy: | ||
4152 | 15 | E_y = E_z => y/z-axis = Hard axes | ||
4153 | 16 | |||
4154 | 17 | * Z-alignment: | ||
4155 | 18 | |||
4156 | 19 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
4157 | 20 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
4158 | 21 | |||
4159 | 22 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
4160 | 23 | same value and they are larger than z-axis SC total energy: | ||
4161 | 24 | E_x = E_y => x/y-axis = Hard axes | ||
4162 | 25 | |||
4163 | 26 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
4164 | 27 | configurations have to have the same values when the system is rotated in space: | ||
4165 | 28 | |||
4166 | 29 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
4167 | 30 | E_y(X-alignment) = E_x(Z-alignment) | ||
4168 | 31 | E_z(X-alignment) = E_y(Z-alignment) | ||
4169 | 32 | |||
4170 | 33 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
4171 | 0 | 34 | ||
4172 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/makefile' | |||
4173 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/makefile 1970-01-01 00:00:00 +0000 | |||
4174 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_xz/offsite_SOC_FePt_xz/makefile 2018-04-30 20:53:35 +0000 | |||
4175 | @@ -0,0 +1,2 @@ | |||
4176 | 1 | name=FePtxz | ||
4177 | 2 | include ../test.mk | ||
4178 | 0 | 3 | ||
4179 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy' | |||
4180 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy/FePtzy.fdf' | |||
4181 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zy/FePtzy.fdf 1970-01-01 00:00:00 +0000 | |||
4182 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zy/FePtzy.fdf 2018-04-30 20:53:35 +0000 | |||
4183 | @@ -0,0 +1,72 @@ | |||
4184 | 1 | SystemName FePt-L1_0 | ||
4185 | 2 | SystemLabel FePtzy | ||
4186 | 3 | NumberOfAtoms 2 | ||
4187 | 4 | NumberOfSpecies 2 | ||
4188 | 5 | %block Chemical_Species_label | ||
4189 | 6 | 1 26 Fe_fept_SOC | ||
4190 | 7 | 2 78 Pt_fept_SOC | ||
4191 | 8 | %endblock Chemical_Species_label | ||
4192 | 9 | |||
4193 | 10 | PAO.EnergyShift 100 meV | ||
4194 | 11 | PAO.SplitNorm 0.15 | ||
4195 | 12 | PAO.OldStylePolOrbs F | ||
4196 | 13 | Restricted.Radial.Grid F | ||
4197 | 14 | %Block PAO.Basis | ||
4198 | 15 | Fe_fept_SOC 2 | ||
4199 | 16 | n=4 0 2 P | ||
4200 | 17 | 0.0 0.0 | ||
4201 | 18 | n=3 2 2 | ||
4202 | 19 | 0.0 0.0 | ||
4203 | 20 | Pt_fept_SOC 2 | ||
4204 | 21 | n=6 0 2 P | ||
4205 | 22 | 0.0 0.0 | ||
4206 | 23 | n=5 2 2 | ||
4207 | 24 | 0.0 0.0 | ||
4208 | 25 | %EndBlock PAO.Basis | ||
4209 | 26 | |||
4210 | 27 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
4211 | 28 | %block LatticeVectors | ||
4212 | 29 | 2.793068700 0.000000000 0.000000000 | ||
4213 | 30 | 0.000000000 2.793068700 0.000000000 | ||
4214 | 31 | 0.000000000 0.000000000 3.792000000 | ||
4215 | 32 | %endblock LatticeVectors | ||
4216 | 33 | LatticeConstant 1.0 Ang | ||
4217 | 34 | |||
4218 | 35 | %block AtomicCoordinatesAndAtomicSpecies | ||
4219 | 36 | 1.396535500 1.396535500 0.000000000 1 | ||
4220 | 37 | 0.000000000 0.000000000 1.896000000 2 | ||
4221 | 38 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
4222 | 39 | |||
4223 | 40 | Spin SO | ||
4224 | 41 | |||
4225 | 42 | %block DM.InitSpin | ||
4226 | 43 | 1 +2. 90. 90. | ||
4227 | 44 | 2 +1. 90. 90. | ||
4228 | 45 | %endblock DM.InitSpin | ||
4229 | 46 | |||
4230 | 47 | |||
4231 | 48 | %block kgrid_Monkhorst_Pack | ||
4232 | 49 | 21 0 0 0.0 | ||
4233 | 50 | 0 21 0 0.0 | ||
4234 | 51 | 0 0 11 0.0 | ||
4235 | 52 | %endblock kgrid_Monkhorst_Pack | ||
4236 | 53 | |||
4237 | 54 | xc.functional GGA | ||
4238 | 55 | xc.authors PBE | ||
4239 | 56 | MeshCutoff 1400. Ry | ||
4240 | 57 | SolutionMethod diagon | ||
4241 | 58 | ElectronicTemperature 1 meV | ||
4242 | 59 | |||
4243 | 60 | DM.Tolerance 1.0E-5 | ||
4244 | 61 | MaxSCFIterations 600 | ||
4245 | 62 | DM.MixingWeight 0.005 | ||
4246 | 63 | DM.NumberPulay 8 | ||
4247 | 64 | DM.UseSaveDM T | ||
4248 | 65 | DM.MixSCF1 F | ||
4249 | 66 | DM.NumberKick 25 | ||
4250 | 67 | #Diag.DivideAndConquer F | ||
4251 | 68 | MixHamiltonian T | ||
4252 | 69 | |||
4253 | 70 | MullikenInSCF T | ||
4254 | 71 | WriteForces T | ||
4255 | 72 | WriteCoorStep T | ||
4256 | 0 | 73 | ||
4257 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy/FePtzy.pseudos' | |||
4258 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zy/FePtzy.pseudos 1970-01-01 00:00:00 +0000 | |||
4259 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zy/FePtzy.pseudos 2018-04-30 20:53:35 +0000 | |||
4260 | @@ -0,0 +1,2 @@ | |||
4261 | 1 | Fe_fept_SOC | ||
4262 | 2 | Pt_fept_SOC | ||
4263 | 0 | 3 | ||
4264 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy/README' | |||
4265 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zy/README 1970-01-01 00:00:00 +0000 | |||
4266 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zy/README 2018-04-30 20:53:35 +0000 | |||
4267 | @@ -0,0 +1,33 @@ | |||
4268 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
4269 | 2 | |||
4270 | 3 | The present test performs fully-relativistic simulation of FePt-L1_0 structure | ||
4271 | 4 | placed with the (001) axis along X and Z, X-alignment and Z-alignment, respectively. | ||
4272 | 5 | By means of the calculation of the total selfconsistent energy it is possible to | ||
4273 | 6 | obtain the magnetic anisotropy energy (MAE) checking in addition that: | ||
4274 | 7 | |||
4275 | 8 | * X-alignment: | ||
4276 | 9 | |||
4277 | 10 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
4278 | 11 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
4279 | 12 | |||
4280 | 13 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
4281 | 14 | same value and they are larger than x-axis SC total energy: | ||
4282 | 15 | E_y = E_z => y/z-axis = Hard axes | ||
4283 | 16 | |||
4284 | 17 | * Z-alignment: | ||
4285 | 18 | |||
4286 | 19 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
4287 | 20 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
4288 | 21 | |||
4289 | 22 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
4290 | 23 | same value and they are larger than z-axis SC total energy: | ||
4291 | 24 | E_x = E_y => x/y-axis = Hard axes | ||
4292 | 25 | |||
4293 | 26 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
4294 | 27 | configurations have to have the same values when the system is rotated in space: | ||
4295 | 28 | |||
4296 | 29 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
4297 | 30 | E_y(X-alignment) = E_x(Z-alignment) | ||
4298 | 31 | E_z(X-alignment) = E_y(Z-alignment) | ||
4299 | 32 | |||
4300 | 33 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
4301 | 0 | 34 | ||
4302 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy/makefile' | |||
4303 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zy/makefile 1970-01-01 00:00:00 +0000 | |||
4304 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zy/makefile 2018-04-30 20:53:35 +0000 | |||
4305 | @@ -0,0 +1,2 @@ | |||
4306 | 1 | name=FePtzy | ||
4307 | 2 | include ../test.mk | ||
4308 | 0 | 3 | ||
4309 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy' | |||
4310 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.fdf' | |||
4311 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.fdf 1970-01-01 00:00:00 +0000 | |||
4312 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.fdf 2018-04-30 20:53:35 +0000 | |||
4313 | @@ -0,0 +1,68 @@ | |||
4314 | 1 | SystemName FePt-L1_0 | ||
4315 | 2 | SystemLabel FePtzy | ||
4316 | 3 | NumberOfAtoms 2 | ||
4317 | 4 | NumberOfSpecies 2 | ||
4318 | 5 | %block Chemical_Species_label | ||
4319 | 6 | 1 26 Fe | ||
4320 | 7 | 2 78 Pt | ||
4321 | 8 | %endblock Chemical_Species_label | ||
4322 | 9 | |||
4323 | 10 | PAO.EnergyShift 100 meV | ||
4324 | 11 | PAO.SplitNorm 0.15 | ||
4325 | 12 | PAO.OldStylePolOrbs F | ||
4326 | 13 | Restricted.Radial.Grid F | ||
4327 | 14 | %Block PAO.Basis | ||
4328 | 15 | Fe 2 | ||
4329 | 16 | n=4 0 2 P | ||
4330 | 17 | 0.0 0.0 | ||
4331 | 18 | n=3 2 2 | ||
4332 | 19 | 0.0 0.0 | ||
4333 | 20 | Pt 2 | ||
4334 | 21 | n=6 0 2 P | ||
4335 | 22 | 0.0 0.0 | ||
4336 | 23 | n=5 2 2 | ||
4337 | 24 | 0.0 0.0 | ||
4338 | 25 | %EndBlock PAO.Basis | ||
4339 | 26 | |||
4340 | 27 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
4341 | 28 | %block LatticeVectors | ||
4342 | 29 | 2.793068700 0.000000000 0.000000000 | ||
4343 | 30 | 0.000000000 2.793068700 0.000000000 | ||
4344 | 31 | 0.000000000 0.000000000 3.792000000 | ||
4345 | 32 | %endblock LatticeVectors | ||
4346 | 33 | LatticeConstant 1.0 Ang | ||
4347 | 34 | |||
4348 | 35 | %block AtomicCoordinatesAndAtomicSpecies | ||
4349 | 36 | 1.396535500 1.396535500 0.000000000 1 | ||
4350 | 37 | 0.000000000 0.000000000 1.896000000 2 | ||
4351 | 38 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
4352 | 39 | |||
4353 | 40 | Spin SO | ||
4354 | 41 | %block DM.InitSpin | ||
4355 | 42 | 1 +2. 90. 90. | ||
4356 | 43 | 2 +1. 90. 90. | ||
4357 | 44 | %endblock DM.InitSpin | ||
4358 | 45 | |||
4359 | 46 | %block kgrid_Monkhorst_Pack | ||
4360 | 47 | 21 0 0 0.0 | ||
4361 | 48 | 0 21 0 0.0 | ||
4362 | 49 | 0 0 11 0.0 | ||
4363 | 50 | %endblock kgrid_Monkhorst_Pack | ||
4364 | 51 | |||
4365 | 52 | xc.functional GGA | ||
4366 | 53 | xc.authors PBE | ||
4367 | 54 | MeshCutoff 1400. Ry | ||
4368 | 55 | SolutionMethod diagon | ||
4369 | 56 | ElectronicTemperature 1 meV | ||
4370 | 57 | |||
4371 | 58 | DM.Tolerance 1.0E-5 | ||
4372 | 59 | MaxSCFIterations 600 | ||
4373 | 60 | DM.MixingWeight 0.005 | ||
4374 | 61 | DM.NumberPulay 8 | ||
4375 | 62 | DM.UseSaveDM T | ||
4376 | 63 | DM.MixSCF1 F | ||
4377 | 64 | DM.NumberKick 25 | ||
4378 | 65 | |||
4379 | 66 | WriteMullikenPop 1 | ||
4380 | 67 | WriteForces T | ||
4381 | 68 | WriteCoorStep T | ||
4382 | 0 | 69 | ||
4383 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.pseudos' | |||
4384 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.pseudos 1970-01-01 00:00:00 +0000 | |||
4385 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/FePtzy.pseudos 2018-04-30 20:53:35 +0000 | |||
4386 | @@ -0,0 +1,2 @@ | |||
4387 | 1 | Fe_SOC | ||
4388 | 2 | Pt_SOC | ||
4389 | 0 | 3 | ||
4390 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/README' | |||
4391 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/README 1970-01-01 00:00:00 +0000 | |||
4392 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/README 2018-04-30 20:53:35 +0000 | |||
4393 | @@ -0,0 +1,33 @@ | |||
4394 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
4395 | 2 | |||
4396 | 3 | The present test performs fully-relativistic simulation of FePt-L1_0 structure | ||
4397 | 4 | placed with the (001) axis along X and Z, X-alignment and Z-alignment, respectively. | ||
4398 | 5 | By means of the calculation of the total selfconsistent energy it is possible to | ||
4399 | 6 | obtain the magnetic anisotropy energy (MAE) checking in addition that: | ||
4400 | 7 | |||
4401 | 8 | * X-alignment: | ||
4402 | 9 | |||
4403 | 10 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
4404 | 11 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
4405 | 12 | |||
4406 | 13 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
4407 | 14 | same value and they are larger than x-axis SC total energy: | ||
4408 | 15 | E_y = E_z => y/z-axis = Hard axes | ||
4409 | 16 | |||
4410 | 17 | * Z-alignment: | ||
4411 | 18 | |||
4412 | 19 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
4413 | 20 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
4414 | 21 | |||
4415 | 22 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
4416 | 23 | same value and they are larger than z-axis SC total energy: | ||
4417 | 24 | E_x = E_y => x/y-axis = Hard axes | ||
4418 | 25 | |||
4419 | 26 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
4420 | 27 | configurations have to have the same values when the system is rotated in space: | ||
4421 | 28 | |||
4422 | 29 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
4423 | 30 | E_y(X-alignment) = E_x(Z-alignment) | ||
4424 | 31 | E_z(X-alignment) = E_y(Z-alignment) | ||
4425 | 32 | |||
4426 | 33 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
4427 | 0 | 34 | ||
4428 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/makefile' | |||
4429 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/makefile 1970-01-01 00:00:00 +0000 | |||
4430 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zy/offsite_SOC_FePt_zy/makefile 2018-04-30 20:53:35 +0000 | |||
4431 | @@ -0,0 +1,2 @@ | |||
4432 | 1 | name=FePtzy | ||
4433 | 2 | include ../test.mk | ||
4434 | 0 | 3 | ||
4435 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz' | |||
4436 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz/FePtzz.fdf' | |||
4437 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zz/FePtzz.fdf 1970-01-01 00:00:00 +0000 | |||
4438 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zz/FePtzz.fdf 2018-04-30 20:53:35 +0000 | |||
4439 | @@ -0,0 +1,72 @@ | |||
4440 | 1 | SystemName FePt-L1_0 | ||
4441 | 2 | SystemLabel FePtzz | ||
4442 | 3 | NumberOfAtoms 2 | ||
4443 | 4 | NumberOfSpecies 2 | ||
4444 | 5 | %block Chemical_Species_label | ||
4445 | 6 | 1 26 Fe_fept_SOC | ||
4446 | 7 | 2 78 Pt_fept_SOC | ||
4447 | 8 | %endblock Chemical_Species_label | ||
4448 | 9 | |||
4449 | 10 | PAO.EnergyShift 100 meV | ||
4450 | 11 | PAO.SplitNorm 0.15 | ||
4451 | 12 | PAO.OldStylePolOrbs F | ||
4452 | 13 | Restricted.Radial.Grid F | ||
4453 | 14 | %Block PAO.Basis | ||
4454 | 15 | Fe_fept_SOC 2 | ||
4455 | 16 | n=4 0 2 P | ||
4456 | 17 | 0.0 0.0 | ||
4457 | 18 | n=3 2 2 | ||
4458 | 19 | 0.0 0.0 | ||
4459 | 20 | Pt_fept_SOC 2 | ||
4460 | 21 | n=6 0 2 P | ||
4461 | 22 | 0.0 0.0 | ||
4462 | 23 | n=5 2 2 | ||
4463 | 24 | 0.0 0.0 | ||
4464 | 25 | %EndBlock PAO.Basis | ||
4465 | 26 | |||
4466 | 27 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
4467 | 28 | %block LatticeVectors | ||
4468 | 29 | 2.793068700 0.000000000 0.000000000 | ||
4469 | 30 | 0.000000000 2.793068700 0.000000000 | ||
4470 | 31 | 0.000000000 0.000000000 3.792000000 | ||
4471 | 32 | %endblock LatticeVectors | ||
4472 | 33 | LatticeConstant 1.0 Ang | ||
4473 | 34 | |||
4474 | 35 | %block AtomicCoordinatesAndAtomicSpecies | ||
4475 | 36 | 1.396535500 1.396535500 0.000000000 1 | ||
4476 | 37 | 0.000000000 0.000000000 1.896000000 2 | ||
4477 | 38 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
4478 | 39 | |||
4479 | 40 | Spin SO | ||
4480 | 41 | |||
4481 | 42 | #%block DM.InitSpin | ||
4482 | 43 | # 1 +2. 90. 0. | ||
4483 | 44 | # 2 +1. 90. 0. | ||
4484 | 45 | #%endblock DM.InitSpin | ||
4485 | 46 | |||
4486 | 47 | |||
4487 | 48 | %block kgrid_Monkhorst_Pack | ||
4488 | 49 | 21 0 0 0.0 | ||
4489 | 50 | 0 21 0 0.0 | ||
4490 | 51 | 0 0 11 0.0 | ||
4491 | 52 | %endblock kgrid_Monkhorst_Pack | ||
4492 | 53 | |||
4493 | 54 | xc.functional GGA | ||
4494 | 55 | xc.authors PBE | ||
4495 | 56 | MeshCutoff 1400. Ry | ||
4496 | 57 | SolutionMethod diagon | ||
4497 | 58 | ElectronicTemperature 1 meV | ||
4498 | 59 | |||
4499 | 60 | DM.Tolerance 1.0E-5 | ||
4500 | 61 | MaxSCFIterations 600 | ||
4501 | 62 | DM.MixingWeight 0.005 | ||
4502 | 63 | DM.NumberPulay 8 | ||
4503 | 64 | DM.UseSaveDM T | ||
4504 | 65 | DM.MixSCF1 F | ||
4505 | 66 | DM.NumberKick 25 | ||
4506 | 67 | #Diag.DivideAndConquer F | ||
4507 | 68 | MixHamiltonian T | ||
4508 | 69 | |||
4509 | 70 | MullikenInSCF T | ||
4510 | 71 | WriteForces T | ||
4511 | 72 | WriteCoorStep T | ||
4512 | 0 | 73 | ||
4513 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz/FePtzz.pseudos' | |||
4514 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zz/FePtzz.pseudos 1970-01-01 00:00:00 +0000 | |||
4515 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zz/FePtzz.pseudos 2018-04-30 20:53:35 +0000 | |||
4516 | @@ -0,0 +1,2 @@ | |||
4517 | 1 | Fe_fept_SOC | ||
4518 | 2 | Pt_fept_SOC | ||
4519 | 0 | 3 | ||
4520 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz/README' | |||
4521 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zz/README 1970-01-01 00:00:00 +0000 | |||
4522 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zz/README 2018-04-30 20:53:35 +0000 | |||
4523 | @@ -0,0 +1,33 @@ | |||
4524 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
4525 | 2 | |||
4526 | 3 | The present test performs fully-relativistic simulation of FePt-L1_0 structure | ||
4527 | 4 | placed with the (001) axis along X and Z, X-alignment and Z-alignment, respectively. | ||
4528 | 5 | By means of the calculation of the total selfconsistent energy it is possible to | ||
4529 | 6 | obtain the magnetic anisotropy energy (MAE) checking in addition that: | ||
4530 | 7 | |||
4531 | 8 | * X-alignment: | ||
4532 | 9 | |||
4533 | 10 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
4534 | 11 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
4535 | 12 | |||
4536 | 13 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
4537 | 14 | same value and they are larger than x-axis SC total energy: | ||
4538 | 15 | E_y = E_z => y/z-axis = Hard axes | ||
4539 | 16 | |||
4540 | 17 | * Z-alignment: | ||
4541 | 18 | |||
4542 | 19 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
4543 | 20 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
4544 | 21 | |||
4545 | 22 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
4546 | 23 | same value and they are larger than z-axis SC total energy: | ||
4547 | 24 | E_x = E_y => x/y-axis = Hard axes | ||
4548 | 25 | |||
4549 | 26 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
4550 | 27 | configurations have to have the same values when the system is rotated in space: | ||
4551 | 28 | |||
4552 | 29 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
4553 | 30 | E_y(X-alignment) = E_x(Z-alignment) | ||
4554 | 31 | E_z(X-alignment) = E_y(Z-alignment) | ||
4555 | 32 | |||
4556 | 33 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
4557 | 0 | 34 | ||
4558 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz/makefile' | |||
4559 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zz/makefile 1970-01-01 00:00:00 +0000 | |||
4560 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zz/makefile 2018-04-30 20:53:35 +0000 | |||
4561 | @@ -0,0 +1,2 @@ | |||
4562 | 1 | name=FePtzz | ||
4563 | 2 | include ../test.mk | ||
4564 | 0 | 3 | ||
4565 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz' | |||
4566 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.fdf' | |||
4567 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.fdf 1970-01-01 00:00:00 +0000 | |||
4568 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.fdf 2018-04-30 20:53:35 +0000 | |||
4569 | @@ -0,0 +1,64 @@ | |||
4570 | 1 | SystemName FePt-L1_0 | ||
4571 | 2 | SystemLabel FePtzz | ||
4572 | 3 | NumberOfAtoms 2 | ||
4573 | 4 | NumberOfSpecies 2 | ||
4574 | 5 | %block Chemical_Species_label | ||
4575 | 6 | 1 26 Fe | ||
4576 | 7 | 2 78 Pt | ||
4577 | 8 | %endblock Chemical_Species_label | ||
4578 | 9 | |||
4579 | 10 | PAO.EnergyShift 100 meV | ||
4580 | 11 | PAO.SplitNorm 0.15 | ||
4581 | 12 | PAO.OldStylePolOrbs F | ||
4582 | 13 | Restricted.Radial.Grid F | ||
4583 | 14 | %Block PAO.Basis | ||
4584 | 15 | Fe 2 | ||
4585 | 16 | n=4 0 2 P | ||
4586 | 17 | 0.0 0.0 | ||
4587 | 18 | n=3 2 2 | ||
4588 | 19 | 0.0 0.0 | ||
4589 | 20 | Pt 2 | ||
4590 | 21 | n=6 0 2 P | ||
4591 | 22 | 0.0 0.0 | ||
4592 | 23 | n=5 2 2 | ||
4593 | 24 | 0.0 0.0 | ||
4594 | 25 | %EndBlock PAO.Basis | ||
4595 | 26 | |||
4596 | 27 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
4597 | 28 | %block LatticeVectors | ||
4598 | 29 | 2.793068700 0.000000000 0.000000000 | ||
4599 | 30 | 0.000000000 2.793068700 0.000000000 | ||
4600 | 31 | 0.000000000 0.000000000 3.792000000 | ||
4601 | 32 | %endblock LatticeVectors | ||
4602 | 33 | LatticeConstant 1.0 Ang | ||
4603 | 34 | |||
4604 | 35 | %block AtomicCoordinatesAndAtomicSpecies | ||
4605 | 36 | 1.396535500 1.396535500 0.000000000 1 | ||
4606 | 37 | 0.000000000 0.000000000 1.896000000 2 | ||
4607 | 38 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
4608 | 39 | |||
4609 | 40 | Spin SO | ||
4610 | 41 | |||
4611 | 42 | %block kgrid_Monkhorst_Pack | ||
4612 | 43 | 21 0 0 0.0 | ||
4613 | 44 | 0 21 0 0.0 | ||
4614 | 45 | 0 0 11 0.0 | ||
4615 | 46 | %endblock kgrid_Monkhorst_Pack | ||
4616 | 47 | |||
4617 | 48 | xc.functional GGA | ||
4618 | 49 | xc.authors PBE | ||
4619 | 50 | MeshCutoff 1400. Ry | ||
4620 | 51 | SolutionMethod diagon | ||
4621 | 52 | ElectronicTemperature 1 meV | ||
4622 | 53 | |||
4623 | 54 | DM.Tolerance 1.0E-5 | ||
4624 | 55 | MaxSCFIterations 600 | ||
4625 | 56 | DM.MixingWeight 0.005 | ||
4626 | 57 | DM.NumberPulay 8 | ||
4627 | 58 | DM.UseSaveDM T | ||
4628 | 59 | DM.MixSCF1 F | ||
4629 | 60 | DM.NumberKick 25 | ||
4630 | 61 | |||
4631 | 62 | WriteMullikenPop 1 | ||
4632 | 63 | WriteForces T | ||
4633 | 64 | WriteCoorStep T | ||
4634 | 0 | 65 | ||
4635 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.pseudos' | |||
4636 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.pseudos 1970-01-01 00:00:00 +0000 | |||
4637 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/FePtzz.pseudos 2018-04-30 20:53:35 +0000 | |||
4638 | @@ -0,0 +1,2 @@ | |||
4639 | 1 | Fe_SOC | ||
4640 | 2 | Pt_SOC | ||
4641 | 0 | 3 | ||
4642 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/README' | |||
4643 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/README 1970-01-01 00:00:00 +0000 | |||
4644 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/README 2018-04-30 20:53:35 +0000 | |||
4645 | @@ -0,0 +1,33 @@ | |||
4646 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
4647 | 2 | |||
4648 | 3 | The present test performs fully-relativistic simulation of FePt-L1_0 structure | ||
4649 | 4 | placed with the (001) axis along X and Z, X-alignment and Z-alignment, respectively. | ||
4650 | 5 | By means of the calculation of the total selfconsistent energy it is possible to | ||
4651 | 6 | obtain the magnetic anisotropy energy (MAE) checking in addition that: | ||
4652 | 7 | |||
4653 | 8 | * X-alignment: | ||
4654 | 9 | |||
4655 | 10 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
4656 | 11 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
4657 | 12 | |||
4658 | 13 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
4659 | 14 | same value and they are larger than x-axis SC total energy: | ||
4660 | 15 | E_y = E_z => y/z-axis = Hard axes | ||
4661 | 16 | |||
4662 | 17 | * Z-alignment: | ||
4663 | 18 | |||
4664 | 19 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
4665 | 20 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
4666 | 21 | |||
4667 | 22 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
4668 | 23 | same value and they are larger than z-axis SC total energy: | ||
4669 | 24 | E_x = E_y => x/y-axis = Hard axes | ||
4670 | 25 | |||
4671 | 26 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
4672 | 27 | configurations have to have the same values when the system is rotated in space: | ||
4673 | 28 | |||
4674 | 29 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
4675 | 30 | E_y(X-alignment) = E_x(Z-alignment) | ||
4676 | 31 | E_z(X-alignment) = E_y(Z-alignment) | ||
4677 | 32 | |||
4678 | 33 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
4679 | 0 | 34 | ||
4680 | === added file 'Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/makefile' | |||
4681 | --- Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/makefile 1970-01-01 00:00:00 +0000 | |||
4682 | +++ Tests/More_SOC_Examples/offsite_SOC_FePt_zz/offsite_SOC_FePt_zz/makefile 2018-04-30 20:53:35 +0000 | |||
4683 | @@ -0,0 +1,2 @@ | |||
4684 | 1 | name=FePtzz | ||
4685 | 2 | include ../test.mk | ||
4686 | 0 | 3 | ||
4687 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xx' | |||
4688 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/Pt2xx.fdf' | |||
4689 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/Pt2xx.fdf 1970-01-01 00:00:00 +0000 | |||
4690 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/Pt2xx.fdf 2018-04-30 20:53:35 +0000 | |||
4691 | @@ -0,0 +1,64 @@ | |||
4692 | 1 | SystemName Pt2 x-alignment x | ||
4693 | 2 | SystemLabel Pt2xx | ||
4694 | 3 | |||
4695 | 4 | Spin SO | ||
4696 | 5 | |||
4697 | 6 | %block DM.InitSpin | ||
4698 | 7 | 1 +1. 90. 0. | ||
4699 | 8 | 2 +1. 90. 0. | ||
4700 | 9 | %endblock DM.InitSpin | ||
4701 | 10 | |||
4702 | 11 | NumberOfAtoms 2 | ||
4703 | 12 | NumberOfSpecies 1 | ||
4704 | 13 | %block Chemical_Species_label | ||
4705 | 14 | 1 78 Pt_pt2_SOC | ||
4706 | 15 | %endblock Chemical_Species_label | ||
4707 | 16 | |||
4708 | 17 | PAO.EnergyShift 100 meV | ||
4709 | 18 | PAO.SplitNorm 0.15 | ||
4710 | 19 | PAO.OldStylePolOrbs F | ||
4711 | 20 | Restricted.Radial.Grid F | ||
4712 | 21 | %Block PAO.Basis | ||
4713 | 22 | Pt_pt2_SOC 2 | ||
4714 | 23 | n=6 0 2 P 1 | ||
4715 | 24 | 7.158 6.085 | ||
4716 | 25 | 1.000 1.000 | ||
4717 | 26 | n=5 2 2 | ||
4718 | 27 | 5.044 3.098 | ||
4719 | 28 | 1.000 1.000 | ||
4720 | 29 | %EndBlock PAO.Basis | ||
4721 | 30 | |||
4722 | 31 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
4723 | 32 | LatticeConstant 20.0 Ang | ||
4724 | 33 | %block LatticeVectors | ||
4725 | 34 | 1.00 .00 .00 | ||
4726 | 35 | .00 1.00 .00 | ||
4727 | 36 | .00 .00 1.00 | ||
4728 | 37 | %endblock LatticeVectors | ||
4729 | 38 | |||
4730 | 39 | %block AtomicCoordinatesAndAtomicSpecies | ||
4731 | 40 | -1.19940 0.00000 0.00000 1 | ||
4732 | 41 | 1.19940 0.00000 0.00000 1 | ||
4733 | 42 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
4734 | 43 | |||
4735 | 44 | XC.functional GGA | ||
4736 | 45 | XC.authors PBE | ||
4737 | 46 | |||
4738 | 47 | MeshCutoff 500. Ry | ||
4739 | 48 | |||
4740 | 49 | SolutionMethod diagon | ||
4741 | 50 | |||
4742 | 51 | ElectronicTemperature 1 meV | ||
4743 | 52 | DM.Tolerance 1.0E-6 | ||
4744 | 53 | MaxSCFIterations 1000 | ||
4745 | 54 | DM.MixingWeight 0.005 | ||
4746 | 55 | DM.MixSCF1 F | ||
4747 | 56 | MixHamiltonian T | ||
4748 | 57 | DM.NumberPulay 6 | ||
4749 | 58 | DM.NumberKick 25 | ||
4750 | 59 | DM.UseSaveDM T | ||
4751 | 60 | |||
4752 | 61 | WriteMullikenPop 1 | ||
4753 | 62 | WriteEigenvalues T | ||
4754 | 63 | WriteForces T | ||
4755 | 64 | WriteCoorStep T | ||
4756 | 0 | 65 | ||
4757 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/Pt2xx.pseudos' | |||
4758 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/Pt2xx.pseudos 1970-01-01 00:00:00 +0000 | |||
4759 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/Pt2xx.pseudos 2018-04-30 20:53:35 +0000 | |||
4760 | @@ -0,0 +1,1 @@ | |||
4761 | 1 | Pt_pt2_SOC | ||
4762 | 0 | 2 | ||
4763 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/README' | |||
4764 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/README 1970-01-01 00:00:00 +0000 | |||
4765 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/README 2018-04-30 20:53:35 +0000 | |||
4766 | @@ -0,0 +1,34 @@ | |||
4767 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
4768 | 2 | |||
4769 | 3 | The present test performs fully-relativistic simulation of Pt2 dimer | ||
4770 | 4 | placed along X and Z axes, X-alignment and Z-alignment, respectively. | ||
4771 | 5 | By means of the calculation of the total selfconsistent energy it is | ||
4772 | 6 | possible to obtain the magnetic anisotropy energy (MAE) checking in | ||
4773 | 7 | addition that: | ||
4774 | 8 | |||
4775 | 9 | * X-alignment: | ||
4776 | 10 | |||
4777 | 11 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
4778 | 12 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
4779 | 13 | |||
4780 | 14 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
4781 | 15 | same value and they are larger than x-axis SC total energy: | ||
4782 | 16 | E_y = E_z => y/z-axis = Hard axes | ||
4783 | 17 | |||
4784 | 18 | * Z-alignment: | ||
4785 | 19 | |||
4786 | 20 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
4787 | 21 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
4788 | 22 | |||
4789 | 23 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
4790 | 24 | same value and they are larger than z-axis SC total energy: | ||
4791 | 25 | E_x = E_y => x/y-axis = Hard axes | ||
4792 | 26 | |||
4793 | 27 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
4794 | 28 | configurations have to have the same values when the dimer is rotated in space: | ||
4795 | 29 | |||
4796 | 30 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
4797 | 31 | E_y(X-alignment) = E_x(Z-alignment) | ||
4798 | 32 | E_z(X-alignment) = E_y(Z-alignment) | ||
4799 | 33 | |||
4800 | 34 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
4801 | 0 | 35 | ||
4802 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/makefile' | |||
4803 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/makefile 1970-01-01 00:00:00 +0000 | |||
4804 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_xx/makefile 2018-04-30 20:53:35 +0000 | |||
4805 | @@ -0,0 +1,2 @@ | |||
4806 | 1 | name=Pt2xx | ||
4807 | 2 | include ../test.mk | ||
4808 | 0 | 3 | ||
4809 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xz' | |||
4810 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/Pt2xz.fdf' | |||
4811 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/Pt2xz.fdf 1970-01-01 00:00:00 +0000 | |||
4812 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/Pt2xz.fdf 2018-04-30 20:53:35 +0000 | |||
4813 | @@ -0,0 +1,59 @@ | |||
4814 | 1 | SystemName Pt2 x-alignment z | ||
4815 | 2 | SystemLabel Pt2xz | ||
4816 | 3 | |||
4817 | 4 | Spin SO | ||
4818 | 5 | |||
4819 | 6 | NumberOfAtoms 2 | ||
4820 | 7 | NumberOfSpecies 1 | ||
4821 | 8 | %block Chemical_Species_label | ||
4822 | 9 | 1 78 Pt_pt2_SOC | ||
4823 | 10 | %endblock Chemical_Species_label | ||
4824 | 11 | |||
4825 | 12 | PAO.EnergyShift 100 meV | ||
4826 | 13 | PAO.SplitNorm 0.15 | ||
4827 | 14 | PAO.OldStylePolOrbs F | ||
4828 | 15 | Restricted.Radial.Grid F | ||
4829 | 16 | %Block PAO.Basis | ||
4830 | 17 | Pt_pt2_SOC 2 | ||
4831 | 18 | n=6 0 2 P 1 | ||
4832 | 19 | 7.158 6.085 | ||
4833 | 20 | 1.000 1.000 | ||
4834 | 21 | n=5 2 2 | ||
4835 | 22 | 5.044 3.098 | ||
4836 | 23 | 1.000 1.000 | ||
4837 | 24 | %EndBlock PAO.Basis | ||
4838 | 25 | |||
4839 | 26 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
4840 | 27 | LatticeConstant 20.0 Ang | ||
4841 | 28 | %block LatticeVectors | ||
4842 | 29 | 1.00 .00 .00 | ||
4843 | 30 | .00 1.00 .00 | ||
4844 | 31 | .00 .00 1.00 | ||
4845 | 32 | %endblock LatticeVectors | ||
4846 | 33 | |||
4847 | 34 | %block AtomicCoordinatesAndAtomicSpecies | ||
4848 | 35 | -1.19940 0.00000 0.00000 1 | ||
4849 | 36 | 1.19940 0.00000 0.00000 1 | ||
4850 | 37 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
4851 | 38 | |||
4852 | 39 | XC.functional GGA | ||
4853 | 40 | XC.authors PBE | ||
4854 | 41 | |||
4855 | 42 | MeshCutoff 500. Ry | ||
4856 | 43 | |||
4857 | 44 | SolutionMethod diagon | ||
4858 | 45 | |||
4859 | 46 | ElectronicTemperature 1 meV | ||
4860 | 47 | DM.Tolerance 1.0E-6 | ||
4861 | 48 | MaxSCFIterations 1000 | ||
4862 | 49 | DM.MixingWeight 0.005 | ||
4863 | 50 | DM.MixSCF1 F | ||
4864 | 51 | MixHamiltonian T | ||
4865 | 52 | DM.NumberPulay 6 | ||
4866 | 53 | DM.NumberKick 25 | ||
4867 | 54 | DM.UseSaveDM T | ||
4868 | 55 | |||
4869 | 56 | WriteMullikenPop 1 | ||
4870 | 57 | WriteEigenvalues T | ||
4871 | 58 | WriteForces T | ||
4872 | 59 | WriteCoorStep T | ||
4873 | 0 | 60 | ||
4874 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/Pt2xz.pseudos' | |||
4875 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/Pt2xz.pseudos 1970-01-01 00:00:00 +0000 | |||
4876 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/Pt2xz.pseudos 2018-04-30 20:53:35 +0000 | |||
4877 | @@ -0,0 +1,1 @@ | |||
4878 | 1 | Pt_pt2_SOC | ||
4879 | 0 | 2 | ||
4880 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/README' | |||
4881 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/README 1970-01-01 00:00:00 +0000 | |||
4882 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/README 2018-04-30 20:53:35 +0000 | |||
4883 | @@ -0,0 +1,34 @@ | |||
4884 | 1 | Ramon Cuadrado del Burgo - March 7, 2016 | ||
4885 | 2 | |||
4886 | 3 | The present test performs fully-relativistic simulation of Pt2 dimer | ||
4887 | 4 | placed along X and Z axes, X-alignment and Z-alignment, respectively. | ||
4888 | 5 | By means of the calculation of the total selfconsistent energy it is | ||
4889 | 6 | possible to obtain the magnetic anisotropy energy (MAE) checking in | ||
4890 | 7 | addition that: | ||
4891 | 8 | |||
4892 | 9 | * X-alignment: | ||
4893 | 10 | |||
4894 | 11 | 1) The total SC energy for x-axis spin orientation corresponds to the | ||
4895 | 12 | lower value: E_x < E_y = E_z => x-axis = Easy axis | ||
4896 | 13 | |||
4897 | 14 | 2) The total SC energy for y-axis and z-axis spin orientation have the | ||
4898 | 15 | same value and they are larger than x-axis SC total energy: | ||
4899 | 16 | E_y = E_z => y/z-axis = Hard axes | ||
4900 | 17 | |||
4901 | 18 | * Z-alignment: | ||
4902 | 19 | |||
4903 | 20 | 1) The total SC energy for z-axis spin orientation corresponds to the | ||
4904 | 21 | lower value: E_z < E_x = E_y => z-axis = Easy axis | ||
4905 | 22 | |||
4906 | 23 | 2) The total SC energy for x-axis and y-axis spin orientation have the | ||
4907 | 24 | same value and they are larger than z-axis SC total energy: | ||
4908 | 25 | E_x = E_y => x/y-axis = Hard axes | ||
4909 | 26 | |||
4910 | 27 | For comparison of (X/Z)-alignment, the total SC energies and MAEs of both | ||
4911 | 28 | configurations have to have the same values when the dimer is rotated in space: | ||
4912 | 29 | |||
4913 | 30 | a) E_x(X-alignment) = E_z(Z-alignment) | ||
4914 | 31 | E_y(X-alignment) = E_x(Z-alignment) | ||
4915 | 32 | E_z(X-alignment) = E_y(Z-alignment) | ||
4916 | 33 | |||
4917 | 34 | b) MAE(X-alignment) = E_x - E_(y/z) <=> MAE(Z-alignment) = E_z - E_(x/y) | ||
4918 | 0 | 35 | ||
4919 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/makefile' | |||
4920 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/makefile 1970-01-01 00:00:00 +0000 | |||
4921 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_xz/makefile 2018-04-30 20:53:35 +0000 | |||
4922 | @@ -0,0 +1,2 @@ | |||
4923 | 1 | name=Pt2xz | ||
4924 | 2 | include ../test.mk | ||
4925 | 0 | 3 | ||
4926 | === added directory 'Tests/More_SOC_Examples/offsite_SOC_Pt2_zy' | |||
4927 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/Pt2zy.fdf' | |||
4928 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/Pt2zy.fdf 1970-01-01 00:00:00 +0000 | |||
4929 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/Pt2zy.fdf 2018-04-30 20:53:35 +0000 | |||
4930 | @@ -0,0 +1,64 @@ | |||
4931 | 1 | SystemName Pt2 z-alignment y | ||
4932 | 2 | SystemLabel Pt2zy | ||
4933 | 3 | |||
4934 | 4 | Spin SO | ||
4935 | 5 | |||
4936 | 6 | %block DM.InitSpin | ||
4937 | 7 | 1 +1. 90. 90. | ||
4938 | 8 | 2 +1. 90. 90. | ||
4939 | 9 | %endblock DM.InitSpin | ||
4940 | 10 | |||
4941 | 11 | NumberOfAtoms 2 | ||
4942 | 12 | NumberOfSpecies 1 | ||
4943 | 13 | %block Chemical_Species_label | ||
4944 | 14 | 1 78 Pt_pt2_SOC | ||
4945 | 15 | %endblock Chemical_Species_label | ||
4946 | 16 | |||
4947 | 17 | PAO.EnergyShift 100 meV | ||
4948 | 18 | PAO.SplitNorm 0.15 | ||
4949 | 19 | PAO.OldStylePolOrbs F | ||
4950 | 20 | Restricted.Radial.Grid F | ||
4951 | 21 | %Block PAO.Basis | ||
4952 | 22 | Pt_pt2_SOC 2 | ||
4953 | 23 | n=6 0 2 P 1 | ||
4954 | 24 | 7.158 6.085 | ||
4955 | 25 | 1.000 1.000 | ||
4956 | 26 | n=5 2 2 | ||
4957 | 27 | 5.044 3.098 | ||
4958 | 28 | 1.000 1.000 | ||
4959 | 29 | %EndBlock PAO.Basis | ||
4960 | 30 | |||
4961 | 31 | AtomicCoordinatesFormat NotScaledCartesianAng | ||
4962 | 32 | LatticeConstant 20.0 Ang | ||
4963 | 33 | %block LatticeVectors | ||
4964 | 34 | 1.00 .00 .00 | ||
4965 | 35 | .00 1.00 .00 | ||
4966 | 36 | .00 .00 1.00 | ||
4967 | 37 | %endblock LatticeVectors | ||
4968 | 38 | |||
4969 | 39 | %block AtomicCoordinatesAndAtomicSpecies | ||
4970 | 40 | 0.00000 0.00000 -1.19940 1 | ||
4971 | 41 | 0.00000 0.00000 1.19940 1 | ||
4972 | 42 | %endblock AtomicCoordinatesAndAtomicSpecies | ||
4973 | 43 | |||
4974 | 44 | XC.functional GGA | ||
4975 | 45 | XC.authors PBE | ||
4976 | 46 | |||
4977 | 47 | MeshCutoff 500. Ry | ||
4978 | 48 | |||
4979 | 49 | SolutionMethod diagon | ||
4980 | 50 | |||
4981 | 51 | ElectronicTemperature 1 meV | ||
4982 | 52 | DM.Tolerance 1.0E-6 | ||
4983 | 53 | MaxSCFIterations 1000 | ||
4984 | 54 | DM.MixingWeight 0.005 | ||
4985 | 55 | DM.MixSCF1 F | ||
4986 | 56 | MixHamiltonian T | ||
4987 | 57 | DM.NumberPulay 6 | ||
4988 | 58 | DM.UseSaveDM T | ||
4989 | 59 | DM.NumberKick 25 | ||
4990 | 60 | |||
4991 | 61 | WriteMullikenPop 1 | ||
4992 | 62 | WriteEigenvalues T | ||
4993 | 63 | WriteForces T | ||
4994 | 64 | WriteCoorStep T | ||
4995 | 0 | 65 | ||
4996 | === added file 'Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/Pt2zy.pseudos' | |||
4997 | --- Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/Pt2zy.pseudos 1970-01-01 00:00:00 +0000 | |||
4998 | +++ Tests/More_SOC_Examples/offsite_SOC_Pt2_zy/Pt2zy.pseudos 2018-04-30 20:53:35 +0000 | |||
4999 | @@ -0,0 +1,1 @@ | |||
5000 | 1 | Pt_pt2_SOC |
There are changes in parts of the code which are not relevant.
Specifically the cold smearing method has been removed! Possibly due to a faulty merge.
Also there were changes to TD-DFT.
I would like a clean-up of comments which is scattered all-over.
Lastly, the use of the spin type should be used throughout (we might as well do it now).
My personal opinion would be to:
spin%SO_offsite change to spin%SO_off
spin%SO_offsite should *only* be true for SO calculations AND off site version. Otherwise false.
This allows easier if-statements throughout the code.