Hi all,

a request for input. The current API in the CDK for atomic descriptors looks 
like:

  public DescriptorValue calculate(IAtom atom) throws CDKException

However, as Miguel Rojas pointed out to me, some/many atomic descriptors 
require, to stricly atom centered, the whole molecule to be calculated. E.g. 
the Gasteiger-Marsili partial charge descriptor.

Just to summarize, an atomic descriptor is a descriptor which has one 
calculated value per atom, while a molecular descriptor has one calculated 
value per molecule. A molecule can be represented by a set of atomic 
descriptors, but the size of the set depends on the number of molecules, 
which is why QSAR mostly uses molecular descriptors.

With the above problem in mind, the API needs to be (and will be) changed to:

  public DescriptorValue calculate(IAtom atom, IAtomContainer container) 
    throws CDKException

Second problem. Especially those atomic descriptors which depend on the whole 
molecule to be calculated, need to do this only once, while the above 
retrieves the values atom by atom. An alternative API could be

  public DescriptorValue calculate(IAtomContainer container) 
    throws CDKException

but that does injustice to those atomic descriptor which do not depend on the 
whole structure. I discussed this with Rajarshi Guha, and he suggested a 
caching mechanism like:

  public DescriptorValue calculate(IAtom atom, IAtomContainer container) 
    throws CDKException {
    if (container != previousContainer) {
      reculateProperties(container);
      // and cache them somehow
    }
    // return cached value for atom
  }

While this addresses the problem, it has the obvious flaw that is present 
because the CDK IAtomContainer is mutable, that the cache might be out of 
date. There is a more elaborate proposal in the making about caching [1], but 
that's not available yet.

Will the above suggestion do? Or do you have a better solution? Any input and 
comment appreciated!

Egon

1.http://wiki.cubic.uni-koeln.de/cdkwiki/doku.php?id=cachingscheme

-- 
[EMAIL PROTECTED]
Cologne University Bioinformatics Center (CUBIC)
Blog: http://chem-bla-ics.blogspot.com/
GPG: 1024D/D6336BA6

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to