This list is closed, nobody may subscribe to it.
2006 |
Jan
|
Feb
|
Mar
(34) |
Apr
(46) |
May
(61) |
Jun
(32) |
Jul
(37) |
Aug
(55) |
Sep
(25) |
Oct
(44) |
Nov
(28) |
Dec
(23) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(27) |
Feb
(71) |
Mar
(55) |
Apr
(10) |
May
(18) |
Jun
(32) |
Jul
(36) |
Aug
(33) |
Sep
(25) |
Oct
(21) |
Nov
(22) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(9) |
Jul
(10) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(6) |
Mar
|
Apr
(5) |
May
|
Jun
(1) |
Jul
(17) |
Aug
|
Sep
(1) |
Oct
(10) |
Nov
(2) |
Dec
|
2010 |
Jan
(2) |
Feb
(6) |
Mar
(7) |
Apr
(14) |
May
|
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
(5) |
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
(6) |
Feb
|
Mar
(10) |
Apr
(9) |
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(11) |
May
|
Jun
|
Jul
(7) |
Aug
|
Sep
|
Oct
(18) |
Nov
(22) |
Dec
(6) |
2013 |
Jan
|
Feb
(21) |
Mar
(3) |
Apr
(3) |
May
|
Jun
(2) |
Jul
(1) |
Aug
(5) |
Sep
(4) |
Oct
(1) |
Nov
(11) |
Dec
(4) |
From: <bao...@us...> - 2006-06-18 15:24:22
|
Revision: 219 Author: baoilleach Date: 2006-06-18 08:24:17 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=219&view=rev Log Message: ----------- Implemented pylint recommendations on spacing Modified Paths: -------------- trunk/src/cclib/parser/jaguarparser.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-18 14:55:18
|
Revision: 218 Author: baoilleach Date: 2006-06-18 07:55:07 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=218&view=rev Log Message: ----------- Setting the svn:keywords property of all of these Python files to 'Rev' Property Changed: ---------------- trunk/src/cclib/parser/__init__.py trunk/src/cclib/parser/adfparser.py trunk/src/cclib/parser/gamessparser.py trunk/src/cclib/parser/gaussianparser.py trunk/src/cclib/parser/jaguarparser.py trunk/src/cclib/parser/logfileparser.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-18 14:53:55
|
Revision: 217 Author: baoilleach Date: 2006-06-18 07:53:43 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=217&view=rev Log Message: ----------- Implemented all pylint recommmendations on spacing Modified Paths: -------------- trunk/src/cclib/parser/gamessparser.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-18 14:40:21
|
Revision: 216 Author: baoilleach Date: 2006-06-18 07:40:16 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=216&view=rev Log Message: ----------- Asking SVN to substitute the revision number in to the __revision__ variable in the source code. Property Changed: ---------------- trunk/src/cclib/parser/utils.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-18 14:39:17
|
Revision: 215 Author: baoilleach Date: 2006-06-18 07:39:09 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=215&view=rev Log Message: ----------- Implementing pylint recommendations Modified Paths: -------------- trunk/src/cclib/parser/utils.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-18 13:10:12
|
Revision: 214 Author: baoilleach Date: 2006-06-18 06:10:04 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=214&view=rev Log Message: ----------- Finished the pylint recommendations on spacing. Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-18 10:43:44
|
Revision: 213 Author: baoilleach Date: 2006-06-18 03:43:32 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=213&view=rev Log Message: ----------- More pylint style improvements Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-16 15:39:18
|
Revision: 212 Author: baoilleach Date: 2006-06-16 08:39:09 -0700 (Fri, 16 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=212&view=rev Log Message: ----------- Pylint recommended changes. Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-16 15:26:54
|
Revision: 211 Author: baoilleach Date: 2006-06-16 08:26:43 -0700 (Fri, 16 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=211&view=rev Log Message: ----------- Tidied up code formatting after looking at output of pylint Modified Paths: -------------- trunk/src/cclib/__init__.py trunk/src/cclib/parser/gaussianparser.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-15 16:01:33
|
Revision: 210 Author: baoilleach Date: 2006-06-15 09:01:15 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=210&view=rev Log Message: ----------- Doc: Updated usage info. Modified Paths: -------------- trunk/src/scripts/ccget This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-15 14:32:53
|
Revision: 209 Author: baoilleach Date: 2006-06-15 07:32:47 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=209&view=rev Log Message: ----------- Test: Adding regression tests for data files that could not be parsed. Added Paths: ----------- trunk/test/regression.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-15 14:31:22
|
Revision: 208 Author: baoilleach Date: 2006-06-15 07:31:09 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=208&view=rev Log Message: ----------- Data: Added the wrong file Added Paths: ----------- trunk/data/Gaussian/wildGaussian98/oo-LAN.out Removed Paths: ------------- trunk/data/Gaussian/wildGaussian98/oo-lan.dat This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-15 14:20:31
|
Revision: 207 Author: baoilleach Date: 2006-06-15 07:20:16 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=207&view=rev Log Message: ----------- Data: Example PCGAMESS file from AOMIX examples (available on web). Broke parser: fixed by r184 Added Paths: ----------- trunk/data/GAMESS/wildPCGAMESS/ trunk/data/GAMESS/wildPCGAMESS/gamess.log This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-15 14:16:19
|
Revision: 206 Author: baoilleach Date: 2006-06-15 07:16:05 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=206&view=rev Log Message: ----------- Data: Supplied by Joe Townsend. Different syntax for scftargets as it's as an earlier version of GAMESS. Added Paths: ----------- trunk/data/GAMESS/wildGAMESS-US/ trunk/data/GAMESS/wildGAMESS-US/bv6010sup1molecule_4.inp.cml_.log This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-06-15 14:11:27
|
Revision: 205 Author: baoilleach Date: 2006-06-15 07:11:13 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=205&view=rev Log Message: ----------- Data: Gaussian98 file from AOMIX examples (available on the web). Broke the parser as there are fewer scftargets in Gaussian98. Added Paths: ----------- trunk/data/Gaussian/wildGaussian98/ trunk/data/Gaussian/wildGaussian98/oo-lan.dat This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-05-27 08:24:28
|
Revision: 163 Author: baoilleach Date: 2006-05-27 01:24:22 -0700 (Sat, 27 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=163&view=rev Log Message: ----------- Sped up the tests 70 times or so, by avoiding re-parsing the file for every test. There's no built-in way to avoid reinitialising using the unittest framework, so you have to figure out a way yourself. Modified Paths: -------------- trunk/test/testGeoOpt.py trunk/test/testSP.py trunk/test/testSPun.py Modified: trunk/test/testGeoOpt.py =================================================================== --- trunk/test/testGeoOpt.py 2006-05-27 07:58:33 UTC (rev 162) +++ trunk/test/testGeoOpt.py 2006-05-27 08:24:22 UTC (rev 163) @@ -70,19 +70,19 @@ class GaussianGeoOptTest(GenericGeoOptTest): def setUp(self): - self.data = getfile(Gaussian,"basicGaussian03","dvb_gopt.out") + self.data = data[0] class GamessUSGeoOptTest(GenericGeoOptTest): def setUp(self): - self.data = getfile(GAMESS,"basicGAMESS-US","dvb_gopt_a.out") + self.data = data[2] class PCGamessGeoOptTest(GenericGeoOptTest): def setUp(self): - self.data = getfile(GAMESS,"basicPCGAMESS","dvb_gopt_a.out") - + self.data = data[1] + class ADFGeoOptTest(GenericGeoOptTest): def setUp(self): - self.data = getfile(ADF,"basicADF2004.01","dvb_gopt_b.adfout") + self.data = data[3] def testscfvaluedim(self): """Do the scf values have the right dimensions? @@ -100,12 +100,18 @@ class JaguarGeoOptTest(GenericGeoOptTest): def setUp(self): - self.data = getfile(Jaguar,"basicJaguar","eg01","dvb_gopt_b.out") + self.data = data[4] + names = [ "Gaussian", "PCGamess", "GAMESS", "ADF", "Jaguar" ] tests = [ GaussianGeoOptTest, PCGamessGeoOptTest, GamessUSGeoOptTest, ADFGeoOptTest, JaguarGeoOptTest ] +data = [ getfile(Gaussian,"basicGaussian03","dvb_gopt.out"), + getfile(GAMESS,"basicPCGAMESS","dvb_gopt_a.out"), + getfile(GAMESS,"basicGAMESS-US","dvb_gopt_a.out"), + getfile(ADF,"basicADF2004.01","dvb_gopt_b.adfout"), + getfile(Jaguar,"basicJaguar","eg01","dvb_gopt_b.out") ] if __name__=="__main__": total = errors = failures = 0 Modified: trunk/test/testSP.py =================================================================== --- trunk/test/testSP.py 2006-05-27 07:58:33 UTC (rev 162) +++ trunk/test/testSP.py 2006-05-27 08:24:22 UTC (rev 163) @@ -19,19 +19,19 @@ class GaussianSPTest(GenericSPTest): def setUp(self): - self.data = getfile(Gaussian,"basicGaussian03","dvb_sp.out") + self.data = data[0] class GamessUSSPTest(GenericSPTest): def setUp(self): - self.data = getfile(GAMESS,"basicGAMESS-US","dvb_sp.out") + self.data = data[1] class PCGamessSPTest(GenericSPTest): def setUp(self): - self.data = getfile(GAMESS,"basicPCGAMESS","dvb_sp.out") + self.data = data[2] class ADFSPTest(GenericSPTest): def setUp(self): - self.data = getfile(ADF,"basicADF2004.01","dvb_sp_b.adfout") + self.data = data[3] def testdimaooverlaps(self): """Are the dims of the overlap matrix consistent with nbasis?""" @@ -41,6 +41,10 @@ names = [ "Gaussian", "PCGamess", "GAMESS", "ADF", "Jaguar" ] tests = [ GaussianSPTest, PCGamessSPTest, GamessUSSPTest, ADFSPTest ] +data = [getfile(Gaussian,"basicGaussian03","dvb_sp.out"), + getfile(GAMESS,"basicGAMESS-US","dvb_sp.out"), + getfile(GAMESS,"basicPCGAMESS","dvb_sp.out"), + getfile(ADF,"basicADF2004.01","dvb_sp_b.adfout")] if __name__=="__main__": total = errors = failures = 0 Modified: trunk/test/testSPun.py =================================================================== --- trunk/test/testSPun.py 2006-05-27 07:58:33 UTC (rev 162) +++ trunk/test/testSPun.py 2006-05-27 08:24:22 UTC (rev 163) @@ -22,19 +22,19 @@ class GaussianSPunTest(GenericSPunTest): def setUp(self): - self.data = getfile(Gaussian,"basicGaussian03","dvb_un_sp.out") + self.data = data[0] class GamessUSSPunTest(GenericSPunTest): def setUp(self): - self.data = getfile(GAMESS,"basicGAMESS-US","dvb_un_sp.out") + self.data = data[1] class PCGamessSPunTest(GenericSPunTest): def setUp(self): - self.data = getfile(GAMESS,"basicPCGAMESS","dvb_un_sp.out") + self.data = data[2] class ADFSPunTest(GenericSPunTest): def setUp(self): - self.data = getfile(ADF,"basicADF2004.01","dvb_un_sp.adfout") + self.data = data[3] def testdimaooverlaps(self): """Are the dims of the overlap matrix consistent with nbasis?""" @@ -45,6 +45,10 @@ names = [ "Gaussian", "PCGamess", "GAMESS", "ADF" ] tests = [ GaussianSPunTest, PCGamessSPunTest, GamessUSSPunTest, ADFSPunTest ] +data = [ getfile(Gaussian,"basicGaussian03","dvb_un_sp.out"), + getfile(GAMESS,"basicGAMESS-US","dvb_un_sp.out"), + getfile(GAMESS,"basicPCGAMESS","dvb_un_sp.out"), + getfile(ADF,"basicADF2004.01","dvb_un_sp.adfout") ] if __name__=="__main__": total = errors = failures = 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-05-27 07:58:43
|
Revision: 162 Author: baoilleach Date: 2006-05-27 00:58:33 -0700 (Sat, 27 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=162&view=rev Log Message: ----------- Jaguar parser now reads scftargets and values correctly, at least for geometry optimisations. Have also converted scfenergies to eV. The GeoOpt test now looks at dvb_gopt_b, which has all of the virtual orbitals included, instead of dvb_gopt Modified Paths: -------------- trunk/src/cclib/parser/jaguarparser.py trunk/test/testGeoOpt.py Modified: trunk/src/cclib/parser/jaguarparser.py =================================================================== --- trunk/src/cclib/parser/jaguarparser.py 2006-05-26 18:45:47 UTC (rev 161) +++ trunk/src/cclib/parser/jaguarparser.py 2006-05-27 07:58:33 UTC (rev 162) @@ -50,6 +50,8 @@ inputfile.seek(0) self.progress.initialize(nstep) oldstep=0 + + geoopt = False # Is this a GeoOpt? Needed for SCF targets/values. for line in inputfile: @@ -64,8 +66,12 @@ # Get SCF convergence information if not hasattr(self,"scfvalues"): self.scfvalues = [] - self.logger.info("Creating attribute: scfvalues") - values = [] + self.logger.info("Creating attribute: scfvalues,scftargets") + self.scftargets = Numeric.array([5E-5,5E-6],"f") + if not geoopt: + values = [[],[]] + else: + values = [[]] while line[0:4]=="etot": if line[39:47].strip(): denergy = float(line[39:47]) @@ -74,7 +80,11 @@ # or should we just ignore the values in this line ddensity = float(line[48:56]) maxdiiserr = float(line[57:65]) - values.append([denergy,ddensity,maxdiiserr]) + if not geoopt: + values[0].append(denergy) + values[1].append(ddensity) + else: + values[0].append(ddensity) line = inputfile.next() self.scfvalues.append(values) @@ -84,7 +94,7 @@ self.logger.info("Creating attribute scfenergies") self.scfenergies = [] temp = line.strip().split() - self.scfenergies.append(float(temp[temp.index("hartrees")-1])) + self.scfenergies.append(utils.convertor(float(temp[temp.index("hartrees")-1]),"hartree","eV")) if line[2:14]=="new geometry" or line[1:21]=="Symmetrized geometry": # Get the atom coordinates @@ -107,6 +117,14 @@ self.atomnos = Numeric.array(atomnos,"i") self.natom = len(atomcoords) + if not geoopt and line[2:24]=="start of program geopt": + geoopt = True + if hasattr(self,"scfvalues"): + # Need to keep only the RMS density change info + # if this is a geoopt + self.scfvalues[0] = [self.scfvalues[0][1]] + self.scftargets = self.scftargets[0] + if line[2:28]=="geometry optimization step": # Get Geometry Opt convergence information if not hasattr(self,"geovalues"): @@ -187,8 +205,8 @@ inputfile.close() -## if hasattr(self,"scfvalues"): -## self.scfvalues = Numeric.array(self.scfvalues,"f") + if hasattr(self,"scfvalues"): + self.scfvalues = [Numeric.array(x,"f") for x in self.scfvalues] if hasattr(self,"scfenergies"): self.scfenergies = Numeric.array(self.scfenergies,"f") if hasattr(self,"atomcoords"): Modified: trunk/test/testGeoOpt.py =================================================================== --- trunk/test/testGeoOpt.py 2006-05-26 18:45:47 UTC (rev 161) +++ trunk/test/testGeoOpt.py 2006-05-27 07:58:33 UTC (rev 162) @@ -33,7 +33,6 @@ coords = self.data.atomcoords self.assertEquals(len(self.data.geovalues),len(coords),"len(atomcoords) is %d but len(geovalues) is %d" % (len(coords),len(self.data.geovalues))) - def testnatom(self): """Is the number of atoms equal to 20?""" self.assertEquals(self.data.natom,20) @@ -101,7 +100,7 @@ class JaguarGeoOptTest(GenericGeoOptTest): def setUp(self): - self.data = getfile(Jaguar,"basicJaguar","eg01","dvb_gopt.out") + self.data = getfile(Jaguar,"basicJaguar","eg01","dvb_gopt_b.out") names = [ "Gaussian", "PCGamess", "GAMESS", "ADF", "Jaguar" ] tests = [ GaussianGeoOptTest, PCGamessGeoOptTest, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-05-26 18:46:08
|
Revision: 161 Author: baoilleach Date: 2006-05-26 11:45:47 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=161&view=rev Log Message: ----------- Added some basic geoopt parsing for Jaguar. Coordinates, atomnos and natom. Corrected 'typo' in testGeoOpt.py Modified Paths: -------------- trunk/src/cclib/parser/jaguarparser.py trunk/test/testGeoOpt.py Modified: trunk/src/cclib/parser/jaguarparser.py =================================================================== --- trunk/src/cclib/parser/jaguarparser.py 2006-05-26 17:33:53 UTC (rev 160) +++ trunk/src/cclib/parser/jaguarparser.py 2006-05-26 18:45:47 UTC (rev 161) @@ -86,25 +86,49 @@ temp = line.strip().split() self.scfenergies.append(float(temp[temp.index("hartrees")-1])) + if line[2:14]=="new geometry" or line[1:21]=="Symmetrized geometry": +# Get the atom coordinates + if not hasattr(self,"atomcoords"): + self.logger.info("Creating attributes: atomcoords, atomnos, natom") + self.atomcoords = [] + p = re.compile("(\D+)\d+") # One/more letters followed by a number + atomcoords = [] + atomnos = [] + angstrom = inputfile.next() + title = inputfile.next() + line = inputfile.next() + while line.strip(): + temp = line.split() + element = p.findall(temp[0])[0] + atomnos.append(self.table.number[element]) + atomcoords.append(map(float,temp[1:])) + line = inputfile.next() + self.atomcoords.append(atomcoords) + self.atomnos = Numeric.array(atomnos,"i") + self.natom = len(atomcoords) + if line[2:28]=="geometry optimization step": # Get Geometry Opt convergence information if not hasattr(self,"geovalues"): self.geovalues = [] - self.geotargets = Numeric.zeros(4,"float") - self.logger.info("Creating attributes: geovalues,geotargets") + geotargets = Numeric.zeros(4,"f") + i = 0 + self.logger.info("Creating attributs: geovalues,geotargets") blank = inputfile.next() blank = inputfile.next() line = inputfile.next() - i = 0 values = [] while line!=blank: if line[41]=="(": # A new geo convergence value values.append(float(line[26:37])) - self.geotargets[i] = float(line[43:54]) - i+=1 + if not hasattr(self,"geotargets"): + geotargets[i] = float(line[43:54]) + i += 1 line = inputfile.next() self.geovalues.append(values) + if not hasattr(self,"geotargets"): + self.geotargets = geotargets if line[2:33]=="Orbital energies/symmetry label": # Get MO Energies and symmetrys @@ -167,6 +191,8 @@ ## self.scfvalues = Numeric.array(self.scfvalues,"f") if hasattr(self,"scfenergies"): self.scfenergies = Numeric.array(self.scfenergies,"f") + if hasattr(self,"atomcoords"): + self.atomcoords = Numeric.array(self.atomcoords,"f") self.parsed = True if __name__=="__main__": Modified: trunk/test/testGeoOpt.py =================================================================== --- trunk/test/testGeoOpt.py 2006-05-26 17:33:53 UTC (rev 160) +++ trunk/test/testGeoOpt.py 2006-05-26 18:45:47 UTC (rev 161) @@ -15,7 +15,7 @@ def testatomcoords(self): """Are atomcoords consistent with natom and Angstroms?""" coords = self.data.atomcoords - self.assertEquals(self.data.natom,len(coords[0]),"len(atomcoords[0]) is %d but natom is %d" % (self.data.natom,len(coords[0]))) + self.assertEquals(self.data.natom,len(coords[0]),"natom is %d but len(atomcoords[0]) is %d" % (self.data.natom,len(coords[0]))) # Find the minimum distance between two C atoms mindist = 999 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-05-24 19:43:47
|
Revision: 157 Author: baoilleach Date: 2006-05-24 12:43:41 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=157&view=rev Log Message: ----------- homos parsed correctly for both restricted and unrestricted calculations. Modified Paths: -------------- trunk/src/cclib/parser/gamessparser.py Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-05-24 19:16:00 UTC (rev 156) +++ trunk/src/cclib/parser/gamessparser.py 2006-05-24 19:43:41 UTC (rev 157) @@ -379,9 +379,22 @@ if line.find("NUMBER OF OCCUPIED ORBITALS")>=0: if not hasattr(self,"homos"): self.logger.info("Creating attribute homos") - temp = line.strip().split('=') - self.homos = Numeric.array([int(temp[-1])-1],"i") + homos = [int(line.split()[-1])-1] + line = inputfile.next() + homos.append(int(line.split()[-1])-1) + # Note that we cannot trust this self.homos until we come to + # a line that contains the phrase: + # "SYMMETRIES FOR INITAL GUESS ORBITALS FOLLOW" + # which either is followed by "ALPHA" or "BOTH" + # at which point we can say for certain that it is an + # un/restricted calculations + self.homos = Numeric.array(homos,"i") + if line.find("SYMMETRIES FOR INITIAL GUESS ORBITALS FOLLOW")>=0: + # Not unrestricted, so lop off the second index + if line.find("BOTH SET(S)")>=0: + self.homos = Numeric.resize(self.homos,[1]) + if line.find("TOTAL NUMBER OF ATOMS")==1: self.logger.info("Creating attribute natom") self.natom = int(line.split()[-1]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-05-24 19:16:12
|
Revision: 156 Author: baoilleach Date: 2006-05-24 12:16:00 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=156&view=rev Log Message: ----------- The typecode of homos is 'i', which needed to be specified in the tests and in the parsers Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py trunk/test/testGeoOpt.py trunk/test/testSPun.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-05-24 18:20:44 UTC (rev 155) +++ trunk/src/cclib/parser/adfparser.py 2006-05-24 19:16:00 UTC (rev 156) @@ -285,7 +285,7 @@ temp=Numeric.array(self.moenergies,"f") self.moenergies=temp - self.homos=Numeric.array(self.homos) + self.homos=Numeric.array(self.homos,"i") if line[1:24]=="List of All Frequencies": # Start of the IR/Raman frequency section Modified: trunk/test/testGeoOpt.py =================================================================== --- trunk/test/testGeoOpt.py 2006-05-24 18:20:44 UTC (rev 155) +++ trunk/test/testGeoOpt.py 2006-05-24 19:16:00 UTC (rev 156) @@ -1,16 +1,16 @@ import os import math +import Numeric import unittest import bettertest -from Numeric import array from testall import getfile from cclib.parser import ADF, GAMESS, Gaussian, Jaguar class GenericGeoOptTest(bettertest.TestCase): def testhomos(self): """Is the index of the homo equal to 34?""" - self.assertArrayEquals(self.data.homos,array([34]),"%s != array([34])" % self.data.homos) + self.assertArrayEquals(self.data.homos,Numeric.array([34],"i"),"%s != array([34],'i')" % Numeric.array_repr(self.data.homos)) def testatomcoords(self): """Are atomcoords consistent with natom and Angstroms?""" @@ -62,7 +62,7 @@ def testscfvaluetype(self): """Do the scf values have the right type?""" self.assertEquals(type(self.data.scfvalues),type([])) - self.assertEquals(type(self.data.scfvalues[0]),type(array([]))) + self.assertEquals(type(self.data.scfvalues[0]),type(Numeric.array([]))) def testscfvaluedim(self): """Do the scf values have the right dimensions?""" Modified: trunk/test/testSPun.py =================================================================== --- trunk/test/testSPun.py 2006-05-24 18:20:44 UTC (rev 155) +++ trunk/test/testSPun.py 2006-05-24 19:16:00 UTC (rev 156) @@ -1,9 +1,12 @@ -import os, unittest -from Numeric import array +import os +import unittest +import bettertest +import Numeric + from testall import getfile from cclib.parser import ADF, GAMESS, Gaussian, Jaguar -class GenericSPunTest(unittest.TestCase): +class GenericSPunTest(bettertest.TestCase): """Restricted single point calculations with MO coeffs and overlap info.""" def testdimaooverlaps(self): """Are the dims of the overlap matrix consistent with nbasis?""" @@ -14,9 +17,8 @@ self.assertEquals(self.data.mocoeffs.shape,(2,self.data.nmo,self.data.nbasis)) def testhomos(self): - """What are the homos?""" - self.assertEquals(type(self.data.homos),type(array([]))) - self.assertEquals(self.data.homos,array([34,33],"i")) + """Are the homos correct?""" + self.assertArrayEquals(self.data.homos,Numeric.array([34,33],"i"),"%s != array([34,33],'i')" % Numeric.array_repr(self.data.homos)) class GaussianSPunTest(GenericSPunTest): def setUp(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-05-24 18:20:56
|
Revision: 155 Author: baoilleach Date: 2006-05-24 11:20:44 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=155&view=rev Log Message: ----------- Oops. Thanks to Adam for pointing out an error in the unittests. Apparently all tests of equality between a Numeric array and pretty much anything else return True. Looking at the web, this is a so-called beginner's mistake. In any case, I've created a special assertArrayEquals() which should be used to compare arrays instead of assertEquals. Now there are failures are over the shop...it was nicer with our heads under the sand :-) Modified Paths: -------------- trunk/test/testGeoOpt.py Added Paths: ----------- trunk/test/bettertest.py Added: trunk/test/bettertest.py =================================================================== --- trunk/test/bettertest.py (rev 0) +++ trunk/test/bettertest.py 2006-05-24 18:20:44 UTC (rev 155) @@ -0,0 +1,25 @@ +import Numeric +import unittest + +class TestCase(unittest.TestCase): + """Create a class with extra 'asserts' for testing numerical data. + + It is not possible to test equality of Numeric arrays using assertEquals(). + Instead use assertArrayEquals() defined below. + (For the original solution see: + http://mail.python.org/pipermail/python-list/2005-November/311235.html) + + Also, for testing near equality of floats use assertInside. + (Taken from Python Cookbook 2nd Ed. Recipe 8.11) + """ + def assertInside(self,first,second,error,msg=None): + """Fail if the second number isn't within a certain error of the first.""" + if not (second-error) < first < (second+error): + raise self.failureException, (msg or '%r != %r (+-%r)' % (first,second,error)) + + def assertArrayEquals(self,first,second,msg=None): + """Fails unless two Numeric arrays are identical.""" + if not (first.shape==second.shape and + first.typecode()==second.typecode() and + Numeric.alltrue(first==second)): + raise self.failureException, (msg or 'These two arrays are not identical') Property changes on: trunk/test/bettertest.py ___________________________________________________________________ Name: svn:executable + * Modified: trunk/test/testGeoOpt.py =================================================================== --- trunk/test/testGeoOpt.py 2006-05-24 01:53:21 UTC (rev 154) +++ trunk/test/testGeoOpt.py 2006-05-24 18:20:44 UTC (rev 155) @@ -1,15 +1,16 @@ import os import math import unittest +import bettertest from Numeric import array from testall import getfile from cclib.parser import ADF, GAMESS, Gaussian, Jaguar -class GenericGeoOptTest(unittest.TestCase): +class GenericGeoOptTest(bettertest.TestCase): def testhomos(self): """Is the index of the homo equal to 34?""" - self.assertEquals(self.data.homos,array([34])) + self.assertArrayEquals(self.data.homos,array([34]),"%s != array([34])" % self.data.homos) def testatomcoords(self): """Are atomcoords consistent with natom and Angstroms?""" @@ -43,7 +44,7 @@ def testscfenergy(self): """Is the SCF energy within 40eV of -10365""" - self.assert_(abs(self.data.scfenergies[-1]-(-10365))<40,"Final scf energy: %f not -10365+-40eV" % self.data.scfenergies[-1]) + self.assertInside(self.data.scfenergies[-1],-10365,40,"Final scf energy: %f not -10365+-40eV" % self.data.scfenergies[-1]) def testnormalisesym(self): """Did this subclasses overwrite normalisesym?""" @@ -60,11 +61,13 @@ def testscfvaluetype(self): """Do the scf values have the right type?""" - self.assert_(type(self.data.scfvalues[0])==type(array([])) and type(self.data.scfvalues)==type([])) + self.assertEquals(type(self.data.scfvalues),type([])) + self.assertEquals(type(self.data.scfvalues[0]),type(array([]))) def testscfvaluedim(self): """Do the scf values have the right dimensions?""" - self.assert_(len(self.data.scfvalues)==len(self.data.geovalues) and len(self.data.scfvalues[0])==len(self.data.scftargets)) + self.assertEquals(len(self.data.scfvalues),len(self.data.geovalues)) + self.assertEquals(len(self.data.scfvalues[0]),len(self.data.scftargets)) class GaussianGeoOptTest(GenericGeoOptTest): def setUp(self): @@ -94,7 +97,7 @@ def testscfenergy(self): """Is the SCF energy within 1eV of -140eV""" - self.assert_(abs(self.data.scfenergies[-1]-(-140))<1,"Final scf energy: %f not -140+-1eV" % self.data.scfenergies[-1]) + self.assertInside(self.data.scfenergies[-1],-140,1,"Final scf energy: %f not -140+-1eV" % self.data.scfenergies[-1]) class JaguarGeoOptTest(GenericGeoOptTest): def setUp(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ate...@us...> - 2006-05-24 01:53:33
|
Revision: 154 Author: atenderholt Date: 2006-05-23 18:53:21 -0700 (Tue, 23 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=154&view=rev Log Message: ----------- Fixed a minor problem in population Modified Paths: -------------- trunk/src/cclib/method/population.py Modified: trunk/src/cclib/method/population.py =================================================================== --- trunk/src/cclib/method/population.py 2006-05-23 12:23:19 UTC (rev 153) +++ trunk/src/cclib/method/population.py 2006-05-24 01:53:21 UTC (rev 154) @@ -68,7 +68,7 @@ #build list of groups of orbitals in each atom for atomresults if hasattr(self.parser,"aonames"): names=self.parser.aonames - elif hasattr(self.parser,"foonames"): + elif hasattr(self.parser,"fonames"): names=self.parser.fonames atoms=[] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-05-23 12:23:35
|
Revision: 153 Author: baoilleach Date: 2006-05-23 05:23:19 -0700 (Tue, 23 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=153&view=rev Log Message: ----------- Added a script to demonstrate the capabilities of cclib...currently not installed by setup.py. Added Paths: ----------- trunk/src/scripts/ trunk/src/scripts/ccget.py Added: trunk/src/scripts/ccget.py =================================================================== --- trunk/src/scripts/ccget.py (rev 0) +++ trunk/src/scripts/ccget.py 2006-05-23 12:23:19 UTC (rev 153) @@ -0,0 +1,58 @@ +import sys +import getopt +import logging + +from cclib.parser import guesstype + +def moreusage(): + """More detailed usage information""" + print """Usage: python ccget.py <attribute> [<attribute>] <compchemlogfile> +where <attribute> is one of the available attributes parsed by cclib +from <compchemlogfile>. +For a list of attributes parsed from the file, type: + python ccget.py --list [or -l]""" + +def usage(): + """Display usage information""" + print """Usage: python ccget.py <attribute> [<attribute>] <compchemlogfile> +Try python ccget.py --help for more information""" + + +def main(): + try: + opts, args = getopt.getopt(sys.argv[1:], "hl", ["help","list"]) + except getopt.GetoptError: + # print help information and exit: + usage() + sys.exit(2) + showattr = False + for o, a in opts: + if o in ("-h", "--help"): + moreusage() + sys.exit() + if o in ("-l", "--list"): + showattr = True + if (not showattr and len(args)<2) or (showattr and len(args)!=1): # Need at least one attribute and the filename + usage() + sys.exit() + + log = guesstype(args[-1]) + log.logger.setLevel(logging.ERROR) + log.parse() + if showattr: + print "cclib can parse the following attributes from %s:" % args[-1] + for x in ['aonames','aooveralps','atomcoords','atomnos', + 'etenergies','etoscs','etrotats','etsecs','etsyms', + 'fonames','fooverlaps','geotargets','geovalues', + 'homos','mocoeffs','moenergies','mosyms','natom','nbasis', + 'nmo','scfenergies','scftargets','scfvalues', + 'vibfreqs','vibirs','vibramans','vibsyms']: + if hasattr(log,x): + print " %s" % x + else: + for arg in args[:-1]: + print getattr(log,arg) + return log + +if __name__ == "__main__": + t = main() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-05-23 08:46:52
|
Revision: 152 Author: baoilleach Date: 2006-05-23 01:46:44 -0700 (Tue, 23 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=152&view=rev Log Message: ----------- Converted scfenergies from a.u. to eV for GAMESS and Gaussian, and updated tests. Modified Paths: -------------- trunk/src/cclib/parser/gamessparser.py trunk/src/cclib/parser/gaussianparser.py trunk/test/testGeoOpt.py Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-05-23 01:28:46 UTC (rev 151) +++ trunk/src/cclib/parser/gamessparser.py 2006-05-23 08:46:44 UTC (rev 152) @@ -140,7 +140,7 @@ # FINAL ENERGY IS -379.7594673378 AFTER 9 ITERATIONS # ...so take the number after the "IS" temp = line.split() - self.scfenergies.append(float(temp[temp.index("IS")+1])) + self.scfenergies.append(utils.convertor(float(temp[temp.index("IS")+1]),"hartree","eV")) if line.find("MAXIMUM GRADIENT")>0: if not hasattr(self,"geovalues"): Modified: trunk/src/cclib/parser/gaussianparser.py =================================================================== --- trunk/src/cclib/parser/gaussianparser.py 2006-05-23 01:28:46 UTC (rev 151) +++ trunk/src/cclib/parser/gaussianparser.py 2006-05-23 08:46:44 UTC (rev 152) @@ -201,7 +201,7 @@ if not hasattr(self,"scfenergies"): self.logger.info("Creating attribute scfenergies[]") self.scfenergies = [] - self.scfenergies.append(self.float(line.split()[4])) + self.scfenergies.append(utils.convertor(self.float(line.split()[4]),"hartree","eV")) if line[49:59]=='Converged?': # Extract Geometry convergence information Modified: trunk/test/testGeoOpt.py =================================================================== --- trunk/test/testGeoOpt.py 2006-05-23 01:28:46 UTC (rev 151) +++ trunk/test/testGeoOpt.py 2006-05-23 08:46:44 UTC (rev 152) @@ -42,8 +42,8 @@ self.assertEquals(self.data.nbasis,60) def testscfenergy(self): - """Is the SCF energy within 3eV(?) of -382.3?""" - self.assert_(self.data.scfenergies[-1]+382.3<3) + """Is the SCF energy within 40eV of -10365""" + self.assert_(abs(self.data.scfenergies[-1]-(-10365))<40,"Final scf energy: %f not -10365+-40eV" % self.data.scfenergies[-1]) def testnormalisesym(self): """Did this subclasses overwrite normalisesym?""" @@ -91,6 +91,10 @@ """Are atomcoords consistent with geovalues?""" coords = self.data.atomcoords self.assertEquals(len(self.data.geovalues),len(coords)-1,"len(atomcoords)-1 is %d but len(geovalues) is %d" % (len(coords)-1,len(self.data.geovalues))) + + def testscfenergy(self): + """Is the SCF energy within 1eV of -140eV""" + self.assert_(abs(self.data.scfenergies[-1]-(-140))<1,"Final scf energy: %f not -140+-1eV" % self.data.scfenergies[-1]) class JaguarGeoOptTest(GenericGeoOptTest): def setUp(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ate...@us...> - 2006-05-23 01:28:54
|
Revision: 151 Author: atenderholt Date: 2006-05-22 18:28:46 -0700 (Mon, 22 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=151&view=rev Log Message: ----------- Added method for mayer's bond orders. I checked it against one known result, and it seems to work. Modified Paths: -------------- trunk/src/cclib/method/__init__.py trunk/src/cclib/method/density.py Added Paths: ----------- trunk/src/cclib/method/mbo.py Modified: trunk/src/cclib/method/__init__.py =================================================================== --- trunk/src/cclib/method/__init__.py 2006-05-23 00:16:35 UTC (rev 150) +++ trunk/src/cclib/method/__init__.py 2006-05-23 01:28:46 UTC (rev 151) @@ -2,3 +2,4 @@ from cspa import CSPA from mpa import MPA from opa import OPA +from mbo import MBO Modified: trunk/src/cclib/method/density.py =================================================================== --- trunk/src/cclib/method/density.py 2006-05-23 00:16:35 UTC (rev 150) +++ trunk/src/cclib/method/density.py 2006-05-23 01:28:46 UTC (rev 151) @@ -20,14 +20,15 @@ import re,time import Numeric import random # For sometimes running the progress updater +import logging from calculationmethod import Method class Density(Method): """Calculate the density matrix""" - def __init__(self,*args): + def __init__(self,parser,progress=None,loglevel=logging.INFO,logname="Log"): # Call the __init__ method of the superclass - super(Density, self).__init__(logname="Density",*args) + super(Density, self).__init__(parser, progress,loglevel,logname) def __str__(self): """Return a string representation of the object.""" Added: trunk/src/cclib/method/mbo.py =================================================================== --- trunk/src/cclib/method/mbo.py (rev 0) +++ trunk/src/cclib/method/mbo.py 2006-05-23 01:28:46 UTC (rev 151) @@ -0,0 +1,129 @@ +""" +cclib is a parser for computational chemistry log files. + +See http://cclib.sf.net for more information. + +Copyright (C) 2006 Noel O'Boyle and Adam Tenderholt + + This program is free software; you can redistribute and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY, without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + +Contributions (monetary as well as code :-) are encouraged. +""" +import re,time +import Numeric +import random # For sometimes running the progress updater +from density import Density + +class MBO(Density): + """Calculate the density matrix""" + def __init__(self,*args): + + # Call the __init__ method of the superclass + super(MBO, self).__init__(logname="MBO",*args) + + def __str__(self): + """Return a string representation of the object.""" + return "Mayer's bond order of" % (self.parser) + + def __repr__(self): + """Return a representation of the object.""" + return 'Mayer\'s bond order("%s")' % (self.parser) + + def calculate(self,indices=None,fupdate=0.05): + """Calculate Mayer's bond orders given the results of a parser""" + + if not self.parser.parsed: + self.parser.parse() + + super(MBO,self).calculate(fupdate) + + #do we have the needed info in the parser? + if not ( hasattr(self.parser,"aooverlaps") or hasattr(self.parser,"fooverlaps")): + self.logger.error("Missing overlap matrix") + return False #let the caller of function know we didn't finish + + if not indices: +#build list of groups of orbitals in each atom for atomresults + if hasattr(self.parser,"aonames"): + names=self.parser.aonames + elif hasattr(self.parser,"foonames"): + names=self.parser.fonames + + atoms=[] + indices=[] + + name=names[0].split('_')[0] + atoms.append(name) + indices.append([0]) + + for i in range(1,len(names)): + name=names[i].split('_')[0] + try: + index=atoms.index(name) + except ValueError: #not found in atom list + atoms.append(name) + indices.append([i]) + else: + indices[index].append(i) +#done building list + + self.logger.info("Creating attribute fragresults: array[3]") + size=len(indices) + unrestricted=(len(self.parser.mocoeffs)==2) + + #determine number of steps, and whether process involves beta orbitals + PS=[] + PS.append(Numeric.matrixmultiply(self.density[0],self.parser.aooverlaps)) + nstep=size**2 #approximately quadratic in size + if unrestricted: + self.fragresults=Numeric.zeros([2,size,size],"f") + PS.append(Numeric.matrixmultiply(self.density[1],self.parser.aooverlaps)) + else: + self.fragresults=Numeric.zeros([1,size,size],"f") + + #intialize progress if available + if self.progress: + self.progress.initialize(nstep) + + step=0 + for i in range(len(indices)): + + if self.progress and random.random() < fupdate: + self.progress.update(step,"Mayer's Bond Order") + + for j in range(i+1,len(indices)): + + tempsumA=0 + tempsumB=0 + + for a in indices[i]: + + for b in indices[j]: + + tempsumA+=2*PS[0][a][b]*PS[0][b][a] + if unrestricted: + tempsumB+=2*PS[1][a][b]*PS[1][b][a] + + self.fragresults[0][i,j]=tempsumA + self.fragresults[0][j,i]=tempsumA + + if unrestricted: + self.fragresults[1][i,j]=tempsumB + self.fragresults[1][j,i]=tempsumB + + if self.progress: + self.progress.update(nstep,"Done") + + return True + +if __name__=="__main__": + import doctest,g03parser + doctest.testmod(g03parser,verbose=False) Property changes on: trunk/src/cclib/method/mbo.py ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |