From: <bao...@us...> - 2006-04-22 18:17:37
|
Revision: 84 Author: baoilleach Date: 2006-04-22 11:17:31 -0700 (Sat, 22 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=84&view=rev Log Message: ----------- Extracted ir and freq info. Not sure how to handle to symmetry yet. It seems to be split into different sections based on symmetry. Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-04-22 17:39:59 UTC (rev 83) +++ trunk/src/cclib/parser/adfparser.py 2006-04-22 18:17:31 UTC (rev 84) @@ -350,48 +350,31 @@ # line = inputfile.next() # self.moenergies = Numeric.array(self.moenergies,"f") # -# if line[1:14]=="Harmonic freq": -# # Start of the IR/Raman frequency section -# if self.progress and random.random()<fupdate: -# step=inputfile.tell() -# if step!=oldstep: -# self.progress.update(step,"Frequency Information") -# oldstep=step -# -# self.vibsyms = [] -# self.vibirs = [] -# self.vibfreqs = [] + if line[1:24]=="List of All Frequencies": +# Start of the IR/Raman frequency section + if self.progress and random.random()<fupdate: + step=inputfile.tell() + if step!=oldstep: + self.progress.update(step,"Frequency Information") + oldstep=step + +# self.vibsyms = [] # Need to look into this a bit more + self.vibirs = [] + self.vibfreqs = [] # self.logger.info("Creating attribute vibsyms[]") -# self.logger.info("Creating attribute vibfreqs[]") -# self.logger.info("Creating attribute vibirs[]") -# line = inputfile.next() -# while len(line[:15].split())>0: -# # Get past the three/four line title of the columns -# line = inputfile.next() -# line = inputfile.next() # The line with symmetries -# while len(line[:15].split())==0: -# self.logger.debug(line) -# self.vibsyms.extend(line.split()) # Adding new symmetry -# line = inputfile.next() -# self.vibfreqs.extend(map(self.float,line[15:].split())) # Adding new frequencies -# [inputfile.next() for i in [0,1]] # Skip two lines -# line = inputfile.next() -# self.vibirs.extend(map(self.float,line[15:].split())) # Adding IR intensities -# line = inputfile.next() -# if line.find("Raman")>=0: -# if not hasattr(self,"vibramans"): -# self.vibramans = [] -# self.logger.info("Creating attribute vibramans[]") -# line = inputfile.next() -# self.vibramans.extend(map(self.float,line[15:].split())) # Adding Raman intensities -# line = inputfile.next() -# while len(line[:15].split())>0: -# line = inputfile.next() -# line = inputfile.next() # Should be the line with symmetries -# self.vibfreqs = Numeric.array(self.vibfreqs,"f") -# self.vibirs = Numeric.array(self.vibirs,"f") -# if hasattr(self,"vibramans"): self.vibramans = Numeric.array(self.vibramans,"f") -# + self.logger.info("Creating attribute vibfreqs[],vibirs[]") + for i in range(8): + line = inputfile.next() + line = inputfile.next().strip() + while line: + temp = line.split() + self.vibfreqs.append(float(temp[0])) + self.vibirs.append(float(temp[2])) # or is it temp[1]? + line = inputfile.next().strip() + self.vibfreqs = Numeric.array(self.vibfreqs,"f") + self.vibirs = Numeric.array(self.vibirs,"f") + if hasattr(self,"vibramans"): self.vibramans = Numeric.array(self.vibramans,"f") + # if line[1:14]=="Excited State": # # Extract the electronic transitions # if not hasattr(self,"etenergy"): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |