User Tools

Site Tools


exercises:2014_ethz_mmm:nacl_free_energy

This is an old revision of the document!


Free Energy Profile of NaCl Dissociation

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.

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. Each constrained MD will produce a .LagrangeMultLog''-files, which look like this:

Shake  Lagrangian Multipliers:            -0.054769270
Rattle Lagrangian Multipliers:            -0.020937479
Shake  Lagrangian Multipliers:            -0.020937479
Rattle Lagrangian Multipliers:            -0.020937479
...

From these files you can calculate the average Lagrange multiplier of the Shake-algorithm like this:

grep Shake NACL-DIMER-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}

A 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}

Make sure that you get the units right. The Largange multipliers are written in atomic units (Hartree/bohr), while the distances are in Angstrom.
Running many similar simulations is tedious. Try to automatize as much as possible.

Required Files

motion.inp
&MOTION
 &CONSTRAINT
    &COLLECTIVE
      COLVAR 1
      INTERMOLECULAR
      TARGET [angstrom] MYDIST
    &END COLLECTIVE
    &LAGRANGE_MULTIPLIERS
      COMMON_ITERATION_LEVELS 1
    &END
 &END CONSTRAINT
 &MD
   ENSEMBLE  NVE
   TIMESTEP  0.5
   STEPS      100
   TEMPERATURE 1
   &THERMOSTAT
     &NOSE
       LENGTH 3
       YOSHIDA 3
       TIMECON 1000
       MTS 2
     &END NOSE
   &END THERMOSTAT
   &PRINT 
     &TRAJECTORY OFF
     &END TRAJECTORY
     &VELOCITIES OFF
     &END VELOCITIES
     &FORCES OFF
     &END FORCES
     &RESTART_HISTORY OFF
     &END RESTART_HISTORY 
     &RESTART OFF
     &END RESTART
   &END PRINT
&END MOTION
NaCl_gasphase.inp
&FORCE_EVAL
  METHOD FIST
  &MM
    &FORCEFIELD
      &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
      &NONBONDED
        &LENNARD-JONES
          atoms Na Cl
          EPSILON [kcalmol]  .0838
          SIGMA   [angstrom] 3.63
          RCUT    [angstrom] 11.4
        &END LENNARD-JONES
      &END NONBONDED
    &END FORCEFIELD
    &POISSON
      &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
     &COORD
Na    0.0    0.0 0.0 NAP
Cl    MYDIST 0.0 0.0 CLM
     &END COORD
    &TOPOLOGY
      CONNECTIVITY GENERATE
      &GENERATE
        BONDLENGTH_MAX 7
      &END
    &END
  &END SUBSYS
&END FORCE_EVAL

&GLOBAL
  PROJECT NACL-MYDIST
  RUN_TYPE ENERGY
&END GLOBAL
exercises/2014_ethz_mmm/nacl_free_energy.1401281711.txt.gz · Last modified: 2020/08/21 10:14 (external edit)