Hi Thomas,

could your report be already backed by the section titled «Working with
2D molecules: Generating Depictions» of the upper half of page

https://www.rdkit.org/docs/GettingStartedInPython.htm

about the 2020.03.1 documentation with the following example?

---- 8>< begin snippet --- ----
>>> m = Chem.MolFromSmiles('c1nccc2n1ccc2')
>>> AllChem.Compute2DCoords(m)
0
---- 8>< end snippet --- ----

Because this snippet is part of a show case, a minimal working example
(at least for a bit old RDKit 2019.9.1) translates into

---- 8>< begin snippet --- ----
from rdkit import Chem
from rdkit.Chem import AllChem
m = Chem.MolFromSmiles('c1ccccc1')
AllChem.Compute2DCoords(m)
---- 8>< end snippet --- ----

to yield "0" (zero).

However, possibly contributing to your struggle, note an entry on page

https://www.rdkit.org/docs/GettingStartedInPython.html#chem-vs-allchem

with the snippet

---- 8>< begin snippet --- ----
>>> from rdkit.Chem import AllChem as Chem
>>> m = Chem.MolFromSmiles('CCC')
---- 8>< end snippet --- ----

equivalent to a MWE of

---- 8>< begin snippet --- ----
import rdkit
from rdkit.Chem import AllChem as Chem
m = Chem.MolFromSmiles('CCC')
Chem.Compute2DCoords(m)
---- 8>< end snippet --- ----

to equally yield "0" (zero).

I only recall this part of the manual because one of my yesterday's
problems caused me to revisit the beginner's page again.

Norwid


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

Reply via email to