On 24/04/2008, Greg Landrum <[email protected]> wrote:
> Hi Noel,
>
>
>  On Thu, Apr 24, 2008 at 12:03 PM, Noel O'Boyle <[email protected]> wrote:
>  > I'm a bit confused by how RDKit calculates the 2D coordinates. I use
>  >  AllChem.Compute2DCoords(mol, clearConfs = False) to calculate the 2D
>  >  coordinates.
>  >
>  >  Given an SD file containing a 2D depiction, RDKit appears to use those
>  >  coordinates rather than generating its own. Can you confirm that this
>  >  is the case, as this is a bit unexpected?
>
>
> Take a look at the documentation for AllChem.Compute2DCoords
>  (accessible in Python via: "help AllChem.Compute2DCoords).
>  By setting clearConfs=False you have told the code to keep the
>  existing conformation (the one read from the SD file) and to add the
>  2D conformation as a new one. If you had left that argument in its
>  default value (True), then the existing conformation(s) would have
>  been replaced with the new 2D one.
>
>  an example:
>  [5]>>> m = Chem.MolFromMolFile('foo.mol')
>  [6]>>> m.GetNumConformers()
>  Out[6] 1
>  [7]>>> AllChem.Compute2DCoords(m,clearConfs=False)
>  Out[7] 1
>  [8]>>> m.GetNumConformers()
>  Out[8] 2
>  [9]>>> AllChem.Compute2DCoords(m)
>  Out[9] 0
>  [10]>>> m.GetNumConformers()
>  Out[10] 1

Right. In my initial testing I only used SMILES strings, which of
course don't have any conformers to begin with.

Reply via email to