SlideShare a Scribd company logo
1 of 13
Monte Carlo Methods:
- Markov Chain
Random movements, one follow another
- Importance sampling
To sample many points in the region where the Boltzmann
factor is large and few elsewhere
- Ergodicity (ensemble average)
Such an average over all possible quantum states of a system
- Detailed Balance
?
?
Metropolis Method:
]/)(exp[yprobabilithaccept wit:
accept:
TKEEEE
EE
Bonon
on
−−>
<
In terms of words:
- Canonical ensemble: N,V,T constant
- Metropolis method: To generate a new configuration with probabilities
Monte Carlo simulation in the canonical ensemble
0. Generate the initial configuration (random or c(2×2))
Beginning of the MC cycle
1. Calculate Eold
2. Randomly select a particle
3. Random displacement (or rotation)
4. Calculate Enew
5. Accept the move with probability (Metropolis method)
En<Eo accept (the move)
En>Eo accept with probability exp[-(En-Eo)/kT]
(Periodic boundary conditions)
End of MC cycle
In terms of diagram:
Monte Carlo simulation in the canonical ensemble
Monte Carlo simulation in the canonical ensemble
Choice of the parameters
Initial configuration
do
en1=EN
typ=1
call rand_pos(mat,typ,xrp,yrp)
x1=xrp, y1=yrp
typ=0
call rand_pos(mat,typ,xrp,yrp)
x2=xrp, y2=yrp
mat(x1,y1)=0
mat(x2,y2)=1
mat(x1,y1)=1
mat(x2,y2)=0
call tot_EN(mat,EN,ei0,ei1)
en2=EN
metropolis conditions
acceptance: save new values+ add MC step
Rejection: add MC step
If (count.eq.mcs+1) then
exit
end if
end do
Monte Carlo simulation in the canonical ensemble
Choice of the parameters
Initial configuration
do
en1=EN
typ=1
call rand_pos(mat,typ,xrp,yrp)
x1=xrp, y1=yrp
typ=0
call rand_pos(mat,typ,xrp,yrp)
x2=xrp, y2=yrp
mat(x1,y1)=0
mat(x2,y2)=1
mat(x1,y1)=1
mat(x2,y2)=0
call tot_EN(mat,EN,ei0,ei1)
en2=EN
metropolis conditions
acceptance: save new values+ add MC step
Rejection: add MC step
If (count.eq.mcs+1) then
exit
end if
end do
real, parameter:: k=8,617339E-5
real *8:: enT,enT2
print *,”temperature:”
read(*,*) T
print *,”MC steps:”
read(*,*) mcs
print *,”starting configuration, R or C:”
read(*,*) st
start=0
select case (st)
case ( “c”, “C”)
start=1
end select
Monte Carlo simulation in the canonical ensemble
Choice of the parameters
Initial configuration
do
en1=EN
typ=1
call rand_pos(mat,typ,xrp,yrp)
x1=xrp, y1=yrp
typ=0
call rand_pos(mat,typ,xrp,yrp)
x2=xrp, y2=yrp
mat(x1,y1)=0
mat(x2,y2)=1
mat(x1,y1)=1
mat(x2,y2)=0
call tot_EN(mat,EN,ei0,ei1)
en2=EN
metropolis conditions
acceptance: save new values+ add MC step
Rejection: add MC step
If (count.eq.mcs+1) then
exit
end if
end do
if (start.eq.1) then
do v=1,10
if (mod(v,2).eq.0) then
mat (u*2,v)=0
else
mat (u*2-1,v)=0
end if, end if, end do
else
do
xr= int (rand()*10)+1
yr= int (rand()*10)+1
if (mat(xr,yr).eq.1) then
mat(xr,yr)= 0
do u=1,5
nb=nb+1
end if
tt= int (10*10*(1-cov))
if (tt.eq.nb) then
exit
end if, end do, end if
%% Start c(2×2) %%
%% Start random %%
Monte Carlo simulation in the canonical ensemble
Choice of the parameters
Initial configuration
do
en1=EN
typ=1
call rand_pos(mat,typ,xrp,yrp)
x1=xrp, y1=yrp
typ=0
call rand_pos(mat,typ,xrp,yrp)
x2=xrp, y2=yrp
mat(x1,y1)=0
mat(x2,y2)=1
mat(x1,y1)=1
mat(x2,y2)=0
call tot_EN(mat,EN,ei0,ei1)
en2=EN
metropolis conditions
acceptance: save new values+ add MC step
Rejection: add MC step
If (count.eq.mcs+1) then
exit
end if
end do
if (en2.lt.en1) then
mat(x2,y2)=1
enT=enT+en2
enT2=enT2+en2*en2
count=count+1
else
if (exp(-(en2-en1)/(k*T)).gt.rand()) then
mat(x2,y2)=1
mat(x1,y1)=0
enT=enT+en2
enT2=enT2+en2*en2
count=count+1
mat(x1,y1)=0
else
end if, end if
enT=enT+en1
enT2=enT2+en1*en1
EN=en1
count=count+1
EN=en2
EN=en2
%% Acceptance %%
%% probability %%
%% Rejection %%
Monte Carlo simulation in the canonical ensemble
Choice of the parameters
Initial configuration
do
en1=EN
typ=1
call rand_pos(mat,typ,xrp,yrp)
x1=xrp, y1=yrp
typ=0
call rand_pos(mat,typ,xrp,yrp)
x2=xrp, y2=yrp
mat(x1,y1)=0
mat(x2,y2)=1
mat(x1,y1)=1
mat(x2,y2)=0
call tot_EN(mat,EN,ei0,ei1)
en2=EN
metropolis conditions
acceptance: save new values+ add MC step
Rejection: add MC step
If (count.eq.mcs+1) then
exit
end if
end do
Subroutine Number of nearest neighbours
NNE=0
id=xn+1
if (id.gt.10) then
end if
ig=xn-1
if (ig.lt.1) then
ig=ig+10
end if
jh=yn-1
if (jh.gt.10) then
jh=jh-10
end if
jb=yn+1
if (jb.lt.1) then
jb=jb+10
end if
NNE=id + ig + jb + jh
%% periodic boundary
conditions %%
id=id-10
Monte Carlo simulation in the canonical ensemble
Choice of the parameters
Initial configuration
do
en1=EN
typ=1
call rand_pos(mat,typ,xrp,yrp)
x1=xrp, y1=yrp
typ=0
call rand_pos(mat,typ,xrp,yrp)
x2=xrp, y2=yrp
mat(x1,y1)=0
mat(x2,y2)=1
mat(x1,y1)=1
mat(x2,y2)=0
call tot_EN(mat,EN,ei0,ei1)
en2=EN
metropolis conditions
acceptance: save new values+ add MC step
Rejection: add MC step
If (count.eq.mcs+1) then
exit
end if
end do
Subroutine Total energy of the system
EN=0
do ii=1,10
do jj=1,10
if mat(ii,jj).eq.1) then
%% periodic boundary
conditions %%
xn=ii
yn=jj
call near_numb(mat,xn,yn,NNE)
EN=NNE*ei1+ei0
Monte Carlo simulation in the canonical ensemble
Choice of the parameters
Initial configuration
do
en1=EN
typ=1
call rand_pos(mat,typ,xrp,yrp)
x1=xrp, y1=yrp
typ=0
call rand_pos(mat,typ,xrp,yrp)
x2=xrp, y2=yrp
mat(x1,y1)=0
mat(x2,y2)=1
mat(x1,y1)=1
mat(x2,y2)=0
call tot_EN(mat,EN,ei0,ei1)
en2=EN
metropolis conditions
acceptance: save new values+ add MC step
Rejection: add MC step
If (count.eq.mcs+1) then
exit
end if
end do
Subroutine Random selection
do
xe= int(rand()*10)+1
ye= int(rand()*10)+1
if (mat(xe,ye).eq.typ) then
xrp=xe
yrp=ye
exit
end if, end do
Monte Carlo simulation in the canonical ensemble
Choice of the parameters
Initial configuration
do
en1=EN
typ=1
call rand_pos(mat,typ,xrp,yrp)
x1=xrp, y1=yrp
typ=0
call rand_pos(mat,typ,xrp,yrp)
x2=xrp, y2=yrp
mat(x1,y1)=0
mat(x2,y2)=1
mat(x1,y1)=1
mat(x2,y2)=0
call tot_EN(mat,EN,ei0,ei1)
en2=EN
metropolis conditions
acceptance: save new values+ add MC step
Rejection: add MC step
If (count.eq.mcs+1) then
exit
end if
end do
Subroutine Order parameter
matf=mat*2-1
do r = 1,10
do q = 1,5
if (mod(r,2).eq.0) then
ma=ma+matf(2*q-1,r)
mb=mb+matf(2*q,r)
else
ma=ma+matf(2*q,r)
mb=mb+matf(2*q-1,r)
end if, end do, end do
Psi=sqrt((ma-mb)*(ma-mb)/100
Subroutine Heat capacity parameter
cv = ((enT2/mcs)-(enT*enT) / (mcs*mcs))) / (k*T*T)
Order-disorder transition Cv parameter
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
500 700 900 1100 1300 1500 1700 1900 2100 2300 2500
T(K)
Cv/N0(meV/K)
Tc=1350K
Simulation: Simple cubic surface (100) plan
- Θ=0.5ML
- Cell :10*10
- Start: random configuration
- Number of MC steps: 10 million
c(2×2)
Critical
phase
Full
disorder
state
- Nearest neighbours interaction energy:
Eint= +0.1eV
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
500 700 900 1100 1300 1500 1700 1900 2100 2300 2500
T(K)
Order-disorder transition:Ψ parameter
Simulation: Simple cubic surface (100) plan
- Θ=0.5ML
- Cell :10*10
- Start: random configuration
- Number of MC steps: 10 million
Tc=1350K
C(2×2)
Critical
phase
Full
disorder
state
- Nearest neighbours interaction energy:
Eint= +0.1eV
Ψ=F(T(K))

More Related Content

What's hot

Monte Carlo Simulation Of Heston Model In Matlab(1)
Monte Carlo Simulation Of Heston Model In Matlab(1)Monte Carlo Simulation Of Heston Model In Matlab(1)
Monte Carlo Simulation Of Heston Model In Matlab(1)Amir Kheirollah
 
Monte carlo simulation
Monte carlo simulationMonte carlo simulation
Monte carlo simulationRajesh Piryani
 
Monte carlo simulation in food application
Monte carlo simulation in food applicationMonte carlo simulation in food application
Monte carlo simulation in food applicationPriya darshini
 
Probability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdfProbability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdfVedant Srivastava
 
Monte carlo simulation
Monte carlo simulationMonte carlo simulation
Monte carlo simulationk1kumar
 
Monte carlo integration, importance sampling, basic idea of markov chain mont...
Monte carlo integration, importance sampling, basic idea of markov chain mont...Monte carlo integration, importance sampling, basic idea of markov chain mont...
Monte carlo integration, importance sampling, basic idea of markov chain mont...BIZIMANA Appolinaire
 
High Dimensional Quasi Monte Carlo Method in Finance
High Dimensional Quasi Monte Carlo Method in FinanceHigh Dimensional Quasi Monte Carlo Method in Finance
High Dimensional Quasi Monte Carlo Method in FinanceMarco Bianchetti
 
Monte Carlo Simulation - Paul wilmott
Monte Carlo Simulation - Paul wilmottMonte Carlo Simulation - Paul wilmott
Monte Carlo Simulation - Paul wilmottAguinaldo Flor
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo SimulationDeepti Singh
 
Unit2 montecarlosimulation
Unit2 montecarlosimulationUnit2 montecarlosimulation
Unit2 montecarlosimulationDevaKumari Vijay
 
23. induction consecutiveints cas_touchpad
23. induction consecutiveints cas_touchpad23. induction consecutiveints cas_touchpad
23. induction consecutiveints cas_touchpadMedia4math
 
Operational Research
Operational ResearchOperational Research
Operational ResearchRoy Thomas
 
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)Ivan Corneillet
 
MATLAB review questions 2014 15
MATLAB review questions 2014 15MATLAB review questions 2014 15
MATLAB review questions 2014 15chingtony mbuma
 
Monte carlo-simulation
Monte carlo-simulationMonte carlo-simulation
Monte carlo-simulationjaimarbustos
 
Stat2010 Sample Final
Stat2010 Sample FinalStat2010 Sample Final
Stat2010 Sample Finalknksmart
 
A lab report on modeling and simulation with python code
A lab report on modeling and simulation with python codeA lab report on modeling and simulation with python code
A lab report on modeling and simulation with python codeAlamgir Hossain
 

What's hot (20)

Monte Carlo Simulation Of Heston Model In Matlab(1)
Monte Carlo Simulation Of Heston Model In Matlab(1)Monte Carlo Simulation Of Heston Model In Matlab(1)
Monte Carlo Simulation Of Heston Model In Matlab(1)
 
Monte carlo simulation
Monte carlo simulationMonte carlo simulation
Monte carlo simulation
 
Monte carlo simulation in food application
Monte carlo simulation in food applicationMonte carlo simulation in food application
Monte carlo simulation in food application
 
Probability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdfProbability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdf
 
Monte carlo simulation
Monte carlo simulationMonte carlo simulation
Monte carlo simulation
 
Monte carlo simulation
Monte carlo simulationMonte carlo simulation
Monte carlo simulation
 
Monte carlo integration, importance sampling, basic idea of markov chain mont...
Monte carlo integration, importance sampling, basic idea of markov chain mont...Monte carlo integration, importance sampling, basic idea of markov chain mont...
Monte carlo integration, importance sampling, basic idea of markov chain mont...
 
High Dimensional Quasi Monte Carlo Method in Finance
High Dimensional Quasi Monte Carlo Method in FinanceHigh Dimensional Quasi Monte Carlo Method in Finance
High Dimensional Quasi Monte Carlo Method in Finance
 
Or ppt,new
Or ppt,newOr ppt,new
Or ppt,new
 
Monte Carlo Simulation - Paul wilmott
Monte Carlo Simulation - Paul wilmottMonte Carlo Simulation - Paul wilmott
Monte Carlo Simulation - Paul wilmott
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo Simulation
 
Unit2 montecarlosimulation
Unit2 montecarlosimulationUnit2 montecarlosimulation
Unit2 montecarlosimulation
 
23. induction consecutiveints cas_touchpad
23. induction consecutiveints cas_touchpad23. induction consecutiveints cas_touchpad
23. induction consecutiveints cas_touchpad
 
Operational Research
Operational ResearchOperational Research
Operational Research
 
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
 
