# Kinetic energy matrix of mintshelper

Hi, I’m trying to study how the mintshelper works.
I could obtain kinetic energy matrix with

mints = psi4.core.MintsHelper(ini_wfn.basisset())
T = np.asarray(mints.ao_kinetic())
print T

option but want to know how to make it explicitly by using psi4numpy.
Is there any tutorial or information exist for how to do it?

Below is my input file.

import psi4
import numpy as np

psi4.core.set_output_file(‘output.dat’, False)

h2o = psi4.geometry("""
0 1
o 0.000000000000 -0.143225816552 0.000000000000
h 1.638036840407 1.136548822547 -0.000000000000
h -1.638036840407 1.136548822547 -0.000000000000
symmetry c1
“”")

psi4.set_options(
{
‘basis’: ‘STO-3G’,
‘scf_type’: ‘df’,
‘e_convergence’: 1e-8,
‘d_convergence’: 1e-6
}
)

ini_wfn = psi4.core.Wavefunction.build(h2o, psi4.core.get_global_option(‘basis’))
print “Alpha Orbital coefficient”
print ini_wfn.basisset()

mints = psi4.core.MintsHelper(ini_wfn.basisset())
S = np.asarray(mints.ao_overlap())
T = np.asarray(mints.ao_kinetic())
V = np.asarray(mints.ao_potential())

H = T + V
print “Overlap matrix”
print S
print “Kinetic matrix”
print T
print “Potential matrix”
print V
print “Core-Hamiltonian matrix”
print H

scf_e, scf_wfn = psi4.energy(‘scf’, return_wfn=True)

This is how you would do create the kinetic matrix with Psi4NumPy. Please see here for the current Psi4NumPy tutorials.

Thank you for the reply. I’ve already seen that tutorial but couldn’t find how to get kinetic energy matrix without mintshelper. I mean, wonder how to make AO basis integral explicitly with psi4numpy without using mintshelper and only with AO basis information. Sorry for the confusion.

MintsHelper is how you obtain this information. Is there a reason this is not sufficient?

MintsHelper is effectively a shell looper for one and two electron integrals. Is that you want other one electron integrals or is the object too heavy?

Yes, I want to do treat some non-trivial (may be not physically meaningful…) 1e integral term and to do so, I guess it will be a great start if I can make the same energy matrices as mintshelper did.

If its a custom integral you will have to loop over the shells and build these yourself. The following line compute the kinetic integrals for a shell pair:

You can pull Gaussian Shells out of BasisSets by using the `basis.shell(n)` function where `n` is a number. The number of shells in a basis can be obtained as `basis.nshell()`. As you can see its a fairly non-trivial task.

Thank you very much! That is what I’m looking for.