Chapter 1
Getting Started

1.1 Download

The latest version of PDPS can be downloaded at here. The latest command manual is also provided in a pdf version.

1.2 Prepare Input Script

The interface of PDPS software package is by preparing an input script file, where user can add command line by line. Comment line will be started with and empty line will be skipped. It is a pretty much free style for user to configure the simulation as he or she prefers. However, certain rules are illustrated in the Sec. 2. Some commands have to be after some commands. Otherwise, error message will be printed to the screen.

Generally speaking, the oder of commands can be explained by four steps:

(1) Setup simulation fundamental parameters, such as timestep, units, dimension, boundary conditions.

(2) Create simulation box, region in order to create particle and assign them to a specific group.

(3) Set potential coefficients, add the correct ensemble, necessary constraints, properties to be computed and output

(4) Setup output file and run the simulation

Below, the input script file for pure water will be presented as the very example:


# pure warter simulation by PDPS source code 
 
# Initial conidtions 
dimension           3 
boundary                   p p p 
lattice             spacing x 0.5 y 0.5 z 1 
units               lj 
timestep            0.04 
neighbor            0.3 
neigh_modify        every 1 delay 1 check yes 
 
 
# Create box 
region              box block 0 10 0 10 0 10 
create_box          1 box 
 
 
# Set mass 
mass                1 1 
 
create_particle       1 region box 
 
group               all 
 
pair_style          dpd 1.0 1.0 3442527 
pair_coeff          * * 25.0 4.5 1.0 
 
velocity            all create 10.0 10342 gaussian 
 
compute             1 all temp 
compute             2 all pressure 
 
integrate           v_verlet 
 
fix                 1 all nve 
 
thermo              1 
thermo_style        custom step temp press 
 
dump                1 all atom 1 dump.atom 
 
run                     200

From the above input script, it can be seen that the first part has defined some fundamental parameters for the simulation environment. It is a 3D simulation, periodic boundary conditions are applied along all directions, uniform lattice spacing are set along all directions, ”lj” units are used, timestep is set as 0.04 and neighbor list will be rebuilt at each step.

The second part will create box based on the defined region and particles with type 1 will be created uniformly in the simulation box. Total number of particle is 4000 and the mass of each particle is defined as 1.

In the third part, DPD potential is chosen and coefficients are set for all possible pairs. Initial velocity with Gaussian distribution will be created at temperature 10. Two properties, temperature and pressure, will be computed.

In the last stage, computed temperature and pressure will be written to a log file every 1 step during the simulation, and particles information, coordinates or velocities, will be output to a dump file named ”dump.atom” with ”atom” format so that it can be visualized by VMD software. Simulation will be run for 200 steps.

In a summary, it is user’s responsibility to create a reasonable environment and parameters for conducting the simulation. This procedure is quite similar as the real experiment, such as preparing sample, setup equipment, run the test. It is highly suggested to check each command’s instruction in details before running a efficient and correct simulation.

1.3 Submit job

In the Windows platform, one needs to install the Microsoft high performance computing (HPC) to include “mpi.h” if PDPS is run in Visual studio. After compiling the code, one can either run it sequentially in the Visual Studio, or open a command prompt in Windows to type the following command:

mpiexec -n 4 Debug/pdps.exe

A short instruction to compile and run MPI program can be found in http://blogs.msdn.com/b/risman/archive/2009/01/04/ms-mpi-with-visual-studio-2008.aspx

To compile the code in Linux system, one can use the following command:

mpiCC -O2 *.h *.cpp

To run the code in Linux system, normally one needs to setup a PBS batch file to run it. Since it varies from platform, it is suggested to contact with your local IT technician. For your convenience, an example of such file (run.pdps) is given below:

#PBS -l nodes=1:ppn=8 
#PBS -l walltime=48:00:00,mem=2gb 
#PBS -W group_list=yetiastro 
#PBS -N boundary_f 
 
cd $PBS_O_WORKDIR 
 
mpirun -np 8 ps_yeti liquid.in > screen

By typing the command “qsub run.pdps”, the job will be submitted to the cluster.