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. |