User 37c69cc8fe
15-03-2011 15:32:29
In the marvinbeans java api, I can get a series of logD calculations over an arbitrary list of pH's by calling logDPlugin.calclogD(x) repeatedly where x is replaced by my favorite pH's (ie, 2, 5.5, 6.5, 7.4 and 10). This is a convenient alternative to "getlogD" at a single pH or "getlogDs" for a regular series.
I'd like to be able to do the same with the "charge distributions" of IsoelectricPointPlugin (analogous to "averagemicrospeciescharge -H x" in cxcalc). An extra benefit of this would be to avoid the array returned from getChargeDistribution even for a single pH.
It seems that my current options are:
- set a wide pH range and a small step size (0.1) and keep the few I want
- make a new object for each desired pH with a "setpH" call on each
- call setpH repeatedly on the same object between calculations
The first options seems wasteful though I haven't actually done timing or memory tests. The third option doesn't seem to work while looping through a set of molecules.
To be honest, it would be nice if all classes that depend on pH could do as the logDPlugin but it's quite possible that the increased convenience wouldn't be worth the bother to find and make the changes.