Problem of CADET-Match parameter estimation

Hi Cadet community,

I am trying to estimate the parameter KS in the HIC isotherm using CADET-Match, but I have tried several times but still no success with the following error:

2024-01-12 12:04:22,667 util.py runExperiment 340 The simulation failed [0.9375]
2024-01-12 12:04:22,685 util.py runExperiment 340 The simulation failed [0.375]
2024-01-12 12:04:22,686 loggerwriter.py write 10 Traceback (most recent call last):
2024-01-12 12:04:22,687 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/CADETMatch/match.py", line 363, in <module>
2024-01-12 12:04:22,687 loggerwriter.py write 10     
2024-01-12 12:04:22,687 loggerwriter.py write 10 main(map_function=map_function)
2024-01-12 12:04:22,687 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/CADETMatch/match.py", line 28, in main
2024-01-12 12:04:22,687 loggerwriter.py write 10     
2024-01-12 12:04:22,687 loggerwriter.py write 10 hof = evo.run(cache)
2024-01-12 12:04:22,687 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/CADETMatch/evo.py", line 153, in run
2024-01-12 12:04:22,688 loggerwriter.py write 10     
2024-01-12 12:04:22,688 loggerwriter.py write 10 return cache.search[searchMethod].run(cache)
2024-01-12 12:04:22,688 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/CADETMatch/search/nsga3.py", line 9, in run
2024-01-12 12:04:22,688 loggerwriter.py write 10     
2024-01-12 12:04:22,688 loggerwriter.py write 10 return CADETMatch.pymoo_config.run(cache, 'nsga3')
2024-01-12 12:04:22,688 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/CADETMatch/pymoo_config.py", line 185, in run
2024-01-12 12:04:22,688 loggerwriter.py write 10     
2024-01-12 12:04:22,688 loggerwriter.py write 10 algorithm.next()
2024-01-12 12:04:22,688 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/pymoo/core/algorithm.py", line 161, in next
2024-01-12 12:04:22,688 loggerwriter.py write 10     
2024-01-12 12:04:22,688 loggerwriter.py write 10 self.evaluator.eval(self.problem, infills, algorithm=self)
2024-01-12 12:04:22,688 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/pymoo/core/evaluator.py", line 69, in eval
2024-01-12 12:04:22,688 loggerwriter.py write 10     
2024-01-12 12:04:22,688 loggerwriter.py write 10 self._eval(problem, pop[I], evaluate_values_of, **kwargs)
2024-01-12 12:04:22,688 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/pymoo/core/evaluator.py", line 90, in _eval
2024-01-12 12:04:22,688 loggerwriter.py write 10     
2024-01-12 12:04:22,688 loggerwriter.py write 10 out = problem.evaluate(X, return_values_of=evaluate_values_of, return_as_dictionary=True, **kwargs)
2024-01-12 12:04:22,688 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/pymoo/core/problem.py", line 187, in evaluate
2024-01-12 12:04:22,688 loggerwriter.py write 10     
2024-01-12 12:04:22,688 loggerwriter.py write 10 _out = self.do(X, return_values_of, *args, **kwargs)
2024-01-12 12:04:22,688 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/pymoo/core/problem.py", line 229, in do
2024-01-12 12:04:22,689 loggerwriter.py write 10     
2024-01-12 12:04:22,689 loggerwriter.py write 10 self._evaluate_vectorized(X, out, *args, **kwargs)
2024-01-12 12:04:22,689 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/pymoo/core/problem.py", line 237, in _evaluate_vectorized
2024-01-12 12:04:22,689 loggerwriter.py write 10     
2024-01-12 12:04:22,689 loggerwriter.py write 10 self._evaluate(X, out, *args, **kwargs)
2024-01-12 12:04:22,689 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/CADETMatch/pymoo_config.py", line 46, in _evaluate
2024-01-12 12:04:22,689 loggerwriter.py write 10     
2024-01-12 12:04:22,689 loggerwriter.py write 10 stalled, stallWarn, progressWarn = util.eval_population(
2024-01-12 12:04:22,689 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/CADETMatch/util.py", line 1019, in eval_population
2024-01-12 12:04:22,689 loggerwriter.py write 10     
2024-01-12 12:04:22,689 loggerwriter.py write 10 return eval_population_base(
2024-01-12 12:04:22,689 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/CADETMatch/util.py", line 1072, in eval_population_base
2024-01-12 12:04:22,689 loggerwriter.py write 10     
2024-01-12 12:04:22,689 loggerwriter.py write 10 return process_population(
2024-01-12 12:04:22,689 loggerwriter.py write 10   File "/root/anaconda3/envs/cadet/lib/python3.8/site-packages/CADETMatch/util.py", line 973, in process_population
2024-01-12 12:04:22,690 loggerwriter.py write 10     
2024-01-12 12:04:22,690 loggerwriter.py write 10 new_best_min = max([i.fitness.values[2] for i in meta_hof.items])
2024-01-12 12:04:22,690 loggerwriter.py write 10 ValueError
2024-01-12 12:04:22,690 loggerwriter.py write 10 : 
2024-01-12 12:04:22,690 loggerwriter.py write 10 max() arg is an empty sequence
2024-01-12 12:04:22,690 util.py info 54 process shutting down

My code file and error is below:

0.5g10CV.csv (498 Bytes)
0.5g20CV.csv (464 Bytes)
0.5g30CV.csv (564 Bytes)
error.txt (12.8 KB)
CadetMatch.ipynb (16.2 KB)

Is this a possible error in my setup? I would be grateful if someone could give me some advice!

Apologies for a late response, but in the error log you can see that the simulations are failing. The most probable cause of this is that you are assigning a parameter value which results in steep concentration fronts. I did a quick look-see of your parameter values and found this:

" model.root.input.model.unit_002.adsorption.hicuni_qmax = [0, 115.5, 32.8]\n",

In CADET, q_{max} must be in units of \mathrm{\frac{mol~protein}{m^3 ~solid ~phase}}. The values you have look like they are in the typical units of \mathrm{\frac{g~protein}{L~column}}. If this is the case, you need to convert between these units – for example, let’s use some typical parameter values:

q_{max} = 100 ~\mathrm{\frac{g~protein}{L~column}},~ M_W = 150000 ~\mathrm{\frac{g}{mol}},~ \varepsilon_e = 0.4,~ \varepsilon_p = 0.6, ~\mathrm{and} ~\varepsilon_t = 0.76.

Converting q_{max} from \mathrm{\frac{g~protein}{L~column}} to \mathrm{\frac{mol~protein}{m^3 ~solid ~phase}},

100 ~\mathrm{\frac{g~protein}{L~column}} \times \frac{1}{M_W} ~\mathrm{\frac{mol ~protein}{g~protein}} \times \frac{1}{1-\varepsilon_t}~\mathrm{\frac{L~column}{L ~solid ~phase}} \times 1000 ~\mathrm{\frac{L~solid~phase}{m^3 ~solid ~phase}} = 2.778 ~\mathrm{\frac{mol~protein}{m^3 ~solid ~phase}}

This is quite different from the q_{max} values you have, so it might be that you need to convert units. I think the conversion to solid phase volume seems a bit confusing to many because I have seen this mistake many many times. It is so important to have your units correct – in fact it is likely the most common cause of failed or anomalous simulations.

It also might be that the parameter bounds you specify for CADET-Match lead to your search space having unrealistic values. You need to check those and make sure that they are realistic.

Another thing I noticed – your K_p values are really small, 10^{-9}, and might as well be set to zero.

Lastly, you should always check that your parameter values work when running a single simulation before you perform parameter calibration.

Hope this helps!

Thanks for the suggestion, I will try it!