From: <bao...@us...> - 2006-05-21 17:44:06
|
Revision: 137 Author: baoilleach Date: 2006-05-21 10:43:52 -0700 (Sun, 21 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=137&view=rev Log Message: ----------- Added test for atomcoords...but the GAMESS parsers fail...oops. Modified Paths: -------------- trunk/test/testGeoOpt.py Modified: trunk/test/testGeoOpt.py =================================================================== --- trunk/test/testGeoOpt.py 2006-05-21 14:49:18 UTC (rev 136) +++ trunk/test/testGeoOpt.py 2006-05-21 17:43:52 UTC (rev 137) @@ -1,4 +1,7 @@ -import os, unittest +import os +import math +import unittest + from Numeric import array from testall import getfile from cclib.parser import ADF, GAMESS, Gaussian, Jaguar @@ -8,6 +11,22 @@ """Is the index of the homo equal to 34?""" self.assertEquals(self.data.homos,array([34])) + def testatomcoords(self): + """Are atomcoords consistent with natom, Angstroms and geovalues?""" + 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(len(self.data.geovalues),len(coords),"len(atomcoords) is %d but len(geovalues) is % d" % (len(coords),len(self.data.geovalues))) + # Find the minimum distance between two C atoms + mindist = 999 + for i in range(self.data.natom-1): + if self.data.atomnos[i]==6: + for j in range(i+1,self.data.natom): + if self.data.atomnos[j]==6: + # Find the distance in the final iteration + dist = math.sqrt(sum((coords[-1][i]-coords[-1][j])**2)) + mindist = min(mindist,dist) + self.assert_(abs(mindist-1.34)<0.02,"Mindist is %f (not 1.34)" % mindist) + def testnatom(self): """Is the number of atoms equal to 20?""" self.assertEquals(self.data.natom,20) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2006-05-22 10:43:42
|
Revision: 141 Author: baoilleach Date: 2006-05-22 03:43:22 -0700 (Mon, 22 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=141&view=rev Log Message: ----------- Changed the test for atomcoords. The length of atomcoords should be one greater than the length of geovalues (the difference is the input coords). Modified Paths: -------------- trunk/test/testGeoOpt.py Modified: trunk/test/testGeoOpt.py =================================================================== --- trunk/test/testGeoOpt.py 2006-05-22 08:54:39 UTC (rev 140) +++ trunk/test/testGeoOpt.py 2006-05-22 10:43:22 UTC (rev 141) @@ -15,7 +15,7 @@ """Are atomcoords consistent with natom, Angstroms and geovalues?""" 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(len(self.data.geovalues),len(coords),"len(atomcoords) is %d but len(geovalues) is % d" % (len(coords),len(self.data.geovalues))) + 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))) # Find the minimum distance between two C atoms mindist = 999 for i in range(self.data.natom-1): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bao...@us...> - 2007-03-01 10:13:38
|
Revision: 556 http://svn.sourceforge.net/cclib/?rev=556&view=rev Author: baoilleach Date: 2007-03-01 02:13:35 -0800 (Thu, 01 Mar 2007) Log Message: ----------- testGeoOpt: Added sanity check to ensure that coreelectrons was being created and was set to all zeros. Modified Paths: -------------- trunk/test/testGeoOpt.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <la...@us...> - 2007-08-17 16:36:45
|
Revision: 732 http://cclib.svn.sourceforge.net/cclib/?rev=732&view=rev Author: langner Date: 2007-08-17 09:36:40 -0700 (Fri, 17 Aug 2007) Log Message: ----------- Added extracoods and extrascfs to GeoOpt unittest for comparing coords with geovalues and scfvalues with geovalues, respectively. Used for ADF and Molpro tests (fixed some more with this). Modified Paths: -------------- trunk/test/testGeoOpt.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |