-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add functional tests for restarting from a seed mechanism
The first test restarts the minimal example after ~20 species and includes filters. The second test restarts the super-minimal example after ~9 species and does not include filters.
- Loading branch information
1 parent
240a690
commit e14e85a
Showing
15 changed files
with
5,485 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
restartFromSeed(path='seed_no_filters') | ||
|
||
# Data sources | ||
database( | ||
thermoLibraries = ['primaryThermoLibrary'], | ||
reactionLibraries = [], | ||
seedMechanisms = [], | ||
kineticsDepositories = ['training'], | ||
kineticsFamilies = ['H_Abstraction','Disproportionation','R_Recombination', | ||
'Birad_recombination', 'Birad_R_Recombination'], | ||
kineticsEstimator = 'rate rules', | ||
) | ||
|
||
# List of species | ||
species( | ||
label='H2', | ||
reactive=True, | ||
structure=SMILES("[H][H]"), | ||
) | ||
species( | ||
label='O2', | ||
reactive=True, | ||
structure=SMILES("[O][O]"), | ||
) | ||
|
||
# Reaction systems | ||
simpleReactor( | ||
temperature=(1000,'K'), | ||
pressure=(1.0,'bar'), | ||
initialMoleFractions={ | ||
'H2':.67, 'O2':.33, | ||
}, | ||
terminationConversion={ | ||
'H2': 0.9, | ||
}, | ||
terminationTime=(1e6,'s'), | ||
) | ||
|
||
simulator( | ||
atol=1e-16, | ||
rtol=1e-8, | ||
) | ||
|
||
model( | ||
toleranceKeepInEdge=0.0, | ||
toleranceMoveToCore=0.001, | ||
toleranceInterruptSimulation=0.001, | ||
maximumEdgeSpecies=100000, | ||
) | ||
|
||
options( | ||
units='si', | ||
generateOutputHTML=True, | ||
generatePlots=False, | ||
saveEdgeSpecies=True, | ||
saveSimulationProfiles=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
restartFromSeed(path='seed_w_filters') | ||
|
||
# Data sources | ||
database( | ||
thermoLibraries = ['primaryThermoLibrary'], | ||
reactionLibraries = [], | ||
seedMechanisms = [], | ||
kineticsDepositories = ['training'], | ||
kineticsFamilies = 'default', | ||
kineticsEstimator = 'rate rules', | ||
) | ||
|
||
# List of species | ||
species( | ||
label='ethane', | ||
reactive=True, | ||
structure=SMILES("CC"), | ||
) | ||
|
||
# Reaction systems | ||
simpleReactor( | ||
temperature=(1350,'K'), | ||
pressure=(1.0,'bar'), | ||
initialMoleFractions={ | ||
"ethane": 1.0, | ||
}, | ||
terminationConversion={ | ||
'ethane': 0.9, | ||
}, | ||
terminationTime=(1e6,'s'), | ||
) | ||
|
||
simulator( | ||
atol=1e-16, | ||
rtol=1e-8, | ||
) | ||
|
||
model( | ||
toleranceKeepInEdge=0.0, | ||
toleranceMoveToCore=0.1, | ||
toleranceInterruptSimulation=0.1, | ||
maximumEdgeSpecies=100000, | ||
filterReactions=True, | ||
) | ||
|
||
options( | ||
units='si', | ||
generateOutputHTML=True, | ||
generatePlots=False, | ||
saveEdgeSpecies=True, | ||
saveSimulationProfiles=True, | ||
) |
Binary file not shown.
49 changes: 49 additions & 0 deletions
49
rmgpy/rmg/test_data/restartTest/seed_no_filters/filters/species_map.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
- '1 Ar u0 p4 c0 | ||
' | ||
- '1 He u0 p1 c0 | ||
' | ||
- '1 Ne u0 p4 c0 | ||
' | ||
- '1 N u0 p1 c0 {2,T} | ||
2 N u0 p1 c0 {1,T} | ||
' | ||
- '1 H u0 p0 c0 {2,S} | ||
2 H u0 p0 c0 {1,S} | ||
' | ||
- 'multiplicity 3 | ||
1 O u1 p2 c0 {2,S} | ||
2 O u1 p2 c0 {1,S} | ||
' | ||
- 'multiplicity 2 | ||
1 H u1 p0 c0 | ||
' | ||
- 'multiplicity 2 | ||
1 O u0 p2 c0 {2,S} {3,S} | ||
2 O u1 p2 c0 {1,S} | ||
3 H u0 p0 c0 {1,S} | ||
' | ||
- '1 O u0 p2 c0 {2,S} {3,S} | ||
2 O u0 p2 c0 {1,S} {4,S} | ||
3 H u0 p0 c0 {1,S} | ||
4 H u0 p0 c0 {2,S} | ||
' |
25 changes: 25 additions & 0 deletions
25
rmgpy/rmg/test_data/restartTest/seed_no_filters/seed/dictionary.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
H | ||
multiplicity 2 | ||
1 H u1 p0 c0 | ||
|
||
H2 | ||
1 H u0 p0 c0 {2,S} | ||
2 H u0 p0 c0 {1,S} | ||
|
||
O2 | ||
multiplicity 3 | ||
1 O u1 p2 c0 {2,S} | ||
2 O u1 p2 c0 {1,S} | ||
|
||
[O]O | ||
multiplicity 2 | ||
1 O u0 p2 c0 {2,S} {3,S} | ||
2 O u1 p2 c0 {1,S} | ||
3 H u0 p0 c0 {1,S} | ||
|
||
OO | ||
1 O u0 p2 c0 {2,S} {3,S} | ||
2 O u0 p2 c0 {1,S} {4,S} | ||
3 H u0 p0 c0 {1,S} | ||
4 H u0 p0 c0 {2,S} | ||
|
Oops, something went wrong.