diff --git a/CADETMatch.pyproj b/CADETMatch.pyproj
index 241dc88..d4be1c6 100644
--- a/CADETMatch.pyproj
+++ b/CADETMatch.pyproj
@@ -12,7 +12,7 @@
{888888a0-9f3d-457c-b088-3a5042f75d52}
Standard Python launcher
CondaEnv|CondaEnv|pymoo_devel
- "F:\cadet_release_test\search\mcmc\stage2\non.json" 12
+ "C:\Users\kosh\Downloads\cadetmatch_test\ds_cex.json" 12
False
true
diff --git a/CADETMatch/transform/auto_keq.py b/CADETMatch/transform/auto_keq.py
index 53368e2..26c2fc0 100644
--- a/CADETMatch/transform/auto_keq.py
+++ b/CADETMatch/transform/auto_keq.py
@@ -150,15 +150,25 @@ def setSimulation(self, sim, seq, experiment):
):
location = self.parameter["location"]
- comp = self.parameter["component"]
- bound = self.parameter["bound"]
-
- unit = self.getUnit(location[0])
- boundOffset = util.getBoundOffset(sim.root.input.model[unit])
-
- position = boundOffset[comp] + bound
- sim[location[0].lower()][position] = values[0]
- sim[location[1].lower()][position] = values[1]
+ try:
+ comp = self.parameter["component"]
+ bound = self.parameter["bound"]
+ index = None
+ except KeyError:
+ index = self.parameter["index"]
+ bound = None
+
+ if bound is not None:
+ unit = self.getUnit(location[0])
+ boundOffset = util.getBoundOffset(sim.root.input.model[unit])
+
+ position = boundOffset[comp] + bound
+ sim[location[0].lower()][position] = values[0]
+ sim[location[1].lower()][position] = values[1]
+
+ if index is not None:
+ sim[location[0].lower()][index] = values[0]
+ sim[location[1].lower()][index] = values[1]
return values, headerValues
@@ -188,25 +198,36 @@ def getHeaders(self):
location = self.parameter["location"]
nameKA = location[0].rsplit("/", 1)[-1]
nameKD = location[1].rsplit("/", 1)[-1]
- bound = self.parameter["bound"]
- comp = self.parameter["component"]
+ bound = self.parameter.get("bound", None)
+ index = self.parameter.get("index", None)
+ comp = self.parameter.get("comp", None)
headers = []
- headers.append("%s Comp:%s Bound:%s" % (nameKA, comp, bound))
- headers.append("%s Comp:%s Bound:%s" % (nameKD, comp, bound))
- headers.append("%s/%s Comp:%s Bound:%s" % (nameKA, nameKD, comp, bound))
+ if bound is not None:
+ headers.append("%s Comp:%s Bound:%s" % (nameKA, comp, bound))
+ headers.append("%s Comp:%s Bound:%s" % (nameKD, comp, bound))
+ headers.append("%s/%s Comp:%s Bound:%s" % (nameKA, nameKD, comp, bound))
+ if index is not None:
+ headers.append("%s Comp:%s Index:%s" % (nameKA, comp, index))
+ headers.append("%s Comp:%s Index:%s" % (nameKD, comp, index))
+ headers.append("%s/%s Comp:%s Index:%s" % (nameKA, nameKD, comp, index))
return headers
def getHeadersActual(self):
location = self.parameter["location"]
nameKA = location[0].rsplit("/", 1)[-1]
nameKD = location[1].rsplit("/", 1)[-1]
- bound = self.parameter["bound"]
- comp = self.parameter["component"]
+ bound = self.parameter.get("bound", None)
+ index = self.parameter.get("index", None)
+ comp = self.parameter.get("comp", None)
headers = []
- headers.append("%s Comp:%s Bound:%s" % (nameKA, comp, bound))
- headers.append("%s/%s Comp:%s Bound:%s" % (nameKA, nameKD, comp, bound))
+ if bound is not None:
+ headers.append("%s Comp:%s Bound:%s" % (nameKA, comp, bound))
+ headers.append("%s/%s Comp:%s Bound:%s" % (nameKA, nameKD, comp, bound))
+ if index is not None:
+ headers.append("%s Comp:%s Index:%s" % (nameKA, comp, index))
+ headers.append("%s/%s Comp:%s Index:%s" % (nameKA, nameKD, comp, index))
return headers
def setBounds(self, parameter, lb, ub):
diff --git a/CADETMatch/version.py b/CADETMatch/version.py
index 1d1668b..0d3ab97 100644
--- a/CADETMatch/version.py
+++ b/CADETMatch/version.py
@@ -18,5 +18,5 @@
__email__ = "w.heymann@fz-juelich.de"
__license__ = "GNU General Public License v3 (GPLv3)"
__copyright__ = "2020 %s" % __author__
-__version__ = "0.8.9"
+__version__ = "0.8.10"
__uri__ = "https://github.com/modsim/CADET-Match"