From: Karol L. <kar...@kn...> - 2007-01-24 14:16:24
|
On Tuesday 23 of January 2007 09:20, Noel O'Boyle wrote: > Regarding the attribute name, how many more similar attributes do you > expect, and is it possible that several may be extracted at the same > time? That is, if you do an MP4 calculation, does this imply an MP2 > calculation first of all, and would the user be interested in > extracting both? If the user is only interested in the highest > available correlated energy, a correlatedenergies attribute might be > better, which would be MP4 for an MP4 calculation, and MP2 for an MP2 > calculation. > > The alternative to a specific mp2energies attribute, would be > something like a dictionary of 'correlatedenergies' which would have > an entry for MP2 (if present), another for MP4 (if present), etc. Or > maybe not a dictionary, but a list of tuples, since MP4 is greater > than MP2. I'm not very keen on separate attributes for every single > possibility, but if you can describe some typical examples we can > discuss this... I was thinking about this the other day, actually, when adding the code for parsing MP2 energies. I think the subject needs some thought and possibly a longer discussion, but let me comment on your ideas here. I think a "correlatedenergies" attribute is not suitable. My main problem with it is that the various methods for getting correlated energies are totally different (conceptually and numerically). But besides that, you can an MP2 correction followed by multiconfigurational calculations (I would like to add these to the parser very soon, also). So some combinations are not unreasonable. IMO having a dictionary is a better idea, becuase it introduces no limitations. But... going this way, it would be reasonable to extend this dictionary to include ANY total molecular energies, after only SCF or otherwise. After all, the present scfenergies attribute contains either Hartree-Fock and DFT energies, depending on the output (not to mention RHF/UHF). I'm having some mixed feelings about whether a dictioary is the right way to go, but having everything in one place seems quite elegant. Something like this: g = cclib.parser.Gaussian("mp2job.log") g.parse() (...) print g.energies.keys() ["RHF", "MP2"] print genergies["MP2"] array( [......, ...., ...]) I'm curious what everyone else thinks about putting all theenergies in one place. > We will need to add tests to ensure at least that the new attribute > has the correct size and shape. If no one else adds tests for the new file Noel uploaded, I'll do it in a few days. Karol -- written by Karol Langner Wed Jan 24 14:59:33 CET 2007 |