org.openscience.cdk.qsar
Class AbstractBondDescriptor

java.lang.Object
  extended by org.openscience.cdk.qsar.AbstractBondDescriptor
All Implemented Interfaces:
IBondDescriptor, IDescriptor
Direct Known Subclasses:
BondPartialPiChargeDescriptor, BondPartialSigmaChargeDescriptor, BondPartialTChargeDescriptor, IPBondLearningDescriptor

public abstract class AbstractBondDescriptor
extends Object
implements IBondDescriptor

Abstract bond descriptor class with helper functions for descriptors that require the whole molecule to calculate the descriptor values, which in turn need to be cached for all bonds, so that they can be retrieved one by one.

Belongs to CDK module:
qsar
Source code:
cdk-1.4.x

Constructor Summary
AbstractBondDescriptor()
           
 
Method Summary
 void cacheDescriptorValue(IBond bond, IAtomContainer container, IDescriptorResult doubleResult)
          Caches a DescriptorValue for a given IBond.
 IDescriptorResult getCachedDescriptorValue(IBond bond)
          Returns the cached DescriptorValue for the given IBond.
 boolean isCachedAtomContainer(IAtomContainer container)
          Returns true if the cached IDescriptorResult's are for the given IAtomContainer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openscience.cdk.qsar.IBondDescriptor
calculate
 
Methods inherited from interface org.openscience.cdk.qsar.IDescriptor
getDescriptorNames, getParameterNames, getParameters, getParameterType, getSpecification, setParameters
 

Constructor Detail

AbstractBondDescriptor

public AbstractBondDescriptor()
Method Detail

isCachedAtomContainer

public boolean isCachedAtomContainer(IAtomContainer container)
Returns true if the cached IDescriptorResult's are for the given IAtomContainer.

Parameters:
container -
Returns:
false, if the cache is for a different IAtomContainer

getCachedDescriptorValue

public IDescriptorResult getCachedDescriptorValue(IBond bond)
Returns the cached DescriptorValue for the given IBond.

Parameters:
bond - the IAtom for which the DescriptorValue is requested
Returns:
null, if no DescriptorValue was cached for the given IBond

cacheDescriptorValue

public void cacheDescriptorValue(IBond bond,
                                 IAtomContainer container,
                                 IDescriptorResult doubleResult)
Caches a DescriptorValue for a given IBond. This method may only be called after setNewContainer() is called.

Parameters:
bond - IBond to cache the value for
doubleResult - DescriptorValue for the given IBond