@@ -84,18 +84,24 @@ def main():
8484
8585 overlap = P @ overlap @ P .T
8686
87- fig , ax = plt .subplots (1 ,1 , dpi = 144 , figsize = (7 , 7 ))
87+ fig , ax = plt .subplots (1 ,1 , dpi = 300 , figsize = (5 , 5 ))
8888 plot_matrix (ax , P @ B , basislabels , symlabels )
89+ plt .tight_layout ()
90+ plt .savefig ('ethylene_symbasis.png' )
8991 plt .show ()
9092
9193 # construct new basis
94+ integrator = PyQInt ()
9295 B = P @ B
9396 cgfs_symad = [CGF () for i in range (len (B ))]
9497 for i in range (len (B )): # loop over new basis functions
9598 for j in range (len (cgfs )): # loop over old basis functions
9699 if abs (B [i ,j ]) > 0.01 : # verify non-negligble contribution
97100 for g in cgfs [j ].gtos :
98101 cgfs_symad [i ].gtos .append (GTO (g .c * B [i ,j ], g .p , g .alpha , g .l , g .m , g .n ))
102+ S = integrator .overlap (cgfs_symad [i ], cgfs_symad [i ])
103+ for g in cgfs_symad [i ].gtos :
104+ g .c /= np .sqrt (S )
99105
100106 # re-perform Hartree-Fock calculation using the symmetry adapted basis
101107 res = HF ().rhf (mol , cgfs_symad , verbose = True )
@@ -111,7 +117,8 @@ def plot_matrix(ax, mat, xlabels, ylabels, xlabelrot = 0):
111117 """
112118 Produce plot of matrix
113119 """
114- mv = np .max (np .abs (mat ))
120+ #mv = np.max(np.abs(mat))
121+ mv = 1
115122 ax .imshow (mat , vmin = - mv , vmax = mv , cmap = 'PiYG' )
116123 for i in range (mat .shape [0 ]):
117124 for j in range (mat .shape [1 ]):
0 commit comments