Skip to content
Snippets Groups Projects
Commit 36708750 authored by Christoph.Knote's avatar Christoph.Knote
Browse files

Updates to make restbox working again.

parent 5b8d0949
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ if work_path is None:
import warnings
warnings.warn("BOXMOX unusable - experiment execution disabled.")
else:
from experiment import Experiment, ExperimentFromExample, ExperimentFromExistingRun, Namelist, examples
from experiment import Experiment, ExperimentFromExample, ExperimentFromExistingRun, Namelist, examples, compiledMechs
try:
import matplotlib
......
......@@ -33,7 +33,11 @@ class ExampleData:
self.path = path
self.files = { x.replace(".csv", ""): os.path.join(self.path, x) for x in os.listdir(self.path) if '.csv' in x }
examples = { x: ExampleData(os.path.join(examplesPath, x)) for x in os.listdir(examplesPath) if os.path.isdir( os.path.join(examplesPath, x))}
examples = { x: ExampleData(os.path.join(examplesPath, x)) for x in os.listdir(examplesPath) if os.path.isdir( os.path.join(examplesPath, x) ) }
compiledMechsPath=os.path.join(os.environ['KPP_HOME'], "boxmox", "compiled_mechs")
compiledMechs = [ x for x in os.listdir(compiledMechsPath) if (os.path.isdir( os.path.join(compiledMechsPath, x) )) and ("_adjoint" not in x) ]
class Namelist:
'''
......@@ -300,6 +304,8 @@ class ExperimentFromExample(Experiment):
self.namelist = Namelist(os.path.join(self.path, 'BOXMOX.nml'))
self.mechanism = self._get_mechanism()
self.version = self._determineVersion(self.path)
def __new(self):
try:
s.check_output(["new_BOXMOX_experiment_from_example", "-f", self.example, self.path], stderr=s.STDOUT)
......@@ -336,8 +342,11 @@ class ExperimentFromExistingRun(Experiment):
self.namelist = Namelist(os.path.join(self.path, 'BOXMOX.nml'))
self.mechanism = self._get_mechanism()
self.version = self._determineVersion(self.path)
self._populateInput()
self._populateOutput(filename=filename)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment