Hi Bing, import pybel mol = pybel.readstring("smi", "CC(=O)Cl") print mol.calcfp("FP2").bits # [18, 220, 329, 330, 624, 671]
So 6 bits are set. Bit number 18, 220, etc. Hopefully you can figure out the rest. Look at the Pybel code if you're interested on how this was done. - Noel On 1 June 2010 13:25, bxiong <bxi...@mail.shcnc.ac.cn> wrote: > Dear all: > I want to calculate the fingerprint of a mol using the default FP2 > algorithm and output it as a string contains only 0 (means not set) or 1 > (means set on). through cehck the c++ source code, I get lost in those > functions. And could not find a function to convert folded fingerprint to > such 01 string. could you tell me how to do it in python script? Thanks in > advance! > > > Bing > > > 2010-06-01 > ________________________________ > bxiong > ------------------------------------------------------------------------------ > > > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > > ------------------------------------------------------------------------------ _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss