Class HybridizationFingerprinter
java.lang.Object
org.openscience.cdk.fingerprint.AbstractFingerprinter
org.openscience.cdk.fingerprint.Fingerprinter
org.openscience.cdk.fingerprint.HybridizationFingerprinter
- All Implemented Interfaces:
IFingerprinter
Generates a fingerprint for a given
IAtomContainer. 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 has the option to ignore explicit hydrogen's
(Fingerprinter.setHashExplicitHydrogens(boolean)) and pseudo atoms
(Fingerprinter.setHashPseudoAtoms(boolean)). This ensures the
fingerprint can be used for substructure screening by default.
Unlike the Fingerprinter, this fingerprinter does not take into
account aromaticity. Instead, it takes into account SP2
IAtomType.Hybridization.
- Keywords:
- fingerprint, similarity
-
Field Summary
Fields inherited from class Fingerprinter
DEFAULT_SEARCH_DEPTH, DEFAULT_SIZEModifier and TypeFieldDescriptionstatic final intThe default search depth used to create the fingerprints.static final intThe default length of created fingerprints. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a fingerprint generator of lengthDEFAULT_SIZEand 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
Modifier and TypeMethodDescriptionprotected StringgetBondSymbol(IBond bond) Gets the bond Symbol attribute of the Fingerprinter class.Methods inherited from class Fingerprinter
encodePaths, findPathes, getBitFingerprint, getBitFingerprint, getCountFingerprint, getParameters, getRawFingerprint, getSearchDepth, getSize, setHashExplicitHydrogens, setHashPseudoAtoms, setPathLimitModifier and TypeMethodDescriptionprotected voidencodePaths(IAtomContainer mol, int depth, BitSet fp, int size) protected int[]findPathes(IAtomContainer container, int searchDepth) Deprecated.getBitFingerprint(IAtomContainer container) Generates a fingerprint of the default size for the given AtomContainer.getBitFingerprint(IAtomContainer container, AllRingsFinder ringFinder) Generates a fingerprint of the default size for the given AtomContainer.getCountFingerprint(IAtomContainer container) Returns the count fingerprint for the givenIAtomContainer.Base classes should override this method to report the parameters they are configured with.getRawFingerprint(IAtomContainer container) Returns the raw representation of the fingerprint for the given IAtomContainer.intintgetSize()Returns the size (or length) of the fingerprint.voidsetHashExplicitHydrogens(boolean value) Include explicit hydrogen atoms in the fingerprint.voidsetHashPseudoAtoms(boolean value) Include pseudo/query atoms in the fingerprint with atomic number 0.voidsetPathLimit(int limit) Methods inherited from class AbstractFingerprinter
getFingerprint, getVersionDescriptionModifier and TypeMethodDescriptionGenerate a binary fingerprint as a bit.final StringGenerate a fingerprint type version description in chemfp's FPS format.
-
Constructor Details
-
HybridizationFingerprinter
public HybridizationFingerprinter()Creates a fingerprint generator of lengthDEFAULT_SIZEand 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 Details
-
getBondSymbol
Gets the bond Symbol attribute of the Fingerprinter class.- Overrides:
getBondSymbolin classFingerprinter- Parameters:
bond- Description of the Parameter- Returns:
- The bondSymbol value
-
Fingerprinter.encodePaths(IAtomContainer, int, BitSet, int)