User Tools

Site Tools


exercises:common:ensemble

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
exercises:common:ensemble [2022/10/31 16:12] jglanexercises:common:ensemble [2022/10/31 17:28] (current) – [NVT Ensemble] jglan
Line 1: Line 1:
-====== Lennard-Jones liquids ======+====== Ensembles (Lennard-Jones liquids======
 In this exercise, you will simulate a fluid of monoatomic particles that interact with a Lennard-Jones potential. The method to be used is molecular dynamics (MD) with periodic boundary conditions using CP2K. The aim is to explore the method, calculate the radial distribution function $g(r)$ and investigate a variety of ensembles. In this exercise, you will simulate a fluid of monoatomic particles that interact with a Lennard-Jones potential. The method to be used is molecular dynamics (MD) with periodic boundary conditions using CP2K. The aim is to explore the method, calculate the radial distribution function $g(r)$ and investigate a variety of ensembles.
  
Line 16: Line 16:
 The radial distribution function, (or pair correlation function) $g(r)$, in a system of particles (atoms, molecules, colloids, etc.), describes how the density varies as a function of distance from a reference particle. The radial distribution function, (or pair correlation function) $g(r)$, in a system of particles (atoms, molecules, colloids, etc.), describes how the density varies as a function of distance from a reference particle.
  
-===== NVE ensemble  =====+===== NVE Ensemble  =====
  
 In this section, we provide you with an example CP2K input for an MD calculation. In this section, we provide you with an example CP2K input for an MD calculation.
Line 215: Line 215:
  
  
-===== Part IV: Other Ensembles  =====+===== NVT Ensemble  ===== 
 + 
 +In the previous sections, you have already run NVE ensemble molecular dynamics calculations for liquid Ar. In this section, we will focus on the NVT ensembles.  
 + 
 +Although the most popular Nose-Hoover thermostat is commonly-used in other MD codes, the original Nose-Hoover thermostat has an ergodic issue. This has been solved by Mark Tuckerman et al. See [[https://doi.org/10.1063/1.463940 |Nose-Hoover Chain Thermostat]]  
 +In CP2K, the default length of the Nose-Hoover chain is set to 3. (See Manual [[https://manual.cp2k.org/cp2k-2022_1-branch/CP2K_INPUT/MOTION/MD/THERMOSTAT/NOSE.html| %MOTION%MD%THERMOSTAT%NOSE]])
  
-In the previous sections, you have already run NVE ensemble molecular dynamics calculations for liquid Ar. In this section, we will focus on the NVT and NPT ensembles. 
  
 To set up an NVT calculation, change the settings in the &MD section as shown below: To set up an NVT calculation, change the settings in the &MD section as shown below:
Line 230: Line 234:
       REGION MASSIVE       REGION MASSIVE
       &NOSE                    #Uses the Nose-Hoover thermostat       &NOSE                    #Uses the Nose-Hoover thermostat
-        TIMECON 1000           #timeconstant of the thermostat chain, how often does thermostat adjust your system +        TIMECON 100           #timeconstant of the thermostat chain, how often does the thermostat adjust your system 
       &END NOSE       &END NOSE
     &END     &END
   &END MD   &END MD
      
 +
 +Alternatively, one can also use [[https://manual.cp2k.org/cp2k-2022_1-branch/CP2K_INPUT/MOTION/MD/THERMOSTAT/CSVR.html| Canonical sampling through velocity rescaling
 +(CSVR)]] as developed by Giovanni [[https://doi.org/10.1063/1.2408420 |Bussi et al. ]]
 +  &MD
 +    ENSEMBLE NVT
 +    STEPS 3000
 +    TIMESTEP 5
 +    TEMPERATURE 298
 +    &THERMOSTAT
 +      &CSVR                    
 +        TIMECON 100           #timeconstant of the CSVR, how often does the thermostat adjust your system 
 +      &END CSVR
 +    &END
 +  &END MD
 +  
 +===== NPT Ensemble  =====
 +
      
 To set up an NPT calculation, change the settings in the &MD section as shown below: To set up an NPT calculation, change the settings in the &MD section as shown below:
exercises/common/ensemble.1667232732.txt.gz · Last modified: 2022/10/31 16:12 by jglan