Package chemaxon.descriptors
Class BCUT
java.lang.Object
chemaxon.descriptors.MolecularDescriptor
chemaxon.descriptors.BCUT
- All Implemented Interfaces:
chemaxon.license.Licensable
,Cloneable
Implements BCUT descriptors. Calculates lowest and highest eigenvalues of the
original Burden matrix and the three variant introduced by Pearlamn and Smith
(ref: R. S. Pearlman and K.M. Smith: Novel Software Tools for Chemical
Diversity, Perspectives in Drug Discovery and Design, 9/10/11: 339-353, 1998.)
These three variants are: atom charge, atom polarizability and hydrogen bond
acceptor/donor properties.
The number of lowest and/or highest eigenvalues to be calculated are
specified in the corresponding parameter configuration file.
- Since:
- JChem 2.3
-
Field Summary
Modifier and TypeFieldDescriptionprotected float[][]
protected float[][]
Fields inherited from class chemaxon.descriptors.MolecularDescriptor
params
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the descriptor, all values are set to zero.clone()
Creates a new instance with identical internal state.void
fromData
(byte[] dbRepr) Builds aBCUT
descriptor from an external data format, created by a previous call totoData()
.void
fromFloatArray
(float[] descr) Builds aBCUT
descriptor from its float array representation (generated bytoFloatArray()
).final void
fromString
(String bcut) Builds aBCUT
descriptor from its string representation created bytoString()
.String[]
Creates the BCUT descriptor for the given Molecule.float[]
Gets the default dissimilarity threshold values for all dissimilarity metrics defined.float
Calculates the dissimilarity ratio between twoBCUT
objects using the current default metric.float
getDissimilarity
(MolecularDescriptor other, int parametrizedMetricIndex) Calculates the dissimilarity between twoBCUT
objects using the specified metric, apart from that it is the same asgetDissimilarity( final MolecularDescriptor other )
.String[]
Gets the dissimilarity metric names introduced for this class ofMolecularDescriptor
.final float
getEuclidean
(BCUT descr) Calculates the Euclidean distance.float
getHighestEigenvalue
(int desc, int index) Gets the specified highest eigenvalue.float
getLowestEigenvalue
(int desc, int index) Gets the specified lowest eigenvalue.getName()
Gets the name of theBCUT
descriptor object.Gets the name of the parameters class corresponding to the descriptor.Gets the short name of the descriptor.final float
getWeightedEuclidean
(BCUT descr) Calculates the weighted Euclidean distance.boolean
Returns information about the licensing of the product.void
Sets the license environment.void
setParameters
(MDParameters parameters) Sets the parameters of an already createdBCUT
object.void
setParameters
(String parameters) Sets the parameters of an already createdBCUT
object.byte[]
toData()
Converts aBCUT
object into a byte array.final String
Converts theBCUT
descriptor into a tab separated string.float[]
Creates the float array representation of aBCUT
descriptor object.final String
toString()
Converts the descriptor into a readable string.Methods inherited from class chemaxon.descriptors.MolecularDescriptor
generate, getAtomSetColors, getAtomSetIndexes, getAtomSetNames, getDefaultMetricIndex, getDefaultThreshold, getDissimilarityMetricIndex, getLowerBound, getMetricIndex, getMetricName, getMetricName, getNumberOfMetrics, getNumberOfWeights, getParameters, getThreshold, getThreshold, main, needsConfig, newInstance, newInstance, newInstanceFromXML, setScreeningConfiguration, toBinaryString
-
Field Details
-
lowestEigenvalues
protected float[][] lowestEigenvalues -
highestEigenvalues
protected float[][] highestEigenvalues
-
-
Constructor Details
-
BCUT
public BCUT()Creates a new, empty BCUT descriptor. -
BCUT
Creates a new instance according to the parameters.- Parameters:
params
- configuration parameters
-
BCUT
Creates a new instance according to the parameters.- Parameters:
params
- parameter settings
-
BCUT
Copy constructor. An identical copy of theBCUT
passed is created. The old and the new instances share the sameBCUTParameters
object.- Parameters:
sd
- BCUT descriptor to be copied
-
-
Method Details
-
clone
Creates a new instance with identical internal state.- Specified by:
clone
in classMolecularDescriptor
- Returns:
- the newly copied object
-
isLicensed
public boolean isLicensed()Returns information about the licensing of the product.- Specified by:
isLicensed
in interfacechemaxon.license.Licensable
- Returns:
- true if the product is correctly licensed
-
setLicenseEnvironment
Sets the license environment.- Specified by:
setLicenseEnvironment
in interfacechemaxon.license.Licensable
-
toData
public byte[] toData()Converts aBCUT
object into a byte array. This format can be reffered to as an "external representation" since it servers as the data format for storing BCUT descriptors in databases.
Use thefromData()
method to build theBCUT
object from this "external" representation.- Specified by:
toData
in classMolecularDescriptor
- Returns:
- byte array representation of the descriptor object
-
fromData
public void fromData(byte[] dbRepr) Builds aBCUT
descriptor from an external data format, created by a previous call totoData()
.- Specified by:
fromData
in classMolecularDescriptor
- Parameters:
dbRepr
- "external" representation of aBCUT
object
-
getName
Gets the name of theBCUT
descriptor object. This name is not the same as the class name: nicer, and more meaningful for end-users too.- Overrides:
getName
in classMolecularDescriptor
- Returns:
- the nice, external name for BCUT descriptor class objects
-
getShortName
Gets the short name of the descriptor.- Overrides:
getShortName
in classMolecularDescriptor
- Returns:
- the short name used in text outputs (tables etc.)
-
setParameters
Sets the parameters of an already createdBCUT
object.- Specified by:
setParameters
in classMolecularDescriptor
- Parameters:
parameters
- parameter settings for the descriptor- Throws:
MDParametersException
- any XML error
-
setParameters
Sets the parameters of an already createdBCUT
object.- Overrides:
setParameters
in classMolecularDescriptor
- Parameters:
parameters
- parameter settings for the descriptor- Throws:
MDParametersException
- any XML error
-
getParametersClassName
Gets the name of the parameters class corresponding to the descriptor.- Overrides:
getParametersClassName
in classMolecularDescriptor
- Returns:
- the name of the parameters class
-
clear
public void clear()Clears the descriptor, all values are set to zero. -
getLowestEigenvalue
public float getLowestEigenvalue(int desc, int index) Gets the specified lowest eigenvalue.- Parameters:
desc
- the index of descriptorindex
- the index of one of the lowest eigenvalues to be retrieved (0 is the smallest).- Returns:
- smallest 'index'-th eigenvalue
-
getHighestEigenvalue
public float getHighestEigenvalue(int desc, int index) Gets the specified highest eigenvalue.- Parameters:
desc
- the index of descriptorindex
- the index of one of the highest eigenvalues to be retrieved (0 is the largest)- Returns:
- largest 'index'-th eigenvalue
-
fromString
Builds aBCUT
descriptor from its string representation created bytoString()
.- Specified by:
fromString
in classMolecularDescriptor
- Parameters:
bcut
-BCUT
descriptor string- Throws:
ParseException
-
toString
Converts the descriptor into a readable string. This is the default external text format of theBCUT
descriptor, and it is also the format which is be stored in SDfiles. Lowest eigenvalues are printed first, and they are comma separated. Lowest and highest eigenvalue are separated by a semicolon, which is printed if there is at least one highest eigenvalue calculated (even if no lowest values are needed).- Specified by:
toString
in classMolecularDescriptor
- Returns:
- string representation of the descriptor
-
toDecimalString
Converts theBCUT
descriptor into a tab separated string.- Specified by:
toDecimalString
in classMolecularDescriptor
- Returns:
- string representation of the descriptor
-
toFloatArray
public float[] toFloatArray()Creates the float array representation of aBCUT
descriptor object.- Specified by:
toFloatArray
in classMolecularDescriptor
- Returns:
- a float array of the descriptor values
-
fromFloatArray
public void fromFloatArray(float[] descr) Builds aBCUT
descriptor from its float array representation (generated bytoFloatArray()
). Typically use is hypothesis generation.- Specified by:
fromFloatArray
in classMolecularDescriptor
- Parameters:
descr
- descriptor represented in a float array
-
generate
Creates the BCUT descriptor for the given Molecule. Calls the generator created by the correspondingBCUTParameters
class.- Overrides:
generate
in classMolecularDescriptor
- Returns:
- property names set in the molecule during generation
- Throws:
MDGeneratorException
- when failed to generate descriptor
-
getDissimilarityMetrics
Gets the dissimilarity metric names introduced for this class ofMolecularDescriptor
.- Specified by:
getDissimilarityMetrics
in classMolecularDescriptor
- Returns:
- the metrics array
-
getDefaultDissimilarityMetricThresholds
public float[] getDefaultDissimilarityMetricThresholds()Gets the default dissimilarity threshold values for all dissimilarity metrics defined.- Specified by:
getDefaultDissimilarityMetricThresholds
in classMolecularDescriptor
- Returns:
- array of dissimilarity threshold values
-
getEuclidean
Calculates the Euclidean distance. The dissimilarity coefficient returned ranges from 0 to MAX_FLOAT, this coefficient is not normalized.- Parameters:
descr
- another descriptor from which the distance is measured- Returns:
- dissimilarity coefficient
-
getWeightedEuclidean
Calculates the weighted Euclidean distance. Weights are taken from the associatedBCUTParameters
object.- Parameters:
descr
- a descriptor from which the distance is measured- Returns:
- dissimilarity coefficient
-
getDissimilarity
Calculates the dissimilarity ratio between twoBCUT
objects using the current default metric. Default metric is set in the correspondingBCUTParameters
object bysetCurrentParametrizedMetric( int metricIndex )
. In the case of assymetric distances swapping the two descriptors can make big difference.- Specified by:
getDissimilarity
in classMolecularDescriptor
- Parameters:
other
- a descriptor, to which the dissimilarity ratio is measured- Returns:
- dissimilarity ratio
-
getDissimilarity
Calculates the dissimilarity between twoBCUT
objects using the specified metric, apart from that it is the same asgetDissimilarity( final MolecularDescriptor other )
.- Specified by:
getDissimilarity
in classMolecularDescriptor
- Parameters:
other
- a descriptor, to which the dissimilarity ratio is measuredparametrizedMetricIndex
- the index of the parametrized metric to used- Returns:
- dissimilarity ratio
- See Also:
-
getAliasNames
-