From: <bao...@us...> - 2006-05-19 20:50:25
|
Revision: 131 Author: baoilleach Date: 2006-05-19 13:50:15 -0700 (Fri, 19 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=131&view=rev Log Message: ----------- Normalised the numbering system for GAMESS so that it agrees with Gaussian. The specific orbital names are different but this is just a question of finding the correct mapping. Orbital names are now unique. See the wiki for more details on the specifics. Modified Paths: -------------- trunk/src/cclib/parser/gamessparser.py Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-05-19 17:29:54 UTC (rev 130) +++ trunk/src/cclib/parser/gamessparser.py 2006-05-19 20:50:15 UTC (rev 131) @@ -70,21 +70,21 @@ >>> data = [' 5 C 1 S ', ' 6 C 1 S ',\ ' 7 C 1 S ', ' 56 C 1XXXX '] >>> print t.normalise_aonames(data) - ['C1_1S', 'C1_2S', 'C1_3S', 'C1_1XXXX'] + ['C1_1S', 'C1_2S', 'C1_3S', 'C1_4XXXX'] """ p = re.compile("(\d+)\s*([A-Z][a-z]?)\s*(\d+)\s*([A-Z]+)") ans = [] + i = 0 for line in listoflines: m = p.search(line.strip()) assert m, "Cannot pick out the aoname from this information: %s" % line - g = m.groups() - i = 1 + if g[3] in ['S','X','XX','XXX','XXXX']: + i += 1 aoname = "%s%s_%d%s" % (g[1],g[2],i,g[3]) - while aoname in ans: # Ensures unique aoname - i += 1 - aoname = "%s%s_%d%s" % (g[1],g[2],i,g[3]) ans.append(aoname) + + return ans def parse(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |