Skip to content

Commit

Permalink
Merge pull request #2574 from hwpang/fix_fragment_regression
Browse files Browse the repository at this point in the history
Compatibility of `regression.py` with fragment
  • Loading branch information
JacksonBurns authored Nov 8, 2023
2 parents e9eca53 + f898372 commit ffeb7bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
15 changes: 5 additions & 10 deletions rmgpy/tools/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from rmgpy.molecule import Molecule
from rmgpy.quantity import Quantity
from rmgpy.species import Species
from rmgpy.rmg.input import fragment_adj, fragment_smiles, smiles, adjacency_list
from rmgpy.tools.canteramodel import CanteraCondition
from rmgpy.tools.observablesregression import ObservablesTestCase

Expand Down Expand Up @@ -74,9 +75,11 @@ def read_input_file(path):
'True': True,
'False': False,
'observable': observable,
'SMILES': SMILES,
'SMILES': smiles,
'fragment_adj': fragment_adj,
'fragment_SMILES': fragment_smiles,
'species': species,
'adjacencyList': adjacencyList,
'adjacencyList': adjacency_list,
'reactorSetups': reactorSetups,
'options': options,
}
Expand Down Expand Up @@ -122,14 +125,6 @@ def reactorSetups(reactorTypes, temperatures, pressures, initialMoleFractionsLis
setups = [reactorTypes, temperatures, pressures, initialMoleFractionsList, terminationTimes]


def SMILES(string):
return Molecule().from_smiles(string)


def adjacencyList(string):
return Molecule().from_adjacency_list(string)


def options(title='', tolerance=0.05):
global casetitle, tol
casetitle = title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@

species(
label="RCCCC",
reactive=True,
structure=fragment_adj(
"""1 C u0 p0 c0 {2,S} {3,S} {5,S} {6,S}
2 C u0 p0 c0 {1,S} {4,S} {7,S} {8,S}
Expand Down
1 change: 0 additions & 1 deletion test/regression/fragment/regression_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@

species(
label="RCCCC",
reactive=True,
structure=fragment_adj(
"""1 C u0 p0 c0 {2,S} {3,S} {5,S} {6,S}
2 C u0 p0 c0 {1,S} {4,S} {7,S} {8,S}
Expand Down

0 comments on commit ffeb7bb

Please sign in to comment.