User Tools

Site Tools


exercises:2015_ethz_mmm:nacl_free_energy

Differences

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

Link to this comparison view

Next revision
Previous revision
exercises:2015_ethz_mmm:nacl_free_energy [2015/02/06 17:49] – external edit 127.0.0.1exercises:2015_ethz_mmm:nacl_free_energy [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Free Energy Profile of NaCl Dissociation====== ====== Free Energy Profile of NaCl Dissociation======
 +
 +In this exercise, you will run different simulations to compute the NaCl dissociation curve in both gas and solution environments.
  
 <note tip> <note tip>
-  * You'll have to run many similar simulations. Try to automatize as much as possible.+  * You'll have to run many similar simulations. Try to automatize as much as possible (we can help you). 
 +  * To avoid confusion, try to perfrom every task in a new directory 
   * The first two task can be run directly on the login node, i.e. without using bsub.   * The first two task can be run directly on the login node, i.e. without using bsub.
   * The third task should be run on 4 cores with ''bsub -n 4''   * The third task should be run on 4 cores with ''bsub -n 4''
Line 8: Line 11:
  
 ===== 1. Task: Potential energy curve (gas phase) ===== ===== 1. Task: Potential energy curve (gas phase) =====
-Plot the gas phase dissociation profile of NaCl of the potential energy. For this you have to run the input file ''NaCl_gasphase.inp'' at a range of Na-Cl distances. +This case is very similar to the computation of the Lennard Jones curve (See: [[exercises:2015_ethz_mmm:single_point_calculation|Computation of the Lennard Jones curve]] )\\  
 +  * For this you have to run the input file ''NaCl_gasphase.inp'' at a range of Na-Cl distances. This can be automathized, so we provide with an template and you have to vary the MYDIST parameter in the input.  
 +  * At the end, plot the potential energy dissociation profile of NaCl.
  
 ===== 2. Task: Free energy curve at 1K (gas phase) ===== ===== 2. Task: Free energy curve at 1K (gas phase) =====
-Plot the gas phase dissociation profile of NaCl of the free energy at 1K.  
  
-For this you have to run constrained MD simulations at 1K for a range of Na-Cl distances. You have to add the ''MOTION''-section provided below to the ''NaCl_gasphase.inp'' and change the ''RUN_TYPE''.+For this you have to run constrained MD simulations at 1K for a range of Na-Cl distances.  
 +  * You have to modify the input file in the following way: 
 +    - Copy the ''NaCl_gasphase.inp'' file to a new directory and rename it to something like: ''NaCl_MD.inp''
 +    - Change the ''RUN_TYPE''  in the new input file, from "ENERGY" to "MD"
 +    - Add the ''MOTION''-section provided (end of this page) to the new ''NaCl_MD.inp'' file.  
 + 
 +  * Then, as usual, run the simulation for a range of NaCl distances. This is a constrained MD simulation, meaning that you have to vary the MYDIST parameter at three points in the file: 
 +     - In the COORD section of the new ''NaCl_MD.inp'' file 
 +     - In the CONSTRAINT section of the new ''NaCl_MD.inp'' file 
 +     - Where the PROJECT_NAME keyword is
  
-Each constrained MD will produce a ''.LagrangeMultLog''-files, which look like this:+⇒ Each constrained MD will produce a ''.LagrangeMultLog''-files, which look like this:
 <code> <code>
 Shake  Lagrangian Multipliers:            -0.054769270 Shake  Lagrangian Multipliers:            -0.054769270
Line 25: Line 37:
 </code> </code>
  
- +  * From these files you can calculate the average Lagrange multiplier of the Shake-algorithm like this:
-From these files you can calculate the average Lagrange multiplier of the Shake-algorithm like this:+
 <code> <code>
 grep Shake NACL-XXX.LagrangeMultLog | awk '{c++ ; s=s+$4}END{print s/c}' grep Shake NACL-XXX.LagrangeMultLog | awk '{c++ ; s=s+$4}END{print s/c}'
 </code> </code>
  
-The average Lagrange multiplier is the average force $F(x)$ required to constrain the atoms at the distance $x$. +  * The average Lagrange multiplier is the average force $F(x)$ required to constrain the atoms at the distance $x$. 
-From these forces the free energy difference can be obtained via integration:+  From these forces the free energy difference can be obtained via integration:
 \begin{equation} \begin{equation}
 \Delta A = -\int_a^b F(x)\, dx \Delta A = -\int_a^b F(x)\, dx
 \end{equation} \end{equation}
  
-dissociation profile can be obtained by choosing the closest distance $d_{min}$ as lower integration-bound:+  * The dissociation profile can be obtained by choosing the closest distance $d_{min}$ as lower integration-bound:
 \begin{equation} \begin{equation}
 A(d) = -\int_{d_{min}}^d F(x)\, dx A(d) = -\int_{d_{min}}^d F(x)\, dx
Line 50: Line 61:
  
 ===== 3. Task: Free energy curve of NaCl in water at 350K ===== ===== 3. Task: Free energy curve of NaCl in water at 350K =====
-Take the solvated system from the [[nacl_md | first exercise]] and add the constraint for a distance of 2.9 ÅThen run 100.000 MD steps MD at 350K. From the MD output calculate the average Largange multiplier. As a check for convergence you can divide the trajectory into two parts and calculate the average for each part separatelyOnce you are convinced of the result you can use it to complete the table given below. From the complete table calculate the free energy dissociation profile via numerical integration. +In this section, we provide an incomplete list of average Lagrange multipliers. You will habe to run a single constrained MD simulation, get the average Lagrange Multiplier. In this way you can complete the list and compute the free energy profile in water.  
 + 
 +  * Use the same input as ** Task 2**. 
 +  * BUT take the forcefield and the solvated system coordinates from the previous exercise (See: [[exercises:2015_ethz_mmm:nacl_md|Observe NaCl dissociation]]). In practice, you have to substitue the whole '' FORCE EVAL '' section in the ** Task 2** input with the '' FORCE EVAL '' section of [[exercises:2015_ethz_mmm:nacl_md|Observe NaCl dissociation]]. 
 +  * Other slight modifications to your input:  
 +         - In the MOTION-CONSTRAINT section set TARGET to 2.9.   
 +         - In the MOTION-MD section set STEPS 100.000 MD and T 350.  
 +  * Run the simulation in the same way you did for ** Task 2**. 
 +  * From the MD output calculate the average Largange multiplier,in the same way you did for ** Task 2** 
 +  * Complete the Lagrange Multiplier list we've provided (end of this page) 
 +  * From the complete table calculate the free energy dissociation profile via numerical integration. 
  
 ===== Required Files ===== ===== Required Files =====
Line 57: Line 78:
  
 ==== Input file for NaCl in gasphase ==== ==== Input file for NaCl in gasphase ====
 +This is the basic input. 
 +Note that for **Task 2** and ** Task 3 ** it should be modified.
 <code - NaCl_gasphase.inp> <code - NaCl_gasphase.inp>
 &FORCE_EVAL &FORCE_EVAL
Line 135: Line 157:
 </code> </code>
  
-==== Motion section for constrained MD ==== +==== Motion section TO ADD for constrained MD ==== 
-<code - motion.inp>+This section has to be added to the above input file for ** Task 2 ** and ** Task 3 ** 
 +<code - motion section>
 &MOTION &MOTION
  &CONSTRAINT  &CONSTRAINT
Line 184: Line 207:
  
 ==== Average Largange multiplier for NaCl in water at 350K (incomplete) ==== ==== Average Largange multiplier for NaCl in water at 350K (incomplete) ====
 +This is the Lagrange Multipliers table to be completed for ** Task 3 **
 <code> <code>
 # dist     avg. Shake Lagrange multiplier # dist     avg. Shake Lagrange multiplier
exercises/2015_ethz_mmm/nacl_free_energy.1423244958.txt.gz · Last modified: 2020/08/21 10:14 (external edit)