Package chemaxon.descriptors
Class BCUT
- java.lang.Object
-
- chemaxon.descriptors.MolecularDescriptor
-
- chemaxon.descriptors.BCUT
-
- All Implemented Interfaces:
chemaxon.license.Licensable
,Cloneable
@PublicAPI public class BCUT extends MolecularDescriptor implements chemaxon.license.Licensable
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
Fields Modifier and Type Field Description protected float[][]
highestEigenvalues
protected float[][]
lowestEigenvalues
-
Fields inherited from class chemaxon.descriptors.MolecularDescriptor
params
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears the descriptor, all values are set to zero.BCUT
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()
).void
fromString(String bcut)
Builds aBCUT
descriptor from its string representation created bytoString()
.String[]
generate(Molecule m)
Creates the BCUT descriptor for the given Molecule.List<String>
getAliasNames()
float[]
getDefaultDissimilarityMetricThresholds()
Gets the default dissimilarity threshold values for all dissimilarity metrics defined.float
getDissimilarity(MolecularDescriptor other)
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[]
getDissimilarityMetrics()
Gets the dissimilarity metric names introduced for this class ofMolecularDescriptor
.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.String
getName()
Gets the name of theBCUT
descriptor object.String
getParametersClassName()
Gets the name of the parameters class corresponding to the descriptor.String
getShortName()
Gets the short name of the descriptor.float
getWeightedEuclidean(BCUT descr)
Calculates the weighted Euclidean distance.boolean
isLicensed()
Returns information about the licensing of the product.void
setLicenseEnvironment(String env)
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.String
toDecimalString()
Converts theBCUT
descriptor into a tab separated string.float[]
toFloatArray()
Creates the float array representation of aBCUT
descriptor object.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, newInstanceSupplier, setScreeningConfiguration, toBinaryString
-
-
-
-
Constructor Detail
-
BCUT
public BCUT()
Creates a new, empty BCUT descriptor.
-
BCUT
public BCUT(BCUTParameters params)
Creates a new instance according to the parameters.- Parameters:
params
- configuration parameters
-
BCUT
public BCUT(String params)
Creates a new instance according to the parameters.- Parameters:
params
- parameter settings
-
BCUT
public BCUT(BCUT sd)
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 Detail
-
clone
public BCUT 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
public void setLicenseEnvironment(String env)
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
public String 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
public String getShortName()
Gets the short name of the descriptor.- Overrides:
getShortName
in classMolecularDescriptor
- Returns:
- the short name used in text outputs (tables etc.)
-
setParameters
public void setParameters(String parameters) throws MDParametersException
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
public void setParameters(MDParameters parameters) throws MDParametersException
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
public String 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
public final void fromString(String bcut) throws ParseException
Builds aBCUT
descriptor from its string representation created bytoString()
.- Specified by:
fromString
in classMolecularDescriptor
- Parameters:
bcut
-BCUT
descriptor string- Throws:
ParseException
-
toString
public final String 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
public final String 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
public String[] generate(Molecule m) throws MDGeneratorException
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
public String[] 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
public final float getEuclidean(BCUT descr)
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
public final float getWeightedEuclidean(BCUT descr)
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
public float getDissimilarity(MolecularDescriptor other)
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
public 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 )
.- 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:
MDParameters
,BCUTParameters
-
-