exercises:2017_ethz_mmm:nacl_free_energy
Differences
This shows you the differences between two versions of the page.
— | exercises:2017_ethz_mmm:nacl_free_energy [2020/08/21 10:15] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 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> | ||
+ | * 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 third task should be run on 4 cores with '' | ||
+ | </ | ||
+ | |||
+ | ===== 1. Task: Potential energy curve (gas phase) ===== | ||
+ | This case is very similar to the computation of the Lennard Jones curve (See: [[exercises: | ||
+ | * For this you have to run the input file '' | ||
+ | * At the end, plot the potential energy dissociation profile of NaCl. | ||
+ | |||
+ | ===== 2. Task: Free energy curve at 1K (gas phase) ===== | ||
+ | |||
+ | 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 '' | ||
+ | - Change the '' | ||
+ | - Add the '' | ||
+ | |||
+ | * 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 '' | ||
+ | - In the CONSTRAINT section of the new '' | ||
+ | - Where the PROJECT_NAME keyword is | ||
+ | |||
+ | ⇒ Each constrained MD will produce a '' | ||
+ | < | ||
+ | Shake Lagrangian Multipliers: | ||
+ | Rattle Lagrangian Multipliers: | ||
+ | Shake Lagrangian Multipliers: | ||
+ | Rattle Lagrangian Multipliers: | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | * From these files you can calculate the average Lagrange multiplier of the Shake-algorithm like this: | ||
+ | < | ||
+ | grep Shake NACL-XXX.LagrangeMultLog | awk '{c++ ; s=s+$4}END{print s/c}' | ||
+ | </ | ||
+ | |||
+ | * 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: | ||
+ | \begin{equation} | ||
+ | \Delta A = -\int_a^b F(x)\, dx | ||
+ | \end{equation} | ||
+ | |||
+ | * The dissociation profile can be obtained by choosing the closest distance $d_{min}$ as lower integration-bound: | ||
+ | \begin{equation} | ||
+ | A(d) = -\int_{d_{min}}^d F(x)\, dx | ||
+ | \end{equation} | ||
+ | |||
+ | <note warning> | ||
+ | Make sure that you get the units right. The Largange multipliers are written in atomic units (Hartree/ | ||
+ | </ | ||
+ | |||
+ | Compare the free-energy dissociation curve at 1K with the potential energy curve. What do you expect? What do you observe? | ||
+ | |||
+ | |||
+ | ===== 3. Task: Free energy curve of NaCl in water at 350K ===== | ||
+ | In this section, we provide an incomplete list of average Lagrange multipliers. You will have 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: | ||
+ | * 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, | ||
+ | * 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 ===== | ||
+ | |||
+ | |||
+ | |||
+ | ==== 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> | ||
+ | & | ||
+ | METHOD FIST | ||
+ | &MM | ||
+ | & | ||
+ | &SPLINE | ||
+ | EPS_SPLINE 1.0E-8 | ||
+ | EMAX_SPLINE 300000.0 | ||
+ | &END | ||
+ | &CHARGE | ||
+ | ATOM Na | ||
+ | CHARGE 1.0 | ||
+ | &END CHARGE | ||
+ | &CHARGE | ||
+ | ATOM Cl | ||
+ | CHARGE -1.0 | ||
+ | &END CHARGE | ||
+ | & | ||
+ | & | ||
+ | atoms Na Cl | ||
+ | EPSILON [kcalmol] | ||
+ | SIGMA | ||
+ | RCUT [angstrom] 11.4 | ||
+ | &END LENNARD-JONES | ||
+ | & | ||
+ | atoms Na Na | ||
+ | EPSILON [kcalmol] | ||
+ | SIGMA | ||
+ | RCUT [angstrom] 11.4 | ||
+ | &END LENNARD-JONES | ||
+ | & | ||
+ | atoms Cl Cl | ||
+ | EPSILON [kcalmol] | ||
+ | SIGMA | ||
+ | RCUT [angstrom] 11.4 | ||
+ | &END LENNARD-JONES | ||
+ | &END NONBONDED | ||
+ | &END FORCEFIELD | ||
+ | & | ||
+ | &EWALD | ||
+ | EWALD_TYPE spme | ||
+ | ALPHA .3 | ||
+ | GMAX 12 | ||
+ | O_SPLINE 6 | ||
+ | &END EWALD | ||
+ | &END POISSON | ||
+ | &END MM | ||
+ | &SUBSYS | ||
+ | &CELL | ||
+ | ABC 12.4138 12.4138 12.4138 | ||
+ | &END CELL | ||
+ | & | ||
+ | Na 0.0 0.0 0.0 NAP | ||
+ | Cl MYDIST 0.0 0.0 CLM | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | ATOMS 1 2 | ||
+ | &END DISTANCE | ||
+ | |||
+ | &END | ||
+ | & | ||
+ | & | ||
+ | CONNECTIVITY GENERATE | ||
+ | & | ||
+ | BONDLENGTH_MAX 7 | ||
+ | &END | ||
+ | &END | ||
+ | &END SUBSYS | ||
+ | &END FORCE_EVAL | ||
+ | |||
+ | &GLOBAL | ||
+ | PROJECT NACL-MYDIST | ||
+ | RUN_TYPE ENERGY | ||
+ | &END GLOBAL | ||
+ | </ | ||
+ | |||
+ | ==== Motion section TO ADD for constrained MD ==== | ||
+ | This section has to be added to the above input file for ** Task 2 ** and ** Task 3 ** | ||
+ | <code - motion section> | ||
+ | &MOTION | ||
+ | & | ||
+ | & | ||
+ | COLVAR 1 | ||
+ | INTERMOLECULAR | ||
+ | TARGET [angstrom] MYDIST | ||
+ | &END COLLECTIVE | ||
+ | & | ||
+ | COMMON_ITERATION_LEVELS 1 | ||
+ | &END | ||
+ | & | ||
+ | & | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | & | ||
+ | & | ||
+ | | ||
+ | | ||
+ | | ||
+ | MTS 2 | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | &END | ||
+ | & | ||
+ | &END VELOCITIES | ||
+ | &FORCES OFF | ||
+ | &END FORCES | ||
+ | & | ||
+ | &END RESTART_HISTORY | ||
+ | & | ||
+ | &END RESTART | ||
+ | & | ||
+ | &END MOTION | ||
+ | </ | ||
+ | |||
+ | ==== Average Largange multiplier for NaCl in water at 350K (incomplete) ==== | ||
+ | This is the Lagrange Multipliers table to be completed for ** Task 3 ** | ||
+ | < | ||
+ | # dist avg. Shake Lagrange multiplier | ||
+ | 2.5 | ||
+ | 2.6 | ||
+ | 2.7 | ||
+ | 2.8 | ||
+ | 2.9 <--- Take missing value from your trajectory | ||
+ | 3.0 -0.000996937 | ||
+ | 3.1 -0.00271078 | ||
+ | 3.2 -0.00335324 | ||
+ | 3.3 -0.00348111 | ||
+ | 3.4 -0.00303697 | ||
+ | 3.5 -0.00259636 | ||
+ | 3.6 -0.00201541 | ||
+ | 3.7 -0.00119027 | ||
+ | 3.8 -0.000408723 | ||
+ | 3.9 -8.19056e-05 | ||
+ | 4.0 | ||
+ | 4.1 | ||
+ | 4.2 | ||
+ | 4.3 | ||
+ | 4.4 | ||
+ | 4.5 | ||
+ | 4.6 | ||
+ | 4.7 | ||
+ | 4.8 | ||
+ | 4.9 | ||
+ | 5.0 | ||
+ | 5.1 | ||
+ | 5.2 | ||
+ | 5.3 | ||
+ | 5.4 | ||
+ | 5.5 | ||
+ | 5.6 -0.000220194 | ||
+ | 5.7 -0.000332539 | ||
+ | 5.8 -0.000674227 | ||
+ | 5.9 -0.00075852 | ||
+ | 6.0 -0.00043128 | ||
+ | </ | ||