Getting Started

To conveniently use the scripting tools of the Amsterdam Modeling Suite you need to set some shell environment variables and add the ADFBIN folder to your PATH. This can be done by sourcing file adfbashrc.sh, which is located in the Amsterdam Modeling Suite installation directory.

Linux

Note: if you followed the Linux Quickstart installation Guide, the adfbashrc.sh should be automatically sourced when you start up a new terminal, and you can ignore the following steps.

  • Start up a terminal

  • Source the adfbashrc.sh with the following command (note: you should replace path_to_installation_directory with the actual path to your AMS installation direcotry:

    . path_to_installation_directory/adfbashrc.sh
    
  • To test that you properly sourced the adfbashrc.sh file you can type the following command, which should yeld the help message for the adfprep command line tool:

    adfprep -h
    

MacOS

  • From the ADFJobs GUI module, click on the Help dropdown menu and select Terminal. This will open a new terminal with all necessary environment variables already set and the ADFBIN folder already added to the PATH.

Alternatively, you can follow the Linux steps.

Windows

Every Windows installation of AMS2019 as well as older ADF versions come with a pre-configured command line. The easiest way to access the command line is via the Help menu of the graphical user interface:

Go to Help → Command-line
Inside the command line window, type bash and hit ENTER (alternative: type sh)
_images/windows_scripting.png

The advantage of calling the command line from the GUI is that you will find yourself in the current working directory right away. In situations in which the GUI is not available, it is also possible to use the pre-configured command line directly:

Double click the file adf_command_line.bat in your ADF installation directory (e.g. C:/ADF2018.104)

Notes on Python

Python scripts should be executed using the python3 interpreter shipped with Amsterdam Modeling Suite:

$ADFBIN/startpython scriptname.py

Further information can be found here: Python Stack in ADF Modeling Suite.