0% found this document useful (0 votes)
91 views2 pages

Problem 1

The document outlines the setup for a LAMMPS simulation involving two types of atoms, their properties, and interactions. It includes details on the system's dimensionality, atom and bond types, initialization commands, and parameters for molecular dynamics runs. Additionally, it specifies how to store data and perform calculations related to temperature, pressure, and bond lengths.

Uploaded by

galizius
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views2 pages

Problem 1

The document outlines the setup for a LAMMPS simulation involving two types of atoms, their properties, and interactions. It includes details on the system's dimensionality, atom and bond types, initialization commands, and parameters for molecular dynamics runs. Additionally, it specifies how to store data and perform calculations related to temperature, pressure, and bond lengths.

Uploaded by

galizius
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1

2
b1

System dimensionality: 2, units: lj


Input data:
Atom types : 2 (1 and 2 in the above figure, each atom is of different type)
Number of atoms : 2
Number of bonds : 1 (the bond b1 above)
Set the atom 1 at the origin
set the atom 2 at the distance equal to the bond length, |b1|
the input data can be the following:
LAMMPS data file
2 atoms #the total number of atoms
1 bonds # the total number of bonds
2
1

atom types
bond types

-1.0
-1.0
-0.1

1.0
1.0
0.1

# no of atom types
# no of bond types
xlo xhi
ylo yhi
zlo zhi

#box size
#box size
# you have to define the z-size, even for 2D systems, the defauls is -0.5,0.5

Masses
1
2

1.000000
1

#masses of atom TYPES (the first column)

Atoms
1 1 1
2 1 2

0
0

0
0.5

0
0

#coorinates. The first column: atom number, the second- MOLECLE


#number, the third- atom TYPE, fourth- x, fifth -y, sixth -z

Bonds
1112

#first column-the bond number, second bond TYPE, third and fourth the
#numbers of atoms connected by that bond.

Store the above data in the signgle.dat file


All the details about types are in the input script.
The input script
#INITIALIZATION
dimension 2
boundary p p p
# (periodic bc, even in the z direction, default)
atom_style bond
# check http://lammps.sandia.gov/doc/angle_style.html
units lj
#check http://lammps.sandia.gov/doc/units.html
read_data single.dat
#read this file for the first time

#read_restart restart1
#read_data multi.dat

#read one of the files below during next runs


# check http://lammps.sandia.gov/doc/read_data.html

# explanations for each command: http://lammps.sandia.gov/doc/Section_commands.html#comm


replicate 50 50 1
neighbor 2.0 bin

#builts larger system, comment this line in the next runs


#define the list of neighbours

velocity all create 1.0 1234


velocity all zero linear

#create the initial velocity


#remove the momentum

reset_timestep 0
timestep 0.01
#sets the timestep. If the program fails decrease it, try to make it larger (default for
# lj units =0.05).
# INTERACTION PARAMETERS
pair_style lj/cut 1 (global cut-off =1, any definition below changes it)
pair_coeff 1 1 1.0 1.0
#usage: i,j types of atoms, epsilon, sigma (and, optionally cut-off)
pair_coeff 1 2 1.0 0.5 0.5
pair_coeff 2 2 3.0 0.1
special_bonds lj 0.0 1.0 1.0
#tuns on/off the interactions between the atomscontributingto bonds,reead manual
bond_style harmonic
# harmonic bond
bond_coeff 1 500.0 0.5
# bond type, energy, equilibrium distance. 500 a huge energy
# try also fixed bond lengths
#fix bonf all shake 0.0001 1 100 b 1 #read the description for fix shake
#MD RUN
fix integrate all nve
#nve simulation
fix 3 all temp/rescale 1 1.0 1.0 0.00005 1.0
#rescale temperature
fix 111 all momentum 1 linear 1 1 1 angular #remove momentum, comment this line after performing
# preliminary calculations
#fix 13ID all temp/berendsen 2 2 10
#berendsen thermostat, comment temperature rescalling
#fix 1a all press/berendsen iso 0.5 0.5 50.0
#berendsen barostat
#ADDITIONAL CALCULATIONS
# be sure that the numbers 10 100 1000 and 10 1000 10000 are correct
# their meaning ( 10 1000 10000): the output after 10000,20000,etc timesteps, each time the averaging
# is over 1000 values obtained after 10,20,30,.....9980,9990 and 10000 timesteps (10010, 10020,...19990,20000, etc)
compute BOND all bond/local dist
compute T all temp
compute P all pressure thermo_temp
compute MSD all msd com yes
fix TempAve all ave/time 10 100 1000 c_T c_P c_MSD[4] file temp.txt #file temp.txt contains themo data
fix length all ave/histo 10 1000 10000 0.4 0.6 50 c_BOND mode vector file l.txt
#file l.txt histograms of bond lengths)
#RUN, OUTPUTS
thermo 200
thermo_style custom step temp pe epair ebond
dump d1 all custom 500 dump.lammpstrj id type x y z
run 20000
write_restart restart1
write_data multi.dat nocoeff

You might also like