SlideShare a Scribd company logo
1 of 13
Download to read offline
Computational Physics B: Coursework Report
1
Lattice Polymer Simulation
20662
Department of Physics, University of Bath, Bath BA2 7AY, United Kingdom
Date submitted: 25 April 2016
Abstract
Modelling the dynamics of polymers is very attractive for multiple reasons; from predicting the
scattering results of amorphous polymers and hence predicting their material properties to
understanding protein folding, it has a wide range of applications in key areas of science. This report
investigates two simple methods of simulating the movement of a lattice polymer, using ‘pivot’ and ‘flip’
type movements. Long-chain polymers modelled solely by flip moves were not found to reach
equilibrium, and it was concluded that a random sequence of both types of move generated the most
realistic representation of polymer motion in solution. It was found that the polymers displayed fractal
growth characteristics, with fractal dimension 1.315±0.004. Introducing monomer interactions was
found to increase the fractal dimension, generating a dependence on the system’s temperature. Finally,
complex polymers were simulated in several scenarios, indicating the program’s suitability to model
bodies such as surfactants and DNA strands. The report found the ability for a system to exist in its
lowest energy configuration to be temperature dependent, with a ‘temperature window’ dictating the
effectiveness of a polymer. The results were consistent with protein denaturing, with high temperatures
preventing the polymer reaching its functioning state for significant periods of time.
1. Introduction
The ability to simulate the behaviour of polymers
(chains of many constituents, called ‘monomers’) is
very attractive and is currently being explored in many
areas of science. From its application in material
physics in predicting the scattering results of
amorphous polymers [1] to explaining the formation of
microscopic gels leading to the ready colonization of
microorganisms within oceans [2], understanding the
dynamics of various kinds of polymer has vast
applications and thus can lead to advances in key areas
of technology. In addition to this, the topic of ‘protein
folding’, the formation of a protein’s typical structure
from a random coil [3], is an area of on-going research,
into which polymer dynamics can directly relate (after
all, a protein is, in essence, a complex polymer).
One limit with such simulations however is the typical
chain length of real-world polymers; polystyrene for
example can consist of chains up to 1000 monomers
long [4], and some proteins can be in excess of 400
amino acids [5], which themselves consist of many
atoms. This makes individually simulating the
behaviour of each atom impossible, and hence
simplified models must be produced. One such model,
the ‘square lattice’ polymer is contained within this
report.
One method of moving the polymer, known as the
‘pivot move’, is discussed in Section 2. The pivot move
is thought to be an efficient way of modelling polymer
dynamics and reaching an equilibrium state for self-
avoiding random walks. This report explores this type
of move, comparing the results obtained to previous
work conducted in the field [6]. In addition to this, the
effect of introducing monomer interactions to the
system is investigated in Section 3, which can be used
for simulating charged polymer chains or including the
effect of the solvent, for example.
The pivot move, although a recognised method, is not
the only way of modelling polymer dynamics; many
other methods may be used that produce similar results
and simulate real-world motion more accurately. One
potential candidate, the ‘flip move’, is investigated in
Section 4, to evaluate how the results obtained differ to
previous work conducted with the pivot move, and in
what conditions the flip move is a better method.
It is uncommon that a polymer only contains a single
type of monomer; it is likely a variety of atoms will be
contained within a single chain. For example, DNA is
made of 4 types of monomer, which exhibit different
interactions with their surroundings and neighbouring
monomers. It is therefore important that a simulation
can incorporate this, allowing the creation of
interesting assemblies. Section 5 investigates the
simple case of a diblock copolymer, and the typical
formations that result.
When the polymer sequence is made more complex
than the simple ‘diblock’ case, it enables the formation
of ‘secondary structures’; the polymer forms into a
stable structure that is essential for its function (alpha
helices and beta sheets are two examples found in many
proteins). This formation depends strongly upon on the
polymer sequence, and many highly ordered structures
can be formed as a result. One sequence of particular
interest is investigated in Section 6, assessing the
influence of temperature on the secondary structures
formed. In a similar manner, a polymer aimed at
modelling the interactions of DNA/RNA molecules is
also completed, evaluating how the introduction of
multiple types of monomer can replicate biological
systems.
Computational Physics B: Coursework Report
2
2. General Simulation Method
A common, much simplified way of modelling the
dynamics of a polymer chain is the introduction of a
square lattice. Each monomer in the chain lies on a
unique site, with the order of the chain kept constant to
simulate the bonds that together form the polymer
(Figure 1). A Monte Carlo (MC) method is then used to
move the polymer many times, resulting in self-
avoiding motion (two monomers are forbidden to lie on
the same lattice site). The simulation rejects any moves
that would result in an overlap, known as a ‘clash’.
To complete the MC motion, many ‘sweeps’ are
conducted, each consisting of 𝑁 attempted moves
(where 𝑁 is the number of monomers in the chain).
Each time a potential move is generated, the energy
difference of the configuration change, ∆𝐸, is calculated
and accepted with probability 𝑝 𝑎𝑐𝑐𝑒𝑝𝑡, given by the
Metropolis formula
𝑝 𝑎𝑐𝑐𝑒𝑝𝑡 = 𝑒−∆𝐸 𝑘 𝐵 𝑇0⁄
, (1)
where 𝑘 𝐵 is the Boltzmann constant and 𝑇0 is the
temperature. Note, if the change results in a decrease
in energy, the move is automatically accepted. Given
that the method of movement meets the ‘detailed
balance condition’ (under equilibrium, the probability
of the system changing between two states is
proportional to the ratio of their probability densities)
and is ‘ergodic’ (every configuration can be reached
from every other configuration in a finite number of
moves), the system converges to a macrostate given by
the Boltzmann distribution [7]. That is, the probability
a system is in a microstate 𝑠, 𝑝(𝑠), is
𝑝(𝑠) =
𝑒−𝐸(𝑠) 𝑘 𝐵 𝑇0⁄
∑ 𝑒−𝐸(𝑠) 𝑘 𝐵 𝑇0⁄
𝑠
, (2)
where 𝐸(𝑠) is the energy of the microstate 𝑠. By only
considering a single polymer (a good approximation for
a dilute suspension), the energy of interaction between
monomers within the same chain can be investigated.
The simulation contained two types of monomer: a
hydrophilic type ‘P’, which has no energy of interaction
with the solvent nor other monomers, and a
hydrophobic type ‘H’, which is assumed to have an
energy of interaction –𝜀 with other H type monomers.
For the simulation, 𝜀 was assumed constant and was
contained within a dimensionless temperature
parameter 𝑇 = 𝑘 𝐵 𝑇0 𝜀⁄ .
The model calculates the total energy of the polymer by
considering the energy of interaction between each
individual monomer with the rest of the chain. Letting
𝑖 run over all monomers, the energy of the
configuration, 𝐸, is expressed as
𝐸 =
1
2
∑ { ∑ Γ𝑖𝑗Α𝑖𝑗𝑗≠𝑖 }𝑖 , (3)
where A 𝑖𝑗 is the interaction energy between monomers
and Γ𝑖𝑗 is a variable equal to 1 if 𝑖 and 𝑗 are neighbours
and Γ𝑖𝑗 = 0 otherwise.
One example of a move that fulfils the detailed balance
condition is the pivot move discussed in [6]. A random
monomer is selected, along with a rotation direction,
and either the preceding or proceeding monomers in
the chain are then selected and moved accordingly.
Figure 1 shows a graphical example of a pivot move.
One limitation of such a movement is the amount of
overlaps the method produces, especially for long-
chain polymers. The model was originally run using a
polymer consisting of 20 – 200 P monomers. After
5000 sweeps, the number of moves rejected due to a
clash was recorded and is displayed in Figure 2 as a
percentage of the total moves attempted.
The results show that as the polymer gets longer, the
proportion of moves rejected due to clashes increases.
This is to be expected – as the chain length increases,
Figure 1. A polymer created upon a square lattice
undergoing a ‘pivot move’. The filled blocks represent
the current configuration and the clear blocks indicate
the new position as a result of a pivot move
anticlockwise around a randomly selected monomer.
Figure 2. How percentage of moves rejected due to
clashes varies with chain length for hydrophilic
polymers. The theoretical line for 1 − 𝑁−0.18
is also
shown, showing a good fit with the results.
Computational Physics B: Coursework Report
3
the probability that a proposed pivot move will result in
an overlap also increases. In fact it is suggested by
Madras and Sokal that the fraction of moves accepted
scales as 𝑁−𝑞
, where 𝑞 was found to be approximately
0.19 [6]. The data in Figure 2 shows a good fit with an
exponent 𝑞 = 0.18, agreeing with this previous work.
Even for polymers of length 200 (very small when
considering real-world applications), the rejection
percentage was found to be 61.1%, which considering
the number of moves attempted, results in a large
amount of wasted computational time. As this value
increases with length, it therefore shows that the pivot
method is not appropriate for studying the dynamics of
real world long-chain polymers without the use of
powerful computers. However, for this investigation
the pivot move is appropriate as chain lengths are
mostly kept below 100.
3. Homopolymers
3.1 Method
To investigate the behaviour of homopolymers
(polymers containing only one type of monomer)
undergoing the pivot move discussed in Section 2,
several changes were made to the original program.
The main alteration was to output several key
parameters after every sweep to a file for each
simulation, including: the end-to-end length, the
dimensionless energy and the fraction of moves
rejected (both due to clashes and the Metropolis
condition). The program was also altered to
automatically loop over all desired conditions,
requiring minimal user interaction once the simulation
was initiated. Appendix A1 contains the code used to
implement this, including how the filename of each run
depended on the date and time of the simulation for
clarity when the data was imported.
Both hydrophilic and hydrophobic homopolymers
were simulated, varying the length between 20 and 100
monomers. For the hydrophobic polymer, the
dimensionless temperature was also varied between 0.1
and 2.5 to investigate its effect on the system’s energy
and end to end distance. After the inspection of initial
results, and to ensure an accurate equilibrium state had
been reached, the average values were taken after 500
sweeps and the simulation ended after 2000 sweeps
were completed. For all conditions, 3 runs were
conducted.
3.2 Results and Discussion
Firstly, the average end to end distance, 𝑙, over the
three runs was evaluated for both hydrophilic (‘P’ type)
and hydrophobic (‘H’ type) homopolymers. The results
are shown in Figure 3, using a natural log scale for both
axis. The standard error in 𝑙 between each run was used
to calculate the uncertainty, shown by the error bars on
Figure 3. Where not visible, the error bars are similar
in size to the data points and therefore not included.
It can be shown that if an object is a fractal (that is to
say it is self-similar on different length scales), it can be
described by a ‘fractal dimension’ 𝑑𝑓 which
characterises its growth, such that
𝑑(𝑙𝑛𝑁)
𝑑(𝑙𝑛𝑅)
=
𝑑 𝑓
1+ 𝛽 (𝛼𝑅)
𝑑 𝑓⁄
, (4)
where 𝑁 and 𝑅 represent the number of monomers and
the ‘size’ of the system respectively and 𝛼, 𝛽 are
constants [8]. Therefore by allowing 𝑅 to become
sufficiently large, the fractal dimension can be found as
the gradient of the data in Figure 3, using 𝑙 as a measure
of the size of the polymer.
The results show that the objects are indeed fractals,
showing the required linear relationship as they grow.
First considering the P type polymer, the fractal
dimension was found to be 1.315±0.004. This is to be
expected; it is larger than for 1D growth as the polymer
does not stay completely extended during its
movement, yet it is smaller than for 2D growth as the
polymer does not bunch up into a tight formation,
equivalent to square like growth.
Now considering the effect of monomer interactions
within a H type chain, at 𝑇 = 1.5 the fractal dimension
was found to be 1.817±0.199. This, again, lies within the
boundaries of 1 and 2 dimensional growth which is
consistent with the previous reasoning. The fractal
dimension however was found to be higher than for the
P type polymer. This is due to the favourable energy of
interaction between H type monomers; the system’s
energy reduces when monomers lie on neighbouring
lattice sites. As the system is most likely to lie in a
configuration that minimises the energy, it therefore
Figure 3. How end to end distance varies with
polymer length. The data has been fitted linearly to
compare with fractal dimension theory. The results
show adding hydrophobic interactions increases the
fractal dimension of the growing polymer.
Computational Physics B: Coursework Report
4
forms a more compact structure in comparison to the P
type chain, resulting in a higher fractal dimension
closer to square-like growth.
However, the fractal dimension was found to decrease
as the temperature of the system was increased.
For 𝑇 = 2.3, 𝑑𝑓 was found to be 1.432±0.012. This value
is still higher than that of the P type polymer due to the
inter-monomer interactions, however the larger
temperature in a less dense structure; equation (1)
shows that at higher temperatures, there is a higher
probability for moves leading to an increase in energy
to be accepted. As the temperature increases to high
values, the behaviour of the system is expected to tend
towards that of a non-interacting system (the
Metropolis formula gives negligible rejections),
therefore the fractal dimension is expected to tend
towards 1.315, which Figure 3 supports.
The dimensionless energy, ε, of the hydrophobic
homopolymers was also measured. The results for
several different chain lengths over a range of
temperatures are shown in Figure 4. As before, the
error bars represent the standard error in the system
energy over the 3 repeats for each condition.
There is a very clear trend in the results for all polymer
lengths; the polymer energy was found to increase with
temperature for most values. This is consistent with a
Boltzmann distribution; at higher temperatures, there
is a larger probability that the system will be in a
microstate with a higher energy. This is also shown in
Figure 5, where the energy distribution is ‘shifted’
towards higher values with increasing temperature,
and is observed to be similar to that of a typical
Boltzmann distribution.
However, the polymer energy was found to initially
decrease at low temperatures. This implies that the
system has not reached an equilibrium that is
consistent with a Boltzmann distribution. This can be
explained by considering the monomer interactions,
and the metropolis formula; at low temperatures, the
probability for moves leading to an increase in energy
is very small. Therefore the polymer becomes trapped
in an early formation and remains in this state for the
remainder of the simulation, similar to the way in
which the structure of a glass is ‘frozen’ into the system
upon rapid cooling. Figure 6 shows an example of such
a formation, where the polymer cannot unravel to
remove the trapped voids and hence cannot reach a
true equilibrium state, giving energies higher than
expected. It is also worth noting the larger error bars at
lower temperatures; the trapped state formed is
random and therefore gives a wide variation in both the
end to end distance and the polymer energy.
To reach an equilibrium state therefore, the system’s
temperature needs to allow for a small proportion of
moves to increase the overall energy (in order to
remove effects such as that displayed in Figure 6).
Physically, this can be related to an ‘activation energy’
the polymer must have to overcome its monomer’s
interactions and rearrange, hence why the energy
initially decreases as temperature is increased. From
Figure 4, this ‘activation temperature’ was found to
increase with increasing length, approximately 0.3, 0.7
and 0.9 for lengths 20, 60 and 100 respectively. This is
due to the larger energy needed to be overcome when
more monomers are interacting together.
Figure 6. An example of several trapped voids
observed for a hydrophobic homopolymer, length
100, at temperature 0.1.
Figure 4. How polymer energy varies with system
temperature. For systems allowed to reach
equilibrium, the polymer energy increases with
temperature.
Figure 5. The frequency distribution of the polymer
energy for three temperatures for a polymer length
100. The results are consistent with a Boltzmann
distribution, with the average energy increasing with
increasing temperature.
Computational Physics B: Coursework Report
5
4. Flip Movement
Whilst the pivot move is a successful method for
simulating polymer dynamics and obtaining
interpretable results, it does not relate well to the real-
world motion of polymers in solution; it is highly
unlikely a system would be bound to solely pivot when
undergoing motion. As well as this, another
disadvantage of the original program is the formation
of erroneous ‘voids’ in the polymer, discussed in section
3.2 (see Figure 6). This can prevent the system reaching
a true equilibrium configuration, therefore other
methods of simulating lattice polymer dynamics are
required. One such system, the ‘flip move’, is proposed
in [9].
A monomer may only move if situated on a ‘corner site’,
that is its two neighbouring monomers do not share
any common coordinates with each other, or at the end
of the chain. If the latter is true, the monomer
undergoes motion similar to that described in Section
2. However, if it lies on a corner, the monomer
diagonally ‘flips’ its position to the opposite corner.
Figure 7 shows graphical representations of both
scenarios. As in Section 2, any proposed moves are
checked both for clashes and against the Metropolis
formula and are accepted accordingly.
4.1 Method
The majority of the program used in Section 3
remained the same for the flip move investigation (the
program still output data in the same manner and
looped over many conditions). However, to complete
the flip move, a random monomer was selected and
checked if it occupied a corner or end position within
the AttemptMove function of the Protein Class. If
either was true, the program completed the move using
two separate functions, otherwise another monomer
was randomly selected. Appendix A2 contains the code
used in implementing these functions.
The program also contained the option for the user to
select which type of move the polymer should partake
in: pivot, flip or a random sequence of both. This
allowed the thorough comparison of both models.
4.2 Results and Discussion
Firstly, P type homopolymers were investigated for
their end to end distance. The polymer length was
varied between 20 and 100 using both only flip and a
random selection of flip and pivot moves. 3 runs for
each length over 5000 sweeps were completed for each
type of move, with parameters measured after 3000
sweeps. As before, errors were taken as the standard
error between the repeats as before, and the data was
compared to that obtained in Section 3. Figure 8 shows
the results, with error bars excluded as they were found
to be smaller than the data points.
The results show that the two methods match
reasonably well for short polymer lengths. However, as
the length is increased the results deviate considerably,
with the flip move giving much higher values for the
end to end length. One reason for this is the polymer
has not yet reached an equilibrium state, shown in
Figure 9. In fact it is suggested by Verdier and
Stockmayer that for a 3D polymer undergoing flip
move motion, relaxation was observed (equilibrium
reached) after 𝑁3
sweeps for 𝑁 = 32 and 64 [9]. This
shows that the flip move is only suitable to study the
dynamics of long chain polymers using a powerful
computer and/or a large simulation time in order to
complete the required number of sweeps to reach an
equilibrium state.
However, introducing the flip move alongside the pivot
move was not found to change the results observed for
the end to end length; Figure 8 shows very similar
results for the two movement conditions. This adds an
Figure 7. A graphical representation of two potential
moves following the flip movement method,
displayed using the same format as Figure 1. Both
moves are shown on the same polymer for
convenience.
Figure 8. How end to end distance varies with
polymer length for the two different move types. The
flip move gives fairly good comparison for short
polymer lengths, however deviates greatly as length
is increased. A random combination of the two moves
matches closely with that of only pivot moves.
0
10
20
30
40
50
60
20 40 60 80 100
𝑙
N
Flip Only Random Move Pivot Only
Computational Physics B: Coursework Report
6
extra dynamic to the polymer motion, potentially
simulating real-world movement more accurately (the
polymer is not solely bound to pivot).
Due to the results shown in Figure 8, only H type
polymers of length 20 were investigated to ensure
enough sweeps were completed to allow the possibility
of equilibrium being reached. The results are shown in
Figure 10. Overall, the results show the same general
trend observed for only pivot moves, with increasing
temperature leading to higher energies, again due to
the larger probability of moves resulting in energy
increases being accepted.
However, the initial decrease observed at low
temperatures was found to be more drastic for only-flip
movement; the results show a larger decrease than for
the pivot case. This is due to the system becoming
locked into a formation at a much earlier stage,
meaning the polymer is further away from an
equilibrium state. Figure 11 shows an example of this,
and also highlights an issue with the flip move when
modelling self-interacting polymers. It shows the ends
of the polymer trapped in coils with no free corner sites
to move. This configuration results in no further moves
being made, hence leading to erroneously high results.
The random move selection was found to reduce the
initial decrease, as with more available types of move
the polymer is less likely to become completely trapped
and hence can reach formations closer to an
equilibrium state.
In contrast, above the ‘activation temperature’, the flip
move was found to produce lower energies than the
pivot move, showing the flip move gives formations
that are more closely packed. This is due to the flip
move’s ability to move a corner monomer into small
gaps within the polymer, hence overall lowering the
energy. The same was observed for a random move
selection, which was also found to give lower energies.
In conclusion, the flip move does give similar
equilibrium values for short polymers, however it
becomes unsuitable for longer polymers without the
use of high speed computers that are able to complete
many sweeps within a reasonable amount of time.
However, the move does add an extra dynamic of
movement when coupled with pivot moves, allowing
polymers to form more compact structures, and when
randomly performed together the results obtained are
comparable to that of only pivot moves. For this reason,
the remainder of the investigation was completed by
randomly selecting both flip and pivot moves.
5. Diblock Copolymers
Diblock copolymers are a simple kind of
heteropolymer, consisting of two sections of different
monomers. Using notation where the polymer
sequence HHHPPP is represented as H3P3, they take
the general form HmPn where m and n are integers. The
program was altered to produce a variety of polymers
of this classification, again averaging over 3 runs for
each condition and length for 2000 sweeps. The
relative length of the blocks was also altered, to
investigate the changes to the polymer. Parameters
were evaluated after 500 sweeps to ensure an
equilibrium state had been reached.
5.1 Results and Discussion
The results obtained for three differently-proportioned
polymers: m = n (equal), 2m = n (one third H
monomers) and m = 2n (two thirds H monomers) are
shown in Figure 12, with errors calculated as discussed
in previous sections.
Figure 10. How energy varies with temperature for a
H type polymer, length 20. Both moves were found to
show the same general trend, with larger temperatures
increasing the average polymer energy at higher
temperatures. Note, data was only obtained
up to 𝑇 = 1.9 for the random move.
Figure 11. An example of a trapped formation
observed for a H type homopolymer, length 20, at
temperature 0.1.
Figure 9. How end to end distance varies with sweep
number for a P type polymer, length 90, undergoing
flip motion for a single run. Even after 5000 sweeps,
the graph shows that the end to end length is still
deceasing, therefore the system has not yet reached
equilibrium.
Computational Physics B: Coursework Report
7
It was observed that for all polymers, the hydrophobic
part forms a tightly packed structure, whereas the
hydrophilic part undertakes a random walk. This is to
be expected; it is energetically favourable for the H type
monomers to compact, ‘grouping’ together. As the
number of self-interacting monomers in the chain is
increased, the average end to end length decreases for
a fixed polymer length as more monomers are
contained within the cluster group. Figure 13 shows
two examples of the structures formed, demonstrating
the grouping effect and the influence of the relative
proportion of H type monomers in the chain.
Simulating these types of polymer could easily be
applied to the study of surfactants - molecules
containing two ‘groups’ of atoms, one hydrophobic and
the other hydrophilic. One imagines that by altering the
code to contain several polymers in the system, the
H type parts would group together and a single
structure would effectively be formed (equivalent to a
micelle – a group of surfactants), thus demonstrating
the physical application of diblock copolymers
investigated here.
6. Secondary Structure
6.1 Method
For more complex polymers, it is possible for a
‘secondary structure’ to be formed, leading to highly
ordered configurations which can be very important for
the function of the polymer. The program was initially
altered to simulate polymers of the form
(PH)b-PP-(HP)b (where b is an integer) over 5 runs of
5000 sweeps, altering the value of b to investigate the
effect of chain length on the structures formed. The
report refers to polymers of this type as ‘complex
copolymers’.
To investigate the simulation’s application to real-
world examples of polymers, the program was also
altered to simulate protein sequences similar to DNA.
4 new monomer types were introduced: A, T, G and C,
each with no energy of self-interaction. However, types
‘A’ and ‘T’ have an energy of interaction –𝜀 and types
‘G’ and ‘C’ have an interaction energy –1.5𝜀 (in order to
relate to biological systems [7]). Appendix A3 contains
the code used to implement this. The sequence
TPPGPPGPPCPPCPPA was modelled, again over 5000
sweeps and 5 runs.
For both polymer sequence types, the fraction of
sweeps spent in the lowest energy configuration, Ω, was
measured. Figure 14(a) shows the lowest energy
configuration for a complex copolymer, length 22
(b = 5) and (b) shows an example for the DNA protein
sequence. The results were taken after 500 sweeps, to
ensure the system was in equilibrium.
6.2 Results and Discussion
For both polymer types, the system temperature was
varied between 0.1 and 1.0 and for complex
copolymers, the value of b was changed between 3 and
5 to investigate their effect on Ω. Figure 15 shows the
results obtained for both complex copolymer and DNA
protein polymer types.
Firstly considering complex copolymers, the results
show there is a clear ‘window’ of temperatures in which
the polymer forms into its lowest energy configuration.
At low temperatures, the polymer becomes trapped in
a formation before reaching its minimum energy
configuration (as discussed in previous sections, the
probability for moves leading to increases in energy
have a very low acceptance probability), hence does not
spend any time in this state. As the temperature
increases, the polymer is able to rearrange and
therefore the proportion of time spent in the lowest
Figure 12. How end to end length varies with relative
length of the H ‘block’ of the polymer at 𝑇 = 1.5. The
average end to end length was found to decrease as
more H monomers were included in the polymer chain.
Error bars were found to be smaller than the data
points.
(a) (b)
Figure 14. Examples of the minimum energy
formation of: (a) complex copolymer, length 22 and
(b) DNA protein. The additional monomer types in
the DNA protein are coloured as follows: green = G,
yellow = C, pink = T and black = A.
(a) (b)
Figure 13. Two examples of diblock copolymers:
(a) H30P60 and (b) H60P30. The H type monomers
‘group’ together, forming a compact area.
Computational Physics B: Coursework Report
8
energy configuration increases. This is observed for all
3 values of b investigated. However, the initial
temperature at which Ω begins to increase gets larger
with b, as a larger temperature is required to overcome
the increased number of H type interactions.
This behaviour, on the other hand, is not observed for
the DNA protein sequence; at low temperatures, the
polymer spends almost 100% of its time in the lowest
energy state. This is, in part, due to the low number of
interacting monomers – the system cannot become
stuck as the monomers only interact with specific
monomer types, of which there are at maximum two in
the chain (instead of 5 other H type monomers for the
b = 3 case). In addition to this, the non-interacting P
type monomers help space the protein out, giving more
freedom as to the formations that result in the
minimum energy.
As the temperature is increased further, the probability
of moves leading to an increase in energy being
accepted also increases, meaning the polymer is more
likely to rearrange out of the required formation and
hence the polymer spends less time in the lowest energy
state. Physically, this can be related to the denaturing
of proteins; at too high temperatures, proteins cease to
function normally. Assuming their function is
dependent upon reaching the minimum energy
configuration, Figure 15 demonstrates how high
temperatures reduce the time spent in this formation
to minimal values, indicating (on application to a
protein) the polymer ceasing to function.
7. Conclusion
The dynamics of lattice polymers were simulated under
a range of conditions for several different types of
polymer. Firstly, simple homopolymers were found to
display fractal growth, with a self-avoiding random
walk generating a fractal dimension 1.315±0.004.
Introducing monomer interactions caused the fractal
dimension to increase. This was found to be dependent
upon temperature, with the fractal dimension found to
decrease from 1.817±0.199 at 𝑇 = 1.5 to 1.432±0.012 at
𝑇 = 2.3. The polymer’s average energy was also found
to be consistent with a Boltzmann distribution for
temperatures that allow the initial rearrangement of
the polymer, required to reach an equilibrium state.
A second method for moving polymers, the ‘flip’ move,
was investigated and was found to produce similar
results compared to solely using pivot movement for
short chain polymers. However, as chain length was
increased, the system did not reach an equilibrium
state and hence it was concluded the flip move is not
suitable without the use of powerful computers.
However, a random mixture of flip and pivot moves
was found to produce results consistent with solely
pivot movement, whilst potentially representing the
physical motion of polymers more accurately. It was
therefore concluded that a random sequence of both
move types would produce the most realistic results.
Finally, polymers containing multiple types of
monomer were investigated, and the formation of
secondary structures was observed. The potential use
of the program for simulating surfactants was
discussed, alongside the modelling of proteins such as
DNA. It was found that the time a polymer lies in its
lowest energy formation was strongly temperature
dependant, decreasing with increasing temperature –
consistent with the denaturing of proteins at high
temperatures.
References:
[1] J. L. Skinner, “Kinetic Ising model for polymer dynamics:
Applications to dielectric relaxation and dynamic depolarized
light scattering”, J. Chem. Phys., vol. 79,. 4, pp. 1955-64, Aug
1983.
[2] P. Verdugo, P. H. Santschi, “Polymer dynamics of DOC
networks and gel formation in seawater”, Deep Sea research
Part II: Topical Studies in Oceanography, vol. 57, 14, pp.
1486-93, Aug 2010.
[3] B. Alberts, A. Johnson, et al., Molecular Biology of the
Cell, 4th ed., New York: Garland Science, 2002.
[4] H. Schuler, S. Papadopoulou, “Real-time estimation of the
chain length distribution in a polymerization reactor—II.
comparison of estimated and measured distribution
functions”, Chem. Eng. Sci., vol. 41, 10, pp. 2681-83, 1986.
[5] J. Zhang, “Protein-Length Distributions for the three
domains of life”, Trends in Genetics, vol. 16, 3, pp. 107-9, Mar
2000.
[6] N. Madras, A. Sokal, “The Pivot Algorithm: A Highly
Efficient Monte Carlo Method for the Self-Avoiding Walk”, J.
Stat. Phys., vol. 50, 1/2, pp. 109-86, 1988.
[7] R. Jack, “PH30056 Comp Phys B – Lattice Polymers
Coursework Assignment”, Mar 2016.
[8] R. Jack, “PH30056 Comp Phys B – DLA Coursework
Assignment”, Feb 2016.
[9] P. H. Verdier, W. H. Stockmayer, “Monte Carlo
Calculations on the Dynamics of Polymers in Dilute
Solution”, J. Chem. Phys., vol. 36, 1, pp. 227-235, Jan 1962.
Figure 15. How the fraction of time the polymer spends
in its lowest energy configuration, Ω, varies with
temperature for several polymer lengths. The results
show a clear ‘active’ temperature range in which the
polymer can rearrange into this formation regularly.
The results for the DNA sequence are also plotted for
comparison.
Computational Physics B: Coursework Report
9
Appendices
A1. Obtaining Polymer Parameters
This is an extract taken from the code used in all sections of the report. The code loops over multiple
conditions to allow the program to run autonomously with minimal user input. Each time a run is
completed, a separate file is created and named according to the date and time it was initiated. After
each sweep, the code outputs key parameters such as the end to end length, energy, number of moves
attempted etc. to the file.
.
.
.
.
.
.
.
.
.
Computational Physics B: Coursework Report
10
Computational Physics B: Coursework Report
11
A2. Applying Flip Move
This is an extract taken from the Protein class, used in implementing the flip move discussed in Section
4. Within the AttemptMove function, the program reads which move has been selected by the user
within main (number 0, 1 or 2) and continues accordingly – attempting the pivot move if selected or
carrying out the extracts of code included here.
.
.
Computational Physics B: Coursework Report
12
Computational Physics B: Coursework Report
13
A3. Creation of DNA monomer types
This part of the code within the Main class declares the new kinds of monomer, used in determining
the energy of the DNA protein.
Within the ResidueType class, two new variables were declared to store the ‘G-C’ and ‘A-T’
interactions. Finally, within the GetSiteEnergy function of the SimulationSystem class, each site
energy is calculated.
.
.

