You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to create an isomorphic template reaction, RMG's generate_reactions generates reactions from a KineticFamily, it creates template reactions which are not isomorphic to the input reaction of interest
How To Reproduce
In:
import rmgpy
from rmgpy.molecule import Molecule
from rmgpy.reaction import Reaction
from rmgpy.data.rmg import RMGDatabase
rmg_database = RMGDatabase()
database_path = rmgpy.settings['database.directory']
rmg_database.load(
database_path,
kinetics_families=["H_Abstraction"],
transport_libraries=[],
reaction_libraries=[],
seed_mechanisms=[],
thermo_libraries=[
'primaryThermoLibrary',
'thermo_DFT_CCSDTF12_BAC',
'CBS_QB3_1dHR'],
solvation=False,
)
family = rmg_database.kinetics.families["H_Abstraction"]
r1 = Reaction(reactants=[Molecule(smiles="[CH2]"), Molecule(smiles="[H]")], products=[Molecule(smiles="[H][H]"), Molecule(smiles="[CH]")])
print("Initial reactions is: {}".format(r1))
print("")
for i, r2 in enumerate(family.generate_reactions(r1.reactants)):
print("The {}th generated reaction is {}".format(i, r2))
print("Isomorphic?: {}".format(r2.is_isomorphic(r1)))
for sp in r2.reactants + r2.products:
sp.clear_labeled_atoms()
Out:
Initial reactions is: <Molecule "[CH2]"> + <Molecule "[H]"> <=> <Molecule "[H][H]"> + <Molecule "[CH]">
The 0th generated reaction is <Molecule "[H]"> + <Molecule "[CH2]"> <=> <Molecule "[H][H]"> + <Molecule "[CH]">
Isomorphic?: False
The 1th generated reaction is <Molecule "[H]"> + <Molecule "[CH2]"> <=> <Molecule "[H][H]"> + <Molecule "[CH]">
Isomorphic?: False
Expected Behavior
We expect one result to be True. However all are False. Also, I would only expect one reaction, however family.generate_reaction(r1.reactants) is list of length 2 of seemingly identical reactions but I'm guessing they are labeled differently.
Installation Information
Describe your installation method and system information.
OS (include version if known): macOS 10.15.2
Installation method: From source
RMG version information:
RMG-Py: latest master
RMG-database: latest master
The text was updated successfully, but these errors were encountered:
I need to test this out, but I wonder if the fact that one of the species is a carbene is relevant. Are there differences in the [CH] molecules in the three reactions? Check the multiplicity and number of paired/unpaired electrons.
Bug Description
When trying to create an isomorphic template reaction, RMG's
generate_reactions
generates reactions from a KineticFamily, it creates template reactions which are not isomorphic to the input reaction of interestHow To Reproduce
In:
Out:
Expected Behavior
We expect one result to be True. However all are False. Also, I would only expect one reaction, however
family.generate_reaction(r1.reactants)
is list of length 2 of seemingly identical reactions but I'm guessing they are labeled differently.Installation Information
Describe your installation method and system information.
The text was updated successfully, but these errors were encountered: