@TestClass(value="org.openscience.cdk.qsar.descriptors.molecular.AtomCountDescriptorTest") public class AtomCountDescriptor extends Object implements IMolecularDescriptor
This descriptor uses these parameters:
Name | Default | Description |
elementName | * | Symbol of the element we want to count |
Constructor and Description |
---|
AtomCountDescriptor()
Constructor for the AtomCountDescriptor object.
|
Modifier and Type | Method and Description |
---|---|
DescriptorValue |
calculate(IAtomContainer container)
This method calculate the number of atoms of a given type in an
IAtomContainer . |
String[] |
getDescriptorNames()
Returns an array of names for each descriptor value calculated.
|
IDescriptorResult |
getDescriptorResultType()
Returns the specific type of the DescriptorResult object.
|
String[] |
getParameterNames()
Gets the parameterNames attribute of the AtomCountDescriptor object.
|
Object[] |
getParameters()
Gets the parameters attribute of the AtomCountDescriptor object.
|
Object |
getParameterType(String name)
Gets the parameterType attribute of the AtomCountDescriptor object.
|
DescriptorSpecification |
getSpecification()
Returns a
Map which specifies which descriptor
is implemented by this class. |
void |
setParameters(Object[] params)
Sets the parameters attribute of the AtomCountDescriptor object.
|
public AtomCountDescriptor()
@TestMethod(value="testGetSpecification") public DescriptorSpecification getSpecification()
Map
which specifies which descriptor
is implemented by this class.
These fields are used in the map:
getSpecification
in interface IDescriptor
@TestMethod(value="testSetParameters_arrayObject") public void setParameters(Object[] params) throws CDKException
setParameters
in interface IDescriptor
params
- The new parameters valueCDKException
- if the number of parameters is greater than 1
or else the parameter is not of type StringgetParameters()
@TestMethod(value="testGetParameters") public Object[] getParameters()
getParameters
in interface IDescriptor
setParameters(java.lang.Object[])
@TestMethod(value="testNamesConsistency") public String[] getDescriptorNames()
IDescriptor
ALOGPDescriptor
the return array will have a single element
getDescriptorNames
in interface IDescriptor
@TestMethod(value="testCalculate_IAtomContainer") public DescriptorValue calculate(IAtomContainer container)
IAtomContainer
.calculate
in interface IMolecularDescriptor
container
- The atom container for which this descriptor is to be calculated@TestMethod(value="testGetDescriptorResultType") public IDescriptorResult getDescriptorResultType()
DescriptorValue
object. Note that the same result
can be achieved by interrogating the DescriptorValue
object; this method
allows you to do the same thing, without actually calculating the descriptor.getDescriptorResultType
in interface IMolecularDescriptor
IDescriptorResult
interface indicating
the actual type of values returned by the descriptor in the DescriptorValue
object@TestMethod(value="testGetParameterNames") public String[] getParameterNames()
getParameterNames
in interface IDescriptor
@TestMethod(value="testGetParameterType_String") public Object getParameterType(String name)
getParameterType
in interface IDescriptor
name
- Description of the Parameter