Running PBS script with LAMMPS

From EVOCD
Revision as of 08:44, 26 January 2011 by Mtschopp (Talk | contribs)

Jump to: navigation, search

Contents

Abstract

This example shows how to run LAMMPS (or any other UNIX executable) on a UNIX cluster that uses the batch scripting language, PBS. This will use the LAMMPS input script from tutorial 1.

Author(s): Mark A. Tschopp

LAMMPS Input File

Download an input file

This input script was run using the Jan 2010 version of LAMMPS. Changes in some commands may require revision of the input script. Copy the text below and paste it into a text file, 'calc_fcc.in'. Use the 'Paste Special' command with 'Unformatted Text'. Notice that the replicate command is used in the following script so that it is a 20 x 20 x 20 simulation cell (32,000 atoms) that is going to be run on 16 processors. Notice that we get the same cohesive energy as that run with 4 atoms in Tutuorial 1.


# Find minimum energy fcc configuration
# Mark Tschopp, 2010

# ---------- Initialize Simulation --------------------- 
clear 
units metal 
dimension 3 
boundary p p p 
atom_style atomic 
atom_modify map array

# ---------- Create Atoms --------------------- 
lattice 	fcc 4
region	box block 0 1 0 1 0 1 units lattice
create_box	1 box

lattice	fcc 4 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1  
create_atoms 1 box
replicate 20 20 20

# ---------- Define Interatomic Potential --------------------- 
pair_style eam/alloy 
pair_coeff * * Al99.eam.alloy Al
neighbor 2.0 bin 
neigh_modify delay 10 check yes 
 
# ---------- Define Settings --------------------- 
compute eng all pe/atom 
compute eatoms all reduce sum c_eng 

# ---------- Run Minimization --------------------- 
reset_timestep 0 
fix 1 all box/relax iso 0.0 vmax 0.001
thermo 10 
thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms 
min_style cg 
minimize 1e-25 1e-25 5000 10000 

variable natoms equal "count(all)" 
variable teng equal "c_eatoms"
variable length equal "lx"
variable ecoh equal "v_teng/v_natoms"

print "Total energy (eV) = ${teng};"
print "Number of atoms = ${natoms};"
print "Lattice constant (Angstoms) = ${length};"
print "Cohesive energy (eV) = ${ecoh};"

print "All done!" 

PBS batch script

Here is an example batch script for Raptor. Copy the text below and paste it into a text file, 'pbs_Raptor_calc_fcc.txt'. Use the 'Paste Special' command with 'Unformatted Text'.


#!/bin/sh 
#PBS -N calc_fcc 
#PBS -q q16p192h@Raptor 
#PBS -l nodes=4:ppn=4 
#PBS -l walltime=192:00:00 
#PBS -mea 
#PBS -r n 
#PBS -V 
cd $PBS_O_WORKDIR 
mpirun -np 16 < calc_fcc.in

Here is an example batch script for Talon. Copy the text below and paste it into a text file, 'pbs_Talon_calc_fcc.txt'. Use the 'Paste Special' command with 'Unformatted Text'.


#!/bin/sh 
#PBS -N calc_fcc
#PBS -q q192p48h@Talon 
#PBS -l nodes=16:ppn=12 
#PBS -l walltime=48:00:00 
#PBS -mbea 
#PBS -r n 
#PBS -V 
cd $PBS_O_WORKDIR 
mpirun -np 192 < calc_fcc.in

Personal tools
Namespaces

Variants
Actions
home
Materials
Material Models
Design
Resources
Projects
Education
Toolbox