Skip to content

C code of the individual-based model developed as part of the HPTN071 (PopART) trial

License

Notifications You must be signed in to change notification settings

BDI-pathogens/POPART-IBM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IBM for the PopART trial

Description

PopART-IBM an individual-based model for simulating HIV epidemic in high-prevalence settings, as used in the HPTN 071 (PopART) trial. A full description of the model is described in Pickles et al., 2020. A data dictionary describing all the output output files from the model is here and a data dictionary describing the parameters in the model is described here.

Compilation

For Mac and Unix-type systems, PopART-IBM requires a C compiler (such as gcc) and the GSL libraries installed:

cd POPART-IBM/src
make all

GSL can be downloaded from here.

For Windows systems, please see this walkthrough.

Usage

cd POPART-IBM/src
./popart-simul.exe <inputdir> <nruns>

where

  • inputdir: Directory where input parameter files ("param_processed*.csv") are located
  • nruns : number of simulation runs in parameter files (num. of lines in parameter files to read in)

A basic example illustrates how the parameter input files can be set up (steps 1 and 2) as is expected by the model.

Notes

  • Additional command-line arguments are described in main.c.
  • The model will write all output files to the directory inputdir/Output (additional command-line arguments can adjust this).
  • The output files written will depending upon which macros are set to 1 within the file constants.h (those beginning WRITE_*).

Testing

Tests are written pytest using Python v3.6+, and run in the following manner: python3 -m pytest. Some tests take a long time to run and so are not run by default, they can be invoked using the --runslow option in pytest (python3 -m pytest --runslow).

It is recommended that tests are run under a Python virtual environment. The following will set up a Python virtual environment, install required modules, and run the tests:

python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r tests/requirements.txt
python3 -m pytest
deactivate

Contributing

Contributions are most welcome. Please see the documentation on contributing for further information. Please contact the core team or raise an issue before making a pull request.

About

C code of the individual-based model developed as part of the HPTN071 (PopART) trial

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages