Can we get one and two integral output from scf calculation using psi4?

Yes, we can. You can do that by using MintsHelper(). Attached is an input file for PSI4, which can give you the text files of overlap integral, one-electron integral and the two-electron integral for a water molecule. I used these integrals for my calculation of total energy of water using Hartree-Fock method. It worked well for me.input4.dat (1.7 KB)

Thank you very much. I will do some try next week.

Thanks for sharing, cpjwong!

Unfortunately, it didn’t work for me. Here is the error message of psi4:

An error has occurred python-side. Traceback (most recent call last):

File “”, line 41, in

ArgumentError: Python argument types in

MintsHelper.**init**(MintsHelper)

did not match C++ signature:

**init**(P7_object, N5boost10shared_ptrIN3psi8BasisSetEEE)

What’s going wrong here?

And, more important, where can I learn this stuff? I didn’t find anything in the manual.

Best regards

Ludger

Kind of hard to see, but the error message is telling you that MintsHelper needs a basis set.

```
molecule mol {
He
}
wfn = psi4.new_wavefunction(mol)
mints = psi4.MintsHelper(wfn.basisset())
```

This kind of functionality is not fully supported at the moment. Probably the best place to learn more is the psi4numpy project.

Thanks, dgasmith.

I am missing a lot of information.

When I run

molecule mol {

He

}

set basis cc-pvtz

energy(‘scf’)

wfn = psi4.new_wavefunction(mol)

I do get an scf energy but then???

Now, I have a wafefunction. But ist doesn’t help.

Sorry, I searched the manuals but didn’t find how to access these methods and variables.

I just would like to know all the coulumb etc. integrals.

Well, SCF isn’t needed for integrals. To get both you can do the following:

```
set basis cc-pvtz
wfn, scf_e = energy('scf', return_wfn=True)
```

Here because you obtain a SCF Wavefunction you also can access orbitals like the following:

```
import numpy as np
print wfn.Ca().to_array() # Returns a numpy array.
```

Remember all of this is valid python code besides the blocks like `molecule`

and `set`

so think of it as a general programming language.

Please look at the SCF examples in Psi4Numpy, I know of no better way of learning this than those repositories.

Daniel, thanks for drawing my attention to the SCF examples in Psi4Numpy.

Now I can print the integrals using

wfn = psi4.new_wavefunction(mol, psi4.get_global_option(‘BASIS’))

mints = MintsHelper(wfn.basisset())

#Evaluation of the kinetic energy term, potential energy term, the two-electron integral and the overlap integral

T = mints.ao_kinetic()

V = mints.ao_potential()

I = mints.ao_eri()

S = mints.ao_overlap()

I have followed the above details for obtaining the one-electron and two electron integrals as a text file. However, there is a additional problem, which says that ‘module has no attribute ’ new_wavefunction’.

Can anyone please suggest me how to overcome this. ??

We are moving the Python functions around considerably. The new command is:

`wfn = psi4.core.Wavefunction.build(mol, psi4.core.get_global_option('BASIS'))`