Skip to content

OE chirality not perceived after to_openeye #901

Open

Description

@SimonBoothroyd

Describe the bug

The chirality of an OE molecule is not perceived during calls to to_openeye which leads to IsChiral calls returning False for chiral atoms on the resulting molecule. The OE molecule does still track the correct stereochemistry however.

To Reproduce

from openeye import oechem

from openff.toolkit.topology import Molecule

molecule = Molecule.from_smiles("N[C@@H](C)C(=O)O")
print([atom.stereochemistry for atom in molecule.atoms])

# [None, 'S', None, None, None, None, None, None, None, None, None, None, None]

oe_molecule = molecule.to_openeye()

for atom in oe_molecule.GetAtoms():
    if atom.IsChiral():
        print(atom.GetIdx(), oechem.OEGetAtomicSymbol(atom.GetAtomicNum()))

#

print(oechem.OEMolToSmiles(oe_molecule))

# C[C@@H](C(=O)O)N

molecule = Molecule.from_smiles("C\C=C/C")
print([bond.stereochemistry for bond in molecule.bonds])

oe_molecule = molecule.to_openeye()

for bond in oe_molecule.GetBonds():
    if bond.IsChiral():
        print(bond.GetBgnIdx(), "=", bond.GetEndIdx())

#

print(oechem.OEMolToSmiles(oe_molecule))

# C/C=C\C

Output
The full error message (may be large, that's fine. Better to paste too much than too little.)

Computing environment (please complete the following information):

  • Operating system: OSX
  • Output of running conda list
openeye-toolkits          2020.2.0                 py38_0    openeye
openff-toolkit            0.9.0           dev_0    <develop>

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions