SlideShare a Scribd company logo
1 of 7
Homework # 7 Numerical Methods in Chemical Engineering
Problem 1. (100 points) Nanoparticle self-assembly Interactions
between nanoparticles can lead to self-assembled arrays that
resemble the structure of crystals. In this problem, you will use
Metropolis Monte Carlo simulations to describe the distribution
of a set of non-charged nanoparticles. We will approximate the
interaction between two particles using a Lenard-Jones
potential: �(���) = 4� [( � ��� ) 12 − ( � ��� ) 6 ]
���ℎ ���= |�� − ��| where ra and rb are the positions of
particle a and b respectively, and the values for σ and ε are
provided below. You may assume that the sample at equilibrium
follows a Boltzmann distribution with probability of finding the
assemble in a state q, �(�) ∝ exp(−����(�)/(���)), where
����(�) = ∑ ∑ �(���) � �=�+1 � �=1 and q is the state
vector containing the position of all the nanoparticles in the
system. For simplicity, we will consider the self-assembly of a
group of N spherical nanoparticles of radius R in two
dimensions, and the state vector has the following structure, q =
[x1 y1 x2 y2 …. xN yN] T .
i. (25 points) Write a function that computes the value of Utot
for a given state vector q.
ii. function z = my_fun(x)
iii. z = zeros(size(x,1),3); % allocate output
iv. z(:,1) = x(:,1).^2 - 2*x(:,1).*x(:,2) + 6*x(:,1) + ...
v. 4*x(:,2).^2 - 3*x(:,2);
vi. z(:,2) = x(:,1).*x(:,2) + cos(3*x(:,2)./(2+x(:,1)));
vii. z(:,3) = tanh(x(:,1) + x(:,2));
where P(Σ) is a given probability distribution (e.g., the
Boltzmann distribution P(Σ) = Z exp[-βE(Σ)]) andN Σ is the
number of configurations Σ (e.g., the number of configurations
generated with a particular arrangement of [x1 y1 x2 y2 …. xN
yN spins
viii. (40 points) Write a function that performs a Monte Carlo
routine with an N_MC Monte Carlo steps, a constant
temperature T, and an N number of nanoparticles in the initial
state q_0. For each MC step, you should attempt moves of one
nanoparticle at a time for all the particles. The function should
output a matrix containing the values of the state vector at each
MC step in different columns, and a vector containing Utot for
each MC step.
The Metropolis Monte Carlo algorithm can be described as
follows:
function mypi = approxpi(n)
% Input: n = number of points to generate
% Default is n = 1e6
% Larger values of n should perform better
if nargin < 1
n = 1e6;
end
% Generate uniformly distributed points in
% [0, 1] x [0, 1]
xy = rand(n, 2);
% Compute distance from (0.5, 0.5)
r = sqrt((xy(:,1)-0.5).^2+(xy(:,2)-0.5).^2);
% Count fraction of points within 1/2 unit of (0.5, 0.5)
frac = sum(r <= 0.5) / n;
% Since square has side 1, circle has radius (1/2)
% and should have area of pi*(1/2)^2
% frac is approximately pi/4 so pi is approximately 4*frac
mypi = 4*frac;
Step (1): Pick a configuration Σn
Step (2): Pick a trial configuration Σt (usually a configuration
similar to Σn) and compute the probability ratio R=p(Σt)/p(Σn) .
Pick a random number p with value between 0 and 1. Make
Σn+1=Σt if p≤R . Otherwise, make Σn+1=Σt.
Step (3): Go to (2) replacing Σn by Σn+1 .
Step (3) is repeated N times, where N is a sufficiently large
number. Note that, according to step (2), the probability of
accepting a trial configuration Σt by making Σn+1=Σt from a
configuration Σn is
ix. (35 points) Use your function to generate histograms
containing the distribution of nanoparticle distances, Rab, for a
set of 16 nanoparticles. Assume that the particles are initially
arranged in a square grid of 4x4 nanoparticles, with center-to-
center distance between the particles equal to 2R.
Generate graphs for T = 100 K, 500 K, 1000 K. Use a minimum
of 100,000 MC steps. Discuss your results. Physical parameters:
R = 5 nm, σ = 5 nm, ε/kb = 5000 K.
专业 matlab
紐約時間12/5 2pm
我要matlab的code
matlab文件
我功課是要交code不是word
我要的是長這樣的東西
[email protected]
12.2pm New York time
I need the code for matlab
Matlab files
My homework is to hand in code, not word
This is my old homework(Modestino_HW5(2))
Homework # 7
Numerical Methods in Chemical Engineering
Submission due: Monday, December 6th, 2019 at 12:25 pm
through NYU Classes
Problem 1. (100 points) Nanoparticle self-assembly
Interactions between nanoparticles can lead to self-assembled
arrays that resemble the structure of
crystals. In this problem, you will use Metropolis Monte Carlo
simulations to describe the distribution of
a set of non-charged nanoparticles. We will approximate the
interaction between two particles using a
Lenard-Jones potential:
�(���) = 4� [(
�
���
)
12
− (
�
���
)
6
] ���ℎ ���= |�� − ��|
where ra and rb are the positions of particle a and b
respectively, and the values for σ and ε are provided
below. You may assume that the sample at equilibrium follows
a Boltzmann distribution with probability
of finding the assemble in a state q, �(�) ∝
exp(−����(�)/(���)), where
����(�) = ∑ ∑ �(���)
�
�=�+1
�
�=1
and q is the state vector containing the position of all the
nanoparticles in the system. For simplicity, we
will consider the self-assembly of a group of N spherical
nanoparticles of radius R in two dimensions, and
the state vector has the following structure, q = [x1 y1 x2 y2 ….
xN yN]
T.
i. (25 points) Write a function that computes the value of Utot
for a given state vector q.
ii. (40 points) Write a function that performs a Monte Carlo
routine with an N_MC Monte Carlo
steps, a constant temperature T, and an N number of
nanoparticles in the initial state q_0. For
each MC step, you should attempt moves of one nanoparticle at
a time for all the particles. The
function should output a matrix containing the values of the
state vector at each MC step in
different columns, and a vector containing Utot for each MC
step.
iii. (35 points) Use your function to generate histograms
containing the distribution of
nanoparticle distances, Rab, for a set of 16 nanoparticles.
Assume that the particles are initially
arranged in a square grid of 4x4 nanoparticles, with center-to-
center distance between the
particles equal to 2R. Generate graphs for T = 100 K, 500 K,
1000 K. Use a minimum of 100,000
MC steps. Discuss your results.
Physical parameters: R = 5 nm, σ = 5 nm, ε/kb = 5000 K.

More Related Content

Similar to Nanoparticle Self-Assembly MC Sim

Metodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang LandauMetodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang Landauangely alcendra
 
Monte Carlo Simulation Methods
Monte Carlo Simulation MethodsMonte Carlo Simulation Methods
Monte Carlo Simulation Methodsioneec
 
machinelearning project
machinelearning projectmachinelearning project
machinelearning projectLianli Liu
 
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006Michael Soltys
 
Semi-Classical Transport Theory.ppt
Semi-Classical Transport Theory.pptSemi-Classical Transport Theory.ppt
Semi-Classical Transport Theory.pptVivekDixit100
 
MVPA with SpaceNet: sparse structured priors
MVPA with SpaceNet: sparse structured priorsMVPA with SpaceNet: sparse structured priors
MVPA with SpaceNet: sparse structured priorsElvis DOHMATOB
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyappasami
 
Unbiased MCMC with couplings
Unbiased MCMC with couplingsUnbiased MCMC with couplings
Unbiased MCMC with couplingsPierre Jacob
 
Replica exchange MCMC
Replica exchange MCMCReplica exchange MCMC
Replica exchange MCMC. .
 
Quantum Computing
Quantum ComputingQuantum Computing
Quantum Computingt0pgun
 
Linear regression [Theory and Application (In physics point of view) using py...
Linear regression [Theory and Application (In physics point of view) using py...Linear regression [Theory and Application (In physics point of view) using py...
Linear regression [Theory and Application (In physics point of view) using py...ANIRBANMAJUMDAR18
 
Dmitrii Tihonkih - The Iterative Closest Points Algorithm and Affine Transfo...
Dmitrii Tihonkih - The Iterative Closest Points Algorithm and  Affine Transfo...Dmitrii Tihonkih - The Iterative Closest Points Algorithm and  Affine Transfo...
Dmitrii Tihonkih - The Iterative Closest Points Algorithm and Affine Transfo...AIST
 

Similar to Nanoparticle Self-Assembly MC Sim (20)

Metodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang LandauMetodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang Landau
 
Monte Carlo Simulation Methods
Monte Carlo Simulation MethodsMonte Carlo Simulation Methods
Monte Carlo Simulation Methods
 
Klt
KltKlt
Klt
 
algorithm Unit 4
algorithm Unit 4 algorithm Unit 4
algorithm Unit 4
 
machinelearning project
machinelearning projectmachinelearning project
machinelearning project
 
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
 
Semi-Classical Transport Theory.ppt
Semi-Classical Transport Theory.pptSemi-Classical Transport Theory.ppt
Semi-Classical Transport Theory.ppt
 
MVPA with SpaceNet: sparse structured priors
MVPA with SpaceNet: sparse structured priorsMVPA with SpaceNet: sparse structured priors
MVPA with SpaceNet: sparse structured priors
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
 
Unit 4 jwfiles
Unit 4 jwfilesUnit 4 jwfiles
Unit 4 jwfiles
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Unbiased MCMC with couplings
Unbiased MCMC with couplingsUnbiased MCMC with couplings
Unbiased MCMC with couplings
 
Replica exchange MCMC
Replica exchange MCMCReplica exchange MCMC
Replica exchange MCMC
 
BNL_Research_Poster
BNL_Research_PosterBNL_Research_Poster
BNL_Research_Poster
 
Hastings 1970
Hastings 1970Hastings 1970
Hastings 1970
 
Quantum Computing
Quantum ComputingQuantum Computing
Quantum Computing
 
Linear regression [Theory and Application (In physics point of view) using py...
Linear regression [Theory and Application (In physics point of view) using py...Linear regression [Theory and Application (In physics point of view) using py...
Linear regression [Theory and Application (In physics point of view) using py...
 
NANO266 - Lecture 7 - QM Modeling of Periodic Structures
NANO266 - Lecture 7 - QM Modeling of Periodic StructuresNANO266 - Lecture 7 - QM Modeling of Periodic Structures
NANO266 - Lecture 7 - QM Modeling of Periodic Structures
 
Ch21 ssm
Ch21 ssmCh21 ssm
Ch21 ssm
 
Dmitrii Tihonkih - The Iterative Closest Points Algorithm and Affine Transfo...
Dmitrii Tihonkih - The Iterative Closest Points Algorithm and  Affine Transfo...Dmitrii Tihonkih - The Iterative Closest Points Algorithm and  Affine Transfo...
Dmitrii Tihonkih - The Iterative Closest Points Algorithm and Affine Transfo...
 

More from pooleavelina

httpswww.azed.govoelaselpsUse this to see the English Lang.docx
httpswww.azed.govoelaselpsUse this to see the English Lang.docxhttpswww.azed.govoelaselpsUse this to see the English Lang.docx
httpswww.azed.govoelaselpsUse this to see the English Lang.docxpooleavelina
 
httpscdnapisec.kaltura.comindex.phpextwidgetpreviewpartner_.docx
httpscdnapisec.kaltura.comindex.phpextwidgetpreviewpartner_.docxhttpscdnapisec.kaltura.comindex.phpextwidgetpreviewpartner_.docx
httpscdnapisec.kaltura.comindex.phpextwidgetpreviewpartner_.docxpooleavelina
 
httpsifes.orgsitesdefaultfilesbrijuni18countryreport_fi.docx
httpsifes.orgsitesdefaultfilesbrijuni18countryreport_fi.docxhttpsifes.orgsitesdefaultfilesbrijuni18countryreport_fi.docx
httpsifes.orgsitesdefaultfilesbrijuni18countryreport_fi.docxpooleavelina
 
httpfmx.sagepub.comField Methods DOI 10.117715258.docx
httpfmx.sagepub.comField Methods DOI 10.117715258.docxhttpfmx.sagepub.comField Methods DOI 10.117715258.docx
httpfmx.sagepub.comField Methods DOI 10.117715258.docxpooleavelina
 
httpsiexaminer.orgfake-news-personal-responsibility-must-trump.docx
httpsiexaminer.orgfake-news-personal-responsibility-must-trump.docxhttpsiexaminer.orgfake-news-personal-responsibility-must-trump.docx
httpsiexaminer.orgfake-news-personal-responsibility-must-trump.docxpooleavelina
 
http1500cms.comBECAUSE THIS FORM IS USED BY VARIOUS .docx
http1500cms.comBECAUSE THIS FORM IS USED BY VARIOUS .docxhttp1500cms.comBECAUSE THIS FORM IS USED BY VARIOUS .docx
http1500cms.comBECAUSE THIS FORM IS USED BY VARIOUS .docxpooleavelina
 
httpswww.medicalnewstoday.comarticles323444.phphttpsasco.docx
httpswww.medicalnewstoday.comarticles323444.phphttpsasco.docxhttpswww.medicalnewstoday.comarticles323444.phphttpsasco.docx
httpswww.medicalnewstoday.comarticles323444.phphttpsasco.docxpooleavelina
 
httpstheater.nytimes.com mem theater treview.htmlres=9902e6.docx
httpstheater.nytimes.com mem theater treview.htmlres=9902e6.docxhttpstheater.nytimes.com mem theater treview.htmlres=9902e6.docx
httpstheater.nytimes.com mem theater treview.htmlres=9902e6.docxpooleavelina
 
httpsfitsmallbusiness.comemployee-compensation-planThe pu.docx
httpsfitsmallbusiness.comemployee-compensation-planThe pu.docxhttpsfitsmallbusiness.comemployee-compensation-planThe pu.docx
httpsfitsmallbusiness.comemployee-compensation-planThe pu.docxpooleavelina
 
httpsdoi.org10.11770002764219842624American Behaviora.docx
httpsdoi.org10.11770002764219842624American Behaviora.docxhttpsdoi.org10.11770002764219842624American Behaviora.docx
httpsdoi.org10.11770002764219842624American Behaviora.docxpooleavelina
 
httpsdoi.org10.11770896920516649418Critical Sociology.docx
httpsdoi.org10.11770896920516649418Critical Sociology.docxhttpsdoi.org10.11770896920516649418Critical Sociology.docx
httpsdoi.org10.11770896920516649418Critical Sociology.docxpooleavelina
 
httpsdoi.org10.11770894318420903495Nursing Science Qu.docx
httpsdoi.org10.11770894318420903495Nursing Science Qu.docxhttpsdoi.org10.11770894318420903495Nursing Science Qu.docx
httpsdoi.org10.11770894318420903495Nursing Science Qu.docxpooleavelina
 
httpswww.youtube.comwatchtime_continue=8&v=rFV0aes0vYAN.docx
httpswww.youtube.comwatchtime_continue=8&v=rFV0aes0vYAN.docxhttpswww.youtube.comwatchtime_continue=8&v=rFV0aes0vYAN.docx
httpswww.youtube.comwatchtime_continue=8&v=rFV0aes0vYAN.docxpooleavelina
 
httphps.orgdocumentspregnancy_fact_sheet.pdfhttpswww.docx
httphps.orgdocumentspregnancy_fact_sheet.pdfhttpswww.docxhttphps.orgdocumentspregnancy_fact_sheet.pdfhttpswww.docx
httphps.orgdocumentspregnancy_fact_sheet.pdfhttpswww.docxpooleavelina
 
httpswww.worldbank.orgencountryvietnamoverview---------.docx
httpswww.worldbank.orgencountryvietnamoverview---------.docxhttpswww.worldbank.orgencountryvietnamoverview---------.docx
httpswww.worldbank.orgencountryvietnamoverview---------.docxpooleavelina
 
HTML WEB Page solutionAbout.htmlQuantum PhysicsHomeServicesAbou.docx
HTML WEB Page solutionAbout.htmlQuantum PhysicsHomeServicesAbou.docxHTML WEB Page solutionAbout.htmlQuantum PhysicsHomeServicesAbou.docx
HTML WEB Page solutionAbout.htmlQuantum PhysicsHomeServicesAbou.docxpooleavelina
 
httpswww.huffpost.comentryonline-dating-vs-offline_b_4037867.docx
httpswww.huffpost.comentryonline-dating-vs-offline_b_4037867.docxhttpswww.huffpost.comentryonline-dating-vs-offline_b_4037867.docx
httpswww.huffpost.comentryonline-dating-vs-offline_b_4037867.docxpooleavelina
 
httpswww.vitalsource.comproductscomparative-criminal-justice-.docx
httpswww.vitalsource.comproductscomparative-criminal-justice-.docxhttpswww.vitalsource.comproductscomparative-criminal-justice-.docx
httpswww.vitalsource.comproductscomparative-criminal-justice-.docxpooleavelina
 
httpswww.nationaleatingdisorders.orglearnby-eating-disordera.docx
httpswww.nationaleatingdisorders.orglearnby-eating-disordera.docxhttpswww.nationaleatingdisorders.orglearnby-eating-disordera.docx
httpswww.nationaleatingdisorders.orglearnby-eating-disordera.docxpooleavelina
 
httpswww.youtube.comwatchtime_continue=59&v=Bh_oEYX1zNM&featu.docx
httpswww.youtube.comwatchtime_continue=59&v=Bh_oEYX1zNM&featu.docxhttpswww.youtube.comwatchtime_continue=59&v=Bh_oEYX1zNM&featu.docx
httpswww.youtube.comwatchtime_continue=59&v=Bh_oEYX1zNM&featu.docxpooleavelina
 

More from pooleavelina (20)

httpswww.azed.govoelaselpsUse this to see the English Lang.docx
httpswww.azed.govoelaselpsUse this to see the English Lang.docxhttpswww.azed.govoelaselpsUse this to see the English Lang.docx
httpswww.azed.govoelaselpsUse this to see the English Lang.docx
 
httpscdnapisec.kaltura.comindex.phpextwidgetpreviewpartner_.docx
httpscdnapisec.kaltura.comindex.phpextwidgetpreviewpartner_.docxhttpscdnapisec.kaltura.comindex.phpextwidgetpreviewpartner_.docx
httpscdnapisec.kaltura.comindex.phpextwidgetpreviewpartner_.docx
 
httpsifes.orgsitesdefaultfilesbrijuni18countryreport_fi.docx
httpsifes.orgsitesdefaultfilesbrijuni18countryreport_fi.docxhttpsifes.orgsitesdefaultfilesbrijuni18countryreport_fi.docx
httpsifes.orgsitesdefaultfilesbrijuni18countryreport_fi.docx
 
httpfmx.sagepub.comField Methods DOI 10.117715258.docx
httpfmx.sagepub.comField Methods DOI 10.117715258.docxhttpfmx.sagepub.comField Methods DOI 10.117715258.docx
httpfmx.sagepub.comField Methods DOI 10.117715258.docx
 
httpsiexaminer.orgfake-news-personal-responsibility-must-trump.docx
httpsiexaminer.orgfake-news-personal-responsibility-must-trump.docxhttpsiexaminer.orgfake-news-personal-responsibility-must-trump.docx
httpsiexaminer.orgfake-news-personal-responsibility-must-trump.docx
 
http1500cms.comBECAUSE THIS FORM IS USED BY VARIOUS .docx
http1500cms.comBECAUSE THIS FORM IS USED BY VARIOUS .docxhttp1500cms.comBECAUSE THIS FORM IS USED BY VARIOUS .docx
http1500cms.comBECAUSE THIS FORM IS USED BY VARIOUS .docx
 
httpswww.medicalnewstoday.comarticles323444.phphttpsasco.docx
httpswww.medicalnewstoday.comarticles323444.phphttpsasco.docxhttpswww.medicalnewstoday.comarticles323444.phphttpsasco.docx
httpswww.medicalnewstoday.comarticles323444.phphttpsasco.docx
 
httpstheater.nytimes.com mem theater treview.htmlres=9902e6.docx
httpstheater.nytimes.com mem theater treview.htmlres=9902e6.docxhttpstheater.nytimes.com mem theater treview.htmlres=9902e6.docx
httpstheater.nytimes.com mem theater treview.htmlres=9902e6.docx
 
httpsfitsmallbusiness.comemployee-compensation-planThe pu.docx
httpsfitsmallbusiness.comemployee-compensation-planThe pu.docxhttpsfitsmallbusiness.comemployee-compensation-planThe pu.docx
httpsfitsmallbusiness.comemployee-compensation-planThe pu.docx
 
httpsdoi.org10.11770002764219842624American Behaviora.docx
httpsdoi.org10.11770002764219842624American Behaviora.docxhttpsdoi.org10.11770002764219842624American Behaviora.docx
httpsdoi.org10.11770002764219842624American Behaviora.docx
 
httpsdoi.org10.11770896920516649418Critical Sociology.docx
httpsdoi.org10.11770896920516649418Critical Sociology.docxhttpsdoi.org10.11770896920516649418Critical Sociology.docx
httpsdoi.org10.11770896920516649418Critical Sociology.docx
 
httpsdoi.org10.11770894318420903495Nursing Science Qu.docx
httpsdoi.org10.11770894318420903495Nursing Science Qu.docxhttpsdoi.org10.11770894318420903495Nursing Science Qu.docx
httpsdoi.org10.11770894318420903495Nursing Science Qu.docx
 
httpswww.youtube.comwatchtime_continue=8&v=rFV0aes0vYAN.docx
httpswww.youtube.comwatchtime_continue=8&v=rFV0aes0vYAN.docxhttpswww.youtube.comwatchtime_continue=8&v=rFV0aes0vYAN.docx
httpswww.youtube.comwatchtime_continue=8&v=rFV0aes0vYAN.docx
 
httphps.orgdocumentspregnancy_fact_sheet.pdfhttpswww.docx
httphps.orgdocumentspregnancy_fact_sheet.pdfhttpswww.docxhttphps.orgdocumentspregnancy_fact_sheet.pdfhttpswww.docx
httphps.orgdocumentspregnancy_fact_sheet.pdfhttpswww.docx
 
httpswww.worldbank.orgencountryvietnamoverview---------.docx
httpswww.worldbank.orgencountryvietnamoverview---------.docxhttpswww.worldbank.orgencountryvietnamoverview---------.docx
httpswww.worldbank.orgencountryvietnamoverview---------.docx
 
HTML WEB Page solutionAbout.htmlQuantum PhysicsHomeServicesAbou.docx
HTML WEB Page solutionAbout.htmlQuantum PhysicsHomeServicesAbou.docxHTML WEB Page solutionAbout.htmlQuantum PhysicsHomeServicesAbou.docx
HTML WEB Page solutionAbout.htmlQuantum PhysicsHomeServicesAbou.docx
 
httpswww.huffpost.comentryonline-dating-vs-offline_b_4037867.docx
httpswww.huffpost.comentryonline-dating-vs-offline_b_4037867.docxhttpswww.huffpost.comentryonline-dating-vs-offline_b_4037867.docx
httpswww.huffpost.comentryonline-dating-vs-offline_b_4037867.docx
 
httpswww.vitalsource.comproductscomparative-criminal-justice-.docx
httpswww.vitalsource.comproductscomparative-criminal-justice-.docxhttpswww.vitalsource.comproductscomparative-criminal-justice-.docx
httpswww.vitalsource.comproductscomparative-criminal-justice-.docx
 
httpswww.nationaleatingdisorders.orglearnby-eating-disordera.docx
httpswww.nationaleatingdisorders.orglearnby-eating-disordera.docxhttpswww.nationaleatingdisorders.orglearnby-eating-disordera.docx
httpswww.nationaleatingdisorders.orglearnby-eating-disordera.docx
 
httpswww.youtube.comwatchtime_continue=59&v=Bh_oEYX1zNM&featu.docx
httpswww.youtube.comwatchtime_continue=59&v=Bh_oEYX1zNM&featu.docxhttpswww.youtube.comwatchtime_continue=59&v=Bh_oEYX1zNM&featu.docx
httpswww.youtube.comwatchtime_continue=59&v=Bh_oEYX1zNM&featu.docx
 

Recently uploaded

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 

Recently uploaded (20)

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 

Nanoparticle Self-Assembly MC Sim

  • 1. Homework # 7 Numerical Methods in Chemical Engineering Problem 1. (100 points) Nanoparticle self-assembly Interactions between nanoparticles can lead to self-assembled arrays that resemble the structure of crystals. In this problem, you will use Metropolis Monte Carlo simulations to describe the distribution of a set of non-charged nanoparticles. We will approximate the interaction between two particles using a Lenard-Jones potential: �(���) = 4� [( � ��� ) 12 − ( � ��� ) 6 ] ���ℎ ���= |�� − ��| where ra and rb are the positions of particle a and b respectively, and the values for σ and ε are provided below. You may assume that the sample at equilibrium follows a Boltzmann distribution with probability of finding the assemble in a state q, �(�) ∝ exp(−����(�)/(���)), where ����(�) = ∑ ∑ �(���) � �=�+1 � �=1 and q is the state vector containing the position of all the nanoparticles in the system. For simplicity, we will consider the self-assembly of a group of N spherical nanoparticles of radius R in two dimensions, and the state vector has the following structure, q = [x1 y1 x2 y2 …. xN yN] T . i. (25 points) Write a function that computes the value of Utot for a given state vector q. ii. function z = my_fun(x) iii. z = zeros(size(x,1),3); % allocate output iv. z(:,1) = x(:,1).^2 - 2*x(:,1).*x(:,2) + 6*x(:,1) + ... v. 4*x(:,2).^2 - 3*x(:,2); vi. z(:,2) = x(:,1).*x(:,2) + cos(3*x(:,2)./(2+x(:,1))); vii. z(:,3) = tanh(x(:,1) + x(:,2)); where P(Σ) is a given probability distribution (e.g., the Boltzmann distribution P(Σ) = Z exp[-βE(Σ)]) andN Σ is the number of configurations Σ (e.g., the number of configurations generated with a particular arrangement of [x1 y1 x2 y2 …. xN yN spins viii. (40 points) Write a function that performs a Monte Carlo
  • 2. routine with an N_MC Monte Carlo steps, a constant temperature T, and an N number of nanoparticles in the initial state q_0. For each MC step, you should attempt moves of one nanoparticle at a time for all the particles. The function should output a matrix containing the values of the state vector at each MC step in different columns, and a vector containing Utot for each MC step. The Metropolis Monte Carlo algorithm can be described as follows: function mypi = approxpi(n) % Input: n = number of points to generate % Default is n = 1e6 % Larger values of n should perform better if nargin < 1 n = 1e6; end % Generate uniformly distributed points in % [0, 1] x [0, 1] xy = rand(n, 2); % Compute distance from (0.5, 0.5) r = sqrt((xy(:,1)-0.5).^2+(xy(:,2)-0.5).^2); % Count fraction of points within 1/2 unit of (0.5, 0.5) frac = sum(r <= 0.5) / n; % Since square has side 1, circle has radius (1/2) % and should have area of pi*(1/2)^2 % frac is approximately pi/4 so pi is approximately 4*frac mypi = 4*frac; Step (1): Pick a configuration Σn Step (2): Pick a trial configuration Σt (usually a configuration similar to Σn) and compute the probability ratio R=p(Σt)/p(Σn) . Pick a random number p with value between 0 and 1. Make Σn+1=Σt if p≤R . Otherwise, make Σn+1=Σt. Step (3): Go to (2) replacing Σn by Σn+1 . Step (3) is repeated N times, where N is a sufficiently large
  • 3. number. Note that, according to step (2), the probability of accepting a trial configuration Σt by making Σn+1=Σt from a configuration Σn is ix. (35 points) Use your function to generate histograms containing the distribution of nanoparticle distances, Rab, for a set of 16 nanoparticles. Assume that the particles are initially arranged in a square grid of 4x4 nanoparticles, with center-to- center distance between the particles equal to 2R. Generate graphs for T = 100 K, 500 K, 1000 K. Use a minimum of 100,000 MC steps. Discuss your results. Physical parameters: R = 5 nm, σ = 5 nm, ε/kb = 5000 K. 专业 matlab 紐約時間12/5 2pm 我要matlab的code matlab文件 我功課是要交code不是word 我要的是長這樣的東西 [email protected]
  • 4. 12.2pm New York time I need the code for matlab Matlab files My homework is to hand in code, not word This is my old homework(Modestino_HW5(2)) Homework # 7 Numerical Methods in Chemical Engineering Submission due: Monday, December 6th, 2019 at 12:25 pm through NYU Classes Problem 1. (100 points) Nanoparticle self-assembly Interactions between nanoparticles can lead to self-assembled arrays that resemble the structure of crystals. In this problem, you will use Metropolis Monte Carlo
  • 5. simulations to describe the distribution of a set of non-charged nanoparticles. We will approximate the interaction between two particles using a Lenard-Jones potential: �(���) = 4� [( � ��� ) 12 − ( � ��� ) 6 ] ���ℎ ���= |�� − ��| where ra and rb are the positions of particle a and b respectively, and the values for σ and ε are provided below. You may assume that the sample at equilibrium follows a Boltzmann distribution with probability of finding the assemble in a state q, �(�) ∝ exp(−����(�)/(���)), where ����(�) = ∑ ∑ �(���)
  • 6. � �=�+1 � �=1 and q is the state vector containing the position of all the nanoparticles in the system. For simplicity, we will consider the self-assembly of a group of N spherical nanoparticles of radius R in two dimensions, and the state vector has the following structure, q = [x1 y1 x2 y2 …. xN yN] T. i. (25 points) Write a function that computes the value of Utot for a given state vector q. ii. (40 points) Write a function that performs a Monte Carlo routine with an N_MC Monte Carlo steps, a constant temperature T, and an N number of nanoparticles in the initial state q_0. For each MC step, you should attempt moves of one nanoparticle at a time for all the particles. The function should output a matrix containing the values of the state vector at each MC step in
  • 7. different columns, and a vector containing Utot for each MC step. iii. (35 points) Use your function to generate histograms containing the distribution of nanoparticle distances, Rab, for a set of 16 nanoparticles. Assume that the particles are initially arranged in a square grid of 4x4 nanoparticles, with center-to- center distance between the particles equal to 2R. Generate graphs for T = 100 K, 500 K, 1000 K. Use a minimum of 100,000 MC steps. Discuss your results. Physical parameters: R = 5 nm, σ = 5 nm, ε/kb = 5000 K.