public class PubChemFingerprinter extends Object
Fingerprinter
for a more detailed
description of fingerprints in general. This implementation is based on the
public domain code made available by the NCGC
here
Some SMARTS patterns have been modified from the original code, since they
were based on explicit H matching. As a result, we replace the explicit H's
with a query of the #N&!H0 where N is the atomic number. Thus bit 344 was
originally [#6](~[#6])([H])
but is written here as
[#6&!H0]~[#6]
. In some cases, where the H count can be reduced
to single possibility we directly use that H count. An example is bit 35,
which was [#6](~[#6])(~[#6])(~[#6])([H])
and is rewritten as
[#6H1](~[#6])(~[#6])(~[#6]
.
Warning - this class is not thread-safe and uses stores intermediate steps
internally. Please use a seperate instance of the class for each thread.Modifier and Type | Field and Description |
---|---|
static int |
FP_SIZE
Number of bits in this fingerprint.
|
Constructor and Description |
---|
PubChemFingerprinter() |
Modifier and Type | Method and Description |
---|---|
static BitSet |
decode(String enc)
Returns a fingerprint from a Base64 encoded Pubchem fingerprint.
|
BitSet |
getFingerprint(org.openscience.cdk.interfaces.IAtomContainer atomContainer)
Calculate 881 bit Pubchem fingerprint for a molecule.
|
byte[] |
getFingerprintAsBytes()
Returns the fingerprint generated for a molecule as a byte[].
|
int |
getSize() |
public static final int FP_SIZE
public BitSet getFingerprint(org.openscience.cdk.interfaces.IAtomContainer atomContainer) throws org.openscience.cdk.exception.CDKException
atomContainer
- the molecule to considerorg.openscience.cdk.exception.CDKException
- if there is an error during substructure searching or atom
typinggetFingerprintAsBytes()
public int getSize()
public byte[] getFingerprintAsBytes()
#getBitFingerprint(org.openscience.cdk.interfaces.IAtomContainer)
#getBitFingerprint(org.openscience.cdk.interfaces.IAtomContainer)
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.