jklustor-all-api-0.0.7-20140619012755 (ChemAxon)


com.chemaxon.descriptors.common
Interface DescriptorGenerator<B extends Descriptor>

Type Parameters:
B - Represented bare descriptor type. Note that rich descriptor type is not referenced in this level. Rich descriptor type is only introduced by the implementations.
All Superinterfaces:
Serializable
All Known Subinterfaces:
BvGenerator, CfpGenerator, EcfpGenerator, FvGenerator, PfGenerator
All Known Implementing Classes:
AbstractShapeGenerator

@Beta
public interface DescriptorGenerator<B extends Descriptor>
extends Serializable

DescriptorGenerator implements molecule to descriptor calculation functionality.

An instance of DescriptorGenerator represents a specific molecular descriptor with a specific settings.

The generated descriptors can have two representations: rich and bare. Both representations are consistent with each other in terms of comparison. The rich form might provide additional details of the descriptor itself. These additional details are not preserverd during serialization; so deserialization is possible only into the bare form. Note that it is possible for a DescriptorGenerator to not distinguish between rich and bare descriptors.

For example, structure based descriptors are represented as a feature ID list or binary fingerprints. The features themself are considered as such additional details. The underlying "bare" representation itself is suitable for comparison and memory efficient storage.

Please note that this interface is marked with Beta annotation, so it can be subject of incompatible changes or removal in later releases.

Author:
Gabor Imre

Method Summary
 B fromByteArray(byte[] desc)
          Builds a descriptor from its byte array representation.
 B fromString(String desc)
          Builds a descriptor from its string representation.
 B generateDescriptor(chemaxon.struc.Molecule mol)
          Calculates the associated descriptor for the given Molecule.
 B getBareDescriptor(B descriptor)
          Get bare-only form of a descriptor.
 DescriptorComparator<B> getDefaultComparator()
          Gets the default comparator object.
 Object getGuardObject()
          Gets the guard object.
 DescriptorParameters getParameters()
          Gets the parameter class.
 byte[] toByteArray(B desc)
          Creates the byte array representation of a descriptor object.
 String toString(B desc)
          Creates the String representation of a descriptor object.
 

Method Detail

generateDescriptor

B generateDescriptor(chemaxon.struc.Molecule mol)
Calculates the associated descriptor for the given Molecule.

Note that different descriptors/application scenatios might need different structure standardization. Currently structure standardization is generally not in the scope of the responsibilities of DescriptorGenerator to the possible maximal extent.

Since the returned descriptor might contain additional data (refrence to input Molecule, etc) if it is stored for later compariosn it is recommended to use the bare-only representation returned by getBareDescriptor(com.chemaxon.descriptors.common.Descriptor).

Parameters:
mol - Input molecule
Returns:
The calculated descriptor. If the implementation discriminates between rich and bare types then the rich type is returned, otherwise the bare type. Note that the bare type is always available using getBareDescriptor(com.chemaxon.descriptors.common.Descriptor) on either the rich or the bare representation.
Throws:
IllegalArgumentException - when an underlying problem occurs during descriptor generation (eg. an exception thrown from some lower level calculation)

getBareDescriptor

B getBareDescriptor(B descriptor)
Get bare-only form of a descriptor.

Parameters:
descriptor - A descriptor's rich or bare form
Returns:
Bare-only representation of given descriptor

toByteArray

byte[] toByteArray(B desc)
Creates the byte array representation of a descriptor object.

The descriptors bare form can be reconstructed using fromByteArray(byte[]).

Parameters:
desc - Descriptor (only bare form is considered)
Returns:
Byte array representation of the descriptor

toString

String toString(B desc)
Creates the String representation of a descriptor object.

The descriptors bare form can be reconstructed using fromString(java.lang.String).

Parameters:
desc - Descriptor (only bare form is considered)
Returns:
String representation of descriptor

fromString

B fromString(String desc)
Builds a descriptor from its string representation.

Please note that the compatibility of this (the reconstructing) DescriptorGenerator, regarding to the serializing generator (on which toString(com.chemaxon.descriptors.common.Descriptor) was called to construct the String form) is not checked; compatibility must be ensured by the user application.

Parameters:
desc - String representation
Returns:
Reconstructed descriptors bare form

fromByteArray

B fromByteArray(byte[] desc)
Builds a descriptor from its byte array representation.

Please note that the compatibility of this (the reconstructing) DescriptorGenerator, regarding to the serializing generator (on which toByteArray(com.chemaxon.descriptors.common.Descriptor) was called to construct the byte array form) is not checked; compatibility must be ensured by the user application.

Parameters:
desc - Byte array of the descriptor
Returns:
Reconstructed descriptors bare form

getDefaultComparator

DescriptorComparator<B> getDefaultComparator()
Gets the default comparator object.

Returns:
default comparator

getParameters

DescriptorParameters getParameters()
Gets the parameter class.

Returns:
paramater obj

getGuardObject

Object getGuardObject()
Gets the guard object.

Returns:
The guard object

jklustor-all-api-0.0.7-20140619012755 (ChemAxon)