# 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
- DESCRIPTION
- FILE_PATHS
- DATA_FIELDS
- PREPROCESS
- LEVEL_PARAMS
- 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
- DESCRIPTION
  - name
  - title
  - author
  - abstract
  - keywords
- FILE_PATHS
  - input_data_file
  - output_folder
  - temp_folder
  - input_solution_file
- DATA_FIELDS
  - type_field
  - id_field
  - time_field
- PREPROCESS
- LEVEL_PARAMS
  - params
  - split_field
  - split_dict
- 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