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") |
(asdf) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Here we collect together bits of code that you can use in [[RDKit]] to get the work done. | |||
from rdkit import Chem,DataStructs | |||
import time,random | |||
from collections import defaultdict | |||
import psycopg2 | |||
from rdkit.Chem import Draw,PandasTools,rdMolDescriptors | |||
from rdkit.Chem.Draw import IPythonConsole | |||
from rdkit import rdBase | |||
from __future__ import print_function | |||
import requests | |||
from xml.etree import ElementTree | |||
import pandas as pd | |||
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]] |
Latest revision as of 04:19, 1 October 2015
Here we collect together bits of code that you can use in RDKit to get the work done.
from rdkit import Chem,DataStructs import time,random from collections import defaultdict import psycopg2 from rdkit.Chem import Draw,PandasTools,rdMolDescriptors from rdkit.Chem.Draw import IPythonConsole from rdkit import rdBase from __future__ import print_function import requests from xml.etree import ElementTree import pandas as pd
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)