RDKit | 分子坐标的测量和绘图

 

导入库

from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem import PyMol
import pickle
molH = pickle.load(open('molH_confs.pkl','rb'))
confs = molH.GetConformers()
diheds = [Chem.rdMolTransforms.GetDihedralDeg(conf,1,3,4,5) for conf in confs]
%matplotlib inline 
import matplotlib.pyplot as plt
plt.style.use('ggplot')
fig,ax = plt.subplots()
n,bins,patches = ax.hist(diheds,bins=36)
ax.set_xlabel('Dihedral Angle')
ax.set_ylabel('Counts');

你可能感兴趣的:(RDKit,化学信息学与AI)