[Rdkit-discuss] How to get coordinates for each atom in molecule?

2014-01-24 Thread MichaƂ Nowotka
Hi, Let's say I loaded a molfile containing coordinates to RDKit mol object or loaded it from smiles but called AllChem.Compute2DCoords(mol). Now I would like to get coordinates for each atom. Unfortunately Atom class doesn't have any GetCoords method but this is understandable since position is

Re: [Rdkit-discuss] How to get coordinates for each atom in molecule?

2014-01-24 Thread sereina riniker
Hi Michael, You can get the atom positions via the conformer: m = Chem.MolFromSmiles('c1c1') AllChem.Compute2DCoords() pos = m.GetConformer().GetAtomPosition(0) # position of atom 0 This gives you a rdGeometry.Point3D - e.g. the x coordinates you get with: x = pos.x I hope this is what