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-04-15 09:07:30
|
Revision: 70 Author: baoilleach Date: 2006-04-15 02:07:25 -0700 (Sat, 15 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=70&view=rev Log Message: ----------- Added some more tests: for the correct symmetry labels, and the correct number of evalues Modified Paths: -------------- trunk/test/testall.py Modified: trunk/test/testall.py =================================================================== --- trunk/test/testall.py 2006-04-15 08:40:26 UTC (rev 69) +++ trunk/test/testall.py 2006-04-15 09:07:25 UTC (rev 70) @@ -23,6 +23,15 @@ """Did this subclasses overwrite normalisesym?""" self.assertNotEquals(self.data.normalisesym("A"),"ERROR: This should be overwritten by this subclass") + def testlengthmosyms(self): + """Is the number of evalues equal to 60?""" + self.assertEquals(60,len(self.data.moenergies[0])) + + def testsymlabels(self): + """Are all the symmetry labels either Ag/u or Bg/u?""" + sumwronglabels = sum([x not in ['Ag','Bu','Au','Bg'] for x in self.data.mosyms[0]]) + self.assertEquals(sumwronglabels,0) + class GaussianGeoOptTest(GenericGeoOptTest): def setUp(self): self.data = getfile(G03,"basicGaussian03","dvb_gopt.out") @@ -63,13 +72,11 @@ getfile(Jaguar,"basicJaguar","eg01","dvb_gopt.out")] print "\n\nMO energies of optimised dvb" - print " ","".join(["%8s" % x for x in ['Gaussian','PCGAMESS','GAMESS-US','ADF']]) + print " ","".join(["%8s" % x for x in ['Gaussian','PCGAMESS','GAMESS-US','ADF','Jaguar']]) print "HOMO", " ".join(["%+2.4f" % x.moenergies[0,x.homos[0]] for x in logfiles]) print "LUMO", " ".join(["%+2.4f" % x.moenergies[0,x.homos[0]+1] for x in logfiles]) print "H-L ", " ".join(["%2.4f" % (x.moenergies[0,x.homos[0]+1]-x.moenergies[0,x.homos[0]],) for x in logfiles]) - for x in logfiles: - print x.mosyms if __name__=="__main__": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-15 08:40:40
|
Revision: 69 Author: baoilleach Date: 2006-04-15 01:40:26 -0700 (Sat, 15 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=69&view=rev Log Message: ----------- Adding the bones of a jaguarparser, along with some tests Modified Paths: -------------- trunk/src/cclib/parser/__init__.py trunk/test/testall.py Added Paths: ----------- trunk/src/cclib/parser/jaguarparser.py trunk/test/parseJaguar.py Modified: trunk/src/cclib/parser/__init__.py =================================================================== --- trunk/src/cclib/parser/__init__.py 2006-04-15 04:17:14 UTC (rev 68) +++ trunk/src/cclib/parser/__init__.py 2006-04-15 08:40:26 UTC (rev 69) @@ -1,3 +1,4 @@ from g03parser import G03 from gamessparser import GAMESS from adfparser import ADF +from jaguarparser import Jaguar Added: trunk/src/cclib/parser/jaguarparser.py =================================================================== --- trunk/src/cclib/parser/jaguarparser.py (rev 0) +++ trunk/src/cclib/parser/jaguarparser.py 2006-04-15 08:40:26 UTC (rev 69) @@ -0,0 +1,140 @@ +""" +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 logfileparser import Logfile,convertor + +class Jaguar(Logfile): + """A Jaguar output file""" + + def __init__(self,*args): + + # Call the __init__ method of the superclass + super(Jaguar, self).__init__(logname="Jaguar",*args) + + def __str__(self): + """Return a string representation of the object.""" + return "Jaguar output file %s" % (self.filename) + + def __repr__(self): + """Return a representation of the object.""" + return 'Jaguar("%s")' % (self.filename) + + def parse(self,fupdate=0.05,cupdate=0.002): + """Extract information from the logfile.""" + inputfile = open(self.filename,"r") + + if self.progress: + + inputfile.seek(0,2) #go to end of file + nstep=inputfile.tell() + inputfile.seek(0) + self.progress.initialize(nstep) + oldstep=0 + + for line in inputfile: + + if self.progress and random.random()<cupdate: + + step = inputfile.tell() + if step!=oldstep: + self.progress.update(step,"Unsupported Information") + oldstep = step + + if line[0:4]=="etot": +# Get SCF convergence information + if not hasattr(self,"scfvalues"): + self.scfvalues = [] + self.logger.info("Creating attribute: scfvalues") + while line[0:4]=="etot": + if line[39:47].strip(): + denergy = float(line[39:47]) + else: + denergy = 0 # Should really be greater than target value + # or should we just ignore the values in this line + ddensity = float(line[48:56]) + maxdiiserr = float(line[57:65]) + self.scfvalues.append([denergy,ddensity,maxdiiserr]) + line = inputfile.next() + + if line[1:5]=="SCFE": +# Get the energy of the molecule + if not hasattr(self,"scfenergies"): + self.logger.info("Creating attribute scfenergies") + self.scfenergies = [] + temp = line.strip().split() + self.scfenergies.append(float(temp[temp.index("hartrees")-1])) + + 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") + 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 + line = inputfile.next() + self.geovalues.append(values) + + if line[2:33]=="Orbital energies/symmetry label": +# Get MO Energies and symmetrys + if not hasattr(self,"moenergies"): + self.logger.info("Creating attributes: moenergies, mosyms") + self.mosyms = [[]] + self.moenergies = [[]] + line = inputfile.next() + while line.strip(): + temp = line.strip().split() + for i in range(0,len(temp),2): + self.moenergies[0].append(float(temp[i])) + self.mosyms[0].append(temp[i+1]) + line = inputfile.next() + self.moenergies = Numeric.array(self.moenergies,"f") + + if line[1:28]=="number of occupied orbitals": + if not hasattr(self,"homos"): + self.logger.info("Creating attribute: homos") + self.homos = Numeric.array([float(line.strip().split()[-1])-1],"i") + + if line[2:27]=="number of basis functions": + if not hasattr(self,"nbasis"): + self.logger.info("Creating attribute: nbasis") + self.nbasis = float(line.strip().split()[-1]) + + inputfile.close() + + if hasattr(self,"scfvalues"): + self.scfvalues = Numeric.array(self.scfvalues,"f") + if hasattr(self,"scfenergies"): + self.scfenergies = Numeric.array(self.scfenergies,"f") + +if __name__=="__main__": + import doctest,g03parser + doctest.testmod(g03parser,verbose=False) Property changes on: trunk/src/cclib/parser/jaguarparser.py ___________________________________________________________________ Name: svn:executable + * Added: trunk/test/parseJaguar.py =================================================================== --- trunk/test/parseJaguar.py (rev 0) +++ trunk/test/parseJaguar.py 2006-04-15 08:40:26 UTC (rev 69) @@ -0,0 +1,14 @@ +import os +from cclib.parser import Jaguar + +os.chdir(os.path.join("..","data","Jaguar","basicJaguar")) + +os.chdir("eg01") + +for file in ["dvb_gopt.out"]: + t = Jaguar(file) + t.parse() + +print t.moenergies[0,:] +print t.homos[0] +print t.moenergies[0,t.homos[0]] Property changes on: trunk/test/parseJaguar.py ___________________________________________________________________ Name: svn:executable + * Modified: trunk/test/testall.py =================================================================== --- trunk/test/testall.py 2006-04-15 04:17:14 UTC (rev 68) +++ trunk/test/testall.py 2006-04-15 08:40:26 UTC (rev 69) @@ -1,5 +1,5 @@ import os, unittest -from cclib.parser import GAMESS,G03,ADF +from cclib.parser import GAMESS,G03,ADF,Jaguar from Numeric import array class GenericGeoOptTest(unittest.TestCase): @@ -12,7 +12,7 @@ self.assertEquals(self.data.natom,20) def testnbasis(self): - """Is the number of basis set function equal to 60?""" + """Is the number of basis set functions equal to 60?""" self.assertEquals(self.data.nbasis,60) def testscfenergy(self): @@ -39,9 +39,13 @@ def setUp(self): self.data = getfile(ADF,"basicADF2004.01","dvb_gopt.adfout") +class JaguarGeoOptTest(GenericGeoOptTest): + def setUp(self): + self.data = getfile(Jaguar,"basicJaguar","eg01","dvb_gopt.out") + def getfile(parser,*location): """Returns a parsed logfile.""" - if parser.__name__ in ['GAMESS','ADF']: + if parser.__name__ in ['GAMESS','ADF','Jaguar']: fullpath = ("..","data",parser.__name__) + location elif parser.__name__=="G03": fullpath = ("..","data","Gaussian") + location @@ -55,7 +59,8 @@ logfiles = [ getfile(G03,"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.adfout") ] + getfile(ADF,"basicADF2004.01","dvb_gopt.adfout"), + getfile(Jaguar,"basicJaguar","eg01","dvb_gopt.out")] print "\n\nMO energies of optimised dvb" print " ","".join(["%8s" % x for x in ['Gaussian','PCGAMESS','GAMESS-US','ADF']]) @@ -72,6 +77,7 @@ pcgamesstests = unittest.makeSuite(PCGamessGeoOptTest) gamessustests = unittest.makeSuite(GamessUSGeoOptTest) adftests = unittest.makeSuite(ADFGeoOptTest) + jaguartests = unittest.makeSuite(JaguarGeoOptTest) print "\n*** Testing Gaussian dvb_gopt.out ***" unittest.TextTestRunner(verbosity=2).run(gaussiantests) print "\n\n*** Testing PCGAMESS dvb_gopt_a.out ***" @@ -80,5 +86,7 @@ unittest.TextTestRunner(verbosity=2).run(gamessustests) print "\n\n*** Testing ADF dvb_gopt.adfout ***" unittest.TextTestRunner(verbosity=2).run(adftests) + print "\n\n*** Testing Jaguar dvb_gopt.out ***" + unittest.TextTestRunner(verbosity=2).run(jaguartests) print "\n\n*** Visual tests ***" visualtests() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ate...@us...> - 2006-04-14 15:00:47
|
Revision: 67 Author: atenderholt Date: 2006-04-14 08:00:42 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=67&view=rev Log Message: ----------- Fixed the problem with adfparser completely dieing on aonames, however it still needs work on other unittests Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-04-14 14:23:25 UTC (rev 66) +++ trunk/src/cclib/parser/adfparser.py 2006-04-14 15:00:42 UTC (rev 67) @@ -478,6 +478,8 @@ atomheader=inputfile.next() underline=inputfile.next() + if len(atomheader)==1: #in the case of gopt, there is no * line after we finish, just two blank lines + break funcs=[] line=inputfile.next() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-14 14:23:31
|
Revision: 66 Author: baoilleach Date: 2006-04-14 07:23:25 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=66&view=rev Log Message: ----------- Added function and doctests for normalising symmetry...but I forgot to call it...oh well, next time. Modified Paths: -------------- trunk/src/cclib/parser/gamessparser.py Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-04-14 01:07:57 UTC (rev 65) +++ trunk/src/cclib/parser/gamessparser.py 2006-04-14 14:23:25 UTC (rev 66) @@ -38,6 +38,26 @@ """Return a representation of the object.""" return 'GAMESS("%s")' % (self.filename) + def normalisesym(self,label): + """Normalise the symmetries used by GAMESS. + + To normalise, two rules need to be applied: + (1) Occurences of U/G in the 2/3 position of the label + must be lower-cased + (2) Two single quotation marks must be replaced by a double + + >>> t = GAMESS("dummyfile").normalisesym + >>> labels = ['A','A1','A1G',"A'","A''","AG"] + >>> answers = map(t,labels) + >>> print answers + ['A', 'A1', 'A1g', "A'", 'A"', 'Ag'] + """ + if label[1:] == "''": + end = '"' + else: + end = label[1:].replace("U","u").replace("G","g") + return label[0] + end + def parse(self): """Extract information from the logfile.""" inputfile = open(self.filename,"r") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ate...@us...> - 2006-04-14 01:08:06
|
Revision: 65 Author: atenderholt Date: 2006-04-13 18:07:57 -0700 (Thu, 13 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=65&view=rev Log Message: ----------- Read smat (aooverlaps) Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-04-13 22:43:15 UTC (rev 64) +++ trunk/src/cclib/parser/adfparser.py 2006-04-14 01:07:57 UTC (rev 65) @@ -544,37 +544,36 @@ # self.nbasis = nbasis # self.logger.info("Creating attribute nbasis: %d" % self.nbasis) # -# if line[1:4]=="***" and (line[5:12]=="Overlap" -# or line[8:15]=="Overlap"): -# # Extract the molecular orbital overlap matrix -# # Has to deal with lines such as: -# # *** Overlap *** -# # ****** Overlap ****** -# self.logger.info("Creating attribute aooverlaps[x,y]") -# self.aooverlaps = Numeric.zeros( (self.nbasis,self.nbasis), "float") -# # Overlap integrals for basis fn#1 are in aooverlaps[0] -# base = 0 -# colmNames = inputfile.next() -# while base<self.nbasis: -# -# if self.progress and random.random()<fupdate: -# step=inputfile.tell() -# if step!=oldstep: -# self.progress.update(step,"Overlap") -# oldstep=step -# -# for i in range(self.nbasis-base): # Fewer lines this time -# line = inputfile.next() -# parts = line.split() -# for j in range(len(parts)-1): # Some lines are longer than others -# k = float(parts[j].replace("D","E")) -# self.aooverlaps[base+j,i+base] = k -# self.aooverlaps[i+base,base+j] = k -# base += 5 -# colmNames = inputfile.next() -# self.aooverlaps = Numeric.array(self.aooverlaps,"f") -# -# + if line[1:13]=="====== smat": +# Extract the overlap matrix + + self.logger.info("Creating attribute aooverlaps[x,y]") + self.aooverlaps = Numeric.zeros( (self.nbasis,self.nbasis), "float") + # Overlap integrals for basis fn#1 are in aooverlaps[0] + base = 0 + + while base<self.nbasis: + + if self.progress and random.random()<fupdate: + step=inputfile.tell() + if step!=oldstep: + self.progress.update(step,"Overlap") + oldstep=step + + blankline=inputfile.next() + colName=inputfile.next() + rowName=inputfile.next() + + for i in range(self.nbasis-base): # Fewer lines this time + line = inputfile.next() + parts = line.split()[1:] + for j in range(len(parts)): # Some lines are longer than others + k = float(parts[j]) + self.aooverlaps[base+j,i+base] = k + self.aooverlaps[i+base,base+j] = k + base += 4 + + # if line[5:35]=="Molecular Orbital Coefficients" or line[5:41]=="Alpha Molecular Orbital Coefficients" or line[5:40]=="Beta Molecular Orbital Coefficients": # if line[5:40]=="Beta Molecular Orbital Coefficients": # beta = True This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ate...@us...> - 2006-04-13 22:43:17
|
Revision: 64 Author: atenderholt Date: 2006-04-13 15:43:15 -0700 (Thu, 13 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=64&view=rev Log Message: ----------- Parse aonames if BAS is printed. Still need to add support for n>2 and d/f orbitals Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-04-13 01:32:20 UTC (rev 63) +++ trunk/src/cclib/parser/adfparser.py 2006-04-13 22:43:15 UTC (rev 64) @@ -422,45 +422,95 @@ # parts = line.strip().split() # self.etrotats = Numeric.array(self.etrotats,"f") # - if line[1:21] == "Total nr. of (C)SFOs": -# Extract the number of basis sets - self.nbasis=int(line.split(":")[1].split()[0]) - # e.g. Total nr. of (C)SFOs (summation over all irreps) : 60 - self.logger.info("Creating attribute nbasis: %i" % self.nbasis) - -# now that we're here, let's extract aonames +#******************************************************************************************************************8 +#delete this after new implementation using smat, eigvec print,eprint? +# if line[1:21] == "Total nr. of (C)SFOs": +# # Extract the number of basis sets +# +# self.nbasis=int(line.split(":")[1].split()[0]) +# # e.g. Total nr. of (C)SFOs (summation over all irreps) : 60 +# self.logger.info("Creating attribute nbasis: %i" % self.nbasis) +# +# # now that we're here, let's extract aonames +# +# self.logger.info("Creating attribute aonames[]") +# self.aonames=[] +# +# blank=inputfile.next() +# note=inputfile.next() +# +# while len(self.aonames)<self.nbasis: +# blank=inputfile.next(); blank=inputfile.next(); blank=inputfile.next() +# sym=inputfile.next() +# line=inputfile.next() +# num=int(line.split(':')[1].split()[0]) +# +# #read until line "--------..." is found +# while line.find('--')<0: +# line=inputfile.next() +# +# for i in range(num): +# line=inputfile.next() +# info=line.split() +# temporb=info[8] +# pos=temporb.find(':') +# if pos>0: +# orbital=temporb[:pos]+temporb[pos+1:] +# else: +# orbital=temporb +# +# self.aonames.append("%s%i_%i%s"%(info[5],int(info[9]),int(info[7]),orbital)) +# line=inputfile.next() #get rid of line with energy in eV +#**************************************************************************************************************************** + if line[1:10]=="BAS: List": + self.logger.info("Creating attribute aonames[]") self.aonames=[] - blank=inputfile.next() - note=inputfile.next() + #get rid of descriptive text + for i in range(18): + inputfile.next() - while len(self.aonames)<self.nbasis: - blank=inputfile.next(); blank=inputfile.next(); blank=inputfile.next() - sym=inputfile.next() + line=inputfile.next() + while line[1:5]!="****": + + atomheader=inputfile.next() + underline=inputfile.next() + + funcs=[] line=inputfile.next() - num=int(line.split(':')[1].split()[0]) - #read until line "--------..." is found - while line.find('--')<0: + #read functions up to blank line + while len(line)>1: + + if line[1:5]=="****": + break + + if line[12:22]=="0 0 0 0": + funcs.append("1S") + if line[12:22]=="0 0 0 1": + funcs.append("2S") + if line[12:22]=="1 0 0 0": + funcs.append("2PX") + if line[12:22]=="0 1 0 0": + funcs.append("2PY") + if line[12:22]=="0 0 1 0": + funcs.append("2PZ") + line=inputfile.next() - - for i in range(num): - line=inputfile.next() - info=line.split() - temporb=info[8] - pos=temporb.find(':') - if pos>0: - orbital=temporb[:pos]+temporb[pos+1:] - else: - orbital=temporb - - self.aonames.append("%s%i_%i%s"%(info[5],int(info[9]),int(info[7]),orbital)) - line=inputfile.next() #get rid of line with energy in eV - - + + element=atomheader[:38].split()[0] + numbers=atomheader[38:].split() + for num in numbers: + for j in range(len(funcs)): + self.aonames.append(element+num+"_"+funcs[j]) + + + self.nbasis=len(self.aonames) + self.logger.info("Creating attribute nbasis: %d" % self.nbasis) + # if line[1:7]=="NBasis" or line[4:10]=="NBasis": # # Extract the number of basis sets # nbasis = int(line.split('=')[1].split()[0]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ate...@us...> - 2006-04-13 01:32:22
|
Revision: 63 Author: atenderholt Date: 2006-04-12 18:32:20 -0700 (Wed, 12 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=63&view=rev Log Message: ----------- Changed ADF parser to use right naming scheme for mosyms Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-04-13 00:34:42 UTC (rev 62) +++ trunk/src/cclib/parser/adfparser.py 2006-04-13 01:32:20 UTC (rev 63) @@ -207,7 +207,7 @@ while len(line)>1: info=line.split() if len(info)==5: #this is restricted - self.mosyms[0].append(info[0]) + self.mosyms[0].append(info[0].replace('.','')) self.moenergies[0].append(convertor(float(info[3]),'hartree','eV')) if info[2]=='0.00' and not hasattr(self,'homos'): self.logger.info("Creating attribute homos[]") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-10 10:47:45
|
Revision: 60 Author: baoilleach Date: 2006-04-10 03:47:34 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=60&view=rev Log Message: ----------- Added processor type to metadata Modified Paths: -------------- trunk/data/GAMESS/basicPCGAMESS/metadata.txt trunk/data/Gaussian/basicGaussian03/metadata.txt Modified: trunk/data/GAMESS/basicPCGAMESS/metadata.txt =================================================================== --- trunk/data/GAMESS/basicPCGAMESS/metadata.txt 2006-04-07 13:21:34 UTC (rev 59) +++ trunk/data/GAMESS/basicPCGAMESS/metadata.txt 2006-04-10 10:47:34 UTC (rev 60) @@ -1,5 +1,5 @@ PC-GAMESS v.6.2 build 2068 Windows XP -Pentium ?? +Intel Celeron Original input file created using GaussView with C2h symmetry and saved as Cartesian coordinates. After GeoOpt of this, the final coordinates were used as the input for a single point energy calculations (unrestricted, no sym) and an IR calculation. For the Raman calculation, the $GRAD and $HESS sections were cut from the PUNCH file of the IR calc and pasted into the Raman calc input file. Modified: trunk/data/Gaussian/basicGaussian03/metadata.txt =================================================================== --- trunk/data/Gaussian/basicGaussian03/metadata.txt 2006-04-07 13:21:34 UTC (rev 59) +++ trunk/data/Gaussian/basicGaussian03/metadata.txt 2006-04-10 10:47:34 UTC (rev 60) @@ -1,4 +1,4 @@ Gaussian 03, Revision B.04 Windows XP -Pentium ?? +Intel Celeron Original Z-matrix created using GaussView (as far as I remember). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-07 13:21:14
|
Revision: 58 Author: baoilleach Date: 2006-04-07 06:20:58 -0700 (Fri, 07 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=58&view=rev Log Message: ----------- Adding standard files...although not with much content. These are added to increase our cheesecake index value (pycheesecake.org). Added Paths: ----------- trunk/ANNOUNCE trunk/CHANGELOG trunk/INSTALL trunk/LICENSE trunk/MANIFEST trunk/README trunk/THANKS Added: trunk/ANNOUNCE =================================================================== Added: trunk/CHANGELOG =================================================================== Added: trunk/INSTALL =================================================================== --- trunk/INSTALL (rev 0) +++ trunk/INSTALL 2006-04-07 13:20:58 UTC (rev 58) @@ -0,0 +1,11 @@ +How to install cclib + +Requirements: + +cclib requires the Numeric extension for python. (Other variants, e.g. scipy, numarray, numpy, should also work but you will have to do some manual replacement of the appropriate references to Numeric) + +Installation: + +Type (as root): + python setup.py install + Added: trunk/LICENSE =================================================================== --- trunk/LICENSE (rev 0) +++ trunk/LICENSE 2006-04-07 13:20:58 UTC (rev 58) @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS Added: trunk/MANIFEST =================================================================== --- trunk/MANIFEST (rev 0) +++ trunk/MANIFEST 2006-04-07 13:20:58 UTC (rev 58) @@ -0,0 +1,15 @@ +THANKS +README +INSTALL +ANNOUNCE +CHANGELOG +LICENSE +setup.py +src/cclib/__init__.py +src/cclib/parser/__init__.py +src/cclib/parser/adfparser.py +src/cclib/parser/g03parser.py +src/cclib/parser/gamessparser.py +src/cclib/parser/logfileparser.py +src/cclib/parser/textprogress.py +test/testall.py Added: trunk/README =================================================================== --- trunk/README (rev 0) +++ trunk/README 2006-04-07 13:20:58 UTC (rev 58) @@ -0,0 +1 @@ +cclib is a parser for outputfiles of computational chemistry packages. Added: trunk/THANKS =================================================================== --- trunk/THANKS (rev 0) +++ trunk/THANKS 2006-04-07 13:20:58 UTC (rev 58) @@ -0,0 +1,3 @@ +The developers of cclib would like the thank the following: + +Rob Paton -- for creating and running Jaguar test jobs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-07 10:39:18
|
Revision: 56 Author: baoilleach Date: 2006-04-07 03:38:57 -0700 (Fri, 07 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=56&view=rev Log Message: ----------- Added prototype function normalisesym() to Logfile() for standardising the symmetry labels of molecular orbitals (and other symmetry labels too?). This should be overwritten in the subclasses. Added a unittest to testall.py that checks to make sure that the prototype has been overwritten. Modified Paths: -------------- trunk/src/cclib/parser/logfileparser.py trunk/test/testall.py Modified: trunk/src/cclib/parser/logfileparser.py =================================================================== --- trunk/src/cclib/parser/logfileparser.py 2006-04-04 16:06:01 UTC (rev 55) +++ trunk/src/cclib/parser/logfileparser.py 2006-04-07 10:38:57 UTC (rev 56) @@ -103,6 +103,15 @@ handler.setFormatter(logging.Formatter("[%(name)s %(levelname)s] %(message)s")) self.logger.addHandler(handler) + def normalisesym(self,symlabel): + """Standardise the symmetry labels between parsers. + + This method should be overwritten by individual parsers, and should + contain appropriate doctests. If is not overwritten, this is detected + as an error by unit tests. + """ + return "ERROR: This should be overwritten by this subclass" + def float(self,number): """Convert a string to a float avoiding the problem with Ds. Modified: trunk/test/testall.py =================================================================== --- trunk/test/testall.py 2006-04-04 16:06:01 UTC (rev 55) +++ trunk/test/testall.py 2006-04-07 10:38:57 UTC (rev 56) @@ -19,6 +19,10 @@ """Is the SCF energy within 3eV(?) of -382.3?""" self.assert_(self.data.scfenergies[-1]+382.3<3) + def testnormalisesym(self): + """Did this subclasses overwrite normalisesym?""" + self.assertNotEquals(self.data.normalisesym("A"),"ERROR: This should be overwritten by this subclass") + class GaussianGeoOptTest(GenericGeoOptTest): def setUp(self): self.data = getfile(G03,"basicGaussian03","dvb_gopt.out") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-04 16:06:16
|
Revision: 55 Author: baoilleach Date: 2006-04-04 09:06:01 -0700 (Tue, 04 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=55&view=rev Log Message: ----------- Added tests for initial GAMESS-US calculations (on Linux). Modified Paths: -------------- trunk/test/parseGAMESS.py trunk/test/testall.py Modified: trunk/test/parseGAMESS.py =================================================================== --- trunk/test/parseGAMESS.py 2006-04-04 15:28:30 UTC (rev 54) +++ trunk/test/parseGAMESS.py 2006-04-04 16:06:01 UTC (rev 55) @@ -7,11 +7,15 @@ t = GAMESS(file) t.parse() -os.chdir("basicPCGAMESS") for file in ["dvb_gopt_a.out","dvb_gopt_b.out","dvb_sp.out","dvb_ir.out","dvb_raman.out", "dvb_un_sp.out"]: - t = GAMESS(file) + t = GAMESS(os.path.join("basicPCGAMESS",file)) t.parse() +for file in ["dvb_gopt_a.out","dvb_sp.out"]: + t = GAMESS(os.path.join("basicGAMESS-US",file)) + t.parse() + + Modified: trunk/test/testall.py =================================================================== --- trunk/test/testall.py 2006-04-04 15:28:30 UTC (rev 54) +++ trunk/test/testall.py 2006-04-04 16:06:01 UTC (rev 55) @@ -23,8 +23,12 @@ def setUp(self): self.data = getfile(G03,"basicGaussian03","dvb_gopt.out") -class GamessGeoOptTest(GenericGeoOptTest): +class GamessUSGeoOptTest(GenericGeoOptTest): def setUp(self): + self.data = getfile(GAMESS,"basicGAMESS-US","dvb_gopt_a.out") + +class PCGamessGeoOptTest(GenericGeoOptTest): + def setUp(self): self.data = getfile(GAMESS,"basicPCGAMESS","dvb_gopt_a.out") class ADFGeoOptTest(GenericGeoOptTest): @@ -46,23 +50,30 @@ """These are not formal tests -- but they should be eyeballed.""" logfiles = [ getfile(G03,"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.adfout") ] print "\n\nMO energies of optimised dvb" - print " ","".join(["%7s" % x for x in ['Gaussian','GAMESS','ADF']]) - print "HOMO", " ".join(["%+2.4f" % x.moenergies[0,x.homos[0]] for x in logfiles]) - print "LUMO", " ".join(["%+2.4f" % x.moenergies[0,x.homos[0]+1] for x in logfiles]) - print "H-L ", " ".join(["%2.4f" % (x.moenergies[0,x.homos[0]+1]-x.moenergies[0,x.homos[0]],) for x in logfiles]) + print " ","".join(["%8s" % x for x in ['Gaussian','PCGAMESS','GAMESS-US','ADF']]) + print "HOMO", " ".join(["%+2.4f" % x.moenergies[0,x.homos[0]] for x in logfiles]) + print "LUMO", " ".join(["%+2.4f" % x.moenergies[0,x.homos[0]+1] for x in logfiles]) + print "H-L ", " ".join(["%2.4f" % (x.moenergies[0,x.homos[0]+1]-x.moenergies[0,x.homos[0]],) for x in logfiles]) + + for x in logfiles: + print x.mosyms if __name__=="__main__": gaussiantests = unittest.makeSuite(GaussianGeoOptTest) - gamesstests = unittest.makeSuite(GamessGeoOptTest) + pcgamesstests = unittest.makeSuite(PCGamessGeoOptTest) + gamessustests = unittest.makeSuite(GamessUSGeoOptTest) adftests = unittest.makeSuite(ADFGeoOptTest) print "\n*** Testing Gaussian dvb_gopt.out ***" unittest.TextTestRunner(verbosity=2).run(gaussiantests) - print "\n\n*** Testing GAMESS dvb_gopt_a.out ***" - unittest.TextTestRunner(verbosity=2).run(gamesstests) + print "\n\n*** Testing PCGAMESS dvb_gopt_a.out ***" + unittest.TextTestRunner(verbosity=2).run(pcgamesstests) + print "\n\n*** Testing GAMESS-US dvb_gopt_a.out ***" + unittest.TextTestRunner(verbosity=2).run(gamessustests) print "\n\n*** Testing ADF dvb_gopt.adfout ***" unittest.TextTestRunner(verbosity=2).run(adftests) print "\n\n*** Visual tests ***" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-04 15:28:39
|
Revision: 54 Author: baoilleach Date: 2006-04-04 08:28:30 -0700 (Tue, 04 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=54&view=rev Log Message: ----------- Adding a line for the machine type, e.g. Pentium 4 to the metadata for the example calculations. Modified Paths: -------------- trunk/data/GAMESS/basicPCGAMESS/metadata.txt Added Paths: ----------- trunk/data/Gaussian/basicGaussian03/metadata.txt Modified: trunk/data/GAMESS/basicPCGAMESS/metadata.txt =================================================================== --- trunk/data/GAMESS/basicPCGAMESS/metadata.txt 2006-04-04 08:33:23 UTC (rev 53) +++ trunk/data/GAMESS/basicPCGAMESS/metadata.txt 2006-04-04 15:28:30 UTC (rev 54) @@ -1,4 +1,5 @@ PC-GAMESS v.6.2 build 2068 -WinXP +Windows XP +Pentium ?? Original input file created using GaussView with C2h symmetry and saved as Cartesian coordinates. -After GeoOpt of this, the final coordinates were used as the input for a single point energy calculations (unrestricted, no sym) and an IR calculation. For the Raman calculation, the $GRAD and $HESS sections were cut from the PUNCH file of the IR calc and pasted into the Raman calc input file. \ No newline at end of file +After GeoOpt of this, the final coordinates were used as the input for a single point energy calculations (unrestricted, no sym) and an IR calculation. For the Raman calculation, the $GRAD and $HESS sections were cut from the PUNCH file of the IR calc and pasted into the Raman calc input file. Added: trunk/data/Gaussian/basicGaussian03/metadata.txt =================================================================== --- trunk/data/Gaussian/basicGaussian03/metadata.txt (rev 0) +++ trunk/data/Gaussian/basicGaussian03/metadata.txt 2006-04-04 15:28:30 UTC (rev 54) @@ -0,0 +1,4 @@ +Gaussian 03, Revision B.04 +Windows XP +Pentium ?? +Original Z-matrix created using GaussView (as far as I remember). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-04 08:33:29
|
Revision: 53 Author: baoilleach Date: 2006-04-04 01:33:23 -0700 (Tue, 04 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=53&view=rev Log Message: ----------- Fixed handling of MO symmetries and evalues for unrestricted calculations Modified Paths: -------------- trunk/src/cclib/parser/gamessparser.py Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-04-03 20:09:44 UTC (rev 52) +++ trunk/src/cclib/parser/gamessparser.py 2006-04-04 08:33:23 UTC (rev 53) @@ -215,7 +215,7 @@ if not hasattr(self,"moenergies"): self.logger.info("Creating attributes moenergies, mosyms") self.moenergies = [[]] - self.mosyms = [] + self.mosyms = [[]] if not hasattr(self,"nindep"): self.logger.info("Creating attribute nindep with default value") self.nindep = self.nbasis @@ -227,7 +227,7 @@ line = inputfile.next() self.moenergies[0].extend([convertor(float(x),"hartree","eV") for x in line.split()]) line = inputfile.next() - self.mosyms.extend(line.split()) + self.mosyms[0].extend(line.split()) for i in range(self.nbasis): line = inputfile.next() if base==0: # Just do this the first time 'round @@ -254,15 +254,17 @@ # 1 2 3 4 5 self.mocoeffs.resize((2,self.nindep,self.nbasis)) + self.moenergies.append([]) + self.mosyms.append([]) for i in range(5): line = inputfile.next() for base in range(0,self.nindep,5): blank = inputfile.next() line = inputfile.next() # Eigenvector no line = inputfile.next() - self.moenergies.extend(map(float,line.split())) + self.moenergies[1].extend([convertor(float(x),"hartree","eV") for x in line.split()]) line = inputfile.next() - self.mosyms.extend(line.split()) + self.mosyms[1].extend(line.split()) for i in range(self.nbasis): line = inputfile.next() temp = line[15:] # Strip off the crud at the start This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-03 20:09:53
|
Revision: 52 Author: baoilleach Date: 2006-04-03 13:09:44 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=52&view=rev Log Message: ----------- Added tests for looking at the energies of the homo/lumo. These values don't at all agree across packages - is this a program with units or what? Modified Paths: -------------- trunk/test/testall.py Modified: trunk/test/testall.py =================================================================== --- trunk/test/testall.py 2006-04-03 16:16:04 UTC (rev 51) +++ trunk/test/testall.py 2006-04-03 20:09:44 UTC (rev 52) @@ -2,31 +2,32 @@ from cclib.parser import GAMESS,G03,ADF from Numeric import array -class GenericTest(unittest.TestCase): +class GenericGeoOptTest(unittest.TestCase): def testhomos(self): + """Is the index of the homo equal to 34?""" self.assertEquals(self.data.homos,array([34])) def testnatom(self): + """Is the number of atoms equal to 20?""" self.assertEquals(self.data.natom,20) def testnbasis(self): + """Is the number of basis set function equal to 60?""" 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) - def testhomoenergy(self): - self.assert_(self.data.moenergies[0,self.data.homos[0]]+4.165<0.5,"HOMO energy is %f (for G03 it's -4.165)" % self.data.moenergies[0,self.data.homos[0]]) - -class GaussianTest(GenericTest): +class GaussianGeoOptTest(GenericGeoOptTest): def setUp(self): self.data = getfile(G03,"basicGaussian03","dvb_gopt.out") -class GamessTest(GenericTest): +class GamessGeoOptTest(GenericGeoOptTest): def setUp(self): self.data = getfile(GAMESS,"basicPCGAMESS","dvb_gopt_a.out") -class ADFTest(GenericTest): +class ADFGeoOptTest(GenericGeoOptTest): def setUp(self): self.data = getfile(ADF,"basicADF2004.01","dvb_gopt.adfout") @@ -43,12 +44,26 @@ def visualtests(): """These are not formal tests -- but they should be eyeballed.""" - pass + logfiles = [ getfile(G03,"basicGaussian03","dvb_gopt.out"), + getfile(GAMESS,"basicPCGAMESS","dvb_gopt_a.out"), + getfile(ADF,"basicADF2004.01","dvb_gopt.adfout") ] + + print "\n\nMO energies of optimised dvb" + print " ","".join(["%7s" % x for x in ['Gaussian','GAMESS','ADF']]) + print "HOMO", " ".join(["%+2.4f" % x.moenergies[0,x.homos[0]] for x in logfiles]) + print "LUMO", " ".join(["%+2.4f" % x.moenergies[0,x.homos[0]+1] for x in logfiles]) + print "H-L ", " ".join(["%2.4f" % (x.moenergies[0,x.homos[0]+1]-x.moenergies[0,x.homos[0]],) for x in logfiles]) if __name__=="__main__": - gaussiantests = unittest.makeSuite(GaussianTest) - gamesstests = unittest.makeSuite(GamessTest) - adftests = unittest.makeSuite(ADFTest) - alltests = unittest.TestSuite((gaussiantests,gamesstests,adftests)) - unittest.TextTestRunner(verbosity=2).run(alltests) + gaussiantests = unittest.makeSuite(GaussianGeoOptTest) + gamesstests = unittest.makeSuite(GamessGeoOptTest) + adftests = unittest.makeSuite(ADFGeoOptTest) + print "\n*** Testing Gaussian dvb_gopt.out ***" + unittest.TextTestRunner(verbosity=2).run(gaussiantests) + print "\n\n*** Testing GAMESS dvb_gopt_a.out ***" + unittest.TextTestRunner(verbosity=2).run(gamesstests) + print "\n\n*** Testing ADF dvb_gopt.adfout ***" + unittest.TextTestRunner(verbosity=2).run(adftests) + print "\n\n*** Visual tests ***" + visualtests() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-03 16:16:12
|
Revision: 51 Author: baoilleach Date: 2006-04-03 09:16:04 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=51&view=rev Log Message: ----------- Added convenience function to make it easier to access the data files in the data folder. Am considering changing all references to G03 or Gaussian03, to Gaussian, in line with GAMESS and ADF (which don't mention the specific version in the parser name). Modified Paths: -------------- trunk/test/testall.py Modified: trunk/test/testall.py =================================================================== --- trunk/test/testall.py 2006-04-03 15:52:28 UTC (rev 50) +++ trunk/test/testall.py 2006-04-03 16:16:04 UTC (rev 51) @@ -20,22 +20,32 @@ class GaussianTest(GenericTest): def setUp(self): - self.data = G03(os.path.join("..","data","Gaussian","basicGaussian03","dvb_gopt.out")) - self.data.logger.setLevel(0) - self.data.parse() + self.data = getfile(G03,"basicGaussian03","dvb_gopt.out") class GamessTest(GenericTest): def setUp(self): - self.data = GAMESS(os.path.join("..","data","GAMESS","basicPCGAMESS","dvb_gopt_a.out")) - self.data.logger.setLevel(0) - self.data.parse() + self.data = getfile(GAMESS,"basicPCGAMESS","dvb_gopt_a.out") class ADFTest(GenericTest): def setUp(self): - self.data = ADF(os.path.join("..","data","ADF","basicADF2004.01","dvb_gopt.adfout")) - self.data.logger.setLevel(0) - self.data.parse() + self.data = getfile(ADF,"basicADF2004.01","dvb_gopt.adfout") + +def getfile(parser,*location): + """Returns a parsed logfile.""" + if parser.__name__ in ['GAMESS','ADF']: + fullpath = ("..","data",parser.__name__) + location + elif parser.__name__=="G03": + fullpath = ("..","data","Gaussian") + location + logfile = parser(os.path.join(*fullpath)) + logfile.logger.setLevel(0) + logfile.parse() + return logfile + +def visualtests(): + """These are not formal tests -- but they should be eyeballed.""" + pass + if __name__=="__main__": gaussiantests = unittest.makeSuite(GaussianTest) gamesstests = unittest.makeSuite(GamessTest) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-03 15:52:36
|
Revision: 50 Author: baoilleach Date: 2006-04-03 08:52:28 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=50&view=rev Log Message: ----------- Fixed bug: Forgot to convert scfenergies to floats Modified Paths: -------------- trunk/src/cclib/parser/gamessparser.py Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-04-03 15:48:50 UTC (rev 49) +++ trunk/src/cclib/parser/gamessparser.py 2006-04-03 15:52:28 UTC (rev 50) @@ -86,7 +86,7 @@ # FINAL ENERGY IS -379.7594673378 AFTER 9 ITERATIONS # ...so take the number after the "IS" temp = line.split() - self.scfenergies.append(temp[temp.index("IS")+1]) + self.scfenergies.append(float(temp[temp.index("IS")+1])) if line.find("MAXIMUM GRADIENT")>0: if not hasattr(self,"geovalues"): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-03 15:48:54
|
Revision: 49 Author: baoilleach Date: 2006-04-03 08:48:50 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=49&view=rev Log Message: ----------- Fixed names of log files.\n\nNote: still doesn't parse unrestricted calculations. Modified Paths: -------------- trunk/test/parseGAMESS.py Modified: trunk/test/parseGAMESS.py =================================================================== --- trunk/test/parseGAMESS.py 2006-04-03 15:44:45 UTC (rev 48) +++ trunk/test/parseGAMESS.py 2006-04-03 15:48:50 UTC (rev 49) @@ -9,7 +9,7 @@ os.chdir("basicPCGAMESS") -for file in ["dvb_gopt.out","dvb_sp.out","dvb_ir.out","dvb_raman.out", +for file in ["dvb_gopt_a.out","dvb_gopt_b.out","dvb_sp.out","dvb_ir.out","dvb_raman.out", "dvb_un_sp.out"]: t = GAMESS(file) t.parse() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-03 15:44:52
|
Revision: 48 Author: baoilleach Date: 2006-04-03 08:44:45 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=48&view=rev Log Message: ----------- When terminating loops by searching for blank lines, it is better to use: while line.strip(): line = inputfile.next() rather than: while line!="\n": line = inputfile.next() as the latter is not cross-platform (i.e. it failed on Linux when dealing with GAMESS files created on Windows). Two changes were made to the gamessparser in this respect. Modified Paths: -------------- trunk/src/cclib/parser/gamessparser.py Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-04-03 15:01:48 UTC (rev 47) +++ trunk/src/cclib/parser/gamessparser.py 2006-04-03 15:44:45 UTC (rev 48) @@ -107,7 +107,7 @@ self.scfvalues = [] line = inputfile.next() den = [] - while line!='\n': + while line.strip(): # The SCF information is terminated by a blank line try: temp = int(line[0:4]) @@ -166,7 +166,7 @@ blank = inputfile.next() line = inputfile.next() numAtom = 0 - while line!="\n": + while line.strip(): numAtom += 1 line = inputfile.next() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-03 15:01:56
|
Revision: 47 Author: baoilleach Date: 2006-04-03 08:01:48 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=47&view=rev Log Message: ----------- Adding some documentation for developers/users regarding SCF- and geo-targets. Added Paths: ----------- trunk/docs/ trunk/docs/targets.txt Added: trunk/docs/targets.txt =================================================================== --- trunk/docs/targets.txt (rev 0) +++ trunk/docs/targets.txt 2006-04-03 15:01:48 UTC (rev 47) @@ -0,0 +1,19 @@ +targets.txt: information on the scftargets and geotargets attributes of different parsers. + + + +scftargets + Gaussian GAMESS ADF +delta density X (this may be the same as rms density) +rms density X +max density X +delta energy X + + + +geotargets + Gaussian GAMESS ADF +max gradient X X (Gaussian uses the terms max force and rms force) +rms gradient X X +max displacement X +rms displacement X This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-02 21:33:50
|
Revision: 46 Author: baoilleach Date: 2006-04-02 14:33:41 -0700 (Sun, 02 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=46&view=rev Log Message: ----------- Corrected doctest references so that they now work if you run the parsers as scripts Modified Paths: -------------- trunk/src/cclib/parser/g03parser.py trunk/src/cclib/parser/gamessparser.py Modified: trunk/src/cclib/parser/g03parser.py =================================================================== --- trunk/src/cclib/parser/g03parser.py 2006-04-02 21:31:57 UTC (rev 45) +++ trunk/src/cclib/parser/g03parser.py 2006-04-02 21:33:41 UTC (rev 46) @@ -544,5 +544,5 @@ assert len(self.traj)==len(self.trajSummary) if __name__=="__main__": - import doctest,parser - doctest.testmod(parser,verbose=False) + import doctest,g03parser + doctest.testmod(g03parser,verbose=False) Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-04-02 21:31:57 UTC (rev 45) +++ trunk/src/cclib/parser/gamessparser.py 2006-04-02 21:33:41 UTC (rev 46) @@ -334,5 +334,5 @@ if __name__=="__main__": - import doctest,parser - doctest.testmod(parser,verbose=False) + import doctest,gamessparser + doctest.testmod(gamessparser,verbose=False) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-02 21:32:07
|
Revision: 45 Author: baoilleach Date: 2006-04-02 14:31:57 -0700 (Sun, 02 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=45&view=rev Log Message: ----------- Added ADF parser Modified Paths: -------------- trunk/src/cclib/parser/__init__.py Modified: trunk/src/cclib/parser/__init__.py =================================================================== --- trunk/src/cclib/parser/__init__.py 2006-04-02 21:31:12 UTC (rev 44) +++ trunk/src/cclib/parser/__init__.py 2006-04-02 21:31:57 UTC (rev 45) @@ -1,2 +1,3 @@ from g03parser import G03 from gamessparser import GAMESS +from adfparser import ADF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <bao...@us...> - 2006-04-02 21:31:22
|
Revision: 44 Author: baoilleach Date: 2006-04-02 14:31:12 -0700 (Sun, 02 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=44&view=rev Log Message: ----------- Starting to use proper unit testing using the unittest module Modified Paths: -------------- trunk/test/testall.py Modified: trunk/test/testall.py =================================================================== --- trunk/test/testall.py 2006-03-27 21:40:25 UTC (rev 43) +++ trunk/test/testall.py 2006-04-02 21:31:12 UTC (rev 44) @@ -1,27 +1,44 @@ -import os -from cclib.parser import GAMESS,G03 +import os, unittest +from cclib.parser import GAMESS,G03,ADF +from Numeric import array -os.chdir(os.path.join("..","data")) +class GenericTest(unittest.TestCase): + def testhomos(self): + self.assertEquals(self.data.homos,array([34])) -testfiles = [G03(os.path.join("Gaussian","basicGaussian03","dvb_gopt.out")), - GAMESS(os.path.join("GAMESS","basicPCGAMESS","dvb_gopt_a.out"))] + def testnatom(self): + self.assertEquals(self.data.natom,20) -for testfile in testfiles: - testfile.logger.setLevel(0) - testfile.parse() + def testnbasis(self): + self.assertEquals(self.data.nbasis,60) -attribs = ['natom','homos','nbasis'] -for attrib in attribs: - print attrib, - for testfile in testfiles: - print testfile.__getattribute__(attrib), - print + def testscfenergy(self): + self.assert_(self.data.scfenergies[-1]+382.3<3) -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 + def testhomoenergy(self): + self.assert_(self.data.moenergies[0,self.data.homos[0]]+4.165<0.5,"HOMO energy is %f (for G03 it's -4.165)" % self.data.moenergies[0,self.data.homos[0]]) + +class GaussianTest(GenericTest): + def setUp(self): + self.data = G03(os.path.join("..","data","Gaussian","basicGaussian03","dvb_gopt.out")) + self.data.logger.setLevel(0) + self.data.parse() + +class GamessTest(GenericTest): + def setUp(self): + self.data = GAMESS(os.path.join("..","data","GAMESS","basicPCGAMESS","dvb_gopt_a.out")) + self.data.logger.setLevel(0) + self.data.parse() + +class ADFTest(GenericTest): + def setUp(self): + self.data = ADF(os.path.join("..","data","ADF","basicADF2004.01","dvb_gopt.adfout")) + self.data.logger.setLevel(0) + self.data.parse() + +if __name__=="__main__": + gaussiantests = unittest.makeSuite(GaussianTest) + gamesstests = unittest.makeSuite(GamessTest) + adftests = unittest.makeSuite(ADFTest) + alltests = unittest.TestSuite((gaussiantests,gamesstests,adftests)) + unittest.TextTestRunner(verbosity=2).run(alltests) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ate...@us...> - 2006-03-27 21:40:27
|
Revision: 43 Author: atenderholt Date: 2006-03-27 13:40:25 -0800 (Mon, 27 Mar 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=43&view=rev Log Message: ----------- homo in adfparser Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-03-27 20:27:30 UTC (rev 42) +++ trunk/src/cclib/parser/adfparser.py 2006-03-27 21:40:25 UTC (rev 43) @@ -191,7 +191,7 @@ # self.geovalues.append(newlist) # if line[1:29]=='Orbital Energies, all Irreps' and not hasattr(self,"mosyms"): -#Extracting orbital symmetries and energies +#Extracting orbital symmetries and energies, homos self.logger.info("Creating attribute mosyms[[]]") self.mosyms=[[]] @@ -209,6 +209,9 @@ if len(info)==5: #this is restricted self.mosyms[0].append(info[0]) self.moenergies[0].append(convertor(float(info[3]),'hartree','eV')) + if info[2]=='0.00' and not hasattr(self,'homos'): + self.logger.info("Creating attribute homos[]") + self.homos=[len(self.moenergies[0])-2] line=inputfile.next() self.moenergies=Numeric.array(self.moenergies,"f") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ate...@us...> - 2006-03-27 20:27:40
|
Revision: 42 Author: atenderholt Date: 2006-03-27 12:27:30 -0800 (Mon, 27 Mar 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=42&view=rev Log Message: ----------- Work on aonames for adfparser there's a complication due to the aonames (SFOs) actually being linear combinations of aonames Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-03-26 20:14:33 UTC (rev 41) +++ trunk/src/cclib/parser/adfparser.py 2006-03-27 20:27:30 UTC (rev 42) @@ -419,6 +419,45 @@ # parts = line.strip().split() # self.etrotats = Numeric.array(self.etrotats,"f") # + if line[1:21] == "Total nr. of (C)SFOs": +# Extract the number of basis sets + + self.nbasis=int(line.split(":")[1].split()[0]) + # e.g. Total nr. of (C)SFOs (summation over all irreps) : 60 + self.logger.info("Creating attribute nbasis: %i" % self.nbasis) + +# now that we're here, let's extract aonames + + self.logger.info("Creating attribute aonames[]") + self.aonames=[] + + blank=inputfile.next() + note=inputfile.next() + + while len(self.aonames)<self.nbasis: + blank=inputfile.next(); blank=inputfile.next(); blank=inputfile.next() + sym=inputfile.next() + line=inputfile.next() + num=int(line.split(':')[1].split()[0]) + + #read until line "--------..." is found + while line.find('--')<0: + line=inputfile.next() + + for i in range(num): + line=inputfile.next() + info=line.split() + temporb=info[8] + pos=temporb.find(':') + if pos>0: + orbital=temporb[:pos]+temporb[pos+1:] + else: + orbital=temporb + + self.aonames.append("%s%i_%i%s"%(info[5],int(info[9]),int(info[7]),orbital)) + line=inputfile.next() #get rid of line with energy in eV + + # if line[1:7]=="NBasis" or line[4:10]=="NBasis": # # Extract the number of basis sets # nbasis = int(line.split('=')[1].split()[0]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ate...@us...> - 2006-03-26 20:14:36
|
Revision: 41 Author: atenderholt Date: 2006-03-26 12:14:33 -0800 (Sun, 26 Mar 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=41&view=rev Log Message: ----------- parse moenergies,mosyms (only restricted calcs) Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-03-22 22:57:48 UTC (rev 40) +++ trunk/src/cclib/parser/adfparser.py 2006-03-26 20:14:33 UTC (rev 41) @@ -61,17 +61,19 @@ if line.find("INPUT FILE")>=0: #check to make sure we aren't parsing Create jobs - line2=inputfile.next() while line: - if line.find("Create")<0: - break + if line.find("INPUT FILE")>=0: + line2=inputfile.next() + if line2.find("Create")<0: + break if self.progress and random.random()<cupdate: - step=inputfile.tell() - if step!=oldstep: - self.progress.update(step,"Unsupported Information") - oldstep=step + step=inputfile.tell() + if step!=oldstep: + self.progress.update(step,"Unsupported Information") + oldstep=step + line=inputfile.next() if line[1:6]=="ATOMS": # Find the number of atoms and their atomic numbers @@ -188,6 +190,28 @@ # self.geotargets[i] = self.float(parts[3]) # self.geovalues.append(newlist) # + if line[1:29]=='Orbital Energies, all Irreps' and not hasattr(self,"mosyms"): +#Extracting orbital symmetries and energies + self.logger.info("Creating attribute mosyms[[]]") + self.mosyms=[[]] + + self.logger.info("Creating attribute moenergies[[]]") + self.moenergies=[[]] + + underline=inputfile.next() + blank=inputfile.next() + header=inputfile.next() + underline2=inputfile.next() + line=inputfile.next() + + while len(line)>1: + info=line.split() + if len(info)==5: #this is restricted + self.mosyms[0].append(info[0]) + self.moenergies[0].append(convertor(float(info[3]),'hartree','eV')) + line=inputfile.next() + self.moenergies=Numeric.array(self.moenergies,"f") + # if line[1:19]=='Orbital symmetries' and not hasattr(self,"mosyms"): # # Extracting orbital symmetries # if self.progress and random.random()<fupdate: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |