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

OpenBabel to molecule conversion fails with AtomTypeError #115

Closed
rwest opened this issue Apr 23, 2013 · 1 comment
Closed

OpenBabel to molecule conversion fails with AtomTypeError #115

rwest opened this issue Apr 23, 2013 · 1 comment

Comments

@rwest
Copy link
Member

rwest commented Apr 23, 2013

Not sure if the problem is with the writing or the reading.

I had a molecule in an RMG run that was turned into the smiles c1(C=C)coo1
but when you try to turn that back into a molecule, you get:

  File "molecule.py", line 928, in rmgpy.molecule.molecule.Molecule.fromSMILES (build/pyrex/rmgpy/molecule/molecule.c:15015)
  File "molecule.py", line 940, in rmgpy.molecule.molecule.Molecule.fromSMILES (build/pyrex/rmgpy/molecule/molecule.c:14948)
  File "molecule.py", line 1006, in rmgpy.molecule.molecule.Molecule.fromOBMol (build/pyrex/rmgpy/molecule/molecule.c:15692)
  File "molecule.py", line 713, in rmgpy.molecule.molecule.Molecule.updateAtomTypes (build/pyrex/rmgpy/molecule/molecule.c:11598)
  File "atomtype.py", line 233, in rmgpy.molecule.atomtype.getAtomType (build/pyrex/rmgpy/molecule/atomtype.c:3917)
  File "atomtype.py", line 285, in rmgpy.molecule.atomtype.getAtomType (build/pyrex/rmgpy/molecule/atomtype.c:3796)
rmgpy.molecule.atomtype.AtomTypeError: Unable to determine atom type for atom O.

Same thing for the equivalent SMILES string C1(=COO1)C=C (converted via NCI/CADD resolver), which makes me think the problem is with reading, rather than writing.

I think the correct adjacency list is

1 C 0 {2,D} {4,S} {5,S}
2 C 0 {1,D} {3,S}
3 O 0 {2,S} {4,S}
4 O 0 {1,S} {3,S}
5 C 0 {1,S} {6,D}
6 C 0 {5,D}
@rwest
Copy link
Member Author

rwest commented Aug 8, 2013

Closed by #135.

@rwest rwest closed this as completed Aug 8, 2013
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