476
|
|
Fix the geometry and DM and H logic for consistency in analysis
-*-*-*-*-* IMPORTANT NOTE: This patch will slightly change the output of most calculations and the detailed results of any post-processing. Keep this in mind if you need to maintain coherency within a project. See the rest of the text for ways to restore backward compatibility. The reference output files in Tests/Reference have *not* been updated yet. -*-*-*-*-* This is the initial patch in a long-overdue clarification work related to the "outer geometry loop" in Siesta and its interaction with the analysis of the electronic structure.
The most important changes, following the actual refactoring logic, are:
* Superfluous calls to 'superx' to propagate the new coordinates to the auxiliary supercell in 'siesta_move' have been removed, as they are already done by 'state_init'.
* The above change has the side effect of leaving inconsistent sets of unit cell and supercell coordinates in 'siesta_analysis' if the unit cell coordinates used in the latter are those 'moved' by the geometry-update routines. To avoid this, and to do the analysis using the actual coordinates used in the computation of the electronic structure, the coordinates are reset to those values (using the *_last arrays) in 'siesta_analysis'. The old behavior can be recovered by using by setting the backward compatibility switch 'compat-pre-v4-dynamics' to 'true'.
* To guarantee that the DM and H used in the analysis correspond to the latest electronic structure computed, there should be no mixing at the end of the scf loop. This behavior, which was optional until now (controlled by the value of scf-mix-after-convergence) is now the default. The use of DM_out instead of DM_mixed provides also a truly variational total-energy and more consistent forces. If the scf cycle is carried out mixing H, H(DM_in) is recovered by re-setting H to Hold in siesta_forces at the end of the cycle.
Also, to preserve the right H for analysis it is necessary to avoid overwriting it in post_scf_work. This is now done by default, except if the option 'scf-recompute-h-after-scf' is 'true'.
There is another switch for pre-v4.0 compatibility in this context: If 'compat-pre-v4-dm-h' is 'true', the 'scf-mix-after-convergence' and 'scf-recompute-h-after-scf' options are activated too.
Some comments have been added to siesta_forces to document possible further clarifications.
* For clarity, each MD or geometry-optimization flavor has now its own self-contained logic block in 'siesta_move'. This has uncovered a few issues that have been corrected:
- The quenched forms of the Verlet and Parrinello-Rahman (PR) schemes, which are actually relaxations, did not check for convergence before moving the atoms (PR did not check at any point). Now the 'constrained' forces and stress are checked before invoking the routines. In the case of PR, a 'target stress' can optionally be subtracted from the constrained stress (a further form of constraint that was previously only available (internally) in the standard relaxation routines). A future update might put all these constraint conditions in 'fixed', but care should be taken to study their interaction with the MD variable-cell routines. A future revision might look into the effectiveness of the variable-cell routines. There is a new example in Tests for quenched MD relaxation.
- The geometry output in 'siesta_move' is now exclusively done for checkpointing purposes, and typically involves the 'moved' geometries. The current geometry output is done in 'state_init', and any final output in 'siesta_analysis'.
- Some output calls have been removed where they did not make much sense (as in the FC or server blocks).
- The deprecated 'phonon' support has been removed.
* Siesta_analysis outputs the 'current' final geometry, and not the 'moved' one. The old behavior can be recovered by using the 'compat-pre-v4-dynamics' switch.
* The default 'dynamics' option has been changed from 'verlet' to 'CG'. There should really be a new 'single-point' default which completely avoids 'siesta_move'. The old behavior can be recovered by using the 'compat-pre-v4-dynamics' switch.
* Single-point calculations do not write .STRUCT_NEXT_ITER files, and the coordinates in the XV file are the current ones, unmoved. Extra output in siesta_options is avoided for this case.
* The headings for the beginning of the dynamics blocks are now more concrete.
Other minor changes:
* Fix the IO field widths in the bonds routine to support more atoms.
* Add a few more deallocations in several routines, and change the 'routine' field in some deallocations to match the allocations (notably for arrays in the 'sparse_matrices' module)
* Cosmetic changes in the output format for dynamics headings
* Atomic displacements for force-constant runs are output in Ang.
removed: Src/phonon.F added: Src/m_target_stress.F Tests/si2x1h-quench/ Tests/si2x1h-quench/makefile Tests/si2x1h-quench/si2x1h-quench.fdf Tests/si2x1h-quench/si2x1h-quench.pseudos modified: Docs/siesta.tex Src/Makefile Src/atomlist.f Src/bonds.f Src/dhscf.F Src/diag2g.F Src/diag2k.F Src/final_H_f_stress.F Src/fixed.F Src/ioxv.F Src/m_check_supercell.f Src/m_pulay.F90 Src/new_dm.F Src/post_scf_work.F Src/save_density_matrix.F Src/siesta_analysis.F Src/siesta_forces.F Src/siesta_init.F Src/siesta_move.F Src/siesta_options.F90 Src/sparse_matrices.F Src/state_analysis.F Src/state_init.F Src/write_subs.F
|
Alberto Garcia |
9 years ago
|
|
|