Nuclephile Substitution CH3Cl - SG: Difference between revisions
Line 97: | Line 97: | ||
let i=i+1 | let i=i+1 | ||
done | done | ||
*The user has to adjust the ''runvasp'' variable, which holds the command for the executable command. | |||
*Please run this script by typing: | |||
bash ./run | |||
== Download == | == Download == |
Revision as of 17:03, 1 October 2019
Task
In this example the nucleophile substitution of a Cl- by another Cl- in CH3Cl is simulated using a slow growth approach.
Input
POSCAR
1.00000000000000 12.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 12.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 12.0000000000000000 C H Cl 1 3 2 direct 0.53294865 0.56575027 0.49613388 0.53110276 0.65294003 0.50241434 0.44611198 0.52863033 0.51450056 0.58463838 0.52611078 0.55968644 0.32726066 0.74478226 0.64936301 0.57915789 0.51894916 0.36275174
KPOINTS
Automatic 0 Gamma 1 1 1 0. 0. 0.
- For isolated atoms and molecules interactions between periodic images are negligible (in sufficiently large cells) hence no Brillouin zone sampling is necessary.
PREC=Low EDIFF=1e-6 LWAVE=.FALSE. LCHARG=.FALSE. NELECT=22 NELMIN=4 LREAL=.FALSE. ALGO=VeryFast ISMEAR=-1 SIGMA=0.0516 ############################# MD setting ##################################### IBRION=0 # MD simulation NSW=1000 # number of steps POTIM=1 # integration step TEBEG=600 # simulation temperature MDALGO=11 # md with Andersen thermostat ANDERSEN_PROB=0.10 # collision probability LBLUEOUT=.TRUE. # write the BM stuff on the output INCREM=-1e-4 # rate at which CV increases each step ##############################################################################
ICONST
R 1 5 0 R 1 6 0 S 1 -1 0
Calculation
In a slow growth simulation, an approximation of the collective variable is increased by the value INCREM every time step. In order for the transformation between the initial and final state to be reversible, the value of INCREM must be infinitesimaly small. In practice we are limited by the desired length of trajectory causing that irreversible rather than reversible work is computed in a slow-growth simulation.
Running the calculation
The mass for hydrogen in this example is set 3.016 a.u. corresponding to the tritium isotope. This way larger timesteps can be chosen for the MD.
For practical reasons, we split our (presumably long) meta dynamics calculation into shorter runs of length of 1000 fs (NSW=1000; POTIM=1). This is done automatically in the script run which looks as follows:
#!/bin/bash runvasp="mpirun -np x executable_path" # ensure that this sequence of MD runs is reproducible cp POSCAR.init POSCAR cp INCAR.init INCAR rseed="RANDOM_SEED = 311137787 0 0" echo $rseed >> INCAR i=1 while [ $i -le 50 ] do # start vasp $runvasp # ensure that this sequence of MD runs is reproducible rseed=$(grep RANDOM_SEED REPORT |tail -1) cp INCAR.init INCAR echo $rseed >> INCAR # use the last configuration generated in the previous # run as initial configuration for the next run cp CONTCAR POSCAR # backup some important files cp REPORT REPORT.$i cp vasprun.xml vasprun.xml.$i let i=i+1 done
- The user has to adjust the runvasp variable, which holds the command for the executable command.
- Please run this script by typing:
bash ./run