In [1]:
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import rdFingerprintGenerator
from rdkit import rdBase
from rdkit import RDPaths
import os
In [2]:
rdBase.rdkitVersion
Out[2]:
'2018.09.1'
In [3]:
mols = Chem.SDMolSupplier(os.path.join(RDPaths.RDDocsDir,'Book/data/cdk2.sdf'))
mols = [ mol for mol in mols if mol != None]
In [4]:
morgan_fp_gen = rdFingerprintGenerator.GetMorganGenerator()
fp01 = morgan_fp_gen.GetFingerprint(mols[0])
fp02 = AllChem.GetMorganFingerprintAsBitVect(mols[0],3)
In [5]:
fp01
Out[5]:
<rdkit.DataStructs.cDataStructs.ExplicitBitVect at 0x10a8231c0>
In [6]:
fp02
Out[6]:
<rdkit.DataStructs.cDataStructs.ExplicitBitVect at 0x10a825260>
In [7]:
dir(morgan_fp_gen)
Out[7]:
['GetCountFingerprint',
 'GetFingerprint',
 'GetInfoString',
 'GetSparseCountFingerprint',
 'GetSparseFingerprint',
 '__class__',
 '__delattr__',
 '__dict__',
 '__dir__',
 '__doc__',
 '__eq__',
 '__format__',
 '__ge__',
 '__getattribute__',
 '__gt__',
 '__hash__',
 '__init__',
 '__init_subclass__',
 '__le__',
 '__lt__',
 '__module__',
 '__ne__',
 '__new__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__setattr__',
 '__sizeof__',
 '__str__',
 '__subclasshook__',
 '__weakref__']
In [ ]:
 
In [ ]: