From c5d557f336d1a6f42ce5681b2d9373838ce5aa41 Mon Sep 17 00:00:00 2001 From: ssun30 Date: Fri, 12 Apr 2024 14:31:37 -0400 Subject: [PATCH] Add set_reference_potential for SurfaceChargeTransfer in to_rms --- rmgpy/rmg/reactors.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rmgpy/rmg/reactors.py b/rmgpy/rmg/reactors.py index 04445e040dd..4e63870a7cf 100644 --- a/rmgpy/rmg/reactors.py +++ b/rmgpy/rmg/reactors.py @@ -608,6 +608,7 @@ def to_rms(obj, species_names=None, rms_species_list=None, rmg_species=None): q = obj._alpha.value_si*obj._electrons.value_si return rms.Arrheniusq(A, n, Ea, q, rms.EmptyRateUncertainty()) elif isinstance(obj, SurfaceChargeTransfer): + print(obj) A = obj._A.value_si if obj._T0.value_si != 1.0: A /= ((obj._T0.value_si) ** obj._n.value_si) @@ -783,6 +784,7 @@ def to_rms(obj, species_names=None, rms_species_list=None, rmg_species=None): productinds = [species_names.index(spc.label) for spc in obj.products] reactants = [rms_species_list[i] for i in reactantinds] products = [rms_species_list[i] for i in productinds] + obj.set_reference_potential(obj.kinetics._T0.value_si) kinetics = to_rms(obj.kinetics, species_names=species_names, rms_species_list=rms_species_list, rmg_species=rmg_species) radchange = sum([spc.molecule[0].multiplicity-1 for spc in obj.products]) - sum([spc.molecule[0].multiplicity-1 for spc in obj.reactants]) electronchange = -sum([spc.molecule[0].get_net_charge() for spc in obj.products]) + sum([spc.molecule[0].get_net_charge() for spc in obj.reactants])