From: Benjamin S. <bs...@un...> - 2011-04-03 21:54:04
|
Hi all, Finally got the basis set parser working at a beginning level. I was having issues with instance vs. class variables and this get/setattr business (this OO stuff takes some getting used to...). Some current limitations: - How basis sets are attached to a particular atom. Right now they are simply associated by element, so if there are different basis sets on atoms of the same element it wont catch that. - Obviously, this only works with ORCA right now. I'll work on a G03 parser soon (and ADF one of these days, but I'll need to add some sort of STO vs. GTO identifier), if anyone can send me a G09 output file with basis set information that would be great. - Documentation is spotty to say the least. Attached are: patches for orcaparser.py and data.py basis.py which contains the classes for the basis set handling a simple ORCA output file (me.out) Parsing the me.out will give the basisset attribute. The data structure is a bit complicated, any thoughts on simplifying it will be greatly appreciated (I looked through avogadro a bit, the organization here is somewhat similar). Here are some examples for navigating basisset. Example 1: the gaussian primitives for the second shell of the carbon atom (2nd atom). Primitives are listed as (coefficient, exponent). In [2]: data.basisset.atoms[1][1].shells[3].primitives Out[2]: [(0.056888332, 9.4680970621), (0.3129405934, 2.0103545142), (0.7606501651, 0.5477100471)] Example 2: angular momentum type (p) of the above shell. In [3]: data.basisset.atoms[1][1].shells[3].angular_momentum Out[3]: 'p' Example 3: element of atom 2. In [4]: data.basisset.atoms[1][0] Out[4]: 'C' Best, Ben Stein |