Skip to content

Instantly share code, notes, and snippets.

@mojaie
Created August 19, 2013 04:56
Show Gist options
  • Save mojaie/6265871 to your computer and use it in GitHub Desktop.
Save mojaie/6265871 to your computer and use it in GitHub Desktop.
Example of rdkit molecule property
# coding: UTF-8
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors
mol = Chem.MolFromSmiles('CCC(CC)O[C@@H]1C=C(C[C@@H]([C@H]1NC(=O)C)[NH3+])C(=O)OCC')
print "組成式:"
print rdMolDescriptors.CalcMolFormula(mol)
print "分子量(モル質量):"
print "{0:.2f}".format(round(rdMolDescriptors._CalcMolWt(mol), 2))
print "Lipinski水素結合アクセプター(O, N)の数:"
print rdMolDescriptors.CalcNumLipinskiHBA(mol)
print "Lipinski水素結合ドナー(OH, NH)の数:"
print rdMolDescriptors.CalcNumLipinskiHBD(mol)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment