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

Trouble rebasing RMG-Cat on latest master #1580

Closed
rwest opened this issue Apr 22, 2019 · 5 comments
Closed

Trouble rebasing RMG-Cat on latest master #1580

rwest opened this issue Apr 22, 2019 · 5 comments

Comments

@rwest
Copy link
Member

rwest commented Apr 22, 2019

The catmerge branch had RMG-cat ready for merging with RMG master.
#1537
I tried rebasing it onto the current master, and pushed the result to
https://github.com/rwest/rmg-py/tree/catmerge2
I had to resolve only a few minor conflicts, which I think I did carefully.
The unit tests all pass.

However, running
python rmg.py examples/rmg/catalysis/ch4_o2/input.py
results in

Initialization complete. Starting model generation.

Generating initial reactions...
Error: Problem family: Surface_Adsorption_vdW
Error: Problem reactants: (Molecule(SMILES="C"), Molecule(SMILES="C"))
Traceback (most recent call last):
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/scoop_framework/util.py", line 112, in __call__
    return self.myfn(*args, **kwargs)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/react.py", line 75, in reactSpecies
    reactions = getDB('kinetics').generate_reactions_from_families(speciesTuple)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/database.py", line 523, in generate_reactions_from_families
    reaction_list.extend(self.react_molecules(combo, products=products, only_families=only_families, prod_resonance=resonance))
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/database.py", line 549, in react_molecules
    reaction_list.extend(family.generateReactions(molecules, products=products, prod_resonance=prod_resonance))
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1649, in generateReactions
    self.__generateReactions(reactants, products=products, forward=False, prod_resonance=prod_resonance))
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1900, in __generateReactions
    productStructures = self.__generateProductStructures(reactantStructures, [mapB, mapA], forward)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1525, in __generateProductStructures
    productStructures = self.applyRecipe(reactantStructures, forward=forward)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1314, in applyRecipe
    self.reverseRecipe.applyForward(reactantStructure, unique)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 364, in applyForward
    return self.__apply(struct, True, unique)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 287, in __apply
    atom2 = struct.getLabeledAtom(label2)
  File "rmgpy/molecule/molecule.py", line 1264, in rmgpy.molecule.molecule.Molecule.getLabeledAtom
    def getLabeledAtom(self, label):
  File "rmgpy/molecule/molecule.py", line 1270, in rmgpy.molecule.molecule.Molecule.getLabeledAtom
    raise ValueError('No atom in the molecule has the label "{0}".'.format(label))
ValueError: No atom in the molecule has the label "*2".

Traceback (most recent call last):
  File "rmg.py", line 173, in <module>
    main()
  File "rmg.py", line 167, in main
    rmg.execute(**kwargs)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/main.py", line 667, in execute
    trimolecularReact=self.trimolecularReact)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/model.py", line 679, in enlarge
    unimolecularReact, bimolecularReact, trimolecularReact=trimolecularReact)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/react.py", line 143, in reactAll
    rxns = list(react(*spcTuples))
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/react.py", line 59, in react
    spcTuples)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/scoop_framework/util.py", line 154, in map_
    return map(WorkerWrapper(args[0]), *args[1:], **kwargs)
  File "/Users/rwest/anaconda/envs/rmg230/lib/python2.7/site-packages/scoop-0.7.2.0-py2.7.egg/scoop/fallbacks.py", line 49, in wrapper
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/scoop_framework/util.py", line 112, in __call__
    return self.myfn(*args, **kwargs)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/react.py", line 75, in reactSpecies
    reactions = getDB('kinetics').generate_reactions_from_families(speciesTuple)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/database.py", line 523, in generate_reactions_from_families
    reaction_list.extend(self.react_molecules(combo, products=products, only_families=only_families, prod_resonance=resonance))
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/database.py", line 549, in react_molecules
    reaction_list.extend(family.generateReactions(molecules, products=products, prod_resonance=prod_resonance))
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1649, in generateReactions
    self.__generateReactions(reactants, products=products, forward=False, prod_resonance=prod_resonance))
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1900, in __generateReactions
    productStructures = self.__generateProductStructures(reactantStructures, [mapB, mapA], forward)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1525, in __generateProductStructures
    productStructures = self.applyRecipe(reactantStructures, forward=forward)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1314, in applyRecipe
    self.reverseRecipe.applyForward(reactantStructure, unique)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 364, in applyForward
    return self.__apply(struct, True, unique)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 287, in __apply
    atom2 = struct.getLabeledAtom(label2)
  File "rmgpy/molecule/molecule.py", line 1264, in rmgpy.molecule.molecule.Molecule.getLabeledAtom
    def getLabeledAtom(self, label):
  File "rmgpy/molecule/molecule.py", line 1270, in rmgpy.molecule.molecule.Molecule.getLabeledAtom
    raise ValueError('No atom in the molecule has the label "{0}".'.format(label))
ValueError: No atom in the molecule has the label "*2".

@mjohnson541
Copy link
Contributor

This is most likely related to the merging of automatic tree generation part 3, which added a set of switches that RMG uses to determine if a tree is an old tree or one of the new trees, however, I don't see any obvious reason why Surface_Adsorption_vdW would run into problems since it's bimolecular and has two trees.

@rwest
Copy link
Member Author

rwest commented Apr 23, 2019

The product is an adsorbate but physisorption (vdW) is represented as a disconnected graph (no bond). Could be the reason? Something splitting the structure into two molecules?

@mjohnson541
Copy link
Contributor

I wouldn't think the product would matter that much, but that certainly seems to make more sense than anything else. I can take a look at this later.

@mjohnson541
Copy link
Contributor

The issue was unrelated to the products, it was actually an issue related to improperly overwritten references in template handling. During the review of atg3 @mliu49 and I removed a deepcopy that was slowing RMG down because we didn't think it would be problematic for ordinary trees. Fortunately I had already fixed this issue (both the references and the speed issue) in atg4 and I've ported forward a fix to catmerge2.

@rwest
Copy link
Member Author

rwest commented Apr 25, 2019

Thanks Matt. I got it onto catmerge #1537 and tested a couple of models

@rwest rwest closed this as completed Apr 25, 2019
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