Skip to content

Conversation

@mjohnson541
Copy link
Contributor

This has four main changes

  1. Enables tree generation for charge transfer families
  2. Updates tree generation, if E0 < 0 or n = 1 it simply uses the average instead of the BM rule
  3. Improves BM fitting using dH298
  4. Adds a SolventData attribute to reactions that can hold transition state solute information

@lgtm-com
Copy link

lgtm-com bot commented Feb 28, 2022

This pull request introduces 2 alerts and fixes 2 when merging ea72bf4 into 603b7f4 - view on LGTM.com

new alerts:

  • 1 for Syntax error
  • 1 for Unreachable code

fixed alerts:

  • 2 for Suspicious unused loop iteration variable

@lgtm-com
Copy link

lgtm-com bot commented Mar 1, 2022

This pull request introduces 2 alerts and fixes 2 when merging 4174c91 into 603b7f4 - view on LGTM.com

new alerts:

  • 1 for Syntax error
  • 1 for Unreachable code

fixed alerts:

  • 2 for Suspicious unused loop iteration variable

kr.fit_to_data(Tlist, klist, reverse_units, kf.T0.value_si)
return kr

<<<<<<< HEAD
Copy link
Contributor

@hwpang hwpang Oct 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you resolve this? It seems some version conflicts are committed

kr.fit_to_data(Tlist, klist, reverse_units, kf.T0.value_si)
return kr

>>>>>>> 3afc9cc91 (handle ChargeTransfer kinetics with in reaction.py)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this

kunits = get_rate_coefficient_units_from_reaction_order(n_gas, n_surf)

kf = self.kinetics
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this

return self.reverse_arrhenius_charge_transfer_rate(kf, kunits, Tmin, Tmax)

elif isinstance(kf, KineticsData):
>>>>>>> 3afc9cc91 (handle ChargeTransfer kinetics with in reaction.py)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this and resolve the conflicts?

elif self.electrons > 0:
products_net_charge -= self.electrons

>>>>>>> 3afc9cc91 (handle ChargeTransfer kinetics with in reaction.py)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this and resolve the conflicts?

kinetics = kinetics.to_arrhenius(rxn.get_enthalpy_of_reaction(T))
L = list(set(template_rxn_map[entry.label]) - set(rxns_test))

if L != []:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a more Pythonic way to check empty list is by if not L?

Copy link
Contributor

@hwpang hwpang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjohnson541 Thanks for the PR! I have a few comments. Could you rebase as well?

Copy link
Member

@rwest rwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to figure out how this relates to #2264
I think both are trying to solve some similar problems.

Can you explain why NOT to fit a Blowers Masel when there's only one training reaction? (if that's the new proposal) ?

return kin
else:
if n == 1:
kin.uncertainty = RateUncertainty(mu=0.0, var=(np.log(fmax) / 2.0) ** 2, N=1, Tref=Tref, data_mean=data_mean, correlation=label)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is unreachable?

if n==1: # on line 4611
else: # line 4631
    if n==1: # line 432

if entry.parent:
entry = entry.parent

boo = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why boo? A more informative name would help. ANd I don't see where boo is ever set to anything but True? So what's this infinite loop about?
Does it mean while entry.parent: ?

return out

if abs(dHrxn) > 4 * w0 / 10.0:
E0 = w0 / 10.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain why removing this? (in the commit message, ideally)

@mjohnson541
Copy link
Contributor Author

I'm not sure how up to date this PR is relative to the electrochem branch. It's been a while, I think as defined in the paper the dHrxn is at 298 K which implies that the Ea is constant with respect to temperature so you only have one datapoint to determine E0. You can determine E0 this way, but I think someone was having problems with those fits? At some point I think this was a matter of significant urgency to get merged and then we (or at least I) forgot about it?

@rwest
Copy link
Member

rwest commented Jun 22, 2023

I think this would address #1748

@rwest
Copy link
Member

rwest commented Jul 18, 2023

I think this is now part of #2316 which has been more recently rebased and checked. Hopefully that will be merged soon.

@rwest rwest closed this Jul 18, 2023
@rwest rwest linked an issue Jul 20, 2023 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Blowers Masel Arrhenius trained and evaluated with T-varying ∆Hr(T) ?

5 participants