From: <bao...@us...> - 2006-03-19 20:11:10
|
Revision: 32 Author: baoilleach Date: 2006-03-19 12:10:58 -0800 (Sun, 19 Mar 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=32&view=rev Log Message: ----------- Adding a couple of tests Added Paths: ----------- trunk/test/parseGAMESS.py trunk/test/parseGaussian.py trunk/test/testall.py Added: trunk/test/parseGAMESS.py =================================================================== --- trunk/test/parseGAMESS.py (rev 0) +++ trunk/test/parseGAMESS.py 2006-03-19 20:10:58 UTC (rev 32) @@ -0,0 +1,17 @@ +import os +from cclib.parser import GAMESS + +os.chdir(os.path.join("..","data","GAMESS")) + +for file in ["ex.out","WinGAMESS.log","exam01.out"]: + t = GAMESS(file) + t.parse() + +os.chdir("basicPCGAMESS") + +for file in ["dvb_gopt.out","dvb_sp.out","dvb_ir.out","dvb_raman.out", + "dvb_un_sp.out"]: + t = GAMESS(file) + t.parse() + + Property changes on: trunk/test/parseGAMESS.py ___________________________________________________________________ Name: svn:executable + * Added: trunk/test/parseGaussian.py =================================================================== --- trunk/test/parseGaussian.py (rev 0) +++ trunk/test/parseGaussian.py 2006-03-19 20:10:58 UTC (rev 32) @@ -0,0 +1,13 @@ +import os +from cclib.parser import G03 + +os.chdir(os.path.join("..","data","Gaussian")) + +os.chdir("basicGaussian03") + +for file in ["dvb_gopt.out","dvb_sp.out","dvb_ir.out","dvb_raman.out", + "dvb_un_sp.out"]: + t = G03(file) + t.parse() + + Property changes on: trunk/test/parseGaussian.py ___________________________________________________________________ Name: svn:executable + * Added: trunk/test/testall.py =================================================================== --- trunk/test/testall.py (rev 0) +++ trunk/test/testall.py 2006-03-19 20:10:58 UTC (rev 32) @@ -0,0 +1,27 @@ +import os +from cclib.parser import GAMESS,G03 + +os.chdir(os.path.join("..","data")) + +testfiles = [G03(os.path.join("Gaussian","basicGaussian03","dvb_gopt.out")), + GAMESS(os.path.join("GAMESS","basicPCGAMESS","dvb_gopt_a.out"))] + +for testfile in testfiles: + testfile.logger.setLevel(0) + testfile.parse() + +attribs = ['natom','homos','nbasis'] +for attrib in attribs: + print attrib, + for testfile in testfiles: + print testfile.__getattribute__(attrib), + print + +print "Energy of optimised molecule", +for testfile in testfiles: + print testfile.scfenergies[-1], +print +print "Energy of HOMO", +for testfile in testfiles: + print testfile.moenergies[0,testfile.homos[0]], +print Property changes on: trunk/test/testall.py ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |