You are on page 1of 5

08-10-2022

ME F315 Advanced Manufacturing


Process
LAMMPS input script in detail
BITS Pilani Dr. Radha Raman Mishra
Pilani Campus
Mr. Ayush Khaitan

LAMMPS input script in details

LAMMPS reads the input script line by line, so if you have a


big script, and has an error in the end of it, it will not
discover it until the end.

It’s advised that you first run the script for one timestep just to
see if there are any errors in it, then run the full simulation

BITS Pilani, Pilani Campus

1
08-10-2022

Input Script
# Initialization
units metal
#
dimension 3
#
boundary p p p
#
atom_style atomic
#
log logfile.txt
#

BITS Pilani, Pilani Campus

Input Script

# Defining Variables
variable stp equal 100

# print “The number of steps is = ${stp}”

# Creating the simulation box and the structure


region myregion block 0 45.8 0 45.8 0 45.8 units box
##

BITS Pilani, Pilani Campus

2
08-10-2022

Input Script
create_box N region-ID keyword value
#
create_box 1 myregion
lattice custom 4.58 a1 1.0 0 0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 &
basis 0.0 0.0 0.0 &
basis 0.5 0.5 0.0 &
basis 0.0 0.5 0.5 &
basis 0.5 0.0 0.5 &
#
create_atoms 1 box basis 1 1 basis 2 1 basis 3 1 basis 4 1 units box
mass 1 39.948
#
BITS Pilani, Pilani Campus

Input Script
# Interatomic potential
pair_style lj/cut 10
# specify parameters

pair_coeff 1 1 0.01006418 3.3952


# The coefficients for the LJ potential of interaction of 1 with 1
#

read_data
#

BITS Pilani, Pilani Campus

3
08-10-2022

Input Script
group ar type 1
#

timestep 0.001
#
run 1

minimize 1e-7 1e-9 10000 10000


#
min_style cg

velocity all create 300 102939 dist gaussian mom yes rot yes
#
BITS Pilani, Pilani Campus

Input Script
fix myensemble all nve
unfix myensemble
fix my2ndensemble all nvt temp 50 300 0.1
unfix my2ndensemble
fix my3rdensemble all npt temp 150 300 0.1 iso 70000 50.0 1.0
unfix my3rdensemble
#

BITS Pilani, Pilani Campus

4
08-10-2022

Input Script
# Output information
thermo_style custom step time temp pe etotal press vol
#
thermo 100
#

# dump dump_1 all custom 100 dump.gas id type x y z ix iy iz vx vy


vz
#
undump dump_1
#

BITS Pilani, Pilani Campus

THANK YOU
BITS Pilani
Pilani Campus

10

You might also like