0% found this document useful (0 votes)
16 views

Assignment 2

Uploaded by

kaleanshu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Assignment 2

Uploaded by

kaleanshu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Anay Singh Sisodiya 21110022

Assignment 2 MSE 402: Computational Process Design

Q. No. 1: What are the key differences between Molecular dynamics and Monte Carlo
simulations in terms of methodology and outcomes? How does the Metropolis algorithm function
within the context of Monte Carlo simulations, and what role does it play in generating sample
configurations?

Molecular Dynamics Monte Carlo

MD Simulates the motion of particles over MC is primarily based on random sampling to


time by solving Newton's equations of motion sample the configuration space of a system.
and considering all forces acting on these Configurations are sampled according to
particles to compute their trajectories based probabilities instead of time evolution in MC.
on those grounds.

Time is a relevant parameter, and the There is no notion of time evolution;


computations give a trajectory of particle configurations are generated according to
positions and velocities as functions of time. their statistical weights. The simulation is
MD computes how systems evolve explicitly. generically viewed as a sequence of
configurations rather than a continuous
trajectory.

Configurations are sampled under the laws of Configurations are sampled under a given
physics governing particle interactions. The probability distribution, most commonly under
computations are based on continuous energy. The sampling of configurations is
dynamics. intrinsically stochastic and, hence, based on
the foundations of statistical mechanics.

It involves calculating forces and updating It does not depend on the direct application of
positions and velocities of particles at each forces but instead uses energy changes to
time step based on a force field. measure the willingness of new
configurations to occur.

Information Obtained:
MD: Gives qualitative dynamic information, including time-dependent properties such as
diffusion coefficients, correlation functions and trajectories of individual particles.

MC: Typically returns thermodynamic properties like free energy, mean energy, and entropy,
though most often focused on such states at equilibrium.

Computational Cost:
MD: More computationally intensive to gather statistically significant data, especially for long
simulations and large systems.
MC: Can be very efficient in sampling phase space, especially in complicated-energy
landscapes. It may converge more slowly for specific properties.

Metropolis Algorithm in Monte Carlo Simulations: Metropolis algorithms are crucial in Monte
Carlo simulations, especially in generating sample configurations according to energy
landscapes.

How Metropolis Algorithm Works:


● Initialization: Start with a given initial configuration of the system.

● Energy Calculation: Calculate the energy of the new configuration and compare it with
the power of the current configuration.

● Acceptance Criterion: The new configuration is accepted automatically if its energy is


less than the energy of the current configuration.
● The new configuration is accepted with a probability given by :
● If the new configuration has a higher energy, as follows: p =exp(−​Δ
​ E/kbT ​) where ΔE is
the change in energy, kb ​ is the Boltzmann constant, and T is the temperature.

● Iteration: This process is repeated hundreds of thousands to millions of times, updating


the configuration according to the acceptance criterion.

● Role in Sample Configuration Generation:


○ Equilibrium Sampling: The Metropolis algorithm ensures that sampled configurations
satisfy the Boltzmann distribution, which is essential to obtain correct thermodynamic
properties.
○ The exploration of phase space: acceptance of a worse state with nonzero probability
and acceptance of a better state ensures that the algorithm thoroughly explores the
phase space without getting trapped into local minima.
○ Convergence: after rather many configurations are sampled, the distribution of
configurations approaches the accurate equilibrium distribution of the system.

Q. No. 2: Two different types of Polymer beads or chains are considered. The task involves
studying the miscibility of these two different polymer beads using Molecula dynamics with
Swap Monte carlo (SMC) algorithm. A fix called “mol/swap” in LAMMPS is used to perform the
Monte carlo swaps of one polymer bead with another. The system is modeled using
Lennard-Jones potential by varying the values of “epsilon” for cross interaction (Interaction
between type 1 and type 2).

a) Read about the “mol/swap” command in LAMMPS documentation and write down its
application in molecular simulations.
The mol/swap command in LAMMPS can allow the exchange of particles between different
types of molecules within a simulation. The command is most relevant in Monte Carlo
simulations or even hybrid methods, combining elements of molecular dynamics and Monte
Carlo techniques.

Example: the mol/swap Command for Molecular Simulations.

Exchanging Particles: The mol/swap command will allow us to swap particles between
different kinds of molecules, and this is quite useful in simulations of mixtures or systems with
compositions varied by design.

Phase Behavior Studies: We can use it extensively in phase behaviour studies where
liquid-liquid phase separation, self-assembly, or processes occurring during crystallization are
interesting. This allows the particles to swap between different phases or components, thereby
allowing exploration of the thermodynamic stability of various stages.

Sampling Improvements: This command may enhance our simulations' sampling efficiency by
better traversing the configuration space and overcoming some of the energy barriers by which
systems may become trapped in local minima.

Grand Canonical Ensemble: The mol/swap command can be used in simulations that
reproduce the Grand Canonical ensemble, meaning the number of particles can fluctuate. It
simulates the change of particles entering and leaving the system.
Hybrid Simulation Techniques:

