Hi Greg,

I have some code that relies on the GenerateDepictionMatching3DStructure
function, that I have found no longer plays nicely with 2010_12_1.

In 2010_09_1, the following works fine:


>>> from rdkit import Chem
>>> from rdkit.Chem import AllChem, Draw
>>> mol = Chem.MolFromSmiles("CCOCCNC")
>>> AllChem.EmbedMolecule(mol)
>>> AllChem.UFFOptimizeMolecule(mol)
>>> AllChem.GenerateDepictionMatching3DStructure(mol, 0)
>>> Draw.MolToImageFile(mol, "C:\\test.png")


However, with 2010_12_1, I get the following at the point of calling
GenerateDepictionMatching3DStructure:

Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    AllChem.GenerateDepictionMatching3DStructure(mol, 0)
  File "C:\RDKit_2010_12_1\rdkit\Chem\AllChem.py", line 149, in
GenerateDepictionMatching3DStructure
    conf = reference.GetConformer(confId)
AttributeError: 'int' object has no attribute 'GetConformer'


I am guessing that something has changed that means a reference
structure is now a requirement(?)  Previously I had been just passing in
0 - which I had assumed meant "don't bother trying to align to anything;
just try and make a tidy 2D representation that looks like the 3D
arrangement".

I must confess I was not 100% sure what the reference option was, but
was fairly happy in my ignorance while I could successfully pass 0 in!
However, now I find that I have to pass a mol type in - I think now
doing:

>>> AllChem.GenerateDepictionMatching3DStructure(mol, mol)

is giving the same results as the previous
"AllChem.GenerateDepictionMatching3DStructure(mol, 0)"...  Am I doing
this correctly, and is the changed behaviour deliberate?

Kind regards

James

______________________________________________________________________
PLEASE READ: This email is confidential and may be privileged. It is intended 
for the named addressee(s) only and access to it by anyone else is 
unauthorised. If you are not an addressee, any disclosure or copying of the 
contents of this email or any action taken (or not taken) in reliance on it is 
unauthorised and may be unlawful. If you have received this email in error, 
please notify the sender or postmas...@vernalis.com. Email is not a secure 
method of communication and the Company cannot accept responsibility for the 
accuracy or completeness of this message or any attachment(s). Please check 
this email for virus infection for which the Company accepts no responsibility. 
If verification of this email is sought then please request a hard copy. Unless 
otherwise stated, any views or opinions presented are solely those of the 
author and do not represent those of the Company.

The Vernalis Group of Companies
Oakdene Court
613 Reading Road
Winnersh, Berkshire
RG41 5UA.
Tel: +44 118 977 3133

To access trading company registration and address details, please go to the 
Vernalis website at www.vernalis.com and click on the "Company address and 
registration details" link at the bottom of the page..
______________________________________________________________________

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to