Simpatico  v1.10
2.7 Examples

2.6 Configuration Files (Prev)         2.8 Data Analysis (Next)

Input files for a set of example simulations are provided with Simpatico in the simpatico/examples/ directory. Examining and running these examples is the easiest way to become familiar with the program.

Examples Directory Tree

Subdirectories of the examples/ directory contain different types of examples that use different features of Simpatico. Some directories contain examples that are designed to work with versions of the code enabled or disabled by preprocessor macros. The file examples/README describes the examples in different subdirectories, and explains which features must be enabled or disabled at compile time run the examples in each subdirectory. The examples in the atomic/, dimer/, homopolymer/, blend/ and diblock/ subdirectories are designed to work with the default versions of the code, which contains no angle, dihedral or external potentials. Many subdirectories also contain README files that explain their contents in greater detail. Subdirectories that contain similar examples designed for use with mcSim, mdSim and ddSim are often labelled mc/, md/ and dd/, respectively.

Typical File Layout

The input files for each example are in a separate directory. In the simplest examples, the parameter file is named "param" and the command file is named "commands". In some molecular dynamics examples, the directory may contain two or more parameter file named param.nve, param.nvt, or param.npt that can be used to run examples in NVE, NVT or NPT ensembles. The file commands.rst, if present, is command script that can be used to restart and extend a simulation. Most examples contain a README file that explains details of usage for the example in that directory.

The directory structure for the simplest example directories contains the following set of files and subdirectories:

param
commands
commands.rst
in/
config
out/
(output files)

Here, in/config is the input configuration file that is used to initialize the simulation.

All of the output files except restart files are written to a subdirectory out/ of the directory containing the example. Most of the files that are created in the out/ directory are created by analyzers that are declared in the parameter file. The parameter file required for this directory structure would define inputPrefix = in/ and outputPrefix = out/.

When two or more examples use the same input configuration file, the input configuration file may instead be in a subdirectory named in/ of the common parent directory of the directories that contain these examples.

Usage

To run a simple MC example simulation with the above directory structure, one must cd to the main directory for the example (the directory that contains the parameter and command files) and issue the command

> mcSim < param

to send the log output to the screen, or

> mcSim < param > log &

to run the MC example in the background and send this output to a file named "log". Among the output files that will be created in the out/ directory is a configuration file that contains the final system configuration. This is usually named out/config.

The above directions assume that the users PATH shell variable has been set to include the directory that contains the mcSim (or mdSim) executable file.

Scripts

Some example directories contain an executable bash script named "clean", and some also contain an script named "run". Executing the "run" file (if any), by typing

> ./run

from within the example directory, will generally run a simulation and then restart the simulation, placing the outputs of the original run and restarted simulation in different directory. Executing the "clean" script, by typing

> ./clean

will remove any files that were created by a previous run. Note the dot and backslash "./" before the name of the script names "run" and "clean" in the above examples. This represents the name of the current directory, is necessary to allow the shell to find the script if the current directory is not in the command search PATH.


2.6 Configuration Files (Prev)         2 User Guide (Up)         2.8 Data Analysis (Next)