steeveslab-blog

Editing, merging, and replacing molecules in RDKit

In [1]:
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem.Draw import MolDrawing, DrawingOptions
In [2]:
DrawingOptions.bondLineWidth=1.8
DrawingOptions.atomLabelFontSize=14
DrawingOptions.includeAtomNumbers=False

Create new molecule from a SMILES string:

In [3]:
start_mol = Chem.MolFromSmiles('c1cc(CCCO ...

Measurement and plotting of coordinates in RDKit

In [1]:
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem import PyMol
import cPickle as pickle
In [2]:
ibuH = pickle.load(open('ibuH_confs.pkl','rb'))
In [3]:
confs = ibuH.GetConformers()

We might be interested in the distribution of a particular ...

Lists of molecules in RDKit

In [1]:
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem.Draw.MolDrawing import MolDrawing, DrawingOptions
In [2]:
DrawingOptions.bondLineWidth=1.8
DrawingOptions.atomLabelFontSize=14

In cheminformatics, we are rarely interested in performing calculations on a single molecule at a time ...

Multiple conformations of a molecule in RDKit

In [1]:
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem.Draw.MolDrawing import MolDrawing, DrawingOptions
In [2]:
import cPickle as pickle
In [3]:
from rdkit.Chem import PyMol
In [4]:
ibuH = pickle.load(open('ibuH.pkl','rb'))
In [5]:
ibuH ...

Force-field optimization of molecules in RDKit

In my previous post, I built a molecule in RDKit and saved it for later use. The construction process may not have created a molecule that is suitable for our purposes. Let’s examine the geometry of the molceule and visualize it using the PyMOL xmlrpc server.

In [1]:
from ...

Molecules in the IPython notebook with RDKit

One of my primary motivations for setting up this blog was to have a centralized place for sharing how I am using the combination of the RDKit and the IPython notebook in teaching and research. There are many great resources for learning how to use the RDKit python bindings, including ...

No time like the present

I have heard that it is possible to assemble a blog using the IPython notebook. I think I might give that a try.

In [1]:
print 'Hello, friends.'
Hello, friends.

I hardcoded a couple of hacks to get "smart quotes" from Markdown both inside and outside of the notebook cells ...