RdKit idioms: Difference between revisions
Jump to navigation
Jump to search
(Created page with "here we collect together bits of code that you can use in rdkit to get the work done. Category:Idioms") |
No edit summary |
||
Line 2: | Line 2: | ||
from rdkit.Chem import MolFromSmiles, RDKFingerprint | |||
from rdkit.DataStructs import TanimotoSimilarity | |||
m1 = MolFromSmiles('c1ccccc1') | |||
m2 = MolFromSmiles('c1ccccc1CCCC') | |||
fp1 = RDKFingerprint(m1) | |||
fp2 = RDKFingerprint(m2) | |||
print TanimotoSimilarity(fp1, fp2) | |||
[[Category:Idioms]] | [[Category:Idioms]] |
Revision as of 20:22, 4 November 2014
here we collect together bits of code that you can use in rdkit to get the work done.
from rdkit.Chem import MolFromSmiles, RDKFingerprint from rdkit.DataStructs import TanimotoSimilarity m1 = MolFromSmiles('c1ccccc1') m2 = MolFromSmiles('c1ccccc1CCCC') fp1 = RDKFingerprint(m1) fp2 = RDKFingerprint(m2) print TanimotoSimilarity(fp1, fp2)