Skip to content
Snippets Groups Projects
Commit fabac839 authored by s1309877's avatar s1309877
Browse files

Add the pair_modify shift command and visualisation tips

parent 725ebf02
No related branches found
No related tags found
No related merge requests found
......@@ -180,6 +180,11 @@ run ${run_init_time}
# If rc > 2^(1/6), then there is a region where the potential is attractive
pair_style lj/cut ${rc_0}
# Make sure the LJ potential is shifted by the energy value at the cutoff.
# This only changes the pairwise energy values output by LAMMPS but has no
# effect on the actual dynamics
pair_modify shift yes
# Set the params for the pairwise interactions between individual atom types
# Key params: atom_type_1 atom_type_2 epsilon sigma rc
# Try changing epsilon and rc (cutoff) and see how that affects the dynamics!
......
......@@ -221,6 +221,7 @@ angle_coeff 1 ${l_p}
# Switch from soft to the purely repulsive LJ (or WCA) potential
pair_style lj/cut ${rc_0}
pair_modify shift yes
pair_coeff * * 1.0 ${sigma} ${rc_0}
run ${run_init_time_2}
......
......@@ -213,6 +213,7 @@ angle_coeff 1 ${l_p}
# Switch from soft to the purely repulsive LJ (or WCA) potential
pair_style lj/cut ${rc_0}
pair_modify shift yes
pair_coeff * * 1.0 ${sigma} ${rc_0}
run ${run_init_time_2}
......
Note that because LAMMPS does not output the bead positions in order (i.e., by
the bead index) while VMD thinks that is the case, beads are linked together
wrongly in the visualisation. We can fix this by typing the following set of
commands in the terminal after loading the molecule:
topo clearbonds
set N {nbeads}
for {set i 0} {$i < [expr $N-1]} {incr i} {
set j [expr $i+1]
topo addbond $i $j
}
[You will need to replace the variable nbeads with the actual number of beads
in the polymer]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment