|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.descriptors.MolecularDescriptor
chemaxon.descriptors.ScalarDescriptor
public class ScalarDescriptor
Base class for all scalar descriptors. All scalar descriptors should be derived from this class.
| Field Summary | |
|---|---|
protected float |
descrValue
descriptor value |
| Fields inherited from class chemaxon.descriptors.MolecularDescriptor |
|---|
params |
| Constructor Summary | |
|---|---|
ScalarDescriptor()
Creates a new, empty instance of ScalarDescriptor. |
|
ScalarDescriptor(ScalarDescriptor sd)
Copy constructor. |
|
ScalarDescriptor(SDParameters params)
Creates a new instance of ScalarDescriptor according to the parameters given. |
|
ScalarDescriptor(java.lang.String params)
Creates a new instance of ScalarDescriptor according to the parameters given. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the descritor: sets its value to zero value. |
java.lang.Object |
clone()
Creates a new instance with identical internal state. |
void |
fromData(byte[] dbRepr)
Builds a descriptor from an external data format, created by a previous call to toData(). |
void |
fromFloatArray(float[] descr)
Builds the descriptor from a float array of one element. |
void |
fromString(java.lang.String sd)
Builds a descriptpr from its string representation created by toString(). |
java.lang.String[] |
generate(Molecule m)
Creates the ScalarDescriptor descriptor for the given Molecule. |
float[] |
getDefaultDissimilarityMetricThresholds()
Gets the default dissimilarity threshold values for all dissimilarity metrics defined. |
float |
getDefaultThreshold(int metricIndex)
Gets a metric dependent default threshold value. |
float |
getDissimilarity(java.lang.Object sd)
Calculates the dissimilarity between two scalar descriptor using the default metrics In the present implementation it is always the absolute difference between them. |
float |
getDissimilarity(java.lang.Object sd,
int metricIndex)
Calculates the dissimilarity between two scalar descriptor using the specified metric. |
java.lang.String[] |
getDissimilarityMetrics()
Gets the dissimilarity metric names |
float |
getLowerBound(java.lang.Object sd)
Calculates the lower bound estimate of the dissimilarity from the given descriptor. |
java.lang.String |
getName()
Gets the name of the ScalarDescriptor 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. |
boolean |
isLicensed()
Returns information about the licensing of the product. |
void |
set(float newValue)
Set the value of the descriptor. |
void |
setLicenseEnvironment(java.lang.String env)
Every license can have a modifier environment that's tipically an integration environment. |
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 ScalarDescriptor object. |
byte[] |
toData()
Converts a ScalarDescriptor object into an array of bytes. |
java.lang.String |
toDecimalString()
Converts the descriptor value into a readable string. |
float[] |
toFloatArray()
Creates the float array representation of the descriptor. |
java.lang.String |
toString()
Converts the descriptor value into a readable string. |
| Methods inherited from class chemaxon.descriptors.MolecularDescriptor |
|---|
getAtomSetColors, getAtomSetIndexes, getAtomSetNames, getDefaultMetricIndex, getDissimilarityMetricIndex, 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 |
| Field Detail |
|---|
protected float descrValue
| Constructor Detail |
|---|
public ScalarDescriptor()
public ScalarDescriptor(SDParameters params)
params - parameters settingspublic ScalarDescriptor(java.lang.String params)
params - parameter stringpublic ScalarDescriptor(ScalarDescriptor sd)
SDParameters object.
sd - a ScalarDescriptor to be copied| Method Detail |
|---|
public java.lang.Object clone()
clone in class MolecularDescriptorpublic java.lang.String getName()
getName in class MolecularDescriptorpublic java.lang.String getShortName()
getShortName in class MolecularDescriptorpublic java.lang.String getParametersClassName()
getParametersClassName in class MolecularDescriptorpublic void setParameters(MDParameters parameters)
setParameters in class MolecularDescriptorparameters - fingerprint parameters
public void setParameters(java.lang.String parameters)
throws chemaxon.descriptors.MDParametersException
ScalarDescriptor object.
setParameters in class MolecularDescriptorparameters - parameter settings for the descriptor
chemaxon.descriptors.MDParametersException - any XML errorpublic byte[] toData()
ScalarDescriptor object into an array of bytes.
This format can be reffered to as an "external representation" since
it servers as the data format for storing scalar descriptors in databases.
fromData() method to build the scalar descriptor
from this "external" representation.
toData in class MolecularDescriptorpublic void fromData(byte[] dbRepr)
toData().
fromData in class MolecularDescriptordbRepr - "external" representation of the ScalarDescriptor
objectpublic final float[] toFloatArray()
toFloatArray in class MolecularDescriptor
public void fromFloatArray(float[] descr)
throws java.lang.RuntimeException
fromFloatArray in class MolecularDescriptordescr - descriptor stored in a (one element) float array
java.lang.RuntimeExceptionpublic void clear()
public final java.lang.String toString()
toString in class MolecularDescriptorpublic java.lang.String toDecimalString()
toDecimalString in class MolecularDescriptor
public final void fromString(java.lang.String sd)
throws java.text.ParseException
toString().
fromString in class MolecularDescriptorsd - descriptor value as string
java.text.ParseExceptionpublic void set(float newValue)
newValue - the value to be set
public java.lang.String[] generate(Molecule m)
throws chemaxon.descriptors.MDGeneratorException
MDParameters).
generate in class MolecularDescriptorchemaxon.descriptors.MDGeneratorException - when failed to generate descriptorpublic java.lang.String[] getDissimilarityMetrics()
getDissimilarityMetrics in class MolecularDescriptorpublic float[] getDefaultDissimilarityMetricThresholds()
getDefaultDissimilarityMetricThresholds in class MolecularDescriptorpublic float getDefaultThreshold(int metricIndex)
getDefaultThreshold in class MolecularDescriptormetricIndex - index of a parametrized metricpublic float getDissimilarity(java.lang.Object sd)
getDissimilarity in interface chemaxon.stat.DiffablegetDissimilarity in class MolecularDescriptorsd - a scalar descriptor value
public float getDissimilarity(java.lang.Object sd,
int metricIndex)
getDissimilarity in class MolecularDescriptorsd - a scalar descriptormetricIndex - index of the metric to be used
MDParameters,
PFParameterspublic float getLowerBound(java.lang.Object sd)
getLowerBound in interface chemaxon.stat.DiffablegetLowerBound in class MolecularDescriptorsd - a descriptor value
public boolean isLicensed()
chemaxon.license.Licensable
return LicenseHandler.getInstance().isLicensed( LicenseHandler.MY_IDENTIFIER, licenseEnvironment );
isLicensed in interface chemaxon.license.Licensablepublic void setLicenseEnvironment(java.lang.String env)
chemaxon.license.Licensable
private String licenseEnvironment = "";
public void setLicenseEnvironment(String env) {
licenseEnvironment = env;
}
setLicenseEnvironment in interface chemaxon.license.Licensableenv - environment String to be stored and passed to the LicenseHandler in the isLicensed method
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||