Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oedepict flattens molecules #20

Open
bannanc opened this issue Aug 5, 2016 · 1 comment
Open

oedepict flattens molecules #20

bannanc opened this issue Aug 5, 2016 · 1 comment

Comments

@bannanc
Copy link
Collaborator

bannanc commented Aug 5, 2016

@cbayly13 pointed out an internal issue with oedepict today. When it is used to depict a molecule it flattens it. So the coordinates are lost.

This is used in a few places in this repository:
SmartsDepict.py
substructRemove.py
smiAmberize.py
oebHasAmberParams.py
oebToAmberMol2TopCrd.py
smartsDepict.ipynb
substrucDepict.ipynb

Instead a copy of the molecule should be used for the depiction, for example:

def depict(input_mol):
   mol = OEGraphMol(input_mol)
@bannanc
Copy link
Collaborator Author

bannanc commented Mar 31, 2017

There is a follow up on this very old issue. Today I tried changing the depictMatch method in substrucDepict.ipynb

I tried changing the first line from

def depictMatch(mol, match, width=500, height = 200):
...

to

def depictMatch(input_mol, match, width=500, height=200):
mol = oechem.OEGraphMol(input_mol) 
....

After doing this the 2D depiction didn't show the color change on the molecule anymore, I think this has something to do with the match being for the origin molecule instead of the copy.

I don't think this is serious right now because all of these scripts are targeted at depicting molecules so we're not trying to access the 3D coordinates after depicting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant