How to install AtChem2 - AtChem/AtChem2 GitHub Wiki
AtChem2 can be installed on Linux/Unix and macOS systems. Download the latest stable version at: https://github.com/AtChem/AtChem2/releases. Alternatively, download the archive file of the development version (master branch) or use git to clone the repository.
For more information, see the AtChem2 manual in the doc/ directory.
Requirements
- bash (or bash-compatible) shell, with basic unix utilities: wget, tar/zip, make, etc...
- text editor
- Fortran compiler: GNU
gfortran(default) or Intelifort - Python
- Ruby (optional, required by FRUIT)
Dependencies
The dependencies are installed in the Dependencies Directory (e.g., $HOME/AtChem-lib/) using the scripts in the tools/install/ directory. The install scripts must be run from the Main Directory (e.g., $HOME/AtChem2/). Compilation of the dependencies requires gcc and cmake.
-
CVODE and openlibm:
./tools/install/install_cvode.sh ~/AtChem-lib/ ./tools/install/install_openlibm.sh ~/AtChem-lib/ -
numdiff is only required to run the Testsuite. It may already be present on the system, otherwise it can be installed locally in the Dependencies Directory:
./tools/install/install_numdiff.sh ~/AtChem-lib/numdiff/Then, add
export PATH=$PATH:$HOME/AtChem-lib/numdiff/binto~/.bash_profile(or~/.profile) and restart the terminal. -
FRUIT is only required to run the unit tests of the Testsuite. First, add to
~/.bash_profile(or~/.profile):export GEM_HOME=$HOME/.gem export PATH=$PATH:$GEM_HOME/binThen, restart the terminal and run the installation script:
./tools/install/install_fruit.sh ~/AtChem-lib/
Installation
-
After installing the dependencies, copy the example
Makefileto the Main Directory:cp ./tools/install/Makefile.skel ./Makefile(v1.2 and later)OR
cp ./tools/Makefile ./Makefile(v1.1.1 and earlier) -
Edit the
Makefileto set the correct paths of CVODE, openlibm and (if installed) FRUIT. -
To test the installation, compile and run the example mechanism:
-
for v1.2.2 and later:
./build/build_atchem2.sh ./model/mechanism.fac ./atchem2 -
for v1.2:
./build/build_atchem2.sh ./mcm/mechanism_test.fac ./atchem2 -
for v1.1.1 and earlier:
./tools/build.sh ./tools/mcm_example.fac ./atchem2
-
If the model compiles and runs without errors, AtChem2 has been successfully installed. In case of errors, please check the page of known issues.