From: <ate...@us...> - 2006-05-16 18:21:59
|
Revision: 120 Author: atenderholt Date: 2006-05-16 11:21:53 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=120&view=rev Log Message: ----------- Changed nindep to nmo. Gaussian and GAMESS pass the unittests. SCF stuff is still broken in ADF, and Jaguar is very incomplete. Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py trunk/src/cclib/parser/g03parser.py trunk/src/cclib/parser/gamessparser.py trunk/src/cclib/parser/logfileparser.py trunk/test/testSP.py trunk/test/testSPun.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-05-16 17:01:46 UTC (rev 119) +++ trunk/src/cclib/parser/adfparser.py 2006-05-16 18:21:53 UTC (rev 120) @@ -472,16 +472,16 @@ # # if line[1:7]=="NBsUse": # # Extract the number of linearly-independent basis sets -# nindep = int(line.split('=')[1].split()[0]) -# if hasattr(self,"nindep"): -# assert nindep==self.nindep +# nmo = int(line.split('=')[1].split()[0]) +# if hasattr(self,"nmo"): +# assert nmo==self.nmo # else: -# self.nindep = nindep -# self.logger.info("Creating attribute nindep: %d" % self.nindep) +# self.nmo = nmo +# self.logger.info("Creating attribute nmo: %d" % self.nmo) # # if line[7:22]=="basis functions,": # # For AM1 calculations, set nbasis by a second method -# # (nindep may not always be explicitly stated) +# # (nmo may not always be explicitly stated) # nbasis = int(line.split()[0]) # if hasattr(self,"nbasis"): # assert nbasis==self.nbasis @@ -609,15 +609,15 @@ # if line[5:40]=="Beta Molecular Orbital Coefficients": # beta = True # # Need to add an extra dimension to self.mocoeffs -# self.mocoeffs = Numeric.resize(self.mocoeffs,(2,nindep,nbasis)) +# self.mocoeffs = Numeric.resize(self.mocoeffs,(2,nmo,nbasis)) # else: # beta = False # self.logger.info("Creating attributes aonames[], mocoeffs[][]") # self.aonames = [] -# self.mocoeffs = Numeric.zeros((1,nindep,nbasis),"float") +# self.mocoeffs = Numeric.zeros((1,nmo,nbasis),"float") # # base = 0 -# for base in range(0,nindep,5): +# for base in range(0,nmo,5): # # if self.progress: # step=inputfile.tell() @@ -656,7 +656,7 @@ if hasattr(self,"scfenergies"): self.scfenergies = Numeric.array(self.scfenergies,"f") if hasattr(self,"scfvalues"): self.scfvalues = [Numeric.array(x,"f") for x in self.scfvalues] self.parsed = True - if hasattr(self,"moenergies"): self.nindep = len(self.moenergies[0]) + if hasattr(self,"moenergies"): self.nmo = len(self.moenergies[0]) Modified: trunk/src/cclib/parser/g03parser.py =================================================================== --- trunk/src/cclib/parser/g03parser.py 2006-05-16 17:01:46 UTC (rev 119) +++ trunk/src/cclib/parser/g03parser.py 2006-05-16 18:21:53 UTC (rev 120) @@ -445,16 +445,16 @@ if line[1:7]=="NBsUse": # Extract the number of linearly-independent basis sets - nindep = int(line.split('=')[1].split()[0]) - if hasattr(self,"nindep"): - assert nindep==self.nindep + nmo = int(line.split('=')[1].split()[0]) + if hasattr(self,"nmo"): + assert nmo==self.nmo else: - self.nindep = nindep - self.logger.info("Creating attribute nindep: %d" % self.nindep) + self.nmo = nmo + self.logger.info("Creating attribute nmo: %d" % self.nmo) if line[7:22]=="basis functions,": # For AM1 calculations, set nbasis by a second method -# (nindep may not always be explicitly stated) +# (nmo may not always be explicitly stated) nbasis = int(line.split()[0]) if hasattr(self,"nbasis"): assert nbasis==self.nbasis @@ -497,15 +497,15 @@ if line[5:40]=="Beta Molecular Orbital Coefficients": beta = True # Need to add an extra dimension to self.mocoeffs - self.mocoeffs = Numeric.resize(self.mocoeffs,(2,nindep,nbasis)) + self.mocoeffs = Numeric.resize(self.mocoeffs,(2,nmo,nbasis)) else: beta = False self.logger.info("Creating attributes aonames[], mocoeffs[][]") self.aonames = [] - self.mocoeffs = Numeric.zeros((1,nindep,nbasis),"float") + self.mocoeffs = Numeric.zeros((1,nmo,nbasis),"float") base = 0 - for base in range(0,nindep,5): + for base in range(0,nmo,5): if self.progress: step=inputfile.tell() Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-05-16 17:01:46 UTC (rev 119) +++ trunk/src/cclib/parser/gamessparser.py 2006-05-16 18:21:53 UTC (rev 120) @@ -236,12 +236,12 @@ self.logger.info("Creating attributes moenergies, mosyms") self.moenergies = [[]] self.mosyms = [[]] - if not hasattr(self,"nindep"): - self.logger.info("Creating attribute nindep with default value") - self.nindep = self.nbasis - self.mocoeffs = Numeric.zeros((1,self.nindep,self.nbasis),"f") + if not hasattr(self,"nmo"): + self.logger.info("Creating attribute nmo with default value") + self.nmo = self.nbasis + self.mocoeffs = Numeric.zeros((1,self.nmo,self.nbasis),"f") line = inputfile.next() - for base in range(0,self.nindep,5): + for base in range(0,self.nmo,5): blank = inputfile.next() line = inputfile.next() # Eigenvector no line = inputfile.next() @@ -273,12 +273,12 @@ # # 1 2 3 4 5 - self.mocoeffs.resize((2,self.nindep,self.nbasis)) + self.mocoeffs.resize((2,self.nmo,self.nbasis)) self.moenergies.append([]) self.mosyms.append([]) for i in range(5): line = inputfile.next() - for base in range(0,self.nindep,5): + for base in range(0,self.nmo,5): blank = inputfile.next() line = inputfile.next() # Eigenvector no line = inputfile.next() @@ -315,7 +315,7 @@ elif line.find("TOTAL NUMBER OF MOS IN VARIATION SPACE")==1: # Note that this line is not always present, so by default # NBsUse is set equal to NBasis (see below). - self.logger.info("Creating attribute nindep") + self.logger.info("Creating attribute nmo") self.indep = int(line.split()[-1]) elif line.find("OVERLAP MATRIX")==0 or line.find("OVERLAP MATRIX")==1: @@ -351,9 +351,9 @@ if hasattr(self,"scfvalues"): self.scfvalues = [Numeric.array(x,"f") for x in self.scfvalues] if hasattr(self,"geovalues"): self.geovalues = Numeric.array(self.geovalues,"f") - if not hasattr(self,"nindep"): - self.logger.info("Creating attribute nindep with default value") - self.nindep = self.nbasis + if not hasattr(self,"nmo"): + self.logger.info("Creating attribute nmo with default value") + self.nmo = self.nbasis self.parsed = True Modified: trunk/src/cclib/parser/logfileparser.py =================================================================== --- trunk/src/cclib/parser/logfileparser.py 2006-05-16 17:01:46 UTC (rev 119) +++ trunk/src/cclib/parser/logfileparser.py 2006-05-16 18:21:53 UTC (rev 120) @@ -72,7 +72,7 @@ mosyms -- orbital symmetries (list[2]) natom -- number of atoms (integer) nbasis -- number of basis functions (integer) - nindep -- number of linearly-independent basis functions (integer) + nmo -- number of linearly-independent basis functions (integer) scfenergies -- the electronic energy of the molecule (array[1], a.u.) scftargets -- targets for convergence of the SCF (array[1]) scfvalues -- current values for convergence of the SCF (array[2], same units as scftargets) Modified: trunk/test/testSP.py =================================================================== --- trunk/test/testSP.py 2006-05-16 17:01:46 UTC (rev 119) +++ trunk/test/testSP.py 2006-05-16 18:21:53 UTC (rev 120) @@ -10,8 +10,8 @@ self.assertEquals(self.data.aooverlaps.shape,(self.data.nbasis,self.data.nbasis)) def testdimmocoeffs(self): - """Are the dimensions of mocoeffs equal to 1 x nindep x nbasis?""" - self.assertEquals(self.data.mocoeffs.shape,(1,self.data.nindep,self.data.nbasis)) + """Are the dimensions of mocoeffs equal to 1 x nmo x nbasis?""" + self.assertEquals(self.data.mocoeffs.shape,(1,self.data.nmo,self.data.nbasis)) class GaussianSPTest(GenericSPTest): def setUp(self): Modified: trunk/test/testSPun.py =================================================================== --- trunk/test/testSPun.py 2006-05-16 17:01:46 UTC (rev 119) +++ trunk/test/testSPun.py 2006-05-16 18:21:53 UTC (rev 120) @@ -10,8 +10,8 @@ self.assertEquals(self.data.aooverlaps.shape,(self.data.nbasis,self.data.nbasis)) def testdimmocoeffs(self): - """Are the dimensions of mocoeffs equal to 1 x nindep x nbasis?""" - self.assertEquals(self.data.mocoeffs.shape,(2,self.data.nindep,self.data.nbasis)) + """Are the dimensions of mocoeffs equal to 1 x nmo x nbasis?""" + self.assertEquals(self.data.mocoeffs.shape,(2,self.data.nmo,self.data.nbasis)) def testhomos(self): """What are the homos?""" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |