Class MACCSFingerprinter
java.lang.Object
org.openscience.cdk.fingerprint.AbstractFingerprinter
org.openscience.cdk.fingerprint.MACCSFingerprinter
- All Implemented Interfaces:
IFingerprinter
This fingerprinter generates 166 bit MACCS keys.
The SMARTS patterns for each of the features was taken from
RDKit. However given that there is no
official and explicit listing of the original key definitions, the results
of this implementation may differ from others.
This class assumes that aromaticity perception, atom typing and adding of
implicit hydrogens have been performed prior to generating the fingerprint.
Note Currently bits 1 and 44 are completely ignored since the RDKit
defs do not provide a definition and I can't find an official description
of them.
Warning - MACCS substructure keys cannot be used for substructure
filtering. It is possible for some keys to match substructures and not match
the superstructures. Some keys check for hydrogen counts which may not be
preserved in a superstructure.
- Author:
- Rajarshi Guha
- Keywords:
- fingerprint, similarity
- Created on:
- 2008-07-23
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBitFingerprint(IAtomContainer container) Returns the bit fingerprint for the givenIAtomContainer.getCountFingerprint(IAtomContainer container) Returns the count fingerprint for the givenIAtomContainer.getRawFingerprint(IAtomContainer iAtomContainer) Returns the raw representation of the fingerprint for the given IAtomContainer.intgetSize()Returns the size (or length) of the fingerprint.Methods inherited from class AbstractFingerprinter
getFingerprint, getParameters, getVersionDescriptionModifier and TypeMethodDescriptionGenerate a binary fingerprint as a bit.Base classes should override this method to report the parameters they are configured with.final StringGenerate a fingerprint type version description in chemfp's FPS format.
-
Constructor Details
-
MACCSFingerprinter
public MACCSFingerprinter() -
MACCSFingerprinter
-
-
Method Details
-
getBitFingerprint
Returns the bit fingerprint for the givenIAtomContainer.- Specified by:
getBitFingerprintin interfaceIFingerprinter- Parameters:
container-IAtomContainerfor which the fingerprint should be calculated.- Returns:
- the bit fingerprint
- Throws:
CDKException- may be thrown if there is an error during aromaticity detection or (for key based fingerprints) if there is a SMARTS parsing error
-
getRawFingerprint
Returns the raw representation of the fingerprint for the given IAtomContainer. The raw representation contains counts as well as the key strings.- Specified by:
getRawFingerprintin interfaceIFingerprinter- Parameters:
iAtomContainer- IAtomContainer for which the fingerprint should be calculated.- Returns:
- the raw fingerprint
- Throws:
CDKException
-
getSize
public int getSize()Returns the size (or length) of the fingerprint.- Specified by:
getSizein interfaceIFingerprinter- Returns:
- the size of the fingerprint
-
getCountFingerprint
Returns the count fingerprint for the givenIAtomContainer.- Specified by:
getCountFingerprintin interfaceIFingerprinter- Parameters:
container-IAtomContainerfor which the fingerprint should be calculated.- Returns:
- the count fingerprint
- Throws:
CDKException- if there is an error during aromaticity detection or (for key based fingerprints) if there is a SMARTS parsing error.
-