chemaxon.descriptors
Class BCUT

java.lang.Object
  extended by chemaxon.descriptors.MolecularDescriptor
      extended by chemaxon.descriptors.BCUT
All Implemented Interfaces:
chemaxon.license.Licensable, chemaxon.stat.Diffable, java.lang.Cloneable

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
Author:
Miklos Vargyas

Field Summary
 
Fields inherited from class chemaxon.descriptors.MolecularDescriptor
params
 
Constructor Summary
BCUT()
          Creates a new, empty BCUT descriptor.
BCUT(BCUT sd)
          Copy constructor.
BCUT(BCUTParameters params)
          Creates a new instance according to the parameters.
BCUT(java.lang.String params)
          Creates a new instance according to the parameters.
 
Method Summary
 void clear()
          Clears the descriptor, all values are set to zero.
 java.lang.Object clone()
          Creates a new instance with identical internal state.
 void fromData(byte[] dbRepr)
          Builds a BCUT descriptor from an external data format, created by a previous call to toData().
 void fromFloatArray(float[] descr)
          Builds a BCUT descriptor from its float array representation (generated by toFloatArray()).
 void fromString(java.lang.String bcut)
          Builds a BCUT descriptor from its string representation created by toString().
 java.lang.String[] generate(Molecule m)
          Creates the BCUT descriptor for the given Molecule.
 float[] getDefaultDissimilarityMetricThresholds()
          Gets the default dissimilarity threshold values for all dissimilarity metrics defined.
 float getDissimilarity(java.lang.Object other)
          Calculates the dissimilarity ratio between two BCUT objects using the current default metric.
 float getDissimilarity(java.lang.Object other, int parametrizedMetricIndex)
          Calculates the dissimilarity between two BCUT objects using the specified metric, apart from that it is the same as getDissimilarity( final Object other ).
 java.lang.String[] getDissimilarityMetrics()
          Gets the dissimilarity metric names introduced for this class of MolecularDescriptor.
 float getEuclidean(BCUT descr)
          Calculates the Euclidean distance.
 float getHighestEigenvalue(int index)
          Gets the specified highest eigenvalue.
 float getLowestEigenvalue(int index)
          Gets the specified lowest eigenvalue.
 java.lang.String getName()
          Gets the name of the BCUT descriptor object.
 java.lang.String getParametersClassName()
          Gets the name of the parameters class corresponding to the descriptor.
 java.lang.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(java.lang.String env)
          Every license can have a modifier environment that's tipically an integration environment.
 void setParameters(MDParameters parameters)
          Sets the parameters of an already created BCUT object.
 void setParameters(java.lang.String parameters)
          Sets the parameters of an already created BCUT object.
 byte[] toData()
          Converts a BCUT object into a byte array.
 java.lang.String toDecimalString()
          Converts the BCUT descriptor into a tab separated string.
 float[] toFloatArray()
          Creates the float array representation of a BCUT descriptor object.
 java.lang.String toString()
          Converts the descriptor into a readable string.
 
Methods inherited from class chemaxon.descriptors.MolecularDescriptor
getAtomSetColors, getAtomSetIndexes, getAtomSetNames, getDefaultMetricIndex, getDefaultThreshold, getDissimilarityMetricIndex, getLowerBound, getMetricIndex, getMetricName, getMetricName, getNumberOfMetrics, getNumberOfWeights, getParameters, getThreshold, getThreshold, main, needsConfig, newInstance, newInstance, newInstanceFromXML, setScreeningConfiguration, toBinaryString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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(java.lang.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 the BCUT passed is created. The old and the new instances share the same BCUTParameters object.

Parameters:
sd - BCUT descriptor to be copied
Method Detail

clone

public java.lang.Object clone()
Creates a new instance with identical internal state.

Specified by:
clone in class MolecularDescriptor
Returns:
the newly copied object

toData

public byte[] toData()
Converts a BCUT 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 the fromData() method to build the BCUT object from this "external" representation.

Specified by:
toData in class MolecularDescriptor
Returns:
byte array representation of the descriptor object

fromData

public void fromData(byte[] dbRepr)
Builds a BCUT descriptor from an external data format, created by a previous call to toData().

Specified by:
fromData in class MolecularDescriptor
Parameters:
dbRepr - "external" representation of a BCUT object

getName

public java.lang.String getName()
Gets the name of the BCUT descriptor object. This name is not the same as the class name: nicer, and more meaningful for end-users too.

Overrides:
getName in class MolecularDescriptor
Returns:
the nice, external name for BCUT descriptor class objects

getShortName

public java.lang.String getShortName()
Gets the short name of the descriptor.

Overrides:
getShortName in class MolecularDescriptor
Returns:
the short name used in text outputs (tables etc.)

setParameters

public void setParameters(java.lang.String parameters)
                   throws chemaxon.descriptors.MDParametersException
Sets the parameters of an already created BCUT object.

Specified by:
setParameters in class MolecularDescriptor
Parameters:
parameters - parameter settings for the descriptor
Throws:
chemaxon.descriptors.MDParametersException - any XML error

setParameters

public void setParameters(MDParameters parameters)
                   throws chemaxon.descriptors.MDParametersException
Sets the parameters of an already created BCUT object.

Overrides:
setParameters in class MolecularDescriptor
Parameters:
parameters - parameter settings for the descriptor
Throws:
chemaxon.descriptors.MDParametersException - any XML error

getParametersClassName

public java.lang.String getParametersClassName()
Gets the name of the parameters class corresponding to the descriptor.

Overrides:
getParametersClassName in class MolecularDescriptor
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 index)
Gets the specified lowest eigenvalue.

