|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.descriptors.MolecularDescriptor
chemaxon.descriptors.ReactionFingerprint
public class ReactionFingerprint
ReactionFingerprint class.
| Field Summary | |
|---|---|
protected int |
brightness
number of bits set in the fingerprint (sometimes this is called the darkness, but that seems to be less pausible) |
protected int[] |
fp
storage for the fingerprint |
| Fields inherited from class chemaxon.descriptors.MolecularDescriptor |
|---|
params |
| Constructor Summary | |
|---|---|
ReactionFingerprint()
Creates a new, empty instance of ReactionFingerprint without allocating internal storage. |
|
ReactionFingerprint(ReactionFingerprint rfp)
Copy constructor. |
|
ReactionFingerprint(RFParameters params)
Creates a new instance of ReactionFingerprint according to the parameters given. |
|
ReactionFingerprint(java.lang.String params)
Creates a new instance of ReactionFingerprint according to the parameters given. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the fingerprint: sets all bins to store zero value. |
ReactionFingerprint |
clone()
Creates a copy with identical internal state. |
void |
fromData(byte[] dbRepr)
Builds a fingerprint from an external data format, created by a previous call to toData(). |
void |
fromFloatArray(float[] descr)
Builds fingerprint from its float array representation. |
void |
fromString(java.lang.String cfp)
Builds a fingerprint from its string representation created by toString(). |
java.lang.String[] |
generate(Molecule m)
Creates the ReactionFingerprint descriptor for the given Molecule. |
int |
getBrightness()
Gets the brightness of the fingerprint. |
static int[] |
getChemicalHashedFingerprint(int[] reactionFingerprint,
int length)
Creates chemical hashed fingerpint from reaction fingerprint. |
float |
getCoarseReactionTanimoto(ReactionFingerprint f)
Returns the tanimoto distance of the reaction centers. |
int |
getCommonBitCount(ReactionFingerprint f)
|
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 fp2)
Calculates the dissimilarity between two reaction fingerprints using the default distance measure. |
float |
getDissimilarity(MolecularDescriptor fp2,
int metricIndex)
Calculates the dissimilarity between two reaction fingerprints using the specified distance metric. |
java.lang.String[] |
getDissimilarityMetrics()
Gets the dissimilarity metric names |
java.lang.String[] |
getDissimilarityMetricsParamDefault()
Gets the dissimilarity metric parameter names -> no parameters. |
java.lang.String[] |
getDissimilarityMetricsParamHelp()
Gets the dissimilarity metric parameter names -> no parameters. |
java.lang.String[] |
getDissimilarityMetricsParamNames()
Gets the dissimilarity metric parameter names -> no parameters. |
int[] |
getDissimilarityMetricsParamNum()
Gets the dissimilarity metric parameter number -> no parameters. |
java.lang.String[] |
getDissimilarityMetricsParamRanges()
Gets the dissimilarity metric parameter ranges -> no parameters. |
float |
getLowerBound(MolecularDescriptor fp2)
Calculates the lower bound estimate of the dissimilarity from the given fingerprint. |
float |
getMediumReactionTanimoto(ReactionFingerprint f)
Returns the tanimoto distance of the reaction centers and their neighbouring atoms and bonds. |
java.lang.String |
getName()
Gets the nice name of the ReactionFingerprint descriptor
object. |
java.lang.String |
getParametersClassName()
Gets the name of the parameters class corresponding to the descriptor. |
float |
getProductTanimoto(ReactionFingerprint f)
Returns the tanimoto distance of the product sides. |
float |
getReactantTanimoto(ReactionFingerprint f)
Returns the tanimoto distance of the reactant sides. |
java.lang.String |
getShortName()
Gets the short name of the descriptor. |
float |
getStrictReactionTanimoto(ReactionFingerprint f)
Returns the tanimoto distance of the reaction centers, their immediate neighbour atoms and bonds, and the neighbours' neighbouring atoms and bonds. |
boolean |
isReactionMappingIncomplete()
Returns true if reaction molecule was not mapped completely during reaction fingerprint generation. |
boolean |
isSubSetOf(ReactionFingerprint f)
|
static void |
main(java.lang.String[] argv)
|
void |
setParameters(MDParameters parameters)
Sets parameters, allocates internal storage if needed and cleans the descriptor. |
void |
setParameters(java.lang.String parameters)
Sets the parameters of an already created ReactionFingerprint object. |
java.lang.String |
toBinaryString()
Converts the fingerprint into a 0,1 string. |
byte[] |
toData()
Converts a reaction fingerprint object into a byte array. |
java.lang.String |
toDecimalString()
Converts the fingerprint into a tab separated string. |
float[] |
toFloatArray()
Creates the float array representation of the fingerprint. |
java.lang.String |
toString()
Converts the fingerprint into a readable string. |
| Methods inherited from class chemaxon.descriptors.MolecularDescriptor |
|---|
generate, getAtomSetColors, getAtomSetIndexes, getAtomSetNames, getDissimilarityMetricIndex, getMetricIndex, getMetricName, getMetricName, getNumberOfMetrics, getNumberOfWeights, getParameters, getThreshold, getThreshold, 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[] fp
protected int brightness
| Constructor Detail |
|---|
public ReactionFingerprint()
public ReactionFingerprint(RFParameters params)
params - parameters used in fingerprint generation and handlingpublic ReactionFingerprint(java.lang.String params)
params - parameter settingspublic ReactionFingerprint(ReactionFingerprint rfp)
RFParameters object.
rfp - fingerprint to be copied| Method Detail |
|---|
public ReactionFingerprint clone()
RFParameters object with the copied one.
clone in class MolecularDescriptorpublic java.lang.String getName()
ReactionFingerprint descriptor
object. This name is not the same as the class name: it is nicer, and
more meaningful for end-users.
getName in class MolecularDescriptorpublic java.lang.String getShortName()
getShortName in class MolecularDescriptorpublic java.lang.String getParametersClassName()
getParametersClassName in class MolecularDescriptorpublic int getBrightness()
public void setParameters(MDParameters parameters)
setParameters in class MolecularDescriptorparameters - fingerprint parameters
public void setParameters(java.lang.String parameters)
throws chemaxon.descriptors.MDParametersException
ReactionFingerprint object.
setParameters in class MolecularDescriptorparameters - parameter settings for the descriptor
chemaxon.descriptors.MDParametersException - any XML errorpublic byte[] toData()
fromData() method to build the fingerprint from
this "external" representation.
toData in class MolecularDescriptorpublic void fromData(byte[] dbRepr)
toData().
fromData in class MolecularDescriptordbRepr - "external" representation of ReactionFingerprintpublic final void clear()
public final java.lang.String toString()
toString in class MolecularDescriptorpublic final java.lang.String toDecimalString()
toDecimalString in class MolecularDescriptorpublic java.lang.String toBinaryString()
toBinaryString in class MolecularDescriptor
public final void fromString(java.lang.String cfp)
throws java.text.ParseException
toString().
fromString in class MolecularDescriptorcfp - fingerprint string
java.text.ParseExceptionpublic final float[] toFloatArray()
toFloatArray in class MolecularDescriptor
public void fromFloatArray(float[] descr)
throws java.lang.RuntimeException
fromFloatArray in class MolecularDescriptordescr - fingerprint represented in a float array
(e.g. generated by toFloatArray())
java.lang.RuntimeException
public java.lang.String[] generate(Molecule m)
throws chemaxon.descriptors.MDGeneratorException
MDParameters class.
generate in class MolecularDescriptorchemaxon.descriptors.MDGeneratorException - when failed to generate descriptorpublic boolean isReactionMappingIncomplete()
true if reaction molecule was not mapped completely during reaction fingerprint generation.
Should be called after generate(Molecule).
true if the reaction molecule was not mapped completelypublic java.lang.String[] getDissimilarityMetrics()
getDissimilarityMetrics in class MolecularDescriptorpublic int[] getDissimilarityMetricsParamNum()
public java.lang.String[] getDissimilarityMetricsParamNames()
public java.lang.String[] getDissimilarityMetricsParamRanges()
public java.lang.String[] getDissimilarityMetricsParamDefault()
public java.lang.String[] getDissimilarityMetricsParamHelp()
public float[] getDefaultDissimilarityMetricThresholds()
getDefaultDissimilarityMetricThresholds in class MolecularDescriptorpublic int getDefaultMetricIndex()
PharmacophoreFingerprint
this is Tanimoto.
getDefaultMetricIndex in class MolecularDescriptorpublic float getDefaultThreshold(int metricIndex)
getDefaultThreshold in class MolecularDescriptormetricIndex - index of a parametrized metricpublic int getCommonBitCount(ReactionFingerprint f)
public float getReactantTanimoto(ReactionFingerprint f)
f - the distance from f is calculated
public float getProductTanimoto(ReactionFingerprint f)
f - the distance from f is calculated
public float getCoarseReactionTanimoto(ReactionFingerprint f)
f - the distance from f is calculated
public float getMediumReactionTanimoto(ReactionFingerprint f)
f - the distance from f is calculated
public float getStrictReactionTanimoto(ReactionFingerprint f)
f - the distance from f is calculated
public float getDissimilarity(MolecularDescriptor fp2)
getDissimilarity in class MolecularDescriptorfp2 - the other reaction fingerprint
public float getDissimilarity(MolecularDescriptor fp2,
int metricIndex)
getMetricIndex( String metricName ) .
getDissimilarity in class MolecularDescriptorfp2 - the reaction fingerprint from which the distance
is measuredmetricIndex - index of the metric to be used
MDParameters,
PFParameterspublic float getLowerBound(MolecularDescriptor fp2)
ReactionFingerprint a good estimate for the minimum distance
cannot be obtained efficiently (that is, significantly faster than
calculating the proper distance) therefore 0 is returned. This trivial
distance bound estimation will lead to calling getDistance.
- Overrides:
getLowerBound in class MolecularDescriptor
- Parameters:
fp2 - reaction fingerprint from which distance is measured
- Returns:
- estimate of the minimum distance
public boolean isSubSetOf(ReactionFingerprint f)
public static int[] getChemicalHashedFingerprint(int[] reactionFingerprint,
int length)
reactionFingerprint - the fingeprint as was generated by
ReactionFingerprint, may contain additional data (e.g. structural keys)
at the endlength - the length of the FP part in integers to consider
(the remainder will be ignored, e.g. structural keys)
public static void main(java.lang.String[] argv)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||