How to install AtChem2 - AtChem/AtChem2 Wiki

AtChem2 can be installed on Unix/Linux and macOS systems. Download the latest stable release 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

Dependencies

The dependencies are installed in a Dependencies Directory (e.g., $HOME/atchem-lib/) using the scripts in the tools/install/ directory.

Installation

  1. After installing the dependencies, copy the example Makefile to the AtChem2 Main Directory:

    cp ./tools/install/Makefile.skel ./Makefile (v1.2)

    OR

    cp ./tools/Makefile ./Makefile (v1.1.1 and earlier)

  2. Edit the ./Makefile to set the correct paths of CVODE, openlibm and (optionally) FRUIT.

  3. To test the installation, compile and run the example mechanism:

    • 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 run completes without errors, AtChem2 has been successfully installed.

Note for macOS users

When AtChem2 is run for the first time, it may give an error like this:

dyld: Library not loaded: @rpath/libsundials_cvode.2.dylib
Referenced from: /Users/username/AtChem2/./atchem2
Reason: image not found
Abort trap: 6

In this case, type at the terminal prompt the following command (change the path to the CVODE library as appropriate):

export DYLD_LIBRARY_PATH=$HOME/atchem-lib/cvode/lib

To make the change permanent, add the command to .bash_profile or .profile.

Advanced users may wish to use instead the accepted answer in this Stack Overflow post and hardcode rpath in this instance for each of libsundials_cvode.2.dylib, libsundials_fvecserial.2.dylib, libsundials_vecserial.2.dylib.