
Chapter 3 · Run a simulation
Set up the run
Choose the targets, the diet and the limits, then launch.
- 5 min read
- In the app: Simulation Configuration
In short
- You need
- A confirmed community.
- You do
- Go through five steps, targets, diet, guardrails, a name and a final check, then launch.
- You get
- A run waiting its turn on the computing cluster.
1Target reactions
Choose the molecules the community must keep making, or taking up: the targets.

- A preset selects a ready group. SCFA Production picks butyrate, acetate and propionate, the SCFA.
- Selected targets lists every target you picked, from a preset or from the full list. Each one starts on Produce.
- Consume asks the community to take the molecule up instead. Here lactose, which comes with the diet.
- Explore All Targets opens the full list, with a search by name or ID.
Targets are exchange reactions: molecules moving between the cells and the gut. The community must keep making them, all together at least the share you set in the Guardrails step. With no target, the run only asks the community to grow.
A target set to Consume is a consume target. In the results its flux reads negative, and in the total it counts as positive. If even the full community cannot produce or consume a target the way you chose, the run stops and says so, rather than leaving the target out.
2Diet
The diet sets what the community can take up from the gut.

- The diet in use. The setup starts on an average European diet.
- Inspect lists the uptake limits of a diet; the number counts them. Every diet comes from VMH, and View on VMH opens its page.
- Create New Custom Diet Configuration opens the editor.
Custom dietsTemplates, uptake limits, JSON import and export
Name the diet, start from a VMH template or from None (Start Empty), then change the maximum uptake of any exchange, its uptake bound. Use Configuration applies it. Export saves the diet as a JSON file, Import loads it again in a later run.

- The name of your diet.
- The template it starts from.
- Import and Export a diet as JSON.
Per-patient diets (cohorts)The default diet, the assignment file and the diet codes
In a cohort the Diet step has two tabs. Default diet is the screen above: every patient gets this diet unless you give them another one. Per-patient diets is where you give some patients a different diet, for example the 20 patients whose meals you know.
The quickest way is a small file with one line per patient: the patient's ID exactly as it is in your matrix, a comma, then the diet's code. Save it from a spreadsheet as CSV (commas or semicolons both work) or as tab-separated text, and load it with Upload assignment file. Patients that are not in the file keep the default diet.
patient_id,diet P001,md P002,vegd P017,LowFiber_P017 P020,default
These are the codes of the diets in the catalog:
mdvegdlovdeuddachhpdhfibdhflcdgfdt2duhdUpper or lower case does not matter, so MD works too. The diet's full name works as well, for example EU average or EU_average. Write default to give a patient the default diet on purpose. Each code also appears next to its diet in the Default diet tab.
Your own diets go in the same tab. New custom diet opens the diet editor, and Import JSON loads one or more diet files you exported earlier. In the assignment file, write the custom diet's name instead of a code. A custom diet cannot have the name or the code of a catalog diet.
Per-patient recap, closed at first, lists every patient with their diet and where it comes from: the file, the default, or a change you made there. A change in the recap wins over the file.
When a line of the file does not fit, the page lists it with its line number and the launch waits until it is fixed. The usual causes are a patient that is not in the matrix (look at the spelling, and at zeros a spreadsheet may have dropped, like 1 for 001), a code that does not exist, or the same patient twice with two different diets.
3Guardrails
The guardrails are the limits the minimal community must respect, as a share of what the full community does.

- Minimum Community Growth: the minimal community must grow at least this share of the growth of the full community. Default 80%.
- Reaction Production Floor: it must make at least this share of what the full community makes of your targets, a consume target counting what is taken up. Default 80%.
- Target floor, with two targets or more: Sum of targets applies the floor to all of them added together, Each target to every one on its own.
- Advanced Controls holds Time Limit and Min Species Count.
With Sum of targets, the default, one target can fall below its share if the others make up for it, but none ever turns around: a target to consume is never released and a target to produce never taken up. With Each target, every target keeps its own share; that is stricter, and a run whose targets cannot all keep their share together stops with a message.
Higher values keep the minimal community closer to the full one, but they can leave no community at all: the run then ends as INFEASIBLE (chapter 4). How it works explains what the limits mean for the model.
Advanced ControlsTime Limit, Min Species Count
4Run details
Give the run a name you will recognise later.
Simulation Name takes up to 60 characters. Hypothesis & Notes takes up to 1,000 and is saved with the run.
5Review and launch
The last step shows everything on one page. Check it, then press Run Simulation.

- The community you confirmed.
- The targets.
- The guardrails and the time limit.
The next page confirms the run is queued. You can close the tab: the run goes on, and you follow it from your profile, as the next chapter shows.