Hello,

I would to generate a 3D geometry of a molecule from a SMILES string.
Using sucrose as example I wrote:

from rdkit import Chem
from rdkit.Chem import AllChem
m = Chem.MolFromSmiles('O([C@@]1(O[C@H](CO)[C@H]([C@@H]1O)O)CO)[C@H]1O[C@@H]([C@@H](O)[C@@H]([C@H]1O)O)CO')
m2 = Chem.AddHs(m)
AllChem.EmbedMolecule(m2)
AllChem.MMFFOptimizeMolecule(m2)
print(Chem.MolToMolBlock(m2),file=open('sucrose.mol','w'))

The resulting structure has very bad bond lengths and angles, as if the
geometry optimization did not do anything.

did I miss something?

For the moment, I am not interested in finding the lowest energy conformer
of the molecule and I will be happy if the configuration of the chiral centers and
of the double bonds (if any) in the 3D structure were in agreement
with those indicated in the SMILES string.

All the best,

Jean-Marc

--

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to