Class AbstractBondDescriptor
java.lang.Object
org.openscience.cdk.qsar.AbstractBondDescriptor
- All Implemented Interfaces:
IBondDescriptor, IDescriptor
- Direct Known Subclasses:
AtomicNumberDifferenceDescriptor, BondPartialPiChargeDescriptor, BondPartialSigmaChargeDescriptor, BondPartialTChargeDescriptor, BondSigmaElectronegativityDescriptor, IPBondLearningDescriptor
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcacheDescriptorValue(IBond bond, IAtomContainer container, IDescriptorResult doubleResult) Caches a DescriptorValue for a given IBond.Returns the cached DescriptorValue for the given IBond.voidinitialise(IChemObjectBuilder builder) Default implementation of initialise allows optional override.booleanisCachedAtomContainer(IAtomContainer container) Returns true if the cached IDescriptorResult's are for the given IAtomContainer.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IBondDescriptor
calculateModifier and TypeMethodDescriptioncalculate(IBond bond, IAtomContainer atomContainer) Calculates the descriptor value for the given IBond.Methods inherited from interface IDescriptor
getDescriptorNames, getParameterNames, getParameters, getParameterType, getSpecification, setParametersModifier and TypeMethodDescriptionString[]Returns an array of names for each descriptor value calculated.String[]Returns the names of the parameters for this descriptor.Object[]Returns the current parameter values.getParameterType(String name) Returns a class matching that of the parameter with the given name.Returns aIImplementationSpecificationwhich specifies which descriptor is implemented by this class.voidsetParameters(Object[] params) Sets the parameters for this descriptor.
-
Constructor Details
-
AbstractBondDescriptor
public AbstractBondDescriptor()
-
-
Method Details
-
isCachedAtomContainer
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
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 fordoubleResult- DescriptorValue for the given IBond
-
initialise
Default implementation of initialise allows optional override.- Specified by:
initialisein interfaceIDescriptor- Parameters:
builder- chem object build
-