Class FingerprinterTool
java.lang.Object
org.openscience.cdk.fingerprint.FingerprinterTool
Tool with helper methods for IFingerprint.
- Author:
- steinbeck
- Keywords:
- fingerprint
- Created on:
- 2002-02-24
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondifferences(BitSet s, BitSet t) List all differences between the two bit vectors.static booleanChecks whether all the positive bits in BitSet bs2 occur in BitSet bs1.listDifferences(BitSet bs1, BitSet bs2) This lists all bits set in bs2 and not in bs2 (other way round not considered) in a list and to logger.static IBitFingerprintmakeBitFingerprint(Map<String, Integer> features) Convert a mapping of features and their counts to a 1024-bit binary fingerprint.static IBitFingerprintmakeBitFingerprint(Map<String, Integer> features, int len) Convert a mapping of features and their counts to a binary fingerprint.static IBitFingerprintmakeBitFingerprint(Map<String, Integer> features, int len, int bits) Convert a mapping of features and their counts to a binary fingerprint.static ICountFingerprintmakeCountFingerprint(Map<String, Integer> features) Wrap a mapping of features and their counts to a continuous (count based) fingerprint.
-
Constructor Details
-
FingerprinterTool
public FingerprinterTool()
-
-
Method Details
-
isSubset
Checks whether all the positive bits in BitSet bs2 occur in BitSet bs1. If so, the molecular structure from which bs2 was generated is a possible substructure of bs1.Example:
Molecule mol = MoleculeFactory.makeIndole(); BitSet bs = Fingerprinter.getBitFingerprint(mol); Molecule frag1 = MoleculeFactory.makePyrrole(); BitSet bs1 = Fingerprinter.getBitFingerprint(frag1); if (Fingerprinter.isSubset(bs, bs1)) { System.out.println("Pyrrole is subset of Indole."); }- Parameters:
bs1- The reference BitSetbs2- The BitSet which is compared with bs1- Returns:
- True, if bs2 is a subset of bs1
- Keywords:
- substructure search
-
listDifferences
This lists all bits set in bs2 and not in bs2 (other way round not considered) in a list and to logger. See.differences(java.util.BitSet, java.util.BitSet)for a method to list all differences, including those missing present in bs2 but not bs1.- Parameters:
bs1- First bitsetbs2- Second bitset- Returns:
- An arrayList of Integers
- See Also:
-
differences
List all differences between the two bit vectors. UnlikelistDifferences(java.util.BitSet, java.util.BitSet)which only list those which are set in s but not in t.- Parameters:
s- a bit vectort- another bit vector- Returns:
- all differences between s and t
-
makeBitFingerprint
Convert a mapping of features and their counts to a 1024-bit binary fingerprint. A single bit is set for each pattern.- Parameters:
features- features to include- Returns:
- the continuous fingerprint
- See Also:
-
makeBitFingerprint
Convert a mapping of features and their counts to a binary fingerprint. A single bit is set for each pattern.- Parameters:
features- features to includelen- fingerprint length- Returns:
- the continuous fingerprint
- See Also:
-
makeBitFingerprint
Convert a mapping of features and their counts to a binary fingerprint. Each feature can set 1-n hashes, the amount is modified by thebitsoperand.- Parameters:
features- features to includelen- fingerprint lengthbits- number of bits to set for each pattern- Returns:
- the continuous fingerprint
-
makeCountFingerprint
Wrap a mapping of features and their counts to a continuous (count based) fingerprint.- Parameters:
features- features to include- Returns:
- the continuous fingerprint
-