Get molecular angle information using RDKit

Now, I’m thinking new molecular similarity score.
It uses molecular angle information.

RDKit has some functions that calculate dihedral or some angles.
Like this..

from rdkit import Chem
from rdkit.Chem import rdMolTransforms
mol = Chem.MolFromSmiles( "N1CCNCC1" )
from rdkit.Chem import AllChem
#generate one confomer.
AllChem.EmbedMolecule(mol)
conf=mol.GetConformer(0)
atoms=[a for a in mol.GetAtoms()]
for a in atoms:
print( a.GetIdx(), a.GetSymbol() )

out put is…
0 N
1 C
2 C
3 N
4 C
5 C
Calculate torsion angle.

rdMolTransforms.GetAngleDeg(conf,0,1,2)
#113.92146321507079 ( degree )

Next, calculate dihedral angle between N-C / C-N.

rdMolTransforms.GetDihedralDeg(conf, 0,1,2,3)

I got -57.29664523229906 ( deg )

Works fine.

I’ll go to next step. 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s