Is this input enough for casscf?

Dear psi4 users,

Hi, I’m very new to post-HF calculation and trying to do CASSCF method.

I set several options to the input file and could get casscf energy.

But I don’t know if my input option is enough for calculating exact casscf energy.

Here is my input file of Fe atom with 6 active orbitals and 8 active electrons.

memory 2000 Mb
molecule {
0 5
symmetry c1
Fe 0.0 0.0 0.0
}

set {
scf_type pk
basis def2-tzvpp
reference rohf
frozen_docc [ 9 ]
active [ 6 ]
guess core
}
set s 5
set mcscf_e_convergence 1e-8
set molden_write true
casscf_energy = energy(‘casscf’)

casscf energy was higher than what I was expected with above input options…

Also, is there exist any other format rather than cube format (http://www.psicode.org/psi4manual/master/cubeprop.html) when generating electron total and spin density?

thank you for the help

CASSCF is one of the most complex post-HF calculations possible as its very far from a black box. Examining your input I have a few notes:

  • Frozen_docc means that the HF orbitals cannot rotate and with CASSCF active rotations are redundant. Effectively this means that there are no possible rotations possible and so you are effectively doing CI here not CASSCF. To allow rotations you can change frozen_docc to restricted_docc.

  • Your active space choice coupled with your spin means that you are not considering many additional configurations in your wavefunction. I would need to think about it, but I believe most of these are redundant so your current computation might return the SCF energy.

  • Im betting Fe without symmetry is not going to converge well. Highly symmetric molecules without symmetry are difficult for CAS and its one of my TODO projects for our CI module.

  • Unfortunately I don’t think molden_write works for CI. Its another TODO list. Currently you can do the following:

    cas_e, cas_wfn = energy(‘CASSCF’, return_wfn=True)
    molden(‘filename’, cas_wfn)

We only support Cube format currently. Is there another format that you have in mind?

Thank you for the kind reply.

But …the molden file was generated with molden_write option above… Then is this molden file doesn’t have molecular orbital information of casscf calculation result,?
I simply thought molden_wrtie can generate molden file for any calculation method.

What happened here was the molden_write flag was used for SCF, and the MCSCF code did not overwrite it. This is on (yet another) TODO list for the Psi4 1.0 release.

Thank you for the helpful comment.

I tried

memory 2000 Mb
molecule {
0 5
symmetry c1
Fe 0.0 0.0 0.0
}

set {
scf_type pk
basis def2-tzvpp
reference rohf
restricted_docc [ 9 ]
active [ 6 ]
guess core
}
set s 5
set mcscf_e_convergence 1e-8
cas_e, cas_wfn = energy(‘casscf’, return_wfn=True)
molden(test, cas_wfn)

to my input file but error has occurred while running.
(<type ‘exceptions.NameError’>: name ‘test’ is not defined: File “”, line 35, in )

Is there any option that I have to put in for the molden file?

thank you for the help

The name test must be in quotes so that it is a string. This is the file name where your molden output will be written.

When doing

cas_e, cas_wfn = energy(‘casscf’, return_wfn=True)
molden(‘test’, cas_wfn)

I also get error but different

An error has occurred Py-side
Traceback:
<class ‘Boost.Python.ArgumentError’>: Python argument types in
MoldenWriter.write(MoldenWriter, str)
did not match C++ signature:
write(N3psi12MoldenWriterE {lvalue}, Ss, N5boost10shared_ptrIN3psi6MatrixEEE, N5boost10shared_ptrIN3psi6MatrixEEE, N5boost10shared_ptrIN3psi6VectorEEE, N5boost10shared_ptrIN3psi6VectorEEE, N5boost10shared_ptrIN3psi6VectorEEE, N5boost10shared_ptrIN3psi6VectorEEE): File “”, line 35, in

File “/usr/local/psi4/share/psi4/python/driver.py”, line 1780, in molden
mw.write(filename)

same error occurs when put “test” in it…

Well, thats quite interesting. This appears to be a bug… I will look into fixing this today.

Dear dgasmith,

I’ve re-installed psi4 from github (https://github.com/psi4/psi4)

but the error message is still occurred.

!Molden warning: This wavefunction does not have occupation numbers.
Writing zero’s for occupation numbers
An error has occurred. Traceback:
<type ‘exceptions.AttributeError’>: ‘str’ object has no attribute ‘nmopi’: File “”, line 35, in

File “/usr/local/psi4/share/psi4/python/driver.py”, line 1802, in molden
occa = psi4.Vector(wfn.nmopi())

my input file is still

memory 2000 Mb
molecule {
0 5
symmetry c1
Fe 0.0 0.0 0.0
}

set {
scf_type pk
basis def2-tzvpp
reference rohf
restricted_docc [ 9 ]
active [ 6 ]
guess core
}
set s 5
set mcscf_e_convergence 1e-8
cas_e, cas_wfn = energy(‘casscf’, return_wfn=True)
molden(‘test’, cas_wfn)

thank you for the help

I switched the input to be more inline with other calls of the nature. Please pass the Wavefunction first.

Cheers,
Daniel

Dear Daniel,

The molden file didn’t show up while setting as

cas_e, cas_wfn = energy(‘casscf’, return_wfn=True)
molden(cas_wfn, ‘test’)

instead I got these messages in my output file.

!Molden warning: This wavefunction does not have occupation numbers.
Writing zero’s for occupation numbers

I’ve tried to look driver.py but couldn’t find how to do it…

could you give me more detailed information please?

That is just a warning message detailing that the occupation numbers are not available. The Molden file is still written to the file “test”. This works fine on my laptop, can you give more details on how you are running Psi?