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

resonance generation creates charged species #53

Open
davidfarinajr opened this issue Jan 6, 2020 · 1 comment
Open

resonance generation creates charged species #53

davidfarinajr opened this issue Jan 6, 2020 · 1 comment

Comments

@davidfarinajr
Copy link
Collaborator

Currently, AutoTST uses RMG's generate_resonance_structures() method to automatically generate resonance structures when an autotst species is initialized. However, occasionally, this resonance generation method raises a ValueError when trying to create a charged species. This is happening to some of the weird HAN nitrogen intermediates. This is the traceback when trying to generate a species from smiles string 'OO[N+](O)[O-]'

Traceback (most recent call last):
  File "molecules.py", line 103, in <module>
    species = Species(smiles=[smiles])
  File "/home/farina.d/AutoTST/autotst/species.py", line 143, in __init__
    species_list.append(molecule.generate_resonance_structures())
  File "rmgpy/molecule/molecule.py", line 2089, in rmgpy.molecule.molecule.Molecule.generate_resonance_structures
  File "rmgpy/molecule/molecule.py", line 2091, in rmgpy.molecule.molecule.Molecule.generate_resonance_structures
  File "rmgpy/molecule/resonance.py", line 150, in rmgpy.molecule.resonance.generate_resonance_structures
  File "rmgpy/molecule/resonance.py", line 185, in rmgpy.molecule.resonance.generate_resonance_structures
ValueError: Got the following structure:
SMILES: OO[N+2](O)[O-]
AdjacencyList:
1 O u0 p2 c0 {3,S} {5,S}
2 O u0 p2 c0 {5,S} {6,S}
3 O u0 p2 c0 {1,S} {7,S}
4 O u0 p3 c-1 {5,S}
5 N u0 p0 c+2 {1,S} {2,S} {4,S}
6 H u0 p0 c0 {2,S}
7 H u0 p0 c0 {3,S}

Net charge: 1

Currently RMG cannot process charged species correctly.
If this structure was entered in SMILES, try using the adjacencyList format for an unambiguous definition.
@rwest
Copy link
Member

rwest commented Jan 6, 2020

Maybe related to ReactionMechanismGenerator/RMG-Py#1859 which is generating charged species through resonance structure generation.

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

2 participants