Running SAFARI

SAFARI is a command line application, and has no graphical user interaction. Adaptive grid mode does have a commandline indication of progress for the first thermal iteration, but otherwise there is no direct progress information for the run until it has finished running.

Required Input Files

Most of the configuration options for SAFARI are provided via a primary input file, there are then some optional additional files, which are used depending on the command line arguments, or options in the main input file.

An sample input file can be located at Main Input File.

Optional Input Files

Other optional files include:

Produced Output Files

SAFARI outputs the data in a plain-text format, the specific files produced depend on the run mode. More information about the produced files is discussed in SAFARI Sample Output Files, and general analysis of these files is discussed in SAFARI Output Analysis.

Command Line Arguments

-i file

Sets the Main Input File to file.input. If this argument is not present, it will look in a file called safari.input, and attempt to read this argument from there

-o file

Sets the name of the various output files, if not present, uses the same as input

-t temperature

Sets the temperature for the run

-n number

Sets the number of runs (trajectories in Monte Carlo, Thermal Iteration in Adaptive Grid)

-e Energy

Sets the initial energy (E0)

-p file

Enables loading external potentials from file.pots

-s

Forces the run to be in Single Shot Mode

-x number

x target for Single Shot Mode

-y number

y target for Single Shot Mode

-r

restricted Single Shot Mode, only will output nearby lattice sites

Command Line examples

Here are a few examples of commands to use for running SAFARI, in the following examples, the safari executable is Sea-Safari, which is the name of the executable produced via the instructions in Building SAFARI.

The following will use ./sample.input for the Main Input File, and produce output files in ./tests/, with names starting with sample:

./Sea-Safari -i sample -o tests/sample

The example below will use the same input and output files as the above, however will do a single-shot run at the origin:

./Sea-Safari -i sample -o tests/sample -s -x 0 -y 0

SAFARI Modes

SAFARI has multiple modes it can run in, these are as follows:

These modes, and how to enable them will be discussed below.

Monte Carlo

Monte Carlo selects random sites on the surface, and fires projectiles at it. This mode is enabled by setting SCAT_TYPE to 666, see line 143 of input file.

In this mode, the run number (line 106 of input file) is the number of such particles fired, and it is evenly distributed over the specified surface (lines 119, 122 of input file).

Fixed Grid

This mode is enabled by setting SCAT_TYPE to 777, see line 143 of input file.

In this mode, the trajectories are made via a raster scan across the surface, where it scans in the step sizes specified on lines 119 and 122 of input file. In this mode, the run number is ignored.

Adaptive Grid

This is similar to Fixed Grid in the initial pass of site selection, however then produces finer and finer grids around the successful trajectories. The number of such bifurcations is specified via the value set for SCAT_TYPE on line 143 of input file.

In this mode, the run number specifies the number of iterations to use for a non 0K surface, and is otherwise ignored if the temperature is set to 0.

Chain Mode

Chain mode fires a line of particles, starting at the initial x, y coordinates, and ending at the final ones, these are specified via lines 119 and 122 of input file. This mode fires the number of specified particles (line 106 of input file), with even spacing.

This mode is enabled by setting line 143 of input file to 888.

Single Shot Mode

A Single Shot run can either be enabled via the commandline argument -s, or by setting the trajctory number to 1. In this mode, SAFARI will log information about the entire trajectory. The run is done with a target location specified by lines 119 and 122 of input file, or via the -x and -y arguments.

The default behaviour of this mode depends on the value for SCAT_TYPE (line 143 of input file), if this is 0, it will produce the entire lattice this can result in extremely large .xyz files. To only include the “relevant” lattice sites, you can use the -r argument or set SCAT_TYPE to a non-zero value.

More information about the specific output files for this run can be located at Single Shot Mode Files.