Merge lp:~albertog/siesta/4.0-spin into lp:siesta/4.0
Status: | Merged |
---|---|
Approved by: | Nick Papior |
Approved revision: | 560 |
Merged at revision: | 562 |
Proposed branch: | lp:~albertog/siesta/4.0-spin |
Merge into: | lp:siesta/4.0 |
Diff against target: |
502 lines (+195/-88) 15 files modified
Docs/compatibility.tex (+5/-0) Src/Makefile (+7/-7) Src/compute_dm.F (+1/-9) Src/mixer.F (+1/-1) Src/mulliken.F (+29/-17) Src/new_dm.F (+1/-43) Src/print_spin.F90 (+9/-7) Src/read_options.F90 (+1/-0) Src/scfconvergence_test.F (+19/-0) Src/siesta_options.F90 (+2/-1) Src/state_init.F (+2/-0) Util/DensityMatrix/README (+4/-0) Util/DensityMatrix/dm_noncol_sign_flip4.f90 (+108/-0) Util/DensityMatrix/makefile (+5/-2) version.info (+1/-1) |
To merge this branch: | bzr merge lp:~albertog/siesta/4.0-spin |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nick Papior | Approve | ||
Review via email: mp+342997@code.launchpad.net |
Commit message
Spin monitoring in scf cycle. Clarification of sign convention for DM
* Spin monitoring during scf cycle
If the fdf variable 'Spin.In.Scf' is set to 'true', the size and
components of the (total) spin polarization will be printed at every
scf step. This is analogous to the 'Mulliken.In.Scf' feature.
The default for the Spin.In.SCF fdf flag is 'true' for calculations
involving spin.
A single line of spin information is printed, prefixed by ' spin-moment:'.
Note that now, for each scf step, the spin and/or mulliken analyses are
printed *after* the line showing the energies.
The initial spin polarization for every geometry iteration is also
printed in 'state_init', replacing the similar calls in 'new_dm'.
* Use explicitly the same DM_12 sign-convention as in SOC versions
In the non-collinear case, the code is actually using internally the
same sign convention for the "up-down" components of H and the DM as
the spin-orbit-capable (SOC) versions (>= 4.1): The building of the
dense Hamiltonian has the same form and the off-diagonal components
of Vxc are identical. Routines diag2g and diag2k are actually using
the same convention, but with DM* as an intermediate step.
By changing the interface to the outside world, namely the
correspondence between spin angles and the DM in new_dm, and the
calculation of the spin (actually moment) components in spnvec, the
code can now interoperate (i.e., reuse DMs) with the SOC versions.
In order to reuse DM information produced by previous versions of
the program in the non-collinear case, the sign of D(4) of the old
DM has to be changed. This can be achieved with the
dm_noncol_
LGTM with the small changes. I think we should just delete the lines that you have commented out (by choosing better alternatives). No need to have them there... :)