Hello,

   is it possible to store custom fingerprints in psql DB and use them 
for similarity search? And how to do this?
   I foundtwo commands bfp_to_binary_text(bfp) and 
bfp_from_binary_text(bytea)in RDKit cartridge but cannot understand how 
to use them.
   I want to store pharmacophore fingerprints. There is no a built-in 
command in RDKit cartridge to calculate them so I have to calculate them 
in a Pythonscript. Then I need to store them in psql DB and create 
similarity search index but I could not find a solution yet.
   It might be of general interest how to store and use arbitrary 
fingerprints in DB.

An example of pharmacophore FP generation:

from rdkit import Chem
from rdkit import RDConfig
from rdkit.Chem.Pharm2D.SigFactory import SigFactory
from rdkit.Chem.Pharm2D import Generate

import os

fdefName = os.path.join(RDConfig.RDDataDir,'BaseFeatures.fdef')
factory = ChemicalFeatures.BuildFeatureFactory(fdefName)
sigFactory = SigFactory(factory, minPointCount=2, maxPointCount=3, 
trianglePruneBins=False)
sigFactory.SetBins([(0,2),(2,5),(5,8)])
sigFactory.Init()

mol = Chem.MolFromSmiles('Cc1nc(CN(C)c2ncnc3ccc(-c4ccc5c(c4)OCO5)cc23)cs1')
fp = Generate.Gen2DFingerprint(mol, sigFactory)

Pavel.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to