More Related Content

Similar to Lattice Polymer Report 20662

PH600 Project report
PH600 Project reportPH600 Project report
PH600 Project report
Luke Moore
 
Liquid crystalline semiconductors
Liquid crystalline semiconductorsLiquid crystalline semiconductors
Liquid crystalline semiconductors
Springer
 
thesis booklet.fin
thesis booklet.finthesis booklet.fin
thesis booklet.fin
N S
 
Chen_Peterson_multi_angle_light_scattering_2015
Chen_Peterson_multi_angle_light_scattering_2015Chen_Peterson_multi_angle_light_scattering_2015
Chen_Peterson_multi_angle_light_scattering_2015
Tyler Peterson
 
Paper_Macromolecules
Paper_MacromoleculesPaper_Macromolecules
Paper_Macromolecules
Deepa Nair
 
Zac Milne Final independent study report 9_2_14
Zac Milne Final independent study report 9_2_14Zac Milne Final independent study report 9_2_14
Zac Milne Final independent study report 9_2_14
Zachary Milne E.I.T.
 

Similar to Lattice Polymer Report 20662 (20)

MoMo
MoMoMoMo
MoMo
 
PH600 Project report
PH600 Project reportPH600 Project report
PH600 Project report
 
Multi scale modeling of micro-coronas
Multi scale modeling of micro-coronasMulti scale modeling of micro-coronas
Multi scale modeling of micro-coronas
 