The mol/swap command application allows the introduction of Monte Carlo-like moves within a
molecular dynamics framework, thus allowing more flexible approaches to sampling
configurations and exploring different thermodynamic states in hybrid simulations using both
molecular dynamics and Monte Carlo methods.

b) Run three different simulations with “epsilon = 0.1, 1.0 and 1.1” and write down
your observation on the miscibility of two systems. Attach the visual
representation of the last frame for all three different simulations. Plot the
variation of the number of particles of Type1 and Type2 in all three simulations
wrt time.

For
𝜖 = 0.1, the interaction energy between type 1-1 and type 2-2 molecules is set to 1. This means
they don't mix well, or in other words, they miscibly not so much. The equilibrium energy will be
higher, and visual inspection suggests that they have low miscibility. Also, since the number of
molecules is the same and ∆E is positive, the probability of molecular swaps is low.
For 𝜖 = 0.1

𝜖 = 1.0, the interaction energies between 1-1, 2-2, and 1-2 are equal. This results in medium
miscibility, as seen in the images. Again, the number of molecules is the same, and with ΔE
about 0, the molecular exchange probability is about 0.5.
𝜖 = 1.0

For 𝜖 = 1.1, After increasing to a specific range, the number of type 1 particles becomes stable
with time, whereas the number of type 2 particles substantially decreases. This trend reflects the
kind of behaviour of the type 1 particle: they can capture or take over the system such that they
dominate the system and gradually replace the type 2 particles. In the simulation process, we
may also realize that molecular swap probability becomes favourable, where we may increase
the number of interactions and exchanges between the types.
For 𝜖 = 1.1

Q. No. 3: The task involves studying the absorption of water molecules on amorphous silica
using the grand canonical monte carlo algorithm (gcmc). This is invoked in LAMMPS by using
the fix “gcmc” command, which performs the grand canonical monte carlo simulations by
exchanging the number of atoms or molecules with an ideal system/reservoir at a fixed
temperature and chemical potential. The problem is divided into two parts. The first part is used
to insert/delete water molecules using gcmc in a simple cubic box until it reaches a density of 1
gm/cm3 and no more addition or deletion of water molecules is permitted. Second part is related
to the adsorption of water in the siliia crack.
a) Plot the variation of density, number of hydrogens and number of oxygens wrt time. Attach
the snapshot of the initial and final frame.

(initial) (final)
b) Run the script that generates a crack in the amorphous silica. Attach the initial and final frame
visualization. Following this, run the final script that executes water addition/deletion in the crack
formed. Attach the final frame visualization. Plot and analyze the variation of energy and the
number of water molecules absorbed in the crack wrt time.
Crack formation

(initial) (final)

(initial) (final)

We can see that energy needs to be in at least 2000 steps. Due to the Metropolis algorithm, it
will accept all the steps to lower the power. We see that the number of H2O molecules in the
crack is rising from about 15 up to 20 molecules by visual inspection.
Q. No. 4: The Ising model is a mathematical representation of ferromagnetism that
uses a lattice of discrete variables (spins), which can be in one of two states (+1 or
-1/up or down). Each spin interacts with its neighbors, and the model captures how
these interactions affect the spin alignment and phase transitions, particularly as the
temperature changes.

a) Plot the variation of energy and magnetization as a function of temperature.


Identify the critical temperature (Tc) point and discuss the influence of increasing
temperature on the alignment of spins. Attach visualization of three different
phases of Ising model: paramagnetic (T>>Tc), critical(T=Tc), and ferromagnetic
(T < <Tc).

T >> Tc T = Tc T<<Tc
fort.13 fort.26 fort.29

In the Ising model, as temperature increases, the spin alignment weakens.

Low Temperature: Spins align strongly, resulting in large regions of uniform +1 or -1 spins
(white or black pixels).
Increasing Temperature: Thermal energy disrupts alignment, leading to more random flipping
of spins.
Critical Temperature: At a certain point, spins become disordered, transitioning to a mixed
state.
High Temperature: Spins are nearly equally likely to be +1 or -1, resulting in a random mix of
black and white pixels, with an increase in black pixels indicating more -1 spins.
The magnetization reaches a peak at 2.5, then stabilizes around 0.025 after 3.

(I couldn't run this simulation on my laptop, so I took help from Adit Rambhia, who
provided the simulation files. I then proceeded with the analysis.)

Q. No. 5: Interaction of water with graphene is studied using NVT Monte Carlo method
using the Cassandra package. A number of water molecules are placed randomly
between the graphene sheets.

a) Conduct Monte Carlo simulations with Cassandra and plot variation of energy
with Monte Carlo steps, analyzing system behavior.

Following the Metropolis Monte Carlo scheme, at step 𝑖

If ΔE<0, we always accept the step, as it represents a decrease in energy.


If ΔE>0, we choose to accept the step with a probability given by: p(Ei) = exp(−△E/kT), Here,
k is the Boltzmann constant, and T is the temperature of the system. As a result of this process,
the system gradually approaches equilibrium, reaching a minimum energy state after a sufficient
number of Monte Carlo steps.

b) Attach visual representations of water distribution between graphene layers and


analyze the simulation results of graphene-water interactions.

You might also like