|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.descriptors.MolecularDescriptor
chemaxon.descriptors.ECFP
public class ECFP
The ECFP class implements Extended-Connectivity Fingerprints (ECFPs)
as a type of MolecularDescriptors.
ECFPs are circular topological fingerprints designed for molecular characterization,
similarity searching, and structure-activity modeling.
They are among the most popular similarity search tools in drug discovery and
they are effectively used in a wide variety of applications.
The main properties of ECFPs are the following.
For more information, see the detailed HTML documentation.
| Field Summary | |
|---|---|
protected int |
brightness
The number of bits set in the binary vector storage |
protected int[] |
fp
Binary vector storage of the fingerprint |
protected int[] |
ids
Identifier list storage of the fingerprint |
| Fields inherited from class chemaxon.descriptors.MolecularDescriptor |
|---|
params |
| Constructor Summary | |
|---|---|
ECFP()
Creates a new, empty instance of ECFP without allocating internal storage. |
|
ECFP(ECFP ecfp)
Copy constructor. |
|
ECFP(ECFPParameters params)
Creates a new instance of ECFP according to the parameters given. |
|
ECFP(java.lang.String params)
Creates a new instance of ECFP according to the parameters given. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the fingerprint, all values are set to zero. |
ECFP |
clone()
Creates a new instance with identical internal state. |
void |
dropBinaryVector()
Drops the binary vector storage. |
void |
fromData(byte[] data)
Builds an ECFP fingerprint from an external data format
created by toData(). |
void |
fromFeatureSet(java.util.Set<java.lang.Integer> set)
Deprecated. As of JChem 5.4.1, replaced by fromIdentiferSet(). |
void |
fromFloatArray(float[] descr)
Builds an ECFP fingerprint from its float array representation. |
void |
fromIdentiferSet(java.util.Set<java.lang.Integer> set)
Builds an ECFP fingerprint from a set of Integer
identifers. |
void |
fromIntArray(int[] array)
Builds an ECFP fingerprint from an array of int
identifiers. |
void |
fromString(java.lang.String ecfp)
Builds an ECFP fingerprint from its string representation
created by toString(). |
java.lang.String[] |
generate(Molecule m)
Creates the ECFP fingerprint for the given Molecule. |
float |
getAsymmetricEuclidean(ECFP f)
Calculates the asymmetric Euclidean distance. |
int |
getBrightness()
Gets the brightness of the fingerprint. |
float[] |
getDefaultDissimilarityMetricThresholds()
Gets the default dissimilarity threshold values for all dissimilarity metrics defined. |
int |
getDefaultMetricIndex()
Gets the index of the default metric. |
float |
getDefaultThreshold(int metricIndex)
Gets a metric dependent default threshold value. |
float |
getDissimilarity(MolecularDescriptor other)
Calculates the dissimilarity ratio between two ECFP
objects using the current default metric. |
float |
getDissimilarity(MolecularDescriptor other,
int metricIndex)
Calculates the dissimilarity between two ECFP
objects using the specified metric, apart from that it is the same as
getDissimilarity(final MolecularDescriptor other). |
java.lang.String[] |
getDissimilarityMetrics()
Gets the dissimilarity metric names introduced for this class of MolecularDescriptor. |
float |
getEuclidean(ECFP f)
Calculates the Euclidean distance. |
int |
getFeatureCount()
Deprecated. As of JChem 5.4.1, replaced by getIdentiferCount(). |
int |
getIdentiferCount()
Gets the number of integer identifers generated for the fingerprint. |
java.lang.String |
getName()
Gets the name of the ECFP fingerprint 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 fingerprint. |
float |
getTanimoto(ECFP f)
Calculates the Tanimoto distance. |
float |
getWeightedAsymmetricEuclidean(ECFP f)
Calculates the weighted asymmetric Euclidean distance. |
float |
getWeightedEuclidean(ECFP f)
Calculates the weighted Euclidean distance. |
boolean |
isLicensed()
Returns information about the licensing of the product. |
protected void |
requireBinaryVector()
Checks the binary vector storage and generates it from the identifier list if necessary. |
void |
setLicenseEnvironment(java.lang.String env)
Sets the license environment. |
void |
setParameters(MDParameters parameters)
Sets the parameters of an already created ECFP object. |
void |
setParameters(java.lang.String parameters)
Sets the parameters of an already created ECFP object. |
java.lang.String |
toBinaryString()
Converts the fingerprint into a fixed-length 0,1 string. |
java.util.BitSet |
toBitSet()
Returns a bit vector storing the "folded" binary representation of the fingerprint. |
byte[] |
toData()
Converts an ECFP object into a byte array. |
java.lang.String |
toDecimalString()
Converts the ECFP fingerprint into a tab separated string. |
java.util.Set<java.lang.Integer> |
toFeatureSet()
Deprecated. As of JChem 5.4.1, replaced by toIdentiferSet(). |
float[] |
toFloatArray()
Creates the float array representation of a ECFP fingerprint
object. |
java.util.Set<java.lang.Integer> |
toIdentiferSet()
Converts the fingerprint to a set of Integer identifiers. |
int[] |
toIntArray()
Converts the fingerprint to an array of int identifiers. |
java.lang.String |
toString()
Converts the fingerprint into a readable string. |
| Methods inherited from class chemaxon.descriptors.MolecularDescriptor |
|---|
generate, getAtomSetColors, getAtomSetIndexes, getAtomSetNames, getDissimilarityMetricIndex, getLowerBound, getMetricIndex, getMetricName, getMetricName, getNumberOfMetrics, getNumberOfWeights, getParameters, getThreshold, getThreshold, main, needsConfig, newInstance, newInstance, newInstanceFromXML, setScreeningConfiguration |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int[] ids
protected int[] fp
protected int brightness
| Constructor Detail |
|---|
public ECFP()
public ECFP(ECFPParameters params)
params - parameter settingspublic ECFP(java.lang.String params)
params - parameter settingspublic ECFP(ECFP ecfp)
ECFP fingerprint
passed is created. The old and the new instances share the same
ECFPParameters object.
ecfp - fingerprint to be copied| Method Detail |
|---|
public ECFP clone()
clone in class MolecularDescriptorpublic boolean isLicensed()
isLicensed in interface chemaxon.license.Licensablepublic void setLicenseEnvironment(java.lang.String env)
setLicenseEnvironment in interface chemaxon.license.Licensablepublic java.lang.String getName()
ECFP fingerprint object. This name is
not the same as the class name: nicer, and more meaningful for end-users
too.
getName in class MolecularDescriptorECFP class objectspublic java.lang.String getShortName()
getShortName in class MolecularDescriptorpublic java.lang.String getParametersClassName()
getParametersClassName in class MolecularDescriptor
public void setParameters(MDParameters parameters)
throws MDParametersException
ECFP object.
setParameters in class MolecularDescriptorparameters - parameter settings for the fingerprint
MDParametersException - any XML error
public void setParameters(java.lang.String parameters)
throws MDParametersException
ECFP object.
setParameters in class MolecularDescriptorparameters - parameter settings for the fingerprint
MDParametersException - any XML errorpublic void clear()
public byte[] toData()
ECFP object into a byte array.
This format can be referred to as an "external representation" since
it servers as the data format for storing ECFP fingerprints in databases.
fromData() method to build the ECFP
object from this "external" representation.
toData in class MolecularDescriptorpublic void fromData(byte[] data)
ECFP fingerprint from an external data format
created by toData().
fromData in class MolecularDescriptordata - "external" representation of a ECFP objectpublic final java.lang.String toString()
toString in class MolecularDescriptorpublic final java.lang.String toDecimalString()
ECFP fingerprint into a tab separated string.
toDecimalString in class MolecularDescriptorpublic java.lang.String toBinaryString()
toBinaryString in class MolecularDescriptor
public final void fromString(java.lang.String ecfp)
throws java.text.ParseException
ECFP fingerprint from its string representation
created by toString().
fromString in class MolecularDescriptorecfp - ECFP fingerprint string
java.text.ParseExceptionpublic float[] toFloatArray()
ECFP fingerprint
object.
toFloatArray in class MolecularDescriptorpublic void fromFloatArray(float[] descr)
ECFP fingerprint from its float array representation.
Typically used when a hypothesis is created.
fromFloatArray in class MolecularDescriptordescr - fingerprint represented in a float array
(e.g. generated by toFloatArray())public int[] toIntArray()
int identifiers.
public void fromIntArray(int[] array)
ECFP fingerprint from an array of int
identifiers.
public java.util.Set<java.lang.Integer> toIdentiferSet()
Integer identifiers.
public void fromIdentiferSet(java.util.Set<java.lang.Integer> set)
ECFP fingerprint from a set of Integer
identifers.
public java.util.Set<java.lang.Integer> toFeatureSet()
toIdentiferSet().
Integer identifiers.
public void fromFeatureSet(java.util.Set<java.lang.Integer> set)
fromIdentiferSet().
ECFP fingerprint from a set of Integer
identifers.
public java.util.BitSet toBitSet()
public int getIdentiferCount()
public int getFeatureCount()
getIdentiferCount().
public int getBrightness()
protected void requireBinaryVector()
public void dropBinaryVector()
public java.lang.String[] generate(Molecule m)
throws MDGeneratorException
ECFPParameters class.
generate in class MolecularDescriptorMDGeneratorException - when failed to generate fingerprintpublic java.lang.String[] getDissimilarityMetrics()
MolecularDescriptor.
getDissimilarityMetrics in class MolecularDescriptorpublic float[] getDefaultDissimilarityMetricThresholds()
getDefaultDissimilarityMetricThresholds in class MolecularDescriptorpublic int getDefaultMetricIndex()
ECFP,
this is Tanimoto.
getDefaultMetricIndex in class MolecularDescriptorpublic float getDefaultThreshold(int metricIndex)
getDefaultThreshold in class MolecularDescriptormetricIndex - index of a parameterized metricpublic float getTanimoto(ECFP f)
f - the distance from f is calculated
public float getEuclidean(ECFP f)
f - the distance from f is calculated
public float getWeightedEuclidean(ECFP f)
f - the distance from f is calculated
public float getAsymmetricEuclidean(ECFP f)
f - the distance from f is calculated
public float getWeightedAsymmetricEuclidean(ECFP f)
f - the distance from f is calculated
public float getDissimilarity(MolecularDescriptor other)
ECFP
objects using the current default metric.
Default metric is set in the corresponding ECFPParameters
object by setCurrentParametrizedMetric(int metricIndex).
In the case of assymetric distances, swapping the two fingerprints can
make big difference.
getDissimilarity in class MolecularDescriptorother - a fingerprint, to which the dissimilarity ratio is measured
public float getDissimilarity(MolecularDescriptor other,
int metricIndex)
ECFP
objects using the specified metric, apart from that it is the same as
getDissimilarity(final MolecularDescriptor other).
getDissimilarity in class MolecularDescriptorother - a fingerprint, to which the dissimilarity ratio is measuredmetricIndex - the index of the metric to be used
MDParameters,
PFParameters
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||