Dpg polymer dynamics in active-fluid-2017-march.20
Dpg polymer dynamics in active-fluid-2017-march.20Dpg polymer dynamics in active-fluid-2017-march.20
Dpg polymer dynamics in active-fluid-2017-march.20
 
Kronfeld asc2009-li
Kronfeld asc2009-liKronfeld asc2009-li
Kronfeld asc2009-li
 
The Monte Carlo Method of Random Sampling in Statistical Physics
The Monte Carlo Method of Random Sampling in Statistical PhysicsThe Monte Carlo Method of Random Sampling in Statistical Physics
The Monte Carlo Method of Random Sampling in Statistical Physics
 
Liquid crystalline semiconductors
Liquid crystalline semiconductorsLiquid crystalline semiconductors
Liquid crystalline semiconductors
 
Molecular dynamics Simulation.pptx
Molecular dynamics Simulation.pptxMolecular dynamics Simulation.pptx
Molecular dynamics Simulation.pptx
 
thesis booklet.fin
thesis booklet.finthesis booklet.fin
thesis booklet.fin
 
1 shape memory_polymers
1 shape memory_polymers1 shape memory_polymers
1 shape memory_polymers
 
Dr Khalid elhasnaoui
Dr Khalid elhasnaouiDr Khalid elhasnaoui
Dr Khalid elhasnaoui
 
Chen_Peterson_multi_angle_light_scattering_2015
Chen_Peterson_multi_angle_light_scattering_2015Chen_Peterson_multi_angle_light_scattering_2015
Chen_Peterson_multi_angle_light_scattering_2015
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Paper_Macromolecules
Paper_MacromoleculesPaper_Macromolecules
Paper_Macromolecules
 
Pericyclic reactions for UG.ppt
Pericyclic reactions for UG.pptPericyclic reactions for UG.ppt
Pericyclic reactions for UG.ppt
 
A04 06 0108
A04 06 0108A04 06 0108
A04 06 0108
 
A04 06 0108
A04 06 0108A04 06 0108
A04 06 0108
 
Biomimetics_2007
Biomimetics_2007Biomimetics_2007
Biomimetics_2007
 
Zac Milne Final independent study report 9_2_14
Zac Milne Final independent study report 9_2_14Zac Milne Final independent study report 9_2_14
Zac Milne Final independent study report 9_2_14
 
Numerical Simulation of Gaseous Microflows by Lattice Boltzmann Method
Numerical Simulation of Gaseous Microflows by Lattice Boltzmann MethodNumerical Simulation of Gaseous Microflows by Lattice Boltzmann Method
Numerical Simulation of Gaseous Microflows by Lattice Boltzmann Method
 

