# MSim Script

Generates multiple simulations of PK/PD curves from given a PopPK/PD model and an input data set.

An MSim Script often outputs a Vpc Script, which generates a VPC plot from the multiple population simulations.

See Visual Predictive Check for Two Compartment PopPK Model for a working example.

## Main Sections of a MSim Script

- METHOD_OPTIONS
- PARALLEL
- DESCRIPTION
- FILE_PATHS
- DATA_FIELDS
- PREPROCESS
- EFFECTS
- MODEL_PARAMS
- STATES
- DERIVATIVES
- PREDICTIONS
- ODE_SOLVER
- OUTPUT_OPTIONS
- OUTPUT_SCRIPTS

## Full Structure of a MSim Script

- METHOD_OPTIONS
  - py_module
  - rand_seed
  - float_format
- PARALLEL
  - SINGLE
  - MPI_WORKERS
    - n_workers
- DESCRIPTION
  - name
  - title
  - author
  - abstract
  - keywords
- FILE_PATHS
  - input_data_file
  - output_folder
  - temp_folder
  - log_folder
  - input_solution_file
- DATA_FIELDS
  - type_field
  - id_field
  - time_field
- PREPROCESS
- EFFECTS
- MODEL_PARAMS
- STATES
- DERIVATIVES
- PREDICTIONS
- ODE_SOLVER
  - NO_SOLVER
  - ANALYTIC
  - SCIPY_ODEINT
    - atol
    - rtol
    - max_nsteps
    - use_sens
- OUTPUT_OPTIONS
  - sim_time_step
  - n_pop_samples
- OUTPUT_SCRIPTS
  - VPC
    - output_mode
    - vpc_list
    - y_var_src_list
    - y_var_list
    - y_var_label_list
    - x_var
    - split_field
    - split_values
    - share_axes