forked from NASymmetry/MolSym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnate_sand.py
47 lines (40 loc) · 1.41 KB
/
nate_sand.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import psi4
import numpy as np
from input import Settings
import molsym
from molsym import Molecule
from molsym.salcs.RSH_SALCs import Project
def qc(molecule):
qc_obj = {
"symbols": [molecule.symbol(x) for x in range(0, molecule.natom())] ,
"geometry": molecule.geometry(),
}
return qc_obj
molecule = psi4.geometry(Settings['molecule'])
molecule.update_geometry()
ndocc = Settings['nalpha'] #Settings['nbeta']
scf_max_iter = Settings['scf_max_iter']
schema = qc(molecule)
mol = Molecule.from_schema(schema)
mol = molsym.symmetrize(mol)
symtext = molsym.Symtext.from_molecule(mol)
mole = symtext.mol
molecule.set_geometry(psi4.core.Matrix.from_array(symtext.mol.coords))
print("updated psi4 mol")
print(symtext.pg)
basis = psi4.core.BasisSet.build(molecule, 'BASIS', Settings['basis'], puream=True)
Enuc = molecule.nuclear_repulsion_energy()
ints = psi4.core.MintsHelper(basis)
#symtext = molsym.Symtext.from_molecule(mol)
#bset = [[0,0,1],[0],[0],[0]]
bset = molsym.salcs.RSH_SALCs.get_basis(molecule,basis)[0]
coords = molsym.salcs.SphericalHarmonics(symtext, bset)
my_salcs = molsym.salcs.ProjectionOp(symtext, coords)
#print(my_salcs.basis_transformation_matrix)
#guess = 'core'
#guess = 'gwh'
salcs, irreplength, reorder_psi4 = molsym.salcs.RSH_SALCs.Project(mole, molecule, basis, symtext)
print(irreplength)
np.set_printoptions(precision=9, threshold=np.inf)
for salc in salcs:
print(salc.lcao)