Skip to content

Commit

Permalink
small refactor of integral calculation in educational toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
tjira committed Feb 15, 2024
1 parent fd2817c commit c10609b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions education/python/resmet.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@

# load the integrals from the Psi4 package or from the files
if args.psi:
import psi4 as psi; psi.core.be_quiet()
V = np.array(psi.core.MintsHelper(psi.core.Wavefunction.build(psi.geometry(open(args.molecule).read()), args.psi)).ao_potential())
S = np.array(psi.core.MintsHelper(psi.core.Wavefunction.build(psi.geometry(open(args.molecule).read()), args.psi)).ao_overlap())
T = np.array(psi.core.MintsHelper(psi.core.Wavefunction.build(psi.geometry(open(args.molecule).read()), args.psi)).ao_kinetic())
J = np.array(psi.core.MintsHelper(psi.core.Wavefunction.build(psi.geometry(open(args.molecule).read()), args.psi)).ao_eri())
import psi4; psi4.core.be_quiet(); mintegrals = psi4.core.MintsHelper(psi4.core.Wavefunction.build(psi4.geometry(open(args.molecule).read()), args.psi))
S, T, V, J = np.array(mintegrals.ao_overlap()), np.array(mintegrals.ao_kinetic()), np.array(mintegrals.ao_potential()), np.array(mintegrals.ao_eri())
else: S, T, V = np.loadtxt(args.int[0]), np.loadtxt(args.int[1]), np.loadtxt(args.int[2]); J = np.loadtxt(args.int[3]).reshape(4 * [S.shape[1]])

# HARTREE-FOCK METHOD ==============================================================================================================================================================================
Expand Down

0 comments on commit c10609b

Please sign in to comment.