diff --git a/rmgpy/reaction.py b/rmgpy/reaction.py index a8ae13f3d3..477e29cc96 100644 --- a/rmgpy/reaction.py +++ b/rmgpy/reaction.py @@ -1447,7 +1447,7 @@ def is_balanced(self): from rmgpy.molecule.element import element_list from rmgpy.molecule.fragment import CuttingLabel, Fragment - cython.declare(reactant_elements=dict, product_elements=dict, molecule=Graph, atom=Vertex, element=Element, + cython.declare(reactant_elements=dict, product_elements=dict, molecule=Molecule, atom=Atom, element=Element, reactants_net_charge=cython.int, products_net_charge=cython.int) reactant_elements = {} diff --git a/rmgpy/rmg/model.py b/rmgpy/rmg/model.py index f937ac8842..225c8f5539 100644 --- a/rmgpy/rmg/model.py +++ b/rmgpy/rmg/model.py @@ -365,10 +365,11 @@ def make_new_species(self, object, label="", reactive=True, check_existing=True, spec.molecular_weight = Quantity(spec.molecule[0].get_molecular_weight() * 1000.0, "amu") if generate_thermo: - self.generate_thermo(spec) + # Rename from thermo library label only if no user-provided label exists yet. + self.generate_thermo(spec, rename=not bool(spec.label)) # If the species still does not have a label, set initial label as the SMILES - # This may change later after getting thermo in self.generate_thermo() + # (applies when generate_thermo is False, or when no library match was found) if not spec.label: spec.label = spec.smiles