Molcas Forum

Support and discussions for Molcas and OpenMolcas users and developers

You are not logged in.

Announcement

Welcome to the Molcas forum.

Please note: The forum's URL has changed. The new URL is: https://molcasforum.univie.ac.at. Please update your bookmarks!

You can choose an avatar and change the default style by going to "Profile" → "Personality" or "Display".

#1 2024-07-04 19:11:56

seapigs
Member
Registered: 2024-07-04
Posts: 1

Reading in orbital guess from Molden file

Hi,

I am new to OpenMolcas and I am wondering if I can read in molden file from other software in order to run an openmolcas CASPT2 calculation.
Could you please let me know what to try?

Thank you in advance!

Offline

#2 2024-07-05 09:51:22

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,079

Re: Reading in orbital guess from Molden file

No, that's not currently possible as far as I'm aware.

Offline

#3 2024-07-12 13:00:04

jxzou
Member
Registered: 2020-09-11
Posts: 8

Re: Reading in orbital guess from Molden file

Hi, seapigs, you can do this. There are two approaches:

(1) Assuming you already have a .molden file which includes converged CASSCF MOs. Let's say a CASSCF(4,4) h2o.molden file from the quantum chemistry package ORCA. Now you can run

molden2fch h2o.molden -orca
fch2inporb h2o.fch

This will generate (Open)Molcas files h2o.input and h2o.INPORB. The former file contains Cartesian coordinates, basis set data and some simple keywords. The latter file contains the converged CASSCF MOs. Now if you want to perform the CASPT2 calculation, you need add keywords into h2o.input. To be specific, you need to delete the SCF keywords

&SCF
Charge= 0
Spin= 1
FILEORB= h2o.INPORB

and add the CASSCF and CASPT2 keywords, e.g.

&RASSCF
CIMX= 200
Tight= 5d-8 5d-6
Spin= 1
Charge= 0
nActEl= 4
RAS2= 4
FILEORB= h2o.INPORB

&CASPT2
 IPEA= 0.25

There is no need to modify the basis set section since it is well written. Now if you submit the (Open)Molcas job, you will find that the CASSCF is converged immediately (because MOs are correctly transformed and transferred)

                                         RASSCF iterations: Energy and convergence statistics
                                         ----------------------------------------------------

      Iter CI   SX   CI       RASSCF       Energy    max ROT     max BLB   max BLB  Level Ln srch  Step   QN   Walltime
          iter iter root      energy       change     param      element    value   shift minimum  type update hh:mm:ss
 Nr of preliminary CI iterations:   1
        1   1    4    1   -75.90823030    0.00E+00   1.29E-05    2   6 1  1.68E-05   0.00   0.00    SX    NO    0:00:00
        2   1    4    1   -75.90823031   -6.39E-10  -9.70E-06    3  10 1  4.90E-06   0.00   0.00    SX    NO    0:00:00
        3   1    3    1   -75.90823031   -1.25E-10  -6.42E-06    2   6 1  3.54E-06   0.00   0.00    SX    NO    0:00:00
        4   1    3    1   -75.90823031   -5.00E-11  -4.47E-06    2   6 1  2.29E-06   0.00   0.00    SX    NO    0:00:00
      Convergence after  4 iterations
        5   1    3    1   -75.90823031   -2.05E-11  -4.47E-06    2   6 1  1.54E-06   0.00   0.00    SX    NO    0:00:00

It can be seen that the initial CASSCF energy has little difference with the converged one. The computation soon runs into the CASPT2 section, which saves a lot of time. Here the molden2fch and fch2inporb are two utilities in the open source package MOKIT. MOKIT can be easily installed via `conda install`, if your computer has Internet connection.

Note:
(i) Quantum chemistry packages seldom obey the real .molden format standard, and thus one h2o.molden file generated by different programs usually have different conventions of MO coefficients. The `molden2fch` utility requires the user to tell it what the program is. If you want other options than -orca, you can use -molcas, -molpro, -tm, etc.
(ii) There is no ECP/PP information in any molden file. If you use ECP/PP in your calculation, you need add this information to h2o.input by yourself. If you use an all-electron basis set, there is no such problem.
(iii) There is no DKH2 or sfX2C keyword in any molden file. If you want to use a scalar relativistic Hamiltonian, you need add keywords to h2o.input by yourself.

(2) Assuming you have not performed the target CASSCF calculation, the solution would be even easier. For example, you can write a h2o.gjf file

%mem=8GB
%nprocshared=4
#p CASPT2/cc-pVTZ

mokit{CASPT2_prog=OpenMolcas}

0 1
O      -0.23497692    0.90193619   -0.068688
H       1.26502308    0.90193619   -0.068688
H      -0.73568721    2.31589843   -0.068688

And run the job as

automr h2o.gjf >h2o.out 2>&1

The utility automr is able to construct the active space automatically, and call PySCF to perform the CASSCF calculation, then call OpenMolcas to perform the CASPT2 calculation. The whole process can be accomplished by a smart workflow.

Last edited by jxzou (2024-07-12 13:02:55)

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 18:12:59