Package org.openscience.cdk.fingerprint
Class ExtendedFingerprinter
- java.lang.Object
-
- org.openscience.cdk.fingerprint.ExtendedFingerprinter
-
- All Implemented Interfaces:
IFingerprinter
public class ExtendedFingerprinter extends Object implements IFingerprinter
Generates an extended fingerprint for a givenIAtomContainer, that extends theFingerprinterwith additional (25) bits describing ring features and isotopic masses. JWM Comment: It's better to actually just hash the rings over the entire length simply using a different seed. The original version of the class used non-unique SSSR which of course doesn't work for substructure screening so this fingerprint can only be used for similarity.- Author:
- shk3
- See Also:
Fingerprinter- Source code:
- main
- Belongs to CDK module:
- fingerprint
- Keywords:
- fingerprint, similarity
- Created on:
- 2006-01-13
-
-
Constructor Summary
Constructors Constructor Description ExtendedFingerprinter()Creates a fingerprint generator of lengthDEFAULT_SIZEand with a search depth ofDEFAULT_SEARCH_DEPTH.ExtendedFingerprinter(int size)ExtendedFingerprinter(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 IBitFingerprintgetBitFingerprint(IAtomContainer container)Generates a fingerprint of the default size for the given AtomContainer, using path and ring metrics.IBitFingerprintgetBitFingerprint(IAtomContainer atomContainer, IRingSet ringSet, List<IRingSet> rslist)Generates a fingerprint of the default size for the given AtomContainer, using path and ring metrics.ICountFingerprintgetCountFingerprint(IAtomContainer container)BitSetgetFingerprint(IAtomContainer mol)Map<String,Integer>getRawFingerprint(IAtomContainer container)intgetSize()StringgetVersionDescription()voidsetHashPseudoAtoms(boolean hashPseudoAtoms)Set the hashPseudoAtoms for the base daylight/path fingerprint.voidsetPathLimit(int pathLimit)Set the pathLimit for the base daylight/path fingerprint.
-
-
-
Constructor Detail
-
ExtendedFingerprinter
public ExtendedFingerprinter()
Creates a fingerprint generator of lengthDEFAULT_SIZEand with a search depth ofDEFAULT_SEARCH_DEPTH.
-
ExtendedFingerprinter
public ExtendedFingerprinter(int size)
-
ExtendedFingerprinter
public ExtendedFingerprinter(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
-
getBitFingerprint
public IBitFingerprint getBitFingerprint(IAtomContainer container) throws CDKException
Generates a fingerprint of the default size for the given AtomContainer, using path and ring metrics. It contains the informations from getBitFingerprint() and bits which tell if the structure has 0 rings, 1 or less rings, 2 or less rings ... 10 or less rings (referring to smallest set of smallest rings) and bits which tell if there is a fused ring system with 1,2...8 or more rings in it- Specified by:
getBitFingerprintin interfaceIFingerprinter- Parameters:
container- The AtomContainer for which a Fingerprint is generated- Returns:
- a bit fingerprint for the given
IAtomContainer. - Throws:
CDKException
-
getRawFingerprint
public Map<String,Integer> getRawFingerprint(IAtomContainer container) throws CDKException
- Specified by:
getRawFingerprintin interfaceIFingerprinter- Throws:
CDKException
-
getBitFingerprint
public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer, IRingSet ringSet, List<IRingSet> rslist) throws CDKException
Generates a fingerprint of the default size for the given AtomContainer, using path and ring metrics. It contains the informations from getBitFingerprint() and bits which tell if the structure has 0 rings, 1 or less rings, 2 or less rings ... 10 or less rings and bits which tell if there is a fused ring system with 1,2...8 or more rings in it. The RingSet used is passed via rs parameter. This must be a smallesSetOfSmallestRings. The List must be a list of all ring systems in the molecule.- Parameters:
atomContainer- The AtomContainer for which a Fingerprint is generatedringSet- A SSSR RingSet of ac (if not available, use getExtendedFingerprint(AtomContainer ac), which does the calculation)rslist- A list of all ring systems in ac- Returns:
- a BitSet representing the fingerprint
- Throws:
CDKException- for example if input can not be cloned.
-
getSize
public int getSize()
- Specified by:
getSizein interfaceIFingerprinter
-
getCountFingerprint
public ICountFingerprint getCountFingerprint(IAtomContainer container) throws CDKException
- Specified by:
getCountFingerprintin interfaceIFingerprinter- Throws:
CDKException
-
getVersionDescription
public String getVersionDescription()
- Specified by:
getVersionDescriptionin interfaceIFingerprinter
-
getFingerprint
public BitSet getFingerprint(IAtomContainer mol) throws CDKException
- Specified by:
getFingerprintin interfaceIFingerprinter- Throws:
CDKException
-
setPathLimit
public void setPathLimit(int pathLimit)
Set the pathLimit for the base daylight/path fingerprint. If too many paths are generated from a single atom an exception is thrown.- Parameters:
pathLimit- the number of paths to generate from a node- See Also:
Fingerprinter
-
setHashPseudoAtoms
public void setHashPseudoAtoms(boolean hashPseudoAtoms)
Set the hashPseudoAtoms for the base daylight/path fingerprint. This indicates whether pseudo-atoms should be hashed, for substructure screening this is not desirable - but this fingerprint uses SSSR so can't be used for substructure screening regardless.- Parameters:
hashPseudoAtoms- the number of paths to generate from a node- See Also:
Fingerprinter
-
-