bugfix for MO_CUBES printing when nspin=2

Murat KILIC murat... at gmail.com
Thu Oct 13 13:59:36 UTC 2011


Dear cp2k developers,

I have made a small change to fix a bug when writing MO_CUBES in the
case of a spin-unrestricted calculation.
The original code has a problem with writing at the same time HOMOs
and LUMOs cubefiles, that is, some files seem to get overwritten, and
there is a shift in the MO numbering.
This is because the HOMO number ("homo") is only obtained for the
occupied orbitals (first for spin 1 and then for spin 2) and not for
the unoccupied MOs afterward. As a result, only the previously
obtained number for "homo" for spin 2 is used for both spins in the
calculation and printing of the unoccupied MOs.

Attached is the changed file "qs_scf_post_gpw.F", before and after my change.
I hope that it will be useful for others.

best wishes,
Bernd Ensing



-- 
..................................................................
Computational Chemistry Group
Van 't Hoff Institute for Molecular Sciences
University of Amsterdam
Science Park 904
1098 XH Amsterdam
http://molsim.chem.uva.nl/users/kilic/index.html
..................................................................
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qs_scf_post_gpw.F_fix
Type: application/octet-stream
Size: 129012 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20111013/662134ab/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qs_scf_post_gpw.F_orig
Type: application/octet-stream
Size: 128641 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20111013/662134ab/attachment-0001.obj>


More information about the CP2K-user mailing list