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 the IMolecularDescriptor, IAtomicDescriptor and IBondDescriptor.

Calculated results
The results calculated by the descriptor can have various types, which extend the IDescriptorResult, and is embedded in a DescriptorValue. Currently, there are five result types:

  • BooleanResultType
  • DoubleResultType
  • IntegerResultType
  • DoubleArrayResultType
  • IntegerArrayResultType
But the DescriptorValue will hold an actual value using one of the following five classes:
  • 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.

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 method getParameterType(String) is used, where the parameter name is used as identifier.

The default values are retrieved using the getParameters() method of a freshly instantiated IDescriptor. After use of setParameters(), the current parameter values are returned.

See Also:
Source code:
Belongs to CDK module:
  • Method Details

    • 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.
      builder - chem object builder to use with this descriptor
    • getSpecification

      IImplementationSpecification getSpecification()
      Returns a IImplementationSpecification 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
      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.
      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.
      name - The name of the parameter whose type is requested
      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.
      params - An array of Object containing the parameters for this descriptor
      CDKException - if invalid number of type of parameters are passed to it
      See Also:
    • 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.
      An array of Object containing the parameter default values
      See Also:
    • 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 as ALOGPDescriptor the return array will have a single element
      An array of descriptor names, equal in length to the number of descriptor calculated..