Parameters:
index - 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 index)
Gets the specified highest eigenvalue.

Parameters:
index - 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(java.lang.String bcut)
                      throws java.text.ParseException
Builds a BCUT descriptor from its string representation created by toString().

Specified by:
fromString in class MolecularDescriptor
Parameters:
bcut - BCUT descriptor string
Throws:
java.text.ParseException

toString

public final java.lang.String toString()
Converts the descriptor into a readable string. This is the default external text format of the BCUT 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 class MolecularDescriptor
Returns:
string representation of the descriptor

toDecimalString

public final java.lang.String toDecimalString()
Converts the BCUT descriptor into a tab separated string.

Specified by:
toDecimalString in class MolecularDescriptor
Returns:
string representation of the descriptor

toFloatArray

public float[] toFloatArray()
Creates the float array representation of a BCUT descriptor object.

Specified by:
toFloatArray in class MolecularDescriptor
Returns:
a float array of the descriptor values

fromFloatArray

public void fromFloatArray(float[] descr)
Builds a BCUT descriptor from its float array representation (generated by toFloatArray()). Typically use is hypothesis generation.

Specified by:
fromFloatArray in class MolecularDescriptor
Parameters:
descr - descriptor represented in a float array

generate

public java.lang.String[] generate(Molecule m)
                            throws chemaxon.descriptors.MDGeneratorException
Creates the BCUT descriptor for the given Molecule. Calls the generator created by the corresponding BCUTParameters class.

Overrides:
generate in class MolecularDescriptor
Returns:
property names set in the molecule during generation
Throws:
chemaxon.descriptors.MDGeneratorException - when failed to generate descriptor

isLicensed

public boolean isLicensed()
Description copied from interface: chemaxon.license.Licensable
Returns information about the licensing of the product. Example implementation: return LicenseHandler.getInstance().isLicensed( LicenseHandler.MY_IDENTIFIER, licenseEnvironment );

Specified by:
isLicensed in interface chemaxon.license.Licensable
Returns:
true if the product is correctly licensed

setLicenseEnvironment

public void setLicenseEnvironment(java.lang.String env)
Description copied from interface: chemaxon.license.Licensable
Every license can have a modifier environment that's tipically an integration environment. All being Licensable should be prepared to store and show a set environment to the LicenseHandler. Example implementation:
 private String licenseEnvironment = "";
 public void setLicenseEnvironment(String env) {
     licenseEnvironment = env;
 }
 

Specified by:
setLicenseEnvironment in interface chemaxon.license.Licensable
Parameters:
env - environment String to be stored and passed to the LicenseHandler in the isLicensed method

getDissimilarityMetrics

public java.lang.String[] getDissimilarityMetrics()
Gets the dissimilarity metric names introduced for this class of MolecularDescriptor.

Specified by:
getDissimilarityMetrics in class MolecularDescriptor
Returns:
the metrics array

getDefaultDissimilarityMetricThresholds

public float[] getDefaultDissimilarityMetricThresholds()
Gets the default dissimilarity threshold values for all dissimilarity metrics defined.

Specified by:
getDefaultDissimilarityMetricThresholds in class MolecularDescriptor
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 associated BCUTParameters object.

Parameters:
descr - a descriptor from which the distance is measured
Returns:
dissimilarity coefficient

getDissimilarity

public float getDissimilarity(java.lang.Object other)
Calculates the dissimilarity ratio between two BCUT objects using the current default metric. Default metric is set in the corresponding BCUTParameters object by setCurrentParametrizedMetric( int metricIndex ). In the case of assymetric distances swapping the two descriptors can make big difference.

Specified by:
getDissimilarity in interface chemaxon.stat.Diffable
Specified by:
getDissimilarity in class MolecularDescriptor
Parameters:
other - a descriptor, to which the dissimilarity ratio is measured
Returns:
dissimilarity ratio

getDissimilarity

public float getDissimilarity(java.lang.Object other,
                              int parametrizedMetricIndex)
Calculates the dissimilarity between two BCUT objects using the specified metric, apart from that it is the same as getDissimilarity( final Object other ).

Specified by:
getDissimilarity in class MolecularDescriptor
Parameters:
other - a descriptor, to which the dissimilarity ratio is measured
parametrizedMetricIndex - the index of the parametrized metric to used
Returns:
dissimilarity ratio
See Also:
MDParameters, BCUTParameters