Simulations_1.gif > Simulations_2.gif

SIMULATIONTOOLS TUTORIAL Simulations_3.gif

Simulations

Finding simulation directories

SimulationTools has an interface for accessing "simulations" which are directories containing simulation output.  The name of the simulation is the name of the directory.  You can either specify a simulation by a full path, or by the simulation name.  For the latter, SimulationTools needs to know which directory to look in.  You can add this directory to the $SimulationPath variable and SimulationTools will then know where to find your simulations.  

For example, suppose your simulations are stored in a directory called “Simulations” in your home directory.

Add the directory containing your simulations to the $SimulationPath variable:

Simulations_4.gif

You can add the above line to the Mathematica init.m file which is loaded when Mathematica starts (it is  stored in Library/Mathematica/Kernel on Mac OS, and .Mathematica/Kernel on Linux).

Finding simulations

You can list all the simulations available on $SimulationPath:

In[1]:=

Simulations_5.gif

Out[1]=

Simulations_6.gif

Segments

Simulations usually take more than one job on a supercomputer, and the output is spread across many different output directories, known as  "segments" of the simulation. SimulationTools supports the SimFactory segmenting mechanism and almost all the file reading functions go through a layer which automatically merges the files in these chunks together, taking care to eliminate any duplicate data.  As such, you should never have to worry about merging data from different segments together, and in fact you can probably forget about the fact that the simulation data is split into segments.

Finding files in a simulation

Given the name of a simulation, and the name of an output file, you can obtain full paths to all the instances of that file across all segments of the simulation.  For example, to find all instances of a file called mp_psi4.h5 in a simulation called bbh which exists on your $SimulationPath:

In[2]:=

Simulations_7.gif

Out[2]=

Simulations_8.gif

You can include wildcards in the filename.  For example, to list all the available HDF5 files:

In[3]:=

Simulations_9.gif

Out[3]=

Simulations_10.gif

or all the available files:

In[4]:=

Simulations_11.gif

Out[4]=

Simulations_12.gif

The output of FindSimulationFiles is always a list of filenames.

Created with the Wolfram Language