Interface IDescriptor
-
- All Known Subinterfaces:
IAtomicDescriptor
,IAtomPairDescriptor
,IBondDescriptor
,IMolecularDescriptor
,ISubstanceDescriptor
- All Known Implementing Classes:
AbstractAtomicDescriptor
,AbstractAtomPairDescriptor
,AbstractBondDescriptor
,AbstractMolecularDescriptor
,AcidicGroupCountDescriptor
,ALOGPDescriptor
,AminoAcidCountDescriptor
,APolDescriptor
,AromaticAtomsCountDescriptor
,AromaticBondsCountDescriptor
,AtomCountDescriptor
,AtomDegreeDescriptor
,AtomHybridizationDescriptor
,AtomHybridizationVSEPRDescriptor
,AtomicNumberDifferenceDescriptor
,AtomValenceDescriptor
,AutocorrelationDescriptorCharge
,AutocorrelationDescriptorMass
,AutocorrelationDescriptorPolarizability
,BasicGroupCountDescriptor
,BCUTDescriptor
,BondCountDescriptor
,BondPartialPiChargeDescriptor
,BondPartialSigmaChargeDescriptor
,BondPartialTChargeDescriptor
,BondSigmaElectronegativityDescriptor
,BondsToAtomDescriptor
,BPolDescriptor
,CarbonTypesDescriptor
,ChiChainDescriptor
,ChiClusterDescriptor
,ChiPathClusterDescriptor
,ChiPathDescriptor
,CovalentRadiusDescriptor
,CPSADescriptor
,DistanceToAtomDescriptor
,EccentricConnectivityIndexDescriptor
,EffectiveAtomPolarizabilityDescriptor
,FMFDescriptor
,FractionalCSP3Descriptor
,FractionalPSADescriptor
,FragmentComplexityDescriptor
,GravitationalIndexDescriptor
,HBondAcceptorCountDescriptor
,HBondDonorCountDescriptor
,HybridizationRatioDescriptor
,InductiveAtomicHardnessDescriptor
,InductiveAtomicSoftnessDescriptor
,IPAtomicHOSEDescriptor
,IPAtomicLearningDescriptor
,IPBondLearningDescriptor
,IPMolecularLearningDescriptor
,IsProtonInAromaticSystemDescriptor
,IsProtonInConjugatedPiSystemDescriptor
,JPlogPDescriptor
,KappaShapeIndicesDescriptor
,KierHallSmartsDescriptor
,LargestChainDescriptor
,LargestPiSystemDescriptor
,LengthOverBreadthDescriptor
,LongestAliphaticChainDescriptor
,MannholdLogPDescriptor
,MDEDescriptor
,MomentOfInertiaDescriptor
,OxygenAtomCountDescriptor
,PartialPiChargeDescriptor
,PartialSigmaChargeDescriptor
,PartialTChargeMMFF94Descriptor
,PartialTChargePEOEDescriptor
,PeriodicTablePositionDescriptor
,PetitjeanNumberDescriptor
,PetitjeanShapeIndexDescriptor
,PiContactDetectionDescriptor
,PiElectronegativityDescriptor
,ProtonAffinityHOSEDescriptor
,ProtonTotalPartialChargeDescriptor
,RDFProtonDescriptor_G3R
,RDFProtonDescriptor_GDR
,RDFProtonDescriptor_GHR
,RDFProtonDescriptor_GHR_topol
,RDFProtonDescriptor_GSR
,RotatableBondsCountDescriptor
,RuleOfFiveDescriptor
,SigmaElectronegativityDescriptor
,SmallRingDescriptor
,SpiroAtomCountDescriptor
,StabilizationPlusChargeDescriptor
,TaeAminoAcidDescriptor
,TPSADescriptor
,VABCDescriptor
,VAdjMaDescriptor
,VdWRadiusDescriptor
,WeightDescriptor
,WeightedPathDescriptor
,WHIMDescriptor
,WienerNumbersDescriptor
,XLogPDescriptor
,ZagrebIndexDescriptor
public interface IDescriptor
Classes that implement this interface are QSAR descriptor calculators. The architecture provides a few subinterfaces such as theIMolecularDescriptor
,IAtomicDescriptor
andIBondDescriptor
.Calculated results
The results calculated by the descriptor can have various types, which extend the IDescriptorResult, and is embedded in aDescriptorValue
. Currently, there are five result types:- BooleanResultType
- DoubleResultType
- IntegerResultType
- DoubleArrayResultType
- IntegerArrayResultType
- BooleanResult
- DoubleResult
- IntegerResult
- DoubleArrayResult
- IntegerArrayResult
The length of the first of these three result types is fixed at 1. However, the length of the array result types varies, depending on the used descriptor parameters. The length must not depend on the IAtomContainer, but only on the parameters.
Parameters
A descriptor may have parameters that specify how the descriptor is calculated, or to what level of detail. For example, the atom count descriptor may calculate counts for all elements, or just the specified element. As an effect, the DescriptorValue results may vary in length too.Each descriptor must provide default parameters, which allow descriptors to be calculated without having to set parameter values.
To interactively query which parameters are available, one can use the methods
getParameterNames()
to see how many and which parameters are available. To determine what object is used to set the parameter, the methodgetParameterType(String)
is used, where the parameter name is used as identifier.The default values are retrieved using the
getParameters()
method of a freshly instantiatedIDescriptor
. After use ofsetParameters()
, the current parameter values are returned.- See Also:
DescriptorValue
,IDescriptorResult
- Source code:
- main
- Belongs to CDK module:
- qsar
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getDescriptorNames()
Returns an array of names for each descriptor value calculated.String[]
getParameterNames()
Returns the names of the parameters for this descriptor.Object[]
getParameters()
Returns the current parameter values.Object
getParameterType(String name)
Returns a class matching that of the parameter with the given name.IImplementationSpecification
getSpecification()
Returns aIImplementationSpecification
which specifies which descriptor is implemented by this class.void
initialise(IChemObjectBuilder builder)
Initialise the descriptor with the specified chem object builder.void
setParameters(Object[] params)
Sets the parameters for this descriptor.
-
-
-
Method Detail
-
initialise
void initialise(IChemObjectBuilder builder)
Initialise the descriptor with the specified chem object builder. This allows descriptors that required domain objects, such as for SMARTS queries to initialise correctly. If you do not need domain objects then this method does not need to be implemented.- Parameters:
builder
- chem object builder to use with this descriptor
-
getSpecification
IImplementationSpecification getSpecification()
Returns aIImplementationSpecification
which specifies which descriptor is implemented by this class. These fields are used in the map:- Specification-Reference: refers to an entry in a unique dictionary
- Implementation-Title: anything
- Implementation-Identifier: a unique identifier for this version of this class
- Implementation-Vendor: CDK, JOELib, or anything else
- Returns:
- An object containing the descriptor specification
-
getParameterNames
String[] getParameterNames()
Returns the names of the parameters for this descriptor. The method returns null or a zero-length Object[] array if the descriptor does not have any parameters.- Returns:
- An array of String containing the names of the parameters that this descriptor can accept.
-
getParameterType
Object getParameterType(String name)
Returns a class matching that of the parameter with the given name. May only return null for when 'name' does not match any parameters returned by the getParameters() method.- Parameters:
name
- The name of the parameter whose type is requested- Returns:
- An Object of the class corresponding to the parameter with the supplied name
-
setParameters
void setParameters(Object[] params) throws CDKException
Sets the parameters for this descriptor. Must be done before calling calculate as the parameters influence the calculation outcome.- Parameters:
params
- An array of Object containing the parameters for this descriptor- Throws:
CDKException
- if invalid number of type of parameters are passed to it- See Also:
getParameters()
-
getParameters
Object[] getParameters()
Returns the current parameter values. If not parameters have been set, it must return the default parameters. The method returns null or a zero-length Object[] array if the descriptor does not have any parameters.- Returns:
- An array of Object containing the parameter default values
- See Also:
setParameters(java.lang.Object[])
-
getDescriptorNames
String[] getDescriptorNames()
Returns an array of names for each descriptor value calculated. Many descriptors return multiple values. In general it is useful for the descriptor to indicate the names for each value. In many cases, these names can be as simple as X1, X2, ..., XN where X is a prefix and 1, 2, ..., N are the indices. On the other hand it is also possible to return other arbitrary names, which should be documented in the Javadocs for the descriptor (e.g., the CPSA descriptor). Note that by default if a descriptor returns a single value (such asALOGPDescriptor
the return array will have a single element- Returns:
- An array of descriptor names, equal in length to the number of descriptor calculated..
-
-