@PublicAPI @Beta public class ShapeDescriptor extends MolecularDescriptor implements chemaxon.license.Licensable
params
Constructor and Description |
---|
ShapeDescriptor() |
ShapeDescriptor(ShapeDescriptor sh)
Copy constructor.
|
ShapeDescriptor(ShapeParameters params)
Creates a new instance of ShapeDescriptor according to the parameters given.
|
ShapeDescriptor(java.lang.String params)
Creates a new instance of ShapeDescriptor according to the parameters given.s
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the fingerprint, all values are set to zero.
|
ShapeDescriptor |
clone()
Creates a new instance with identical internal state.
|
void |
fromData(byte[] dbRepr)
Builds a
MolecularDescriptor object from its external
(database) representation. |
void |
fromFloatArray(float[] descr)
Builds a molecular descriptor from its float array representation.
|
void |
fromString(java.lang.String descr)
Builds a molecular descriptor from its string representation.
|
java.lang.String[] |
generate(Molecule m)
Creates the descriptor for the given Molecule.
|
java.util.List<java.lang.String> |
getAliasNames() |
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(MolecularDescriptor other)
Calculates the dissimilarity ratio between two
MolecularDescriptor
objects using the default metric. |
float |
getDissimilarity(MolecularDescriptor other,
int parametrizedMetricIndex)
Calculates the dissimilarity between two
MolecularDescriptor
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 in an array.
|
float |
getHistogramSimilarity(MolecularDescriptor other)
Deprecated.
use
getShapeSimilarity(MolecularDescriptor) instead |
java.lang.String |
getName()
Gets the name of the
ShapeDescriptor fingerprint object. |
java.lang.String |
getParametersClassName()
Gets the name of the parameters class corresponding to the descriptor.
|
float |
getShapeSimilarity(MolecularDescriptor other) |
java.lang.String |
getShortName()
Gets the short name of the fingerprint.
|
boolean |
isLicensed() |
void |
setLicenseEnvironment(java.lang.String env) |
void |
setParameters(java.lang.String parameters)
Sets the parameters of an already created
ShapeDescriptor object. |
void |
setShapeData(chemaxon.marvin.alignment.ShapeData shapeData) |
java.lang.String |
toBinaryString()
Creates the binary string representation of a
MolecularDescriptor
object. |
byte[] |
toData()
Converts the internal (memory) representation of a
MolecularDescriptor instance into an external format that
can be stored in a database. |
java.lang.String |
toDecimalString()
Creates the string representation of a
MolecularDescriptor
object. |
float[] |
toFloatArray()
Creates the float array representation of a
MolecularDescriptor
object. |
java.lang.String |
toString()
Creates the string representation of a
MolecularDescriptor
object. |
generate, getAtomSetColors, getAtomSetIndexes, getAtomSetNames, getDefaultMetricIndex, getDissimilarityMetricIndex, getLowerBound, getMetricIndex, getMetricName, getMetricName, getNumberOfMetrics, getNumberOfWeights, getParameters, getThreshold, getThreshold, main, needsConfig, newInstance, newInstance, newInstanceFromXML, newInstanceSupplier, setParameters, setScreeningConfiguration
public ShapeDescriptor()
public ShapeDescriptor(ShapeParameters params)
params
- parameter settingspublic ShapeDescriptor(java.lang.String params)
params
- parameter settingspublic ShapeDescriptor(ShapeDescriptor sh)
ShapeDescriptor
passed is created. The old and the new instances share the same
ShapeDescriptorParameters
object.sh
- fingerprint to be copiedpublic float getDefaultThreshold(int metricIndex)
getDefaultThreshold
in class MolecularDescriptor
metricIndex
- index of a parameterized metricpublic float[] getDefaultDissimilarityMetricThresholds()
getDefaultDissimilarityMetricThresholds
in class MolecularDescriptor
public void setLicenseEnvironment(java.lang.String env)
setLicenseEnvironment
in interface chemaxon.license.Licensable
public boolean isLicensed()
isLicensed
in interface chemaxon.license.Licensable
public ShapeDescriptor clone()
MolecularDescriptor
clone
in class MolecularDescriptor
public void setShapeData(chemaxon.marvin.alignment.ShapeData shapeData)
public java.lang.String[] generate(Molecule m) throws MDGeneratorException
MolecularDescriptor
generate
in class MolecularDescriptor
MDGeneratorException
- when failed to generate descriptorpublic java.lang.String getName()
ShapeDescriptor
fingerprint object. This name is
not the same as the class name: nicer, and more meaningful for end-users
too.getName
in class MolecularDescriptor
ShapeDescriptor
class objectspublic java.lang.String getShortName()
getShortName
in class MolecularDescriptor
public java.lang.String getParametersClassName()
getParametersClassName
in class MolecularDescriptor
public void setParameters(java.lang.String parameters) throws MDParametersException
ShapeDescriptor
object.setParameters
in class MolecularDescriptor
parameters
- parameter settings for the fingerprintMDParametersException
- any XML errorpublic void clear()
public byte[] toData()
MolecularDescriptor
MolecularDescriptor
instance into an external format that
can be stored in a database.toData
in class MolecularDescriptor
public void fromData(byte[] dbRepr)
MolecularDescriptor
MolecularDescriptor
object from its external
(database) representation.fromData
in class MolecularDescriptor
dbRepr
- an array generated by toData()
public java.lang.String toString()
MolecularDescriptor
MolecularDescriptor
object. This string value is stored in SDfiles, though the use of this
string is not limited to this purpose. Typically, this string is compact,
for instance zero values are not necessarily printed.toString
in class MolecularDescriptor
public java.lang.String toDecimalString()
MolecularDescriptor
MolecularDescriptor
object. This string value contains all values of the descriptor
(including all zeros), values are separated by tabs.toDecimalString
in class MolecularDescriptor
public void fromString(java.lang.String descr) throws java.text.ParseException
MolecularDescriptor
fromString
in class MolecularDescriptor
descr
- descriptor string, previously generated by toString()
java.text.ParseException
public float[] toFloatArray()
MolecularDescriptor
MolecularDescriptor
object. This array contains all values of the descriptor
(including all zeros) in the elements of the array.toFloatArray
in class MolecularDescriptor
public void fromFloatArray(float[] descr)
MolecularDescriptor
fromFloatArray
in class MolecularDescriptor
descr
- descriptor represented in a float array
(e.g. generated by toFloatArray()
)public java.lang.String toBinaryString()
MolecularDescriptor
MolecularDescriptor
object.toBinaryString
in class MolecularDescriptor
public java.lang.String[] getDissimilarityMetrics()
MolecularDescriptor
getDissimilarityMetrics
in class MolecularDescriptor
public float getDissimilarity(MolecularDescriptor other)
MolecularDescriptor
MolecularDescriptor
objects using the default metric.
Default metric is set in the corresponding MDParameters
object.
In the case of asymmetric distances swapping the two descriptors can
make a big difference.getDissimilarity
in class MolecularDescriptor
other
- the query descriptor with initialized Similarity3d object.public float getShapeSimilarity(MolecularDescriptor other)
other
- the query descriptor with initialized Similarity3d obj.@Deprecated public float getHistogramSimilarity(MolecularDescriptor other)
getShapeSimilarity(MolecularDescriptor)
insteadother
- the query descriptor with initialized Similarity3d obj.public float getDissimilarity(MolecularDescriptor other, int parametrizedMetricIndex)
MolecularDescriptor
MolecularDescriptor
objects using the specified metric, apart from that it is the same as
getDissimilarity( final MolecularDescriptor other )
.getDissimilarity
in class MolecularDescriptor
other
- a descriptor, to which the dissimilarity ratio is measuredparametrizedMetricIndex
- the index of the parameterized metric to usedMDParameters
,
PFParameters
public java.util.List<java.lang.String> getAliasNames()