Package org.openscience.cdk.fingerprint
Class HybridizationFingerprinter
- java.lang.Object
-
- org.openscience.cdk.fingerprint.AbstractFingerprinter
-
- org.openscience.cdk.fingerprint.Fingerprinter
-
- org.openscience.cdk.fingerprint.HybridizationFingerprinter
-
- All Implemented Interfaces:
IFingerprinter
public class HybridizationFingerprinter extends Fingerprinter implements IFingerprinter
Generates a fingerprint for a givenIAtomContainer
. Fingerprints are one-dimensional bit arrays, where bits are set according to a the occurrence of a particular structural feature (See for example the Daylight inc. theory manual for more information). Fingerprints allow for a fast screening step to exclude candidates for a substructure search in a database. They are also a means for determining the similarity of chemical structures.A fingerprint is generated for an AtomContainer with this code:
Molecule molecule = new Molecule(); IFingerprinter fingerprinter = new HybridizationFingerprinter(); BitSet fingerprint = fingerprinter.getFingerprint(molecule); fingerprint.size(); // returns 1024 by default fingerprint.length(); // returns the highest set bit
The FingerPrinter assumes that hydrogens are explicitly given! Furthermore, if pseudo atoms or atoms with malformed symbols are present, their atomic number is taken as one more than the last element currently supported in
PeriodicTable
.Unlike the
Fingerprinter
, this fingerprinter does not take into account aromaticity. Instead, it takes into account SP2IAtomType.Hybridization
.- Source code:
- main
- Belongs to CDK module:
- standard
- Keywords:
- fingerprint, similarity
-
-
Field Summary
-
Fields inherited from class org.openscience.cdk.fingerprint.Fingerprinter
DEFAULT_SEARCH_DEPTH, DEFAULT_SIZE
-
-
Constructor Summary
Constructors Constructor Description HybridizationFingerprinter()
Creates a fingerprint generator of lengthDEFAULT_SIZE
and with a search depth ofDEFAULT_SEARCH_DEPTH
.HybridizationFingerprinter(int size)
HybridizationFingerprinter(int size, int searchDepth)
Constructs a fingerprint generator that creates fingerprints of the given size, using a generation algorithm with the given search depth.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getBondSymbol(IBond bond)
Gets the bond Symbol attribute of the Fingerprinter class.-
Methods inherited from class org.openscience.cdk.fingerprint.Fingerprinter
encodePaths, findPathes, getBitFingerprint, getBitFingerprint, getCountFingerprint, getParameters, getRawFingerprint, getSearchDepth, getSize, setHashPseudoAtoms, setPathLimit
-
Methods inherited from class org.openscience.cdk.fingerprint.AbstractFingerprinter
getFingerprint, getVersionDescription
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openscience.cdk.fingerprint.IFingerprinter
getBitFingerprint, getCountFingerprint, getFingerprint, getRawFingerprint, getSize, getVersionDescription
-
-
-
-
Constructor Detail
-
HybridizationFingerprinter
public HybridizationFingerprinter()
Creates a fingerprint generator of lengthDEFAULT_SIZE
and with a search depth ofDEFAULT_SEARCH_DEPTH
.
-
HybridizationFingerprinter
public HybridizationFingerprinter(int size)
-
HybridizationFingerprinter
public HybridizationFingerprinter(int size, int searchDepth)
Constructs a fingerprint generator that creates fingerprints of the given size, using a generation algorithm with the given search depth.- Parameters:
size
- The desired size of the fingerprintsearchDepth
- The desired depth of search
-
-
Method Detail
-
getBondSymbol
protected String getBondSymbol(IBond bond)
Gets the bond Symbol attribute of the Fingerprinter class.- Overrides:
getBondSymbol
in classFingerprinter
- Parameters:
bond
- Description of the Parameter- Returns:
- The bondSymbol value
-
-