Hi
I am using rdkit to fetch atom pair information as AtomPairFingerprint. I
am reading from a list of molecules as individual SDF. Calling
GetHashedAtomPairFingerprintAsBitVect on the object "m" (where m is read as
each molecule), object strings are returned.
trainResi=open(rootpath + 'trialResi.list').readlines()
trainResi = [x.strip() for x in trainResi]
print len(trainResi)
for name in trainResi:
for ligname in glob.glob(os.path.join(modelDir+name+'.sdf'))[:]:
m = Chem.MolFromMolFile(ligname, sanitize=False, removeHs=False)
for atm in m.GetAtoms():
aid = atm.GetIdx()
m.UpdatePropertyCache(strict=False) ##Required because I
want to include charged molecules too!
fp =
AllChem.GetHashedAtomPairFingerprintAsBitVect(m,maxLength=APLength, \
fromAtoms=[aid])
print fp
* "fp" are returned as (including only one example) :*
<rdkit.DataStructs.cDataStructs.ExplicitBitVect object at 0x11bfc4d70>
For my code to work further, I am converting my fp into a numpy array,
which returns [0 0 0 ..., 0 0 0] (zero values)
What am I doing wrong?
I am new to rdkit and machine learning, and I am using jupyter notebook.
Thanks
Payal
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss