MOS in Molden Format

Luca luca.d... at gmail.com
Tue Jul 31 06:09:30 UTC 2018


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/20180730/bcd52872/attachment.htm>


More information about the CP2K-user mailing list