Skip to content

Commit

Permalink
Add set_reference_potential for SurfaceChargeTransfer
Browse files Browse the repository at this point in the history
in to_rms
  • Loading branch information
ssun30 committed Apr 12, 2024
1 parent 75ee20f commit c5d557f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rmgpy/rmg/reactors.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit c5d557f

Please sign in to comment.