Orbital localization failed from read orbitals

40 views
Skip to first unread message

Shaowei Nie

unread,
Jul 4, 2025, 2:10:08 AMJul 4
to molpro-user
Hi all,

Does someone know how to do orbital localization from read orbitals? It seems that the read orbitals are assigned with wrong type so that the following localization program cannot correctly recognize it.
Here is my input and error:
Input:
"""
***, acrolein, DFT orbitals localization
gprint, orbital

geometry=acrolein_s0.xyz
basis=vdz

! read DFT orbitals from saved ASCII file
{matrop
read,mo,ORB,canonical,file=acrolein_dft.a
save,mo,2100.2,ORBITALS,canonical
}

! do orbital localization
{locali
method,natural
orbital,2100.2
save,2400.2
}
"""

Error:
"""
Natural Bond Localization, Authors: R. Mata, H.-J. Werner

Molecular orbitals read from record     2100.2  Type=MATROP/CANONICAL   

?RECORD     0.* HAS ILLEGAL TYPE FOR LOCALIZATION: MATROP   

GLOBAL ERROR fehler on processor   0   
"""

The localization works fine if I redo a DFT scf convergence.

Any suggestion is appreciated!

Sincerely,
Shaowei

jxzou

unread,
Jul 4, 2025, 3:16:48 AMJul 4
to molpro-user
Hi, Shaowei,
It seems that you are using MOKIT to transfer MOs from another quantum chemistry package to Molpro. I see that you have
```
{matrop
read,mo,ORB,canonical,file=acrolein_dft.a
save,mo,2100.2,ORBITALS,canonical
}
```
which seems to be generated by the fch2com utility of MOKIT. If this is true, you cannot delete the Cartesian coordinates and basis set data generated by fch2com and you cannot modify them into  `geometry=xxx.xyz` and `basis=vdz`, since those original information ensure the correct correspondence between MOs and basis set data. And you can only modify the last line in the input file (which are supposed to be HF/DFT keywords).

Of course, if you are not using MOKIT, please just ignore my reply.

Best wishes,
Jingxiang

Shaowei Nie

unread,
Jul 7, 2025, 1:29:03 AMJul 7
to molpro-user
Dear Dr. Zou,

I am indeed a MOKIT user but the DFT orbitals here were generated from a previous MOLPRO run. I just want to save the timing of DFT integral (if possible).
The input file I use for DFT orbitals is:
"""
***, acrolein dft  
memory,100,m
geometry=acrolein_s0.xyz
basis=vdz
rks,b3lyp,disp=d3

put,molden,acrolein.molden,NEW;orbital,2100.2

! Use Matrop to write DFT orbitals to ASCII file
{matrop
load,acrolein_dft_mo,ORB,2100.2   ! load dft orbitals to acrolein_dft_mo
write,acrolein_dft_mo,acrolein_dft.a,new  ! write,name,filename
}
"""
Best regards,
Shaowei

jxzou

unread,
Jul 14, 2025, 9:15:14 AMJul 14
to molpro-user
Hi,  Shaowei,
I don't think it works in that way. The following two solutions should work:

(1) Perform DFT and orbital localization using Molpro, but save MOs/LMOs into separate files.
For example, the Molpro input file can be
```
***, acrolein dft
memory,100,m
geometry=acrolein_s0.xyz
basis=vdz
rks,b3lyp,disp=d3
put,molden,acrolein.molden,NEW;orbital,2100.2

{locali
method,pipek
save,2400.2
}
put,molden,acrolein_lmo.molden,NEW;orbital,2400.2
```
Now you save KS-DFT canonical MOs and LMOs into two different .molden files. If you want to visualize orbitals, you can convert them into .fch(k) files and open via GaussView/Multiwfn. For example, run
```
molden2fch  acrolein_lmo.molden -molpro
```

(2) Perform DFT using Molpro, and perform orbital localization using MOKIT.
After you accomplished your KS-DFT calculation and obtain the file `acrolein.molden`. You can run
```
molden2fch  acrolein.molden -molpro
```
to generate  `acrolein.fch`. So you can use Python API in MOKIT to perform orbital localization, e.g.
```python
from mokit.lib.gaussian import loc
loc(fchname='acrolein.fch',idx=range(15))
```
Then you obtain `acrolein_LMO.fch`, in which the Pipek-Mezey LMOs are kept. You can use the utility `fch2com` to generate Molpro input and orbital file again, e.g.
```
fch2com acrolein_LMO.fch
```
In this approach, the point group symmetry would be turned off in `acrolein_LMO.com`.

Good luck.
Reply all
Reply to author
Forward
0 new messages