From: Karol M. L. <kar...@gm...> - 2012-10-06 18:34:03
|
On Oct 06 2012, Karol M. Langner wrote: > On Oct 05 2012, Noel O'Boyle wrote: > > On 5 October 2012 18:53, Adam Tenderholt <ate...@gm...> wrote: > > > Copying to cclib-dev instead of cclib-users... > > > > > >> So, Noel, Adam... what do you think? We can't have na attribute for > > >> every type of population analysis parsed. I see two options: > > >> 1) use a dictionary, with keys like 'Mulliken', 'Loewdin' > > >> 2) use a list of tuples consisting of a string and an array of charges > > > > > > > > > I agree that it's bad form to have to deal with all permutations of > > > attributes like mulliken_charges, loewdin_charges, etc, so it's best to have > > > just have charges and densities attributes. > > > > > > I think dictionaries are more elegant than a list of tuples. For example, > > > getting the Mulliken charges is simply charges["Mulliken"] instead of having > > > to iterate over the elements in a charges list looking for "Mulliken" in > > > tuple[0]. > > > > +1 > > I just implemented this in recent commits, for several parsers and > Mulliken/Lowdin charges where they are printed. In some cases (Molpro > and Jaguar) I could not find them and I think some flag in the input > would need to be turned on in order to print them. I don't think I will > update the data files and parsers for that unless somebody asks, though. > > The attribute is called atomcharges and I added unit tests for their > length (should equal natom) and sum (should be zero for the unit tests). > > As far as spin densities are concerned, this is also easily done -- > should we call the corresponding attribute atomspins? I went ahead and implemented this for ORCA, too. If you guys think a different attribute name will better, jsut change it. Implementing this for other parsers will require updating output files to have spin densities. I might do that for GAMESS and one more sometime in the future, but I suppose the rest will be upon request. - Karol -- written by Karol M. Langner Sat Oct 6 20:32:38 CEST 2012 |