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

Reconciling Electrochem Branch with main #2598

Draft
wants to merge 148 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
866045c
Add reaction library to test example for liquidSurfaceReactor
mjohnson541 Sep 4, 2021
af44932
added Faraday's Constant `F`
davidfarinajr May 12, 2021
2c924ed
added Potential as `V` quantity
davidfarinajr May 12, 2021
909cf21
added `H+` and `e` atomtypes, increment/decrement charge attributes
davidfarinajr May 12, 2021
915d221
Added increment_charge and decrement_charge to Rx
ssun30 Mar 29, 2024
03bca9b
H -> H0 in find_h_bonds Molecule method
davidfarinajr May 12, 2021
7d0196b
added `gain_charge` and `lose_charge` actions
davidfarinajr May 12, 2021
4a69379
added `is_proton` and `is_electron` group methods
davidfarinajr May 12, 2021
abe55f2
added group unit tests
davidfarinajr May 12, 2021
f85cd37
added `is_electron` and `is_proton` methods to Atom and Mol
davidfarinajr May 12, 2021
7e614be
added GAIN and LOSE CHARGE actions to Atoms
davidfarinajr May 12, 2021
7afe23a
added updated charge method and revised `update` Molecule method
davidfarinajr May 12, 2021
6c18f4a
do not raise charge exception by default when creating molecule from …
davidfarinajr May 12, 2021
2828032
try to generate_resonance_structures, and return a deep copy of the m…
davidfarinajr May 12, 2021
5b93de2
added molecule.pxd declarations
davidfarinajr May 12, 2021
9a4ff77
added Species `is_electron` and `is_proton` methods
davidfarinajr May 12, 2021
acf2119
do not raise charge exception by default when creating species from a…
davidfarinajr May 12, 2021
ce18d11
added `get_net_charge` method for Species
davidfarinajr May 12, 2021
91833d3
do not forbid ions
davidfarinajr May 12, 2021
eefe3db
added `SurfaceChargeTransfer` and `SurfaceChargeTransferBEP` kinetic …
davidfarinajr May 12, 2021
f44e639
added Molecule unit tests
davidfarinajr May 12, 2021
b3d73cf
added `electrons` reaction attr and reaction methods for charge trans…
davidfarinajr May 12, 2021
8236a91
added reaction tests for charge transfer reactions
davidfarinajr May 12, 2021
126caad
adding charged species and electrons to family.py
davidfarinajr May 12, 2021
7bfa977
added family test for `Surface_Proton_Electron_Reduction_Alpha` family
davidfarinajr May 12, 2021
6b03865
added support for loading `SurfaceChargeTransfer` kinetics from the d…
davidfarinajr May 12, 2021
1fc276a
update charge before updating lone pairs for solvation `transform_lon…
davidfarinajr May 12, 2021
b81891d
making rules for SurfaceChargeTransfer training reactions
davidfarinajr May 12, 2021
b371529
added SurfaceChargeTransfer kinetics import
davidfarinajr May 12, 2021
70629c0
added H+ and e to translator
davidfarinajr May 12, 2021
64fa18f
update_atomtypes -> update in translator.py
davidfarinajr May 12, 2021
2965d72
added `SurfaceChargeTransfer` to yml
davidfarinajr May 12, 2021
e46d521
added `adsorption_groups` attr to thermoDB
davidfarinajr Sep 2, 2021
1835afd
added fluorine to thermo `correct_binding_energy` method
davidfarinajr Sep 2, 2021
7d2e38a
add LiH and LiF to atom energy corrections fitting species list
mjohnson541 Oct 4, 2021
d0e971b
add Li atom spin
mjohnson541 Oct 4, 2021
6d7bbfe
don't check Li partial charges in adjlists
mjohnson541 Oct 4, 2021
e914f7e
add Li atomtype
mjohnson541 Oct 4, 2021
b03a838
add atom information for Li
mjohnson541 Oct 4, 2021
8302af5
add Li to R and R!H lists
mjohnson541 Dec 7, 2021
56ad071
add Li0 and Li+ atomtypes
mjohnson541 Jan 11, 2022
0717141
add Li McGowan volume
mjohnson541 Dec 9, 2021
eaaf549
add additional Li BDEs
mjohnson541 Dec 9, 2021
e623a95
add Li to bond dictionaries in thermo
mjohnson541 Jan 11, 2022
95e02eb
handle Lithium electron calculations
mjohnson541 Oct 4, 2021
02557ce
add is_lithium for GroupAtom
mjohnson541 Dec 9, 2021
278e283
handle SurfaceChargeTransfer in to_rms
mjohnson541 Oct 8, 2021
277e8eb
filter out resonance structures that try to put - charges on Li
mjohnson541 Dec 7, 2021
67bde16
ensure atomtypes get updated on loading in thermo entries
mjohnson541 Jan 11, 2022
1d26edf
add solute data to KineticsModel and Arrhenius
mjohnson541 Jan 11, 2022
efd1028
add ArrheniusChargeTransfer kinetics type
mjohnson541 Jan 11, 2022
c0e27d3
create ArrheniusChargeTransferBM type
mjohnson541 Jan 11, 2022
8fe87c3
add ChargeTransfer types to kinetics/__init__.py
mjohnson541 Jan 11, 2022
0d8b0af
avoid issue with auto decay reactions
mjohnson541 Jan 11, 2022
b172ddd
handle ChargeTransfer kinetics with in reaction.py
mjohnson541 Jan 11, 2022
73515e6
add handling ArrheniusChargeTransfer and fix handling SurfaceChargeTr…
mjohnson541 Jan 11, 2022
dcf052d
Revert "Remove charge transfer types from average_kinetics (to be rev…
rwest Jul 17, 2023
712293c
enable access to SoluteData object in kinetics database
mjohnson541 Jan 11, 2022
a4d1a13
update rule fitting
mjohnson541 Jan 11, 2022
f7ec31d
enable use of non-surface charge transfer families
mjohnson541 Jan 11, 2022
6d5a204
add charge transfer types to database context
mjohnson541 Jan 11, 2022
0a3513f
enable surface and bulk potentials to be specified separately
mjohnson541 Jan 11, 2022
b20ed71
Allow approximating a solvent not in the database with another solvent
mjohnson541 Feb 28, 2022
89addf5
standardize ascend option in cross validate
mjohnson541 Jan 11, 2022
1fae5b9
Average kinetics when n=1 or E0<0
mjohnson541 Feb 28, 2022
6d87a7a
add comment to averaged kinetics
mjohnson541 Feb 28, 2022
b5a625e
fix BM fitting
mjohnson541 Feb 28, 2022
15a495e
add functions for solvent correcting kinetics
mjohnson541 Jun 18, 2022
91136c2
add functionality for site specific solvent corrections
mjohnson541 Jun 18, 2022
dee563b
apply_solvent_correction in fix_barrier_height
mjohnson541 Jun 18, 2022
4db415d
enable solvent parameters to be directly specified in input file
mjohnson541 Jun 18, 2022
85b65a0
adapt fix_barrier_height calls
mjohnson541 Jun 18, 2022
4f3090f
handle ArrheniusChargeTransfer => Arrheniusq
mjohnson541 Jun 18, 2022
09c9a78
add index of refraction to SolventData objects
mjohnson541 Sep 9, 2022
c734d4f
fix KineticsModel outputs
mjohnson541 Jan 9, 2023
5097b53
add SoluteTSData object
mjohnson541 Jan 9, 2023
8da0728
add SoluteTSDIffData object
mjohnson541 Jan 9, 2023
29a82d8
add function to convert SoluteData and SoluteTSDiffData to SoluteTSData
mjohnson541 Jan 9, 2023
19e1c30
Enable database to understand new objects
mjohnson541 Jan 9, 2023
28d4ed5
Enable LibraryReaction to handle SoluteTSData
mjohnson541 Jan 9, 2023
359cf98
Enable TemplateReaction to handle new TS solvent corrections
mjohnson541 Jan 9, 2023
174a350
only use kinetics that have arrhenius forms for tree generation
mjohnson541 Jan 9, 2023
e8cad90
enable solute data to be pulled from further up the tree as necessary
mjohnson541 Jan 9, 2023
8586da5
enable fitting of TS solute rules
mjohnson541 Jan 9, 2023
872f89e
allow training reaction notebook to handle reactions without gas phas…
mjohnson541 Jan 9, 2023
2607dcd
fix arrhenius test
mjohnson541 May 7, 2023
a66291e
Fix ArrheniusBM.get_activation_energy unit test.
rwest Jul 18, 2023
183037d
modifed arrbm `fit_to_data` unit test
davidfarinajr Jan 18, 2022
e0e6f1c
port arrheniusTest changes to pytest
JacksonBurns Feb 1, 2024
2ae2add
add is_lithium to fragment
mjohnson541 May 7, 2023
49972a4
handle charge properly in fragment smiles hack
mjohnson541 May 7, 2023
773ab8d
skip nodes that are empty when pulling solute data
mjohnson541 May 7, 2023
64deaa1
update product template after generation
mjohnson541 May 9, 2023
30517fd
add Li adsorption to test data
mjohnson541 May 9, 2023
013a6b1
add adsorptionLi.py to testing database
mjohnson541 May 10, 2023
f4da930
don't check collision limit for reactions without kinetics
mjohnson541 Jun 3, 2023
b440b11
fix charge handling in make sample molecule
mjohnson541 Jun 10, 2023
8b7e020
Refactor some rate fitting in rule generation.
rwest Jul 17, 2023
a8c86e9
Minor refactor.
rwest Jul 18, 2023
bacd0fc
Consistently use T=298. K for fitting and evaluating Blowers-Masel ra…
rwest Jul 18, 2023
90247d9
Fixes and tweaks to Blowers Masel classes' fit_to_reactions methods.
rwest Jul 18, 2023
9fa935c
fix atomtype charge checking
mjohnson541 Jul 27, 2023
e6bd2fd
allow `cat` of regression diff to fail, print a warning instead
JacksonBurns Jul 28, 2023
5f30524
combine the messy Cython declarations (and remove dupes) in reaction.py
JacksonBurns Feb 1, 2024
79873bf
include changes to corrTest - lost in rebase somehow
JacksonBurns Feb 1, 2024
03ac364
change from unittest assert style to pytest
JacksonBurns Feb 1, 2024
2de48b2
port new test for kinetics families
JacksonBurns Feb 1, 2024
0c4c6ba
skip a test in solvation
JacksonBurns Feb 1, 2024
6a77e84
port surface test to new file and style
JacksonBurns Feb 1, 2024
ee3f539
port atom type test to new style and file
JacksonBurns Feb 1, 2024
931d3f3
change moleculeTest to pytest style
JacksonBurns Feb 1, 2024
6f0b4d4
port groupTest to pytest
JacksonBurns Feb 1, 2024
21ac0b3
move database test files, port tests and update style
JacksonBurns Feb 1, 2024
fd9e122
pytest.skip -> pytest.mark.skip
JacksonBurns Feb 1, 2024
fdcec90
add a missing kwarg to fragment's overloaded update function
JacksonBurns Feb 1, 2024
09ca03c
remove deprecated check for nose test
JacksonBurns Feb 1, 2024
17ea490
bad automated conversion of assert equal
JacksonBurns Feb 1, 2024
c111060
missed some unittest-style assert + copied some tests into wrong class
JacksonBurns Feb 1, 2024
9894c70
add missing kwarg to fragment update method
JacksonBurns Feb 2, 2024
0093716
TEMPORARY: set database branch to lithium
mjohnson541 Jan 10, 2023
b342fd3
enable fitting of TS solute rules
mjohnson541 Jan 9, 2023
758f1e4
set database branch to lithium
mjohnson541 Jan 10, 2023
740ab82
fix charge handling in make sample molecule
mjohnson541 Jun 10, 2023
c623447
allow inclusion of refractive index in Solvent object
mjohnson541 Dec 8, 2023
e2752b9
change TS solvation handling to new system
mjohnson541 Dec 8, 2023
de380d5
add Marcus kinetics
mjohnson541 Mar 10, 2024
285e390
handle Marcus kinetics in the RMS reactors
mjohnson541 Mar 10, 2024
6beb04f
fix bug with species initialization
mjohnson541 Mar 10, 2024
6cc20c1
allow direct specification of viscosity and electrode distance for th…
mjohnson541 Mar 10, 2024
9a321ba
properly handle electronchange when constructing RMS reaction objects
mjohnson541 Mar 10, 2024
839b9ed
add epsilon_0 to constants
mjohnson541 Mar 10, 2024
75425fa
handle Marcus in RMS yaml constructionn
mjohnson541 Mar 10, 2024
511fb56
specify electronchange in RMS yaml construction
mjohnson541 Mar 10, 2024
7796adf
handle Marcus kinetics in fix_barrier_height
mjohnson541 Mar 10, 2024
471477e
handle solvation for Marcus kinetics for library reactions
mjohnson541 Mar 10, 2024
e250465
allow Marcus kinetics to be loaded
mjohnson541 Mar 10, 2024
183bf5c
alllow Marcus kinetics in families
mjohnson541 Mar 10, 2024
34f1918
handle solvation for Marcus kinetics in families
mjohnson541 Mar 10, 2024
faeb2bb
handle kinetics averaging for Marcus
mjohnson541 Mar 10, 2024
d6511fd
squash
mjohnson541 Mar 10, 2024
b761436
handle Marcus kinetics within tree generation and rule generation
mjohnson541 Mar 10, 2024
1c6635b
add ethylene carbonate example
mjohnson541 Mar 10, 2024
8cad683
add acetonitrile SEI chemistry example
mjohnson541 Mar 10, 2024
3cd342d
Fixed a typo in test lose charge
ssun30 Mar 15, 2024
8d07234
Fixed syntax problems with SEI examples
ssun30 Mar 15, 2024
cc13430
Add set_reference_potential for SurfaceChargeTransfer
ssun30 Apr 12, 2024
cac7251
temporary fix to an exponent overflow problem
ssun30 Apr 26, 2024
20dbe27
Fixed atomtype charge checking
ssun30 May 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/CI.yml
Expand Up @@ -2,7 +2,7 @@
# This file contains the script used by GitHub actions to execute the Continuous Integration (CI)
# for RMG-Py. This includes building RMG and its dependencies, executing the unit tests,
# functional tests, database tests, and regression tests.
#
#
# This will run automatically on any push to any branch, but will only run one instance of
# itself at a time per branch (to avoid spawning tons of runners, which prevents them from
# executing).
Expand All @@ -14,7 +14,7 @@
#
#
# Changelog:
# 2023-04 - Jackson Burns - Added this header, regression tests, cleanup of action in
# 2023-04 - Jackson Burns - Added this header, regression tests, cleanup of action in
# in general, and documentation throughout the file.
# 2023-05 - added Docker build steps
# 2023-05-12 - added changes to allow running on forks
Expand Down Expand Up @@ -46,14 +46,19 @@ concurrency:
env:
# if running on RMG-Py but requiring changes on an un-merged branch of RMG-database, replace
# main with the name of the branch
RMG_DATABASE_BRANCH: main
RMG_DATABASE_BRANCH: lithium


jobs:
build-osx:
runs-on: macos-latest
# skip scheduled runs from forks
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
env:
# Update this if needed to match a pull request on the RMG-database:
RMG_DATABASE_BRANCH: lithium
# This is true only if this is a reference case for the regression testing:
REFERENCE_JOB: ${{ github.ref == 'refs/heads/main' && matrix.os =='ubuntu-latest' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }}
defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -272,7 +277,7 @@ jobs:
export FAILED=Yes
fi
echo "" # blank line so next block is interpreted as markdown
cat "$regr_test-core.log"
cat "$regr_test-core.log" || (echo "Dumping the whole log failed, please download it from GitHub actions. Here are the first 100 lines:" && head -n100 "$regr_test-core.log")
echo "</details>"
echo "<details>"
if python-jl scripts/checkModels.py \
Expand All @@ -289,7 +294,7 @@ jobs:
export FAILED=Yes
fi
echo "" # blank line so next block is interpreted as markdown
cat "$regr_test-edge.log"
cat "$regr_test-edge.log" || (echo "Dumping the whole log failed, please download it from GitHub actions. Here are the first 100 lines:" && head -n100 "$regr_test-core.log")
echo "</details>"

# Check for Regression between Reference and Dynamic (skip superminimal)
Expand Down
4 changes: 3 additions & 1 deletion arkane/encorr/ae.py
Expand Up @@ -73,7 +73,9 @@
'Methane',
'Methyl',
'Ammonia',
'Chloromethane'
'Chloromethane',
'Lithium Hydride',
'Lithium Fluoride'
]


Expand Down
2 changes: 1 addition & 1 deletion arkane/encorr/bac.py
Expand Up @@ -241,7 +241,7 @@ class BAC:
ref_databases = {}
atom_spins = {
'H': 0.5, 'C': 1.0, 'N': 1.5, 'O': 1.0, 'F': 0.5,
'Si': 1.0, 'P': 1.5, 'S': 1.0, 'Cl': 0.5, 'Br': 0.5, 'I': 0.5
'Si': 1.0, 'P': 1.5, 'S': 1.0, 'Cl': 0.5, 'Br': 0.5, 'I': 0.5, 'Li': 0.5,
}
exp_coeff = 3.0 # Melius-type parameter (Angstrom^-1)

Expand Down
181 changes: 181 additions & 0 deletions examples/rmg/SEI_pure_ACN/input.py
@@ -0,0 +1,181 @@
# Data sources
database(
thermoLibraries=['LithiumSurface','electrocatLiThermo','primaryThermoLibrary', 'LithiumPrimaryThermo', 'LithiumAdditionalThermo', 'thermo_DFT_CCSDTF12_BAC','DFT_QCI_thermo'], # 'surfaceThermoPt' is the default. Thermo data is derived using bindingEnergies for other metals
reactionLibraries = ['LithiumPrimaryKinetics',"LithiumSurface"], # when Ni is used change the library to Surface/Deutschmann_Ni
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = ['surface',
'1+2_Cycloaddition',
'Surface_Carbonate_Deposition',
'Surface_Carbonate_F_CO_Decomposition',
'Surface_Carbonate_2F_Decomposition',
'Surface_Carbonate_CO_Decomposition',
'1,2_Elimination_LiR',
'1,2_Intra_Elimination_LiR',
'Li_Addition_MultipleBond',
'Li_NO_Substitution',
'Li_NO_Ring_Opening',
'Li_Abstraction',
'R_Addition_MultipleBond_Disprop',
'Cation_R_Recombination',
'Cation_Addition_MultipleBond',
'1,2-Birad_to_alkene',
'1,2_Insertion_CO',
'1,2_Insertion_carbene',
'1,2_shiftS',
'1,3_Insertion_CO2',
'1,3_Insertion_ROR',
'1,3_Insertion_RSR',
'1,4_Cyclic_birad_scission',
'1,4_Linear_birad_scission',
'2+2_cycloaddition',
'Birad_recombination',
'CO_Disproportionation',
'Birad_R_Recombination',
'Cyclic_Ether_Formation',
'Cyclic_Thioether_Formation',
'Diels_alder_addition',
'Diels_alder_addition_Aromatic',
#'Disproportionation',
'HO2_Elimination_from_PeroxyRadical',
'H_Abstraction',
'Intra_Retro_Diels_alder_bicyclic',
'Intra_Disproportionation',
'Intra_R_Add_Endocyclic',
'Intra_R_Add_Exocyclic',
'R_Addition_COm',
'R_Addition_MultipleBond',
'R_Recombination',
'intra_H_migration',
'intra_NO2_ONO_conversion',
'intra_OH_migration',
'intra_substitutionCS_cyclization',
'intra_substitutionCS_isomerization',
'intra_substitutionS_cyclization',
'intra_substitutionS_isomerization',
#'ketoenol',
'Singlet_Carbene_Intra_Disproportionation',
'Singlet_Val6_to_triplet',
'Intra_5_membered_conjugated_C=C_C=C_addition',
'Intra_Diels_alder_monocyclic',
'Concerted_Intra_Diels_alder_monocyclic_1,2_shiftH',
'Intra_2+2_cycloaddition_Cd',
'Intra_ene_reaction',
'Cyclopentadiene_scission',
'6_membered_central_C-C_shift',
'Intra_R_Add_Exo_scission',
'1,2_shiftC',
'1,2_NH3_elimination',
'1,3_NH3_elimination',
'Retroene',],
kineticsEstimator = 'rate rules',
adsorptionGroups='adsorptionLi',
)

catalystProperties(
metal = 'Li110',
)

# List of species
species(
label="Lip",
reactive=True,
structure=SMILES("[Li+]"),
)

species(
label='ACN',
reactive=True,
structure=SMILES("CC#N"),
)

species(
label='vacantX',
reactive=True,
structure=adjacencyList("1 X u0"),
)

liquidSurfaceReactor(
temperature=(298.15,'K'),
distance=(10.0e-10,"m"),
viscosity=(5e7,"Pa*s"),
liqPotential=(0.3,'V'),
surfPotential=(0.0,'V'),
initialConcentrations={
"ACN": (0.019146,'mol/cm^3'),
"Lip": (15.0,'mol/m^3'),
},
initialSurfaceCoverages={
"vacantX": 1.0,
},
surfaceVolumeRatio=(1.0e-5, 'm^-1'),
terminationTime=(1e3,'sec'),
constantSpecies=["ACN","Lip"],
)

liquidSurfaceReactor(
temperature=(298.15,'K'),
distance=(0.0,"m"),
liqPotential=(0.0,'V'),
surfPotential=(0.0,'V'),
initialConcentrations={
"ACN": (0.019146,'mol/cm^3'),
"Lip": (15.0,'mol/m^3'),
},
initialSurfaceCoverages={
"vacantX": 1.0,
},
surfaceVolumeRatio=(1.0e5, 'm^-1'),
terminationTime=(1e3,'sec'),
constantSpecies=["ACN","Lip"],
)

solvation(
solvent='acetonitrile'
)

simulator(
atol=1e-16,
rtol=1e-6,
)

model(
toleranceKeepInEdge=1E-20,
toleranceMoveToCore=0.1,
toleranceRadMoveToCore=0.1,
toleranceInterruptSimulation=1e10,
maximumEdgeSpecies=100000,
filterReactions=False,
maxNumObjsPerIter=1,
terminateAtMaxObjects=True,
toleranceBranchReactionToCore=0.001,
branchingIndex=0.5,
branchingRatioMax=1.0,
)

options(
units='si',
saveEdgeSpecies=False,
)

forbidden(
label='vacancies',
structure=adjacencyListGroup("""
1 Xv u0 p0 c0
"""),
)

forbidden(
label='Li2',
structure=adjacencyList("""
1 Li u0 p0 c0 {2,S}
2 Li u0 p0 c0 {1,S}"""),
)

generatedSpeciesConstraints(
allowed=['input species','reaction libraries'],
maximumSurfaceSites=1,
maximumCarbonAtoms=7,
maximumOxygenAtoms=4,
maximumRadicalElectrons=1,
)