Lattice Polymer Report 20662

  • 1. Computational Physics B: Coursework Report 1 Lattice Polymer Simulation 20662 Department of Physics, University of Bath, Bath BA2 7AY, United Kingdom Date submitted: 25 April 2016 Abstract Modelling the dynamics of polymers is very attractive for multiple reasons; from predicting the scattering results of amorphous polymers and hence predicting their material properties to understanding protein folding, it has a wide range of applications in key areas of science. This report investigates two simple methods of simulating the movement of a lattice polymer, using ‘pivot’ and ‘flip’ type movements. Long-chain polymers modelled solely by flip moves were not found to reach equilibrium, and it was concluded that a random sequence of both types of move generated the most realistic representation of polymer motion in solution. It was found that the polymers displayed fractal growth characteristics, with fractal dimension 1.315±0.004. Introducing monomer interactions was found to increase the fractal dimension, generating a dependence on the system’s temperature. Finally, complex polymers were simulated in several scenarios, indicating the program’s suitability to model bodies such as surfactants and DNA strands. The report found the ability for a system to exist in its lowest energy configuration to be temperature dependent, with a ‘temperature window’ dictating the effectiveness of a polymer. The results were consistent with protein denaturing, with high temperatures preventing the polymer reaching its functioning state for significant periods of time. 1. Introduction The ability to simulate the behaviour of polymers (chains of many constituents, called ‘monomers’) is very attractive and is currently being explored in many areas of science. From its application in material physics in predicting the scattering results of amorphous polymers [1] to explaining the formation of microscopic gels leading to the ready colonization of microorganisms within oceans [2], understanding the dynamics of various kinds of polymer has vast applications and thus can lead to advances in key areas of technology. In addition to this, the topic of ‘protein folding’, the formation of a protein’s typical structure from a random coil [3], is an area of on-going research, into which polymer dynamics can directly relate (after all, a protein is, in essence, a complex polymer). One limit with such simulations however is the typical chain length of real-world polymers; polystyrene for example can consist of chains up to 1000 monomers long [4], and some proteins can be in excess of 400 amino acids [5], which themselves consist of many atoms. This makes individually simulating the behaviour of each atom impossible, and hence simplified models must be produced. One such model, the ‘square lattice’ polymer is contained within this report. One method of moving the polymer, known as the ‘pivot move’, is discussed in Section 2. The pivot move is thought to be an efficient way of modelling polymer dynamics and reaching an equilibrium state for self- avoiding random walks. This report explores this type of move, comparing the results obtained to previous work conducted in the field [6]. In addition to this, the effect of introducing monomer interactions to the system is investigated in Section 3, which can be used for simulating charged polymer chains or including the effect of the solvent, for example. The pivot move, although a recognised method, is not the only way of modelling polymer dynamics; many other methods may be used that produce similar results and simulate real-world motion more accurately. One potential candidate, the ‘flip move’, is investigated in Section 4, to evaluate how the results obtained differ to previous work conducted with the pivot move, and in what conditions the flip move is a better method. It is uncommon that a polymer only contains a single type of monomer; it is likely a variety of atoms will be contained within a single chain. For example, DNA is made of 4 types of monomer, which exhibit different interactions with their surroundings and neighbouring monomers. It is therefore important that a simulation can incorporate this, allowing the creation of interesting assemblies. Section 5 investigates the simple case of a diblock copolymer, and the typical formations that result. When the polymer sequence is made more complex than the simple ‘diblock’ case, it enables the formation of ‘secondary structures’; the polymer forms into a stable structure that is essential for its function (alpha helices and beta sheets are two examples found in many proteins). This formation depends strongly upon on the polymer sequence, and many highly ordered structures can be formed as a result. One sequence of particular interest is investigated in Section 6, assessing the influence of temperature on the secondary structures formed. In a similar manner, a polymer aimed at modelling the interactions of DNA/RNA molecules is also completed, evaluating how the introduction of multiple types of monomer can replicate biological systems.
  • 2. Computational Physics B: Coursework Report 2 2. General Simulation Method A common, much simplified way of modelling the dynamics of a polymer chain is the introduction of a square lattice. Each monomer in the chain lies on a unique site, with the order of the chain kept constant to simulate the bonds that together form the polymer (Figure 1). A Monte Carlo (MC) method is then used to move the polymer many times, resulting in self- avoiding motion (two monomers are forbidden to lie on the same lattice site). The simulation rejects any moves that would result in an overlap, known as a ‘clash’. To complete the MC motion, many ‘sweeps’ are conducted, each consisting of 𝑁 attempted moves (where 𝑁 is the number of monomers in the chain). Each time a potential move is generated, the energy difference of the configuration change, ∆𝐸, is calculated and accepted with probability 𝑝 𝑎𝑐𝑐𝑒𝑝𝑡, given by the Metropolis formula 𝑝 𝑎𝑐𝑐𝑒𝑝𝑡 = 𝑒−∆𝐸 𝑘 𝐵 𝑇0⁄ , (1) where 𝑘 𝐵 is the Boltzmann constant and 𝑇0 is the temperature. Note, if the change results in a decrease in energy, the move is automatically accepted. Given that the method of movement meets the ‘detailed balance condition’ (under equilibrium, the probability of the system changing between two states is proportional to the ratio of their probability densities) and is ‘ergodic’ (every configuration can be reached from every other configuration in a finite number of moves), the system converges to a macrostate given by the Boltzmann distribution [7]. That is, the probability a system is in a microstate 𝑠, 𝑝(𝑠), is 𝑝(𝑠) = 𝑒−𝐸(𝑠) 𝑘 𝐵 𝑇0⁄ ∑ 𝑒−𝐸(𝑠) 𝑘 𝐵 𝑇0⁄ 𝑠 , (2) where 𝐸(𝑠) is the energy of the microstate 𝑠. By only considering a single polymer (a good approximation for a dilute suspension), the energy of interaction between monomers within the same chain can be investigated. The simulation contained two types of monomer: a hydrophilic type ‘P’, which has no energy of interaction with the solvent nor other monomers, and a hydrophobic type ‘H’, which is assumed to have an energy of interaction –𝜀 with other H type monomers. For the simulation, 𝜀 was assumed constant and was contained within a dimensionless temperature parameter 𝑇 = 𝑘 𝐵 𝑇0 𝜀⁄ . The model calculates the total energy of the polymer by considering the energy of interaction between each individual monomer with the rest of the chain. Letting 𝑖 run over all monomers, the energy of the configuration, 𝐸, is expressed as 𝐸 = 1 2 ∑ { ∑ Γ𝑖𝑗Α𝑖𝑗𝑗≠𝑖 }𝑖 , (3) where A 𝑖𝑗 is the interaction energy between monomers and Γ𝑖𝑗 is a variable equal to 1 if 𝑖 and 𝑗 are neighbours and Γ𝑖𝑗 = 0 otherwise. One example of a move that fulfils the detailed balance condition is the pivot move discussed in [6]. A random monomer is selected, along with a rotation direction, and either the preceding or proceeding monomers in the chain are then selected and moved accordingly. Figure 1 shows a graphical example of a pivot move. One limitation of such a movement is the amount of overlaps the method produces, especially for long- chain polymers. The model was originally run using a polymer consisting of 20 – 200 P monomers. After 5000 sweeps, the number of moves rejected due to a clash was recorded and is displayed in Figure 2 as a percentage of the total moves attempted. The results show that as the polymer gets longer, the proportion of moves rejected due to clashes increases. This is to be expected – as the chain length increases, Figure 1. A polymer created upon a square lattice undergoing a ‘pivot move’. The filled blocks represent the current configuration and the clear blocks indicate the new position as a result of a pivot move anticlockwise around a randomly selected monomer. Figure 2. How percentage of moves rejected due to clashes varies with chain length for hydrophilic polymers. The theoretical line for 1 − 𝑁−0.18 is also shown, showing a good fit with the results.
  • 3. Computational Physics B: Coursework Report 3 the probability that a proposed pivot move will result in an overlap also increases. In fact it is suggested by Madras and Sokal that the fraction of moves accepted scales as 𝑁−𝑞 , where 𝑞 was found to be approximately 0.19 [6]. The data in Figure 2 shows a good fit with an exponent 𝑞 = 0.18, agreeing with this previous work. Even for polymers of length 200 (very small when considering real-world applications), the rejection percentage was found to be 61.1%, which considering the number of moves attempted, results in a large amount of wasted computational time. As this value increases with length, it therefore shows that the pivot method is not appropriate for studying the dynamics of real world long-chain polymers without the use of powerful computers. However, for this investigation the pivot move is appropriate as chain lengths are mostly kept below 100. 3. Homopolymers 3.1 Method To investigate the behaviour of homopolymers (polymers containing only one type of monomer) undergoing the pivot move discussed in Section 2, several changes were made to the original program. The main alteration was to output several key parameters after every sweep to a file for each simulation, including: the end-to-end length, the dimensionless energy and the fraction of moves rejected (both due to clashes and the Metropolis condition). The program was also altered to automatically loop over all desired conditions, requiring minimal user interaction once the simulation was initiated. Appendix A1 contains the code used to implement this, including how the filename of each run depended on the date and time of the simulation for clarity when the data was imported. Both hydrophilic and hydrophobic homopolymers were simulated, varying the length between 20 and 100 monomers. For the hydrophobic polymer, the dimensionless temperature was also varied between 0.1 and 2.5 to investigate its effect on the system’s energy and end to end distance. After the inspection of initial results, and to ensure an accurate equilibrium state had been reached, the average values were taken after 500 sweeps and the simulation ended after 2000 sweeps were completed. For all conditions, 3 runs were conducted. 3.2 Results and Discussion Firstly, the average end to end distance, 𝑙, over the three runs was evaluated for both hydrophilic (‘P’ type) and hydrophobic (‘H’ type) homopolymers. The results are shown in Figure 3, using a natural log scale for both axis. The standard error in 𝑙 between each run was used to calculate the uncertainty, shown by the error bars on Figure 3. Where not visible, the error bars are similar in size to the data points and therefore not included. It can be shown that if an object is a fractal (that is to say it is self-similar on different length scales), it can be described by a ‘fractal dimension’ 𝑑𝑓 which characterises its growth, such that 𝑑(𝑙𝑛𝑁) 𝑑(𝑙𝑛𝑅) = 𝑑 𝑓 1+ 𝛽 (𝛼𝑅) 𝑑 𝑓⁄ , (4) where 𝑁 and 𝑅 represent the number of monomers and the ‘size’ of the system respectively and 𝛼, 𝛽 are constants [8]. Therefore by allowing 𝑅 to become sufficiently large, the fractal dimension can be found as the gradient of the data in Figure 3, using 𝑙 as a measure of the size of the polymer. The results show that the objects are indeed fractals, showing the required linear relationship as they grow. First considering the P type polymer, the fractal dimension was found to be 1.315±0.004. This is to be expected; it is larger than for 1D growth as the polymer does not stay completely extended during its movement, yet it is smaller than for 2D growth as the polymer does not bunch up into a tight formation, equivalent to square like growth. Now considering the effect of monomer interactions within a H type chain, at 𝑇 = 1.5 the fractal dimension was found to be 1.817±0.199. This, again, lies within the boundaries of 1 and 2 dimensional growth which is consistent with the previous reasoning. The fractal dimension however was found to be higher than for the P type polymer. This is due to the favourable energy of interaction between H type monomers; the system’s energy reduces when monomers lie on neighbouring lattice sites. As the system is most likely to lie in a configuration that minimises the energy, it therefore Figure 3. How end to end distance varies with polymer length. The data has been fitted linearly to compare with fractal dimension theory. The results show adding hydrophobic interactions increases the fractal dimension of the growing polymer.
  • 4. Computational Physics B: Coursework Report 4 forms a more compact structure in comparison to the P type chain, resulting in a higher fractal dimension closer to square-like growth. However, the fractal dimension was found to decrease as the temperature of the system was increased. For 𝑇 = 2.3, 𝑑𝑓 was found to be 1.432±0.012. This value is still higher than that of the P type polymer due to the inter-monomer interactions, however the larger temperature in a less dense structure; equation (1) shows that at higher temperatures, there is a higher probability for moves leading to an increase in energy to be accepted. As the temperature increases to high values, the behaviour of the system is expected to tend towards that of a non-interacting system (the Metropolis formula gives negligible rejections), therefore the fractal dimension is expected to tend towards 1.315, which Figure 3 supports. The dimensionless energy, ε, of the hydrophobic homopolymers was also measured. The results for several different chain lengths over a range of temperatures are shown in Figure 4. As before, the error bars represent the standard error in the system energy over the 3 repeats for each condition. There is a very clear trend in the results for all polymer lengths; the polymer energy was found to increase with temperature for most values. This is consistent with a Boltzmann distribution; at higher temperatures, there is a larger probability that the system will be in a microstate with a higher energy. This is also shown in Figure 5, where the energy distribution is ‘shifted’ towards higher values with increasing temperature, and is observed to be similar to that of a typical Boltzmann distribution. However, the polymer energy was found to initially decrease at low temperatures. This implies that the system has not reached an equilibrium that is consistent with a Boltzmann distribution. This can be explained by considering the monomer interactions, and the metropolis formula; at low temperatures, the probability for moves leading to an increase in energy is very small. Therefore the polymer becomes trapped in an early formation and remains in this state for the remainder of the simulation, similar to the way in which the structure of a glass is ‘frozen’ into the system upon rapid cooling. Figure 6 shows an example of such a formation, where the polymer cannot unravel to remove the trapped voids and hence cannot reach a true equilibrium state, giving energies higher than expected. It is also worth noting the larger error bars at lower temperatures; the trapped state formed is random and therefore gives a wide variation in both the end to end distance and the polymer energy. To reach an equilibrium state therefore, the system’s temperature needs to allow for a small proportion of moves to increase the overall energy (in order to remove effects such as that displayed in Figure 6). Physically, this can be related to an ‘activation energy’ the polymer must have to overcome its monomer’s interactions and rearrange, hence why the energy initially decreases as temperature is increased. From Figure 4, this ‘activation temperature’ was found to increase with increasing length, approximately 0.3, 0.7 and 0.9 for lengths 20, 60 and 100 respectively. This is due to the larger energy needed to be overcome when more monomers are interacting together. Figure 6. An example of several trapped voids observed for a hydrophobic homopolymer, length 100, at temperature 0.1. Figure 4. How polymer energy varies with system temperature. For systems allowed to reach equilibrium, the polymer energy increases with temperature. Figure 5. The frequency distribution of the polymer energy for three temperatures for a polymer length 100. The results are consistent with a Boltzmann distribution, with the average energy increasing with increasing temperature.
  • 5. Computational Physics B: Coursework Report 5 4. Flip Movement Whilst the pivot move is a successful method for simulating polymer dynamics and obtaining interpretable results, it does not relate well to the real- world motion of polymers in solution; it is highly unlikely a system would be bound to solely pivot when undergoing motion. As well as this, another disadvantage of the original program is the formation of erroneous ‘voids’ in the polymer, discussed in section 3.2 (see Figure 6). This can prevent the system reaching a true equilibrium configuration, therefore other methods of simulating lattice polymer dynamics are required. One such system, the ‘flip move’, is proposed in [9]. A monomer may only move if situated on a ‘corner site’, that is its two neighbouring monomers do not share any common coordinates with each other, or at the end of the chain. If the latter is true, the monomer undergoes motion similar to that described in Section 2. However, if it lies on a corner, the monomer diagonally ‘flips’ its position to the opposite corner. Figure 7 shows graphical representations of both scenarios. As in Section 2, any proposed moves are checked both for clashes and against the Metropolis formula and are accepted accordingly. 4.1 Method The majority of the program used in Section 3 remained the same for the flip move investigation (the program still output data in the same manner and looped over many conditions). However, to complete the flip move, a random monomer was selected and checked if it occupied a corner or end position within the AttemptMove function of the Protein Class. If either was true, the program completed the move using two separate functions, otherwise another monomer was randomly selected. Appendix A2 contains the code used in implementing these functions. The program also contained the option for the user to select which type of move the polymer should partake in: pivot, flip or a random sequence of both. This allowed the thorough comparison of both models. 4.2 Results and Discussion Firstly, P type homopolymers were investigated for their end to end distance. The polymer length was varied between 20 and 100 using both only flip and a random selection of flip and pivot moves. 3 runs for each length over 5000 sweeps were completed for each type of move, with parameters measured after 3000 sweeps. As before, errors were taken as the standard error between the repeats as before, and the data was compared to that obtained in Section 3. Figure 8 shows the results, with error bars excluded as they were found to be smaller than the data points. The results show that the two methods match reasonably well for short polymer lengths. However, as the length is increased the results deviate considerably, with the flip move giving much higher values for the end to end length. One reason for this is the polymer has not yet reached an equilibrium state, shown in Figure 9. In fact it is suggested by Verdier and Stockmayer that for a 3D polymer undergoing flip move motion, relaxation was observed (equilibrium reached) after 𝑁3 sweeps for 𝑁 = 32 and 64 [9]. This shows that the flip move is only suitable to study the dynamics of long chain polymers using a powerful computer and/or a large simulation time in order to complete the required number of sweeps to reach an equilibrium state. However, introducing the flip move alongside the pivot move was not found to change the results observed for the end to end length; Figure 8 shows very similar results for the two movement conditions. This adds an Figure 7. A graphical representation of two potential moves following the flip movement method, displayed using the same format as Figure 1. Both moves are shown on the same polymer for convenience. Figure 8. How end to end distance varies with polymer length for the two different move types. The flip move gives fairly good comparison for short polymer lengths, however deviates greatly as length is increased. A random combination of the two moves matches closely with that of only pivot moves. 0 10 20 30 40 50 60 20 40 60 80 100 𝑙 N Flip Only Random Move Pivot Only
  • 6. Computational Physics B: Coursework Report 6 extra dynamic to the polymer motion, potentially simulating real-world movement more accurately (the polymer is not solely bound to pivot). Due to the results shown in Figure 8, only H type polymers of length 20 were investigated to ensure enough sweeps were completed to allow the possibility of equilibrium being reached. The results are shown in Figure 10. Overall, the results show the same general trend observed for only pivot moves, with increasing temperature leading to higher energies, again due to the larger probability of moves resulting in energy increases being accepted. However, the initial decrease observed at low temperatures was found to be more drastic for only-flip movement; the results show a larger decrease than for the pivot case. This is due to the system becoming locked into a formation at a much earlier stage, meaning the polymer is further away from an equilibrium state. Figure 11 shows an example of this, and also highlights an issue with the flip move when modelling self-interacting polymers. It shows the ends of the polymer trapped in coils with no free corner sites to move. This configuration results in no further moves being made, hence leading to erroneously high results. The random move selection was found to reduce the initial decrease, as with more available types of move the polymer is less likely to become completely trapped and hence can reach formations closer to an equilibrium state. In contrast, above the ‘activation temperature’, the flip move was found to produce lower energies than the pivot move, showing the flip move gives formations that are more closely packed. This is due to the flip move’s ability to move a corner monomer into small gaps within the polymer, hence overall lowering the energy. The same was observed for a random move selection, which was also found to give lower energies. In conclusion, the flip move does give similar equilibrium values for short polymers, however it becomes unsuitable for longer polymers without the use of high speed computers that are able to complete many sweeps within a reasonable amount of time. However, the move does add an extra dynamic of movement when coupled with pivot moves, allowing polymers to form more compact structures, and when randomly performed together the results obtained are comparable to that of only pivot moves. For this reason, the remainder of the investigation was completed by randomly selecting both flip and pivot moves. 5. Diblock Copolymers Diblock copolymers are a simple kind of heteropolymer, consisting of two sections of different monomers. Using notation where the polymer sequence HHHPPP is represented as H3P3, they take the general form HmPn where m and n are integers. The program was altered to produce a variety of polymers of this classification, again averaging over 3 runs for each condition and length for 2000 sweeps. The relative length of the blocks was also altered, to investigate the changes to the polymer. Parameters were evaluated after 500 sweeps to ensure an equilibrium state had been reached. 5.1 Results and Discussion The results obtained for three differently-proportioned polymers: m = n (equal), 2m = n (one third H monomers) and m = 2n (two thirds H monomers) are shown in Figure 12, with errors calculated as discussed in previous sections. Figure 10. How energy varies with temperature for a H type polymer, length 20. Both moves were found to show the same general trend, with larger temperatures increasing the average polymer energy at higher temperatures. Note, data was only obtained up to 𝑇 = 1.9 for the random move. Figure 11. An example of a trapped formation observed for a H type homopolymer, length 20, at temperature 0.1. Figure 9. How end to end distance varies with sweep number for a P type polymer, length 90, undergoing flip motion for a single run. Even after 5000 sweeps, the graph shows that the end to end length is still deceasing, therefore the system has not yet reached equilibrium.
  • 7. Computational Physics B: Coursework Report 7 It was observed that for all polymers, the hydrophobic part forms a tightly packed structure, whereas the hydrophilic part undertakes a random walk. This is to be expected; it is energetically favourable for the H type monomers to compact, ‘grouping’ together. As the number of self-interacting monomers in the chain is increased, the average end to end length decreases for a fixed polymer length as more monomers are contained within the cluster group. Figure 13 shows two examples of the structures formed, demonstrating the grouping effect and the influence of the relative proportion of H type monomers in the chain. Simulating these types of polymer could easily be applied to the study of surfactants - molecules containing two ‘groups’ of atoms, one hydrophobic and the other hydrophilic. One imagines that by altering the code to contain several polymers in the system, the H type parts would group together and a single structure would effectively be formed (equivalent to a micelle – a group of surfactants), thus demonstrating the physical application of diblock copolymers investigated here. 6. Secondary Structure 6.1 Method For more complex polymers, it is possible for a ‘secondary structure’ to be formed, leading to highly ordered configurations which can be very important for the function of the polymer. The program was initially altered to simulate polymers of the form (PH)b-PP-(HP)b (where b is an integer) over 5 runs of 5000 sweeps, altering the value of b to investigate the effect of chain length on the structures formed. The report refers to polymers of this type as ‘complex copolymers’. To investigate the simulation’s application to real- world examples of polymers, the program was also altered to simulate protein sequences similar to DNA. 4 new monomer types were introduced: A, T, G and C, each with no energy of self-interaction. However, types ‘A’ and ‘T’ have an energy of interaction –𝜀 and types ‘G’ and ‘C’ have an interaction energy –1.5𝜀 (in order to relate to biological systems [7]). Appendix A3 contains the code used to implement this. The sequence TPPGPPGPPCPPCPPA was modelled, again over 5000 sweeps and 5 runs. For both polymer sequence types, the fraction of sweeps spent in the lowest energy configuration, Ω, was measured. Figure 14(a) shows the lowest energy configuration for a complex copolymer, length 22 (b = 5) and (b) shows an example for the DNA protein sequence. The results were taken after 500 sweeps, to ensure the system was in equilibrium. 6.2 Results and Discussion For both polymer types, the system temperature was varied between 0.1 and 1.0 and for complex copolymers, the value of b was changed between 3 and 5 to investigate their effect on Ω. Figure 15 shows the results obtained for both complex copolymer and DNA protein polymer types. Firstly considering complex copolymers, the results show there is a clear ‘window’ of temperatures in which the polymer forms into its lowest energy configuration. At low temperatures, the polymer becomes trapped in a formation before reaching its minimum energy configuration (as discussed in previous sections, the probability for moves leading to increases in energy have a very low acceptance probability), hence does not spend any time in this state. As the temperature increases, the polymer is able to rearrange and therefore the proportion of time spent in the lowest Figure 12. How end to end length varies with relative length of the H ‘block’ of the polymer at 𝑇 = 1.5. The average end to end length was found to decrease as more H monomers were included in the polymer chain. Error bars were found to be smaller than the data points. (a) (b) Figure 14. Examples of the minimum energy formation of: (a) complex copolymer, length 22 and (b) DNA protein. The additional monomer types in the DNA protein are coloured as follows: green = G, yellow = C, pink = T and black = A. (a) (b) Figure 13. Two examples of diblock copolymers: (a) H30P60 and (b) H60P30. The H type monomers ‘group’ together, forming a compact area.
  • 8. Computational Physics B: Coursework Report 8 energy configuration increases. This is observed for all 3 values of b investigated. However, the initial temperature at which Ω begins to increase gets larger with b, as a larger temperature is required to overcome the increased number of H type interactions. This behaviour, on the other hand, is not observed for the DNA protein sequence; at low temperatures, the polymer spends almost 100% of its time in the lowest energy state. This is, in part, due to the low number of interacting monomers – the system cannot become stuck as the monomers only interact with specific monomer types, of which there are at maximum two in the chain (instead of 5 other H type monomers for the b = 3 case). In addition to this, the non-interacting P type monomers help space the protein out, giving more freedom as to the formations that result in the minimum energy. As the temperature is increased further, the probability of moves leading to an increase in energy being accepted also increases, meaning the polymer is more likely to rearrange out of the required formation and hence the polymer spends less time in the lowest energy state. Physically, this can be related to the denaturing of proteins; at too high temperatures, proteins cease to function normally. Assuming their function is dependent upon reaching the minimum energy configuration, Figure 15 demonstrates how high temperatures reduce the time spent in this formation to minimal values, indicating (on application to a protein) the polymer ceasing to function. 7. Conclusion The dynamics of lattice polymers were simulated under a range of conditions for several different types of polymer. Firstly, simple homopolymers were found to display fractal growth, with a self-avoiding random walk generating a fractal dimension 1.315±0.004. Introducing monomer interactions caused the fractal dimension to increase. This was found to be dependent upon temperature, with the fractal dimension found to decrease from 1.817±0.199 at 𝑇 = 1.5 to 1.432±0.012 at 𝑇 = 2.3. The polymer’s average energy was also found to be consistent with a Boltzmann distribution for temperatures that allow the initial rearrangement of the polymer, required to reach an equilibrium state. A second method for moving polymers, the ‘flip’ move, was investigated and was found to produce similar results compared to solely using pivot movement for short chain polymers. However, as chain length was increased, the system did not reach an equilibrium state and hence it was concluded the flip move is not suitable without the use of powerful computers. However, a random mixture of flip and pivot moves was found to produce results consistent with solely pivot movement, whilst potentially representing the physical motion of polymers more accurately. It was therefore concluded that a random sequence of both move types would produce the most realistic results. Finally, polymers containing multiple types of monomer were investigated, and the formation of secondary structures was observed. The potential use of the program for simulating surfactants was discussed, alongside the modelling of proteins such as DNA. It was found that the time a polymer lies in its lowest energy formation was strongly temperature dependant, decreasing with increasing temperature – consistent with the denaturing of proteins at high temperatures. References: [1] J. L. Skinner, “Kinetic Ising model for polymer dynamics: Applications to dielectric relaxation and dynamic depolarized light scattering”, J. Chem. Phys., vol. 79,. 4, pp. 1955-64, Aug 1983. [2] P. Verdugo, P. H. Santschi, “Polymer dynamics of DOC networks and gel formation in seawater”, Deep Sea research Part II: Topical Studies in Oceanography, vol. 57, 14, pp. 1486-93, Aug 2010. [3] B. Alberts, A. Johnson, et al., Molecular Biology of the Cell, 4th ed., New York: Garland Science, 2002. [4] H. Schuler, S. Papadopoulou, “Real-time estimation of the chain length distribution in a polymerization reactor—II. comparison of estimated and measured distribution functions”, Chem. Eng. Sci., vol. 41, 10, pp. 2681-83, 1986. [5] J. Zhang, “Protein-Length Distributions for the three domains of life”, Trends in Genetics, vol. 16, 3, pp. 107-9, Mar 2000. [6] N. Madras, A. Sokal, “The Pivot Algorithm: A Highly Efficient Monte Carlo Method for the Self-Avoiding Walk”, J. Stat. Phys., vol. 50, 1/2, pp. 109-86, 1988. [7] R. Jack, “PH30056 Comp Phys B – Lattice Polymers Coursework Assignment”, Mar 2016. [8] R. Jack, “PH30056 Comp Phys B – DLA Coursework Assignment”, Feb 2016. [9] P. H. Verdier, W. H. Stockmayer, “Monte Carlo Calculations on the Dynamics of Polymers in Dilute Solution”, J. Chem. Phys., vol. 36, 1, pp. 227-235, Jan 1962. Figure 15. How the fraction of time the polymer spends in its lowest energy configuration, Ω, varies with temperature for several polymer lengths. The results show a clear ‘active’ temperature range in which the polymer can rearrange into this formation regularly. The results for the DNA sequence are also plotted for comparison.
  • 9. Computational Physics B: Coursework Report 9 Appendices A1. Obtaining Polymer Parameters This is an extract taken from the code used in all sections of the report. The code loops over multiple conditions to allow the program to run autonomously with minimal user input. Each time a run is completed, a separate file is created and named according to the date and time it was initiated. After each sweep, the code outputs key parameters such as the end to end length, energy, number of moves attempted etc. to the file. . . . . . . . . .
  • 10. Computational Physics B: Coursework Report 10
  • 11. Computational Physics B: Coursework Report 11 A2. Applying Flip Move This is an extract taken from the Protein class, used in implementing the flip move discussed in Section 4. Within the AttemptMove function, the program reads which move has been selected by the user within main (number 0, 1 or 2) and continues accordingly – attempting the pivot move if selected or carrying out the extracts of code included here. . .
  • 12. Computational Physics B: Coursework Report 12
  • 13. Computational Physics B: Coursework Report 13 A3. Creation of DNA monomer types This part of the code within the Main class declares the new kinds of monomer, used in determining the energy of the DNA protein. Within the ResidueType class, two new variables were declared to store the ‘G-C’ and ‘A-T’ interactions. Finally, within the GetSiteEnergy function of the SimulationSystem class, each site energy is calculated. . .