MATLAB review questions 2014 15
MATLAB review questions 2014 15MATLAB review questions 2014 15
MATLAB review questions 2014 15
 
Monte carlo-simulation
Monte carlo-simulationMonte carlo-simulation
Monte carlo-simulation
 
Stat2010 Sample Final
Stat2010 Sample FinalStat2010 Sample Final
Stat2010 Sample Final
 
A lab report on modeling and simulation with python code
A lab report on modeling and simulation with python codeA lab report on modeling and simulation with python code
A lab report on modeling and simulation with python code
 
S chart
S chart S chart
S chart
 

Viewers also liked

An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...NTNU
 
Energy Minimization Using Gromacs
Energy Minimization Using GromacsEnergy Minimization Using Gromacs
Energy Minimization Using GromacsRajendra K Labala
 
Monte Carlo Methods
Monte Carlo MethodsMonte Carlo Methods
Monte Carlo MethodsJames Bell
 
Seminar energy minimization mettthod
Seminar energy minimization mettthodSeminar energy minimization mettthod
Seminar energy minimization mettthodPavan Badgujar
 
4.Molecular mechanics + quantum mechanics
4.Molecular mechanics + quantum mechanics4.Molecular mechanics + quantum mechanics
4.Molecular mechanics + quantum mechanicsAbhijeet Kadam
 
energy minimization
energy minimizationenergy minimization
energy minimizationpradeep kore
 
History of Mathematics
History of MathematicsHistory of Mathematics
History of Mathematicstmp44
 
Kingfisher airlines
Kingfisher airlinesKingfisher airlines
Kingfisher airlinessaketsrv2
 
Particle Filters and Applications in Computer Vision
Particle Filters and Applications in Computer VisionParticle Filters and Applications in Computer Vision
Particle Filters and Applications in Computer Visionzukun
 
Monte carlo presentation for analysis of business growth
Monte carlo presentation for analysis of business growthMonte carlo presentation for analysis of business growth
Monte carlo presentation for analysis of business growthAsif Anik
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programminggourab27
 
Mba i qt unit-1.2_transportation, assignment and transshipment problems
Mba i qt unit-1.2_transportation, assignment and transshipment problemsMba i qt unit-1.2_transportation, assignment and transshipment problems
Mba i qt unit-1.2_transportation, assignment and transshipment problemsRai University
 
molecular mechanics and quantum mechnics
molecular mechanics and quantum mechnicsmolecular mechanics and quantum mechnics
molecular mechanics and quantum mechnicsRAKESH JAGTAP
 

Viewers also liked (20)

An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
 
Molecular mechanics
Molecular mechanicsMolecular mechanics
Molecular mechanics
 
Energy Minimization Using Gromacs
Energy Minimization Using GromacsEnergy Minimization Using Gromacs
Energy Minimization Using Gromacs
 
Monte Carlo Methods
Monte Carlo MethodsMonte Carlo Methods
Monte Carlo Methods
 
Seminar energy minimization mettthod
Seminar energy minimization mettthodSeminar energy minimization mettthod
Seminar energy minimization mettthod
 
MD Simulation
MD SimulationMD Simulation
MD Simulation
 
Particle Filter
Particle FilterParticle Filter
Particle Filter
 
4.Molecular mechanics + quantum mechanics
4.Molecular mechanics + quantum mechanics4.Molecular mechanics + quantum mechanics
4.Molecular mechanics + quantum mechanics
 
Ms(lpgraphicalsoln.)[1]
Ms(lpgraphicalsoln.)[1]Ms(lpgraphicalsoln.)[1]
Ms(lpgraphicalsoln.)[1]
 
energy minimization
energy minimizationenergy minimization
energy minimization
 
History of Mathematics
History of MathematicsHistory of Mathematics
History of Mathematics
 
Monte carlo simulation
Monte carlo simulationMonte carlo simulation
Monte carlo simulation
 
Kingfisher airlines
Kingfisher airlinesKingfisher airlines
Kingfisher airlines
 
Particle Filters and Applications in Computer Vision
Particle Filters and Applications in Computer VisionParticle Filters and Applications in Computer Vision
Particle Filters and Applications in Computer Vision
 
Monte carlo presentation for analysis of business growth
Monte carlo presentation for analysis of business growthMonte carlo presentation for analysis of business growth
Monte carlo presentation for analysis of business growth
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programming
 
Credit, Cash, and Collections Management
Credit, Cash, and Collections ManagementCredit, Cash, and Collections Management
Credit, Cash, and Collections Management
 
Mba i qt unit-1.2_transportation, assignment and transshipment problems
Mba i qt unit-1.2_transportation, assignment and transshipment problemsMba i qt unit-1.2_transportation, assignment and transshipment problems
Mba i qt unit-1.2_transportation, assignment and transshipment problems
 
molecular mechanics and quantum mechnics
molecular mechanics and quantum mechnicsmolecular mechanics and quantum mechnics
molecular mechanics and quantum mechnics
 
P time-cost
P time-costP time-cost
P time-cost
 

Similar to Monte Carlo Simulation Methods

L5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shapeL5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shapeSam Alalimi
 
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...Shizuoka Inst. Science and Tech.
 
Fourier series example
Fourier series exampleFourier series example
Fourier series exampleAbi finni
 
Metodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang LandauMetodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang Landauangely alcendra
 
Journey to structure from motion
Journey to structure from motionJourney to structure from motion
Journey to structure from motionJa-Keoung Koo
 
Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...
  Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...  Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...
Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...Belinda Marchand
 
2012 mdsp pr06  hmm
2012 mdsp pr06  hmm2012 mdsp pr06  hmm
2012 mdsp pr06  hmmnozomuhamada
 
Markov chain Monte Carlo methods and some attempts at parallelizing them
Markov chain Monte Carlo methods and some attempts at parallelizing themMarkov chain Monte Carlo methods and some attempts at parallelizing them
Markov chain Monte Carlo methods and some attempts at parallelizing themPierre Jacob
 
Random Matrix Theory and Machine Learning - Part 3
Random Matrix Theory and Machine Learning - Part 3Random Matrix Theory and Machine Learning - Part 3
Random Matrix Theory and Machine Learning - Part 3Fabian Pedregosa
 
Maneuvering target track prediction model
Maneuvering target track prediction modelManeuvering target track prediction model
Maneuvering target track prediction modelIJCI JOURNAL
 
Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical MethodsChristian Robert
 
Ray : modeling dynamic systems
Ray : modeling dynamic systemsRay : modeling dynamic systems
Ray : modeling dynamic systemsHouw Liong The
 

Similar to Monte Carlo Simulation Methods (20)

L5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shapeL5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shape
 
assignment_2
assignment_2assignment_2
assignment_2
 
numerical.ppt
numerical.pptnumerical.ppt
numerical.ppt
 
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
Talk at SciCADE2013 about "Accelerated Multiple Precision ODE solver base on ...
 
05_AJMS_332_21.pdf
05_AJMS_332_21.pdf05_AJMS_332_21.pdf
05_AJMS_332_21.pdf
 
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
 
Fourier series example
Fourier series exampleFourier series example
Fourier series example
 
Metodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang LandauMetodo Monte Carlo -Wang Landau
Metodo Monte Carlo -Wang Landau
 
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
 
Numerical methods generating polynomial
Numerical methods generating polynomialNumerical methods generating polynomial
Numerical methods generating polynomial
 
Journey to structure from motion
Journey to structure from motionJourney to structure from motion
Journey to structure from motion
 
Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...
  Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...  Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...
Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...
 
2012 mdsp pr06  hmm
2012 mdsp pr06  hmm2012 mdsp pr06  hmm
2012 mdsp pr06  hmm
 
Markov chain Monte Carlo methods and some attempts at parallelizing them
Markov chain Monte Carlo methods and some attempts at parallelizing themMarkov chain Monte Carlo methods and some attempts at parallelizing them
Markov chain Monte Carlo methods and some attempts at parallelizing them
 
Random Matrix Theory and Machine Learning - Part 3
Random Matrix Theory and Machine Learning - Part 3Random Matrix Theory and Machine Learning - Part 3
Random Matrix Theory and Machine Learning - Part 3
 
Maneuvering target track prediction model
Maneuvering target track prediction modelManeuvering target track prediction model
Maneuvering target track prediction model
 
Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical Methods
 
Ray : modeling dynamic systems
Ray : modeling dynamic systemsRay : modeling dynamic systems
Ray : modeling dynamic systems
 
002 ray modeling dynamic systems
002 ray modeling dynamic systems002 ray modeling dynamic systems
002 ray modeling dynamic systems
 
002 ray modeling dynamic systems
002 ray modeling dynamic systems002 ray modeling dynamic systems
002 ray modeling dynamic systems
 

More from ioneec

IONEEC - How To Stimulate Your Art?
IONEEC - How To Stimulate Your Art?IONEEC - How To Stimulate Your Art?
IONEEC - How To Stimulate Your Art?ioneec
 
Iron Doped Titania Nanostructures Synthesis, DFT modelling and Photocatalysis
Iron Doped Titania Nanostructures Synthesis, DFT modelling and PhotocatalysisIron Doped Titania Nanostructures Synthesis, DFT modelling and Photocatalysis
Iron Doped Titania Nanostructures Synthesis, DFT modelling and Photocatalysisioneec
 
Silicon Falls Into Line
Silicon Falls Into LineSilicon Falls Into Line
Silicon Falls Into Lineioneec
 
Dipole-directed Assembly of Lines of Dichloropentane on Silicon Substrates by...
Dipole-directed Assembly of Lines of Dichloropentane on Silicon Substrates by...Dipole-directed Assembly of Lines of Dichloropentane on Silicon Substrates by...
Dipole-directed Assembly of Lines of Dichloropentane on Silicon Substrates by...ioneec
 
Maskless Nanopattering and Formation of Nanocorrals and Switches for Haloalka...
Maskless Nanopattering and Formation of Nanocorrals and Switches for Haloalka...Maskless Nanopattering and Formation of Nanocorrals and Switches for Haloalka...
Maskless Nanopattering and Formation of Nanocorrals and Switches for Haloalka...ioneec
 
Electronic Switching of Single Silicon Atoms by Molecular Field Effects
Electronic Switching of Single Silicon Atoms by Molecular Field EffectsElectronic Switching of Single Silicon Atoms by Molecular Field Effects
Electronic Switching of Single Silicon Atoms by Molecular Field Effectsioneec
 
Self-Assembled Molecular Corrals on a Semiconductor Surface
Self-Assembled Molecular Corrals on a Semiconductor SurfaceSelf-Assembled Molecular Corrals on a Semiconductor Surface
Self-Assembled Molecular Corrals on a Semiconductor Surfaceioneec
 
5 Reasons to use IONEEC
5 Reasons to use IONEEC5 Reasons to use IONEEC
5 Reasons to use IONEECioneec
 
Last jp403835m
Last jp403835mLast jp403835m
Last jp403835mioneec
 
Acs ejpcc-e5b01406
Acs ejpcc-e5b01406Acs ejpcc-e5b01406
Acs ejpcc-e5b01406ioneec
 

More from ioneec (10)

IONEEC - How To Stimulate Your Art?
IONEEC - How To Stimulate Your Art?IONEEC - How To Stimulate Your Art?
IONEEC - How To Stimulate Your Art?
 
Iron Doped Titania Nanostructures Synthesis, DFT modelling and Photocatalysis
Iron Doped Titania Nanostructures Synthesis, DFT modelling and PhotocatalysisIron Doped Titania Nanostructures Synthesis, DFT modelling and Photocatalysis
Iron Doped Titania Nanostructures Synthesis, DFT modelling and Photocatalysis
 
Silicon Falls Into Line
Silicon Falls Into LineSilicon Falls Into Line
Silicon Falls Into Line
 
Dipole-directed Assembly of Lines of Dichloropentane on Silicon Substrates by...
Dipole-directed Assembly of Lines of Dichloropentane on Silicon Substrates by...Dipole-directed Assembly of Lines of Dichloropentane on Silicon Substrates by...
Dipole-directed Assembly of Lines of Dichloropentane on Silicon Substrates by...
 
Maskless Nanopattering and Formation of Nanocorrals and Switches for Haloalka...
Maskless Nanopattering and Formation of Nanocorrals and Switches for Haloalka...Maskless Nanopattering and Formation of Nanocorrals and Switches for Haloalka...
Maskless Nanopattering and Formation of Nanocorrals and Switches for Haloalka...
 
Electronic Switching of Single Silicon Atoms by Molecular Field Effects
Electronic Switching of Single Silicon Atoms by Molecular Field EffectsElectronic Switching of Single Silicon Atoms by Molecular Field Effects
Electronic Switching of Single Silicon Atoms by Molecular Field Effects
 
Self-Assembled Molecular Corrals on a Semiconductor Surface
Self-Assembled Molecular Corrals on a Semiconductor SurfaceSelf-Assembled Molecular Corrals on a Semiconductor Surface
Self-Assembled Molecular Corrals on a Semiconductor Surface
 
5 Reasons to use IONEEC
5 Reasons to use IONEEC5 Reasons to use IONEEC
5 Reasons to use IONEEC
 
Last jp403835m
Last jp403835mLast jp403835m
Last jp403835m
 
Acs ejpcc-e5b01406
Acs ejpcc-e5b01406Acs ejpcc-e5b01406
Acs ejpcc-e5b01406
 

Recently uploaded

The dark energy paradox leads to a new structure of spacetime.pptx
The dark energy paradox leads to a new structure of spacetime.pptxThe dark energy paradox leads to a new structure of spacetime.pptx
The dark energy paradox leads to a new structure of spacetime.pptxEran Akiva Sinbar
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPirithiRaju
 
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...lizamodels9
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxBerniceCayabyab1
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzohaibmir069
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptArshadWarsi13
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)DHURKADEVIBASKAR
 
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)riyaescorts54
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPirithiRaju
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensorsonawaneprad
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptxBREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptxPABOLU TEJASREE
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfBUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfWildaNurAmalia2
 

Recently uploaded (20)

The dark energy paradox leads to a new structure of spacetime.pptx
The dark energy paradox leads to a new structure of spacetime.pptxThe dark energy paradox leads to a new structure of spacetime.pptx
The dark energy paradox leads to a new structure of spacetime.pptx
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
 
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
 
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort ServiceHot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistan
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.ppt
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensor
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptxBREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
Volatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -IVolatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -I
 
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdfBUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
BUMI DAN ANTARIKSA PROJEK IPAS SMK KELAS X.pdf
 

Monte Carlo Simulation Methods

  • 1. Monte Carlo Methods: - Markov Chain Random movements, one follow another - Importance sampling To sample many points in the region where the Boltzmann factor is large and few elsewhere - Ergodicity (ensemble average) Such an average over all possible quantum states of a system - Detailed Balance ? ? Metropolis Method: ]/)(exp[yprobabilithaccept wit: accept: TKEEEE EE Bonon on −−> <
  • 2. In terms of words: - Canonical ensemble: N,V,T constant - Metropolis method: To generate a new configuration with probabilities Monte Carlo simulation in the canonical ensemble 0. Generate the initial configuration (random or c(2×2)) Beginning of the MC cycle 1. Calculate Eold 2. Randomly select a particle 3. Random displacement (or rotation) 4. Calculate Enew 5. Accept the move with probability (Metropolis method) En<Eo accept (the move) En>Eo accept with probability exp[-(En-Eo)/kT] (Periodic boundary conditions) End of MC cycle
  • 3. In terms of diagram: Monte Carlo simulation in the canonical ensemble
  • 4. Monte Carlo simulation in the canonical ensemble Choice of the parameters Initial configuration do en1=EN typ=1 call rand_pos(mat,typ,xrp,yrp) x1=xrp, y1=yrp typ=0 call rand_pos(mat,typ,xrp,yrp) x2=xrp, y2=yrp mat(x1,y1)=0 mat(x2,y2)=1 mat(x1,y1)=1 mat(x2,y2)=0 call tot_EN(mat,EN,ei0,ei1) en2=EN metropolis conditions acceptance: save new values+ add MC step Rejection: add MC step If (count.eq.mcs+1) then exit end if end do
  • 5. Monte Carlo simulation in the canonical ensemble Choice of the parameters Initial configuration do en1=EN typ=1 call rand_pos(mat,typ,xrp,yrp) x1=xrp, y1=yrp typ=0 call rand_pos(mat,typ,xrp,yrp) x2=xrp, y2=yrp mat(x1,y1)=0 mat(x2,y2)=1 mat(x1,y1)=1 mat(x2,y2)=0 call tot_EN(mat,EN,ei0,ei1) en2=EN metropolis conditions acceptance: save new values+ add MC step Rejection: add MC step If (count.eq.mcs+1) then exit end if end do real, parameter:: k=8,617339E-5 real *8:: enT,enT2 print *,”temperature:” read(*,*) T print *,”MC steps:” read(*,*) mcs print *,”starting configuration, R or C:” read(*,*) st start=0 select case (st) case ( “c”, “C”) start=1 end select
  • 6. Monte Carlo simulation in the canonical ensemble Choice of the parameters Initial configuration do en1=EN typ=1 call rand_pos(mat,typ,xrp,yrp) x1=xrp, y1=yrp typ=0 call rand_pos(mat,typ,xrp,yrp) x2=xrp, y2=yrp mat(x1,y1)=0 mat(x2,y2)=1 mat(x1,y1)=1 mat(x2,y2)=0 call tot_EN(mat,EN,ei0,ei1) en2=EN metropolis conditions acceptance: save new values+ add MC step Rejection: add MC step If (count.eq.mcs+1) then exit end if end do if (start.eq.1) then do v=1,10 if (mod(v,2).eq.0) then mat (u*2,v)=0 else mat (u*2-1,v)=0 end if, end if, end do else do xr= int (rand()*10)+1 yr= int (rand()*10)+1 if (mat(xr,yr).eq.1) then mat(xr,yr)= 0 do u=1,5 nb=nb+1 end if tt= int (10*10*(1-cov)) if (tt.eq.nb) then exit end if, end do, end if %% Start c(2×2) %% %% Start random %%
  • 7. Monte Carlo simulation in the canonical ensemble Choice of the parameters Initial configuration do en1=EN typ=1 call rand_pos(mat,typ,xrp,yrp) x1=xrp, y1=yrp typ=0 call rand_pos(mat,typ,xrp,yrp) x2=xrp, y2=yrp mat(x1,y1)=0 mat(x2,y2)=1 mat(x1,y1)=1 mat(x2,y2)=0 call tot_EN(mat,EN,ei0,ei1) en2=EN metropolis conditions acceptance: save new values+ add MC step Rejection: add MC step If (count.eq.mcs+1) then exit end if end do if (en2.lt.en1) then mat(x2,y2)=1 enT=enT+en2 enT2=enT2+en2*en2 count=count+1 else if (exp(-(en2-en1)/(k*T)).gt.rand()) then mat(x2,y2)=1 mat(x1,y1)=0 enT=enT+en2 enT2=enT2+en2*en2 count=count+1 mat(x1,y1)=0 else end if, end if enT=enT+en1 enT2=enT2+en1*en1 EN=en1 count=count+1 EN=en2 EN=en2 %% Acceptance %% %% probability %% %% Rejection %%
  • 8. Monte Carlo simulation in the canonical ensemble Choice of the parameters Initial configuration do en1=EN typ=1 call rand_pos(mat,typ,xrp,yrp) x1=xrp, y1=yrp typ=0 call rand_pos(mat,typ,xrp,yrp) x2=xrp, y2=yrp mat(x1,y1)=0 mat(x2,y2)=1 mat(x1,y1)=1 mat(x2,y2)=0 call tot_EN(mat,EN,ei0,ei1) en2=EN metropolis conditions acceptance: save new values+ add MC step Rejection: add MC step If (count.eq.mcs+1) then exit end if end do Subroutine Number of nearest neighbours NNE=0 id=xn+1 if (id.gt.10) then end if ig=xn-1 if (ig.lt.1) then ig=ig+10 end if jh=yn-1 if (jh.gt.10) then jh=jh-10 end if jb=yn+1 if (jb.lt.1) then jb=jb+10 end if NNE=id + ig + jb + jh %% periodic boundary conditions %% id=id-10
  • 9. Monte Carlo simulation in the canonical ensemble Choice of the parameters Initial configuration do en1=EN typ=1 call rand_pos(mat,typ,xrp,yrp) x1=xrp, y1=yrp typ=0 call rand_pos(mat,typ,xrp,yrp) x2=xrp, y2=yrp mat(x1,y1)=0 mat(x2,y2)=1 mat(x1,y1)=1 mat(x2,y2)=0 call tot_EN(mat,EN,ei0,ei1) en2=EN metropolis conditions acceptance: save new values+ add MC step Rejection: add MC step If (count.eq.mcs+1) then exit end if end do Subroutine Total energy of the system EN=0 do ii=1,10 do jj=1,10 if mat(ii,jj).eq.1) then %% periodic boundary conditions %% xn=ii yn=jj call near_numb(mat,xn,yn,NNE) EN=NNE*ei1+ei0
  • 10. Monte Carlo simulation in the canonical ensemble Choice of the parameters Initial configuration do en1=EN typ=1 call rand_pos(mat,typ,xrp,yrp) x1=xrp, y1=yrp typ=0 call rand_pos(mat,typ,xrp,yrp) x2=xrp, y2=yrp mat(x1,y1)=0 mat(x2,y2)=1 mat(x1,y1)=1 mat(x2,y2)=0 call tot_EN(mat,EN,ei0,ei1) en2=EN metropolis conditions acceptance: save new values+ add MC step Rejection: add MC step If (count.eq.mcs+1) then exit end if end do Subroutine Random selection do xe= int(rand()*10)+1 ye= int(rand()*10)+1 if (mat(xe,ye).eq.typ) then xrp=xe yrp=ye exit end if, end do
  • 11. Monte Carlo simulation in the canonical ensemble Choice of the parameters Initial configuration do en1=EN typ=1 call rand_pos(mat,typ,xrp,yrp) x1=xrp, y1=yrp typ=0 call rand_pos(mat,typ,xrp,yrp) x2=xrp, y2=yrp mat(x1,y1)=0 mat(x2,y2)=1 mat(x1,y1)=1 mat(x2,y2)=0 call tot_EN(mat,EN,ei0,ei1) en2=EN metropolis conditions acceptance: save new values+ add MC step Rejection: add MC step If (count.eq.mcs+1) then exit end if end do Subroutine Order parameter matf=mat*2-1 do r = 1,10 do q = 1,5 if (mod(r,2).eq.0) then ma=ma+matf(2*q-1,r) mb=mb+matf(2*q,r) else ma=ma+matf(2*q,r) mb=mb+matf(2*q-1,r) end if, end do, end do Psi=sqrt((ma-mb)*(ma-mb)/100 Subroutine Heat capacity parameter cv = ((enT2/mcs)-(enT*enT) / (mcs*mcs))) / (k*T*T)
  • 12. Order-disorder transition Cv parameter 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 500 700 900 1100 1300 1500 1700 1900 2100 2300 2500 T(K) Cv/N0(meV/K) Tc=1350K Simulation: Simple cubic surface (100) plan - Θ=0.5ML - Cell :10*10 - Start: random configuration - Number of MC steps: 10 million c(2×2) Critical phase Full disorder state - Nearest neighbours interaction energy: Eint= +0.1eV
  • 13. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 500 700 900 1100 1300 1500 1700 1900 2100 2300 2500 T(K) Order-disorder transition:Ψ parameter Simulation: Simple cubic surface (100) plan - Θ=0.5ML - Cell :10*10 - Start: random configuration - Number of MC steps: 10 million Tc=1350K C(2×2) Critical phase Full disorder state - Nearest neighbours interaction energy: Eint= +0.1eV Ψ=F(T(K))