From: Noel O'B. <bao...@gm...> - 2007-01-24 14:48:33
|
> This is a situation, where having a general "energies" (or "molenergies" or > "totalenergies") dictionary attribute would be useful - it could hold HF, > MP2, MP3, and other energies. The attribute "scfenergies" could be kept as a > reference to energies["SCF"], though. There are a bunch of other energies > that could be contained here in the future, too, correlated energies (coupled > cluster), or from parametrized hamiltonians (AM1, ...). > > Even if a general attribute like this turned out clumsy for the user, I think > it could be usefull in other parts of cclib code. I'm just not sure if a > dictionary is the best way to go? Let's try what we think is a reasonable approach, and then, if we have problems adapting this to deal with other programs, etc., we can change it. Note, though, that we will need to have resolved these questions before these attributes will be included in a public release. Regarding dictionaries, if it helps, you should realise that object attributes such as "mylogfile.homos" are actually implemented as dictionaries. It's just that the syntax is different, and you use hasattr(mylogfile, "homos") instead of mydict.has_key("homos"). So the user has the same problems in either case trying to find out whether there is an MP2 energy present or not. The only advantage in using a dictionary is that, as you say, all of the energies are in the same place, so that the user can test to see if more than a single energy is present, for example: len(totalenergies)>0? BTW, I think that we currently extract AM1/PM3 energies (at least for Gaussian) and put them into scfenergies. It might be useful to have a 'bestenergies' attribute which points to the highest quality energies present. > Karol > > -- > written by Karol Langner > Wed Jan 24 15:18:43 CET 2007 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > cclib-devel mailing list > ccl...@li... > https://lists.sourceforge.net/lists/listinfo/cclib-devel > |