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

Got a charged molecule from the singlet_carbene_intra_disproportionation family #213

Closed
alongd opened this issue Sep 11, 2017 · 2 comments
Closed

Comments

@alongd
Copy link
Member

alongd commented Sep 11, 2017

RMG crashed when processing the following molecule
a
in the singlet_carbene_intra_disproportionation family, giving this trace:

family: singlet_carbene_intra_disproportionation
reactants: [Molecule(SMILES="C[C-]=[N+]=O")]
Error: Could not update atomtypes for <Molecule "[CH+](=C)=[N+]=O">.
multiplicity -187
1 *2 C u0 p0 c0 {2,D} {5,S} {6,S}
2 *1 C u0 p0 c+1 {1,D} {3,D} {4,S}
3    N u0 p0 c+1 {2,D} {7,D}
4 *3 H u0 p0 c0 {2,S}
5    H u0 p0 c0 {1,S}
6    H u0 p0 c0 {1,S}
7    O u0 p2 c0 {3,D}

Traceback (most recent call last):
  File "/home/alongd/Code/RMG-Py/rmgpy/scoop_framework/util.py", line 112, in __call__
    return self.myfn(*args, **kwargs)
  File "/home/alongd/Code/RMG-Py/rmgpy/rmg/react.py", line 77, in reactSpecies
    reactions = map(reactMolecules,combos)
  File "/home/alongd/Code/RMG-Py/rmgpy/rmg/react.py", line 164, in reactMolecules
    rxns = family.generateReactions(molecules)
  File "/home/alongd/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 1414, in generateReactions
    reactionList.extend(self.__generateReactions(reactants, forward=True))
  File "/home/alongd/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 1579, in __generateReactions
    productStructures = self.__generateProductStructures(reactantStructures, [map], forward)
  File "/home/alongd/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 1294, in __generateProductStructures
    productStructures = self.applyRecipe(reactantStructures, forward=forward)
  File "/home/alongd/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 1260, in applyRecipe
    struct.update()
  File "rmgpy/molecule/molecule.py", line 822, in rmgpy.molecule.molecule.Molecule.update
    self.updateAtomTypes()
  File "rmgpy/molecule/molecule.py", line 1033, in rmgpy.molecule.molecule.Molecule.updateAtomTypes
    raise
  File "rmgpy/molecule/molecule.py", line 1028, in rmgpy.molecule.molecule.Molecule.updateAtomTypes
    atom.atomType = getAtomType(atom, atom.edges)
  File "rmgpy/molecule/atomtype.py", line 477, in rmgpy.molecule.atomtype.getAtomType
    def getAtomType(atom, bonds):
  File "rmgpy/molecule/atomtype.py", line 511, in rmgpy.molecule.atomtype.getAtomType
    raise AtomTypeError(
AtomTypeError: Unable to determine atom type for atom C+, which has 1 single bonds, 2 double bonds to C, 0 double bonds to O, 0 double bonds to S, 0 triple bonds, 0 benzene bonds, and 0 lone pairs.

(the family + reactant in the trace are my debug additions)

The product has a net charge of (+2).
Perhaps we should forbid charged carbenes from reacting in this family?

alongd added a commit that referenced this issue Sep 11, 2017
Forbidding a charged carbene such as in C[C-]=[N+]=O from reacting in
the singlet_carbene_intra_disproportionation family. See #213.
alongd added a commit that referenced this issue Sep 11, 2017
Forbidding a charged carbene such as in C[C-]=[N+]=O from reacting in
the singlet_carbene_intra_disproportionation family. See #213.
alongd added a commit that referenced this issue Sep 11, 2017
Forbidding a charged carbene such as in C[C-]=[N+]=O from reacting in
the singlet_carbene_intra_disproportionation family. See #213.
alongd added a commit that referenced this issue Sep 11, 2017
Forbidding a charged carbene such as in C[C-]=[N+]=O from reacting in
the singlet_carbene_intra_disproportionation family. See #213.
@nyee
Copy link
Contributor

nyee commented Sep 20, 2017

@zjburas and I had a face to face conversation about whether it is better to restructure trees to exclude charged carbons or to add a forbidden group.

It is probably better to just define the trees correctly rather than putting in forbidden groups. To my knowledge, the forbidden groups adds an extra step that is applied in every isomorphism. Additionally, we have had cases in the past where we "over-forbid" in a family and end up missing relevant chemistry. However, I get that it is much harder to change trees than add forbidden groups, so I'd allow it sometimes for expedience.

alongd added a commit that referenced this issue Sep 28, 2017
…nation

Forbidding a charged carbene such as in C[C-]=[N+]=O from reacting in
the singlet_carbene_intra_disproportionation family. See #213.
@alongd
Copy link
Member Author

alongd commented Nov 3, 2017

solved by #214

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