Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps_tutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cchiang2
lammps_tutorial
Commits
dc1efac4
Commit
dc1efac4
authored
2 years ago
by
s1309877
Browse files
Options
Downloads
Patches
Plain Diff
Update README for tutorial 1
parent
5234edd2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tut1_polymer/README
+68
-44
68 additions, 44 deletions
tut1_polymer/README
with
68 additions
and
44 deletions
tut1_polymer/README
+
68
−
44
View file @
dc1efac4
# Tutorial 1 - simulating a simple polymer chain
In this second tutorial, we use LAMMPS to simulate the dynamics of a simple
polymer (a chain of beads) within a solvent (modelled implicitly by simulating
the system using Langevin/Brownian dynamics). As in the previous tutorial,
beads interact with one another via
the
truncated Lennard-Jones
(LJ)
potential, with the default parameters setting the interactions to be
purely
repulsive.
beads interact with one another via
a
truncated
and shifted
Lennard-Jones
(LJ)
potential, with the default parameters setting the interactions to be
purely
repulsive.
To link consecutive beads of the polymer together, we add finite extensible
nonlinear elastic (FENE) springs/bonds between them. In formula, the FENE
potential is given by
U(r) = -K_f*R_0^2*ln(1-(r/R_0)^2)
,
U(r) = -
0.5*
K_f*R_0^2*ln(1-(r/R_0)^2)
if r < R_0
wh
ere r is the distance between two consecutive beads
,
and
K_f is the spring
constant. The FENE bond differs from the harmonic bond in
that it can only
extend to a finite limit (R_0), and this can help reduce the
chance of the
polymer getting entangled.
and infty otherwise. H
ere
,
r is the distance between two consecutive beads and
K_f is the spring
constant. The FENE bond differs from the harmonic bond in
that it can only
extend to a finite limit (R_0), and this can help reduce the
chance of the
polymer getting entangled.
We also model the polymer to be semi-flexible by adding angle bonds - bonds
which act between three consecutive beads. Here we use the cosine potential
...
...
@@ -27,68 +29,90 @@ persistence length l_p (K_b ~ k_B*T*l_p/sigma), the characteristic length over
which the polymer loses memory of its direction. This kind of semi-flexible
polymer models is also known as a Kratky-Porod model.
###############################################################################
What to do:
0.
Plot
the bond and angle potentials
0.
Familarise yourself with
the bond and angle potentials
Using your favourite plotting package, plot both the FENE and cosine
potentials. Make sure you are happy with how these potentials do what they
are meant to do in the simulations. Explore different parameter values and
see how that changes the shape of the potential.
are meant to do in the simulations! Explore different parameter values and
see how that changes the shape of the potential as well as th structural
and dynamical properties of the system.
1. Run the simulation with the default parameters
a. Generate the required input scripts/files
As before, this is done by running the provided bash script
bash init.sh
As in the first tutorial, this generates two files that are necessary
for running LAMMPS:
- run.lam file - a 'driver' script that is read by LAMMPS
- init.in file - a trajectory file containing the initial configuration
of the system (i.e., the atoms' positions, bonds, etc)
Have a look at these files individually and make sure you understand
what each command and each section does! In particular:
which creates two files (run.lam and init.in) that are needed for
running LAMMPS. Like before, have a look at these files individually
and make sure you understand what each command and each section does!
In particular:
- What are some new commands added in the run.lam file?
- What is the initial configuration of the polymer? And how did we
equilibrate the system?
- What additional info have we provided in the init.in file?
As always, i
f in doubt, check out LAMMPS documentation on
I
f in doubt, check out LAMMPS documentation on
docs.lammps.org/Manual.html
b. Run the simulation
This can be done using LAMMPS installed on the school computer
This can be done using the LAMMPS installed on the school computer. We
start the simulation using the same command as before
lmp -in run.lam
pos*.lammpstrj files will be generated, storing the beads' positions
and velociti
es
The simulated trajectory of the polymer is stored in the
pos*.lammpstrj fil
es
.
c. Visualise the trajectory of the polymer
This can be done using VMD as in the first tutorial. 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]
This can be done using VMD as in the first tutorial.
2. Explore the effect of changing the
3.
2. Explore the effect of changing different system parameters
a. Change the interaction between polymer beads
Modify the pairwise interaction between beads so that they become
attractive to one another (i.e., change the cutoff r_c to 1.8 and vary
epsilon).
- Can you pinpoint the critical value for epsilon where the polymer
changes from having an extended/open structure to a compact/
globule-like one? This transition is also known as the
'coil-to-globule' transition in polymer physics, and can be seen in
experiment, for example, by modifying the salt concentration
of the solvent.
- Can you come up with an observable that allows you to quantify the
'size' of the polymer?
b. Change the stiffness/flexibility of the polymer
- How does changing the persistence length parameter in init.sh affect
the overall structure of the polymer?
- In the case where the attraction between beads is strong enough such
that the polymer collapses, how does changing the flexibility of the
fibre affect the way how it is folded?
3. (More advanced) Model a heteropolymer chain
The provided script simulates a polymer chain where all beads are identical
(e.g., they interact the same with one another), and this type of chain is
known as a homopolymer. A heteropolymer is one where beads/monomers with
different properties are chained together. Try modifying the code to
simulate a chain with two types of beads (type A and B, and say they are
randomly ordered along the polymer, e.g., ABAAABBAB). Set the interaction
strength to be different between the two kinds of beads (i.e.,
epsilon_AA != epsilon_AB != epsilon_BB).
- At what parameter regime does the polymer form a single globule with
A and B type beads mixed together?
- At what parameter regime does the polymer 'phase separate' and form
distinct globules, where A beads are demixed with B beads?
- How is the dynamics here different from the case of the LJ fluid,
where the beads/colloid particles are not connected together?
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment