|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.descriptors.MDGenerator
chemaxon.descriptors.CFGenerator
public class CFGenerator
The CFGenerator class generates topological fingerprints
of molecular graphs.
Basic concepts
A binary string (series of 0 and 1) is constructed based on local
connectivity atoms and atom types. The length of the series is a predefined
constant parameter. Two further parameters influence the fingerprints
gerenerated: number of bonds, which determines the number size of local
neighborhood of atoms takes into account by providing an upper limit for
the length of path starting from each atom; and the number of bits to be set
in the fingerprint for each property identified.
Typical usage
For the sake of optimal memory usage one instance of this class can generate
fingerprints for a series of molecular graphs by the consequtive call to
the generate() method.
In most cases the generator is not intended to be used directly. When molecules
are taken from files or databases the corresponding MolecularDescriptors
can be generated by the appropriate MDReader object.
Alternatively, MolecularDescriptor.generate( final Molecule )
is the simplest way to obtain a descriptor corresponding to a molecular
structure.
CFGenerator gen = new ChemicalFingerprintenerator(
new Standardizer( new FileInputStream("stdconfig.xml") ), 512 );
ChemicalFingerprint fp = new ChemicalFingerprint();
Molecule mol = getFirstMoleculeFromSomewhere();
while ( mol != null ) {
gen.generate( mol, fp );
doSomethingWith( fp );
mol = getNextMoleculeFromSomewhere();
}
| Field Summary |
|---|
| Fields inherited from class chemaxon.descriptors.MDGenerator |
|---|
createStatistics, density, freqCount, maxNonEmptyId, maxNonEmptyPercent, minNonEmptyId, minNonEmptyPercent, molCount, sumNonEmptyPercent |
| Constructor Summary | |
|---|---|
CFGenerator(int length)
Creates a new instance of CFGenerator which can be used to
generate chemical fingerprints for an arbitrary number of molecules. |
|
CFGenerator(Standardizer s,
int length)
Deprecated. since 2.2 |
|
| Method Summary | |
|---|---|
protected int |
calcFreqCount(MolecularDescriptor d)
Updates statistics gathered on fingerprints generated and get the number of non-zero cells. |
java.lang.String[] |
generate(Molecule m,
MolecularDescriptor d)
Generates the chemical fingerprint for the given molecule. |
| Methods inherited from class chemaxon.descriptors.MDGenerator |
|---|
getAverageNonZeroRatio, getBrightestMolId, getDarkestMolId, getDensityCounts, getFrequencyCounts, getMaximumBitRatio, getMinimumBitRatio, getMoleculeCount, setCreateStatistics, updateStatistics |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CFGenerator(Standardizer s,
int length)
CFGenerator which can be used to
generate chemical fingerprints for an arbitrary number of molecules.
s - Standardizer object to transform input molecules into a
standard formlength - length of the chemical fingerprint in bitspublic CFGenerator(int length)
CFGenerator which can be used to
generate chemical fingerprints for an arbitrary number of molecules.
length - length of the chemical fingerprint in bits| Method Detail |
|---|
public java.lang.String[] generate(Molecule m,
MolecularDescriptor d)
throws chemaxon.descriptors.MDGeneratorException
ChemicalFingerprint object is not allocated, the
MolecularDescriptor provided as a method parameter is
updated (and it has to be allocated and initialized by the client of this
class).
generate in class chemaxon.descriptors.MDGeneratorm - molecule for which the fingerprint is createdd - the chemical fingerprint generated
ChemicalFingerprint
chemaxon.descriptors.MDGeneratorException - in the case of any failures to generate
the descriptorprotected int calcFreqCount(MolecularDescriptor d)
calcFreqCount in class chemaxon.descriptors.MDGeneratord - newly generated MolecularDescriptor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||