From: <ate...@us...> - 2006-04-26 01:43:42
|
Revision: 95 Author: atenderholt Date: 2006-04-25 18:43:39 -0700 (Tue, 25 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=95&view=rev Log Message: ----------- Added some elements to logfileparser and some progress code to adfparser Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py trunk/src/cclib/parser/logfileparser.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-04-26 01:20:18 UTC (rev 94) +++ trunk/src/cclib/parser/adfparser.py 2006-04-26 01:43:39 UTC (rev 95) @@ -83,7 +83,6 @@ for line in inputfile: if self.progress and random.random()<cupdate: - step = inputfile.tell() if step!=oldstep: self.progress.update(step,"Unsupported Information") @@ -92,16 +91,17 @@ if line.find("INPUT FILE")>=0: #check to make sure we aren't parsing Create jobs while line: + + if self.progress and random.random()<fupdate: + step = inputfile.tell() + #if step!=oldstep: + self.progress.update(step,"Unsupported Information") + oldstep = step + 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 line=inputfile.next() @@ -377,6 +377,7 @@ nosymreps=[] while len(self.fonames)<self.nbasis: + sym=inputfile.next() line=inputfile.next() num=int(line.split(':')[1].split()[0]) @@ -458,14 +459,15 @@ # if line[1:32]=="S F O P O P U L A T I O N S ,": - +#Extract overlap matrix + self.logger.info("Creating attribute fooverlaps[x,y]") self.fooverlaps = Numeric.zeros((self.nbasis,self.nbasis),"float") symoffset=0 for nosymrep in nosymreps: - + line=inputfile.next() while line.find('===')<10: #look for the symmetry labels line=inputfile.next() @@ -475,10 +477,15 @@ base=0 while base<nosymrep: #have we read all the columns? - + for i in range(nosymrep-base): - #while symoffset+base+i<self.nbasis: #have we read all the rows? - #while True: + + if self.progress: + step=inputfile.tell() + if step!=oldstep and random.random() < fupdate: + self.progress.update(step,"Overlap") + oldstep=step + line=inputfile.next() parts=line.split()[1:] @@ -533,7 +540,7 @@ line=inputfile.next() while symoffset+base<self.nbasis: - + line=inputfile.next() if len(line)<3: symoffset+=base @@ -549,6 +556,13 @@ row=0 line=inputfile.next() while len(line)>2: + + if self.progress: + step=inputfile.tell() + if step!=oldstep and random.random() < fupdate: + self.progress.update(step,"Coefficients") + oldstep=step + cols=line.split() for i in range(len(cols[1:])): self.mocoeffs[spin,row+symoffset,i+symoffset+base]=float(cols[i+1]) Modified: trunk/src/cclib/parser/logfileparser.py =================================================================== --- trunk/src/cclib/parser/logfileparser.py 2006-04-26 01:20:18 UTC (rev 94) +++ trunk/src/cclib/parser/logfileparser.py 2006-04-26 01:43:39 UTC (rev 95) @@ -43,7 +43,8 @@ 6 """ def __init__(self): - self.element = [None,"H","He","Li","Be","B","C","N","O","F","Ne"] + self.element = [None,"H","He","Li","Be","B","C","N","O","F","Ne","Na","Mg","Al","Si","P","S","Cl","Ar","K","Ca","Sc","Ti","V","Cr","Mn","Fe" + "Co","Ni","Cu","Zn","Ga","Ge","As","Se","Br","Kr","Rb","Sr","Y","Zr","Nb","Mo"] self.number = {} for i in range(1,len(self.element)): self.number[self.element[i]] = i This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |