From: Adam T. <a-t...@st...> - 2006-05-10 16:14:09
|
> As a function you could have... > > popanalyser > (method="Mulliken",aonames=myfile.aonames,aooverlaps=myfile.aooverlap, > mocoeffs=myfile.mocoeffs) or just popanalyser > (method="Mulliken",parsedfile = myfile) > > which behind the scenes calls Mulliken(aooverlaps,mocoeffs) or > something. I like the idea of passing a parsed file to it, simply because there is less to remember about the order of arguments if there is only 1 or two arguments. ;o) > > Next you need to think about what the popanalysers return: partial > charges on atoms? pop analyses per MO per AO? How do you handle > groups? > Will they be handled afterwards? e.g. > mypopanalyser.partition(listofgroups in terms of aonames). > > In short, I'm not sure how 'classified' we should/could make this - > but > the object, in this case, would be the result: a partitioning of > 'electron density' per moorbital per aoorbital. You could have: > > mypartition > (method="Mulliken",aonames=myfile.aonames,aooverlaps=myfile.aooverlap, > mocoeffs=myfile.mocoeffs) > mypartition.calculate() # per MO per AO > print mypartition.mocontributions > print mypartition.partialcharges > groupcontributions = mypartition.splitintogroups(listofgroups) This sounds like a good idea, although I think we should keep each calculation type as a separate class, and then decide if we want a super-function that will call the right method of the class. I see the base class having the following: -an instance of a logfile subclass (parsed or not, since checking if parsed and calling parse is easy) -a loglevel -a logfile I'll start with calculating the density matrix, array[3] because I know how to do that using Numeric as I just did it. ;o) Adapting it to a class and giving it progress and logging support shouldn't be too hard. Plus, we can check our results as Gaussian prints it in the output (I don't think the others do, at least not as a default, which is why I didn't suggest parsing it). Next, I'll work on the SCPA and MPA classes. I figure their calculate functions will build an array([3]) for alpha/beta matrices of dimension nbasis x nbasis (moresults), an array([3]) for alpha/beta matrices of dimension nbasis x natoms (atomresults), and a list of atom charges (atomcharges). After that, I'll add a function that accepts a list of lists to partition into fragments. Hopefully these three things won't take more than a few hours since I already have most of the pieces. > I think it's time to make that TODO list :-) I thought it was your job to start that. ;o) > Also, we should both be trying to migrate to SVN, as this will make it > easier to integrate the latest version of cclib into our own projects. > My initial try failed so I have to do it manually somehow...I'm really > looking forward to that. :-) I'm already using SVN since I like it so much better than CVS. I briefly looked around to see how to put cclib into my trunk, but I didn't see anything. I sorta remember seeing that you can't do an svn copy between two different trees, so I didn't try that. Let me know what you find. > BTW, check out http://cia.navi.cx/stats/project/cclib - this was > enabled > by ticking some box on the sourceforge SVN page. That's impressive. :o) |