Skip to content

Running microStamp

Placing the appropriate environment

Before running the application, you need to place the appropriate environment. Depending on whether you installed exaNBody with spack or through CMake, follow these steps

source ${XNB_INSTALL_DIR}/bin/exaNBody
spack load exanbody

The executable is pretty straigthforward in each case. Let's say your input file is named "myinput.msp" you can proceed as follows

1
2
3
4
# Run through exaNBody executable
${XNB_INSTALL_DIR}/bin/exaNBody myinput.msp
# Or run through onika executable
${ONIKA_INSTALL_DIR}/bin/onika-exec myinput.msp
exaNBody myinput.msp

Basic YAML example for exaStamp

tar -zxvf benchmark-snap-new.tgz
cd benchmark-snap-new/
${ONIKA_INSTALL_DIR}/bin/onika-exec snap_from_dump.msp

# To increase the number of cells (thus number of used cuda blocks)
# and the total number of particles, one can add the --set-replicate_domain-repeat "[Nx,Ny,Nz]"
# where Nx, Ny, Nz are the number of replication in each direction of the 3D space.

# Example for replicating 8 times (2 in each direction):
${ONIKA_INSTALL_DIR}/bin/onika-exec snap_from_dump.msp --set-replicate_domain-repeat "[2,2,2]"

Now that you have installed onika, exaNBody and exaStamp, you can create your simulation file using the YAML format. Please refer to the Beginner's guide to exaStamp section to learn how to build your first input deck! Once this file is constructed, you can run your simulation with a specified number of MPI processes and threads per MPI process.

Simple YAML input file

Below is an example of an YAML input file that allows to:

  • Define a 3D-periodic simulation cell containing an FCC Copper sample
  • Assign a gaussian random noise to particles positions and velocities
  • Performs the time integration using a Velocity-Verlet scheme
  • Uses a Langevin thermostat to maintain the temperature at 300. K
  • Dumps .xyz files at a specific frequency for vizualization with OVITO

Basic YAML example for exaStamp

# Choose the grid flavor
grid_flavor: grid_flavor_full

# Define the species present in the system
species:
  - Cu: { mass: 63.546 Da , z: 29 , charge: 0.0 e- }

# Interatomic potential
sutton_chen_force:
  rcut: 7.29 ang
  parameters:
    c: 3.317E+01
    epsilon: 3.605E-21 J
    a0: 0.327E-09 m
    n: 9.050E+00
    m: 5.005E+00

# Force operator (interatomic potential + Langevin thermostat)
compute_force:
  - sutton_chen_force
  - langevin_thermostat: { T: 300. K, gamma: 0.1 ps^-1 }

# System's creation
input_data:
  - domain:
      cell_size: 5.0 ang
  - bulk_lattice:
      structure: FCC
      types: [ Cu, Cu, Cu, Cu]
      size: [ 3.615 ang , 3.615 ang , 3.615 ang ]
      repeat: [ 20, 20, 20 ]
  - gaussian_noise_r:
  - gaussian_noise_v:

# Simulation parameters        
global:
  simulation_end_iteration: 1000
  simulation_log_frequency: 20
  simulation_dump_thermo_frequency: -1
  simulation_dump_frequency: -1
  rcut_inc: 1.0 ang
  dt: 2.0e-3 ps
  init_temperature: 5. K

It's go time

To run the above case, and depending if you installed exaNBody using CMake or spack follow these instructions:

Running an microStamp simulation

source ${XNB_INSTALL_DIR}/bin/exaNBody
export OMP_NUM_THREADS=10
export N_MPI=2
mpirun -np ${N_MPI} ${XNB_INSTALL_DIR}/exaNBody myinput.msp
export OMP_NUM_THREADS=10
export N_MPI=2
spack load exanbody
mpirun -np ${N_NMPI} exaNBody myinput.msp