[CP2K-user] MOS in Molden Format
Matthias Krack
matthi... at psi.ch
Thu Apr 22 19:33:45 UTC 2021
Dear Luca
I have just applied a fix <https://github.com/cp2k/cp2k/issues/1335>
proposed by Hossam Elgabarty to the CP2K trunk (master) affecting the
transformation of spherical to Cartesian orbitals which includes also the
MOLDEN output. Perhaps that fix resolves the problem which you observed.
Best regards
Matthias
On Saturday, August 4, 2018 at 11:58:17 AM UTC+2 Luca wrote:
> Dear Matt
>
>
> Could you please let me know if the orbitals projected on the CARTESIAN -
> GTOs are normalized?
>
>
> The basis set (Normalized-Cartesian-GTOs) printed in the MOLDEN formatted
> file is consistent with the basis set printed by the NWCHEM code.
>
> When I use the MOLDEN formatted file printed by NWCHEM, my code gives the
> right number of electrons.
>
> When I use the orbitals printed by CP2K, I am not able to get the right
> number of electrons in the system.
>
> Considering that the basis set is the same, the CP2K orbitals projected on
> the Normalized-Cartesian-GTOs could not be normalized.
>
> Best Regards
> Luca
>
>
> On Tuesday, July 31, 2018 at 8:09:31 AM UTC+2, Luca wrote:
>>
>> Dear Matt
>>
>> the correct clause should be
>>
>> IF (ABS(mo_coeff(orbmap(orbital))) .GT. 10.0**(-digits))
>>
>>
>>
>> Best Regards
>>
>> Luca
>>
>>
>>
>>
>> On Monday, July 30, 2018 at 8:30:38 AM UTC+2, Luca wrote:
>>>
>>> Dear Matt
>>>
>>>
>>> The following code seems to give the correct MOLDEN-FORMAT. Please
>>> note that:
>>>
>>> 1) I modified (irow_in+orbital ) in (irow_in+orbital – 1)
>>>
>>> 2) I tested molden formatted files containing no more than s,p,d
>>> functions.
>>>
>>>
>>>
>>> DO orbital = 1, 15
>>>
>>> IF (orbmap(orbital) .NE. 0) THEN
>>>
>>> WRITE (iw, fmtstr1) irow_in+orbital - 1 ,
>>> mo_coeff(orbmap(orbital))
>>>
>>> END IF
>>>
>>> END DO
>>>
>>>
>>>
>>> By adding the following clause:
>>>
>>> IF (mo_coeff(orbmap(orbital)) .GT. 10.0**(-digits))
>>>
>>>
>>>
>>> One obtains an incomplete MODLEN formatted file since it misses some
>>> coefficients greater than 10.0**(-digits).
>>>
>>>
>>>
>>> Best Regards.
>>>
>>> Luca
>>>
>>> On Saturday, July 28, 2018 at 6:41:21 PM UTC+2, Matt W wrote:
>>>>
>>>> Hmmm, could you try recompiling after changing the lines around 323 -
>>>> 330 to something like
>>>>
>>>> DO orbital = 1, 15
>>>> IF (orbmap(orbital) .NE. 0) THEN
>>>> WRITE (iw, fmtstr1) irow_in+orbital, mo_coeff(orbmap(orbital))
>>>> IF (mo_coeff(orbmap(orbital)) .GT. 10.0**(-digits)) THEN
>>>> WRITE(6,*) "skipping this orbital"
>>>> END IF
>>>> END IF
>>>> END DO
>>>>
>>>>
>>>> i.e. take the original write statement out of the if clause. This
>>>> should print all coefficients in molden format.
>>>>
>>>> If that works then I can try and see why the if statement doesn't work
>>>> as expected ...
>>>>
>>>> Matt
>>>>
>>>> On Saturday, July 28, 2018 at 5:05:04 PM UTC+1, Luca wrote:
>>>>>
>>>>>
>>>>> Dear Matt
>>>>>
>>>>> Thank you for your answer. However, I still believe that the printed
>>>>> formats do not differ only for the ordering. Furthermore, modifying NDIGITS
>>>>> does not fix the issue.
>>>>>
>>>>> This means that the printed MOLDEN file cannot be used for
>>>>> quantitative post-processing.
>>>>>
>>>>> I performed tests on H atoms and the H2 molecule, and in both the
>>>>> cases, the MOLDEN-file does not contain the right orbitals.
>>>>>
>>>>> Below I will report the H case. The orbital printed in the MOLDEN
>>>>> FORMAT is not normalized, as you can easily check by printing the OVERLAP
>>>>> matrix.
>>>>>
>>>>> Please find below the different formats and the overlap (NDIGITS = 12)
>>>>> :
>>>>>
>>>>>
>>>>>
>>>>> CP2K-FORMAT : Occupied orbital of H
>>>>>
>>>>> 1 1 H 1s 0.860523926375
>>>>>
>>>>> 2 1 H 2s -0.147897200557
>>>>>
>>>>> 3 1 H 2px -0.000000000000
>>>>>
>>>>> 4 1 H 2py -0.000000000000
>>>>>
>>>>> 5 1 H 2pz -0.000000000000
>>>>>
>>>>>
>>>>>
>>>>> MOLDEN-Format :Occupied orbital of H
>>>>>
>>>>> One = -0.25103226963873182
>>>>>
>>>>> Spin= Alpha
>>>>>
>>>>> Occup= 1.0000000000000000
>>>>>
>>>>> 2 8.605239264E-01
>>>>>
>>>>>
>>>>>
>>>>> OVERLAP
>>>>>
>>>>> 1s
>>>>> 2s
>>>>>
>>>>> 1 1 H 1s 1.000000008914 -0.933553473764
>>>>>
>>>>> 2 1 H 2s -0.933553473764 1.000000029566
>>>>>
>>>>> ------------------------------------------------------------
>>>>> ------------------------------------------------------------
>>>>> -----------------
>>>>>
>>>>>
>>>>>
>>>>> The right MOLDEN FORMAT should be (I tested it):
>>>>>
>>>>> 1 0.860523926375
>>>>>
>>>>> 2 -0.147897200557
>>>>>
>>>>>
>>>>>
>>>>> Best Regards.
>>>>>
>>>>> Luca
>>>>>
>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20210422/5ec4f002/attachment.htm>
More information about the CP2K-user
mailing list