public interface IDescriptor
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:
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 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.
DescriptorValue
,
IDescriptorResult
Modifier and Type | Method and 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 a
IImplementationSpecification 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.
|
void initialise(IChemObjectBuilder builder)
builder
- chem object builder to use with this descriptorIImplementationSpecification getSpecification()
IImplementationSpecification
which specifies which descriptor
is implemented by this class.
These fields are used in the map:
String[] getParameterNames()
Object getParameterType(String name)
name
- The name of the parameter whose type is requestedvoid setParameters(Object[] params) throws CDKException
params
- An array of Object containing the parameters for this descriptorCDKException
- if invalid number of type of parameters are passed to itgetParameters()
Object[] getParameters()
setParameters(java.lang.Object[])
String[] getDescriptorNames()
ALOGPDescriptor
the return array will have a single elementCopyright © 2018. All Rights Reserved.