exercises:2015_pitt:aimd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exercises:2015_pitt:aimd [2015/03/03 09:37] – [AIMD of water] vondele | exercises:2015_pitt:aimd [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 6: | Line 6: | ||
The second goal to understand the produced .ener file and do some basic analysis of the trajectory with VMD. | The second goal to understand the produced .ener file and do some basic analysis of the trajectory with VMD. | ||
- | ====== AIMD of water ====== | + | ====== AIMD of bulk liquid |
- | < | + | < |
Topics: | Topics: | ||
* MD section (timestep) | * MD section (timestep) | ||
* Thermostat (NVE, NVT, NPT) | * Thermostat (NVE, NVT, NPT) | ||
+ | |||
+ | ===== 1st task: prepapre inputs for MD ===== | ||
Start from the '' | Start from the '' | ||
Line 114: | Line 116: | ||
+ | ====== Analysis ====== | ||
+ | While running the MD simulations, | ||
+ | |||
+ | ===== 2nd task: visualize the .ener file ===== | ||
+ | |||
+ | A first quick check can be performed using the file '' | ||
+ | < | ||
+ | # Step Nr. Time[fs] | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | This can be easily visualized with gnuplot, for example for the conserved quantity (plotting the second vs the sixth column) : | ||
+ | < | ||
+ | gnuplot> plot ' | ||
+ | </ | ||
+ | |||
+ | To judge if this is actually well conserved, compare to the potential energy: | ||
+ | < | ||
+ | gnuplot> plot ' | ||
+ | gnuplot> replot ' | ||
+ | </ | ||
+ | |||
+ | If the constant of motion is not well conserved, try to | ||
+ | * Make '' | ||
+ | * Make '' | ||
+ | * Play with '' | ||
+ | |||
+ | To judge if a system is well equilibrated is not easy. At least the temperature and the potential energy of the system must oscillate around an average and be free of long term drift. As a rule of thumb, discard 1/3 of the trajectory, use 2/3 for data analysis. | ||
+ | |||
+ | ===== 3rd task: visualize/ | ||
+ | |||
+ | We will use vmd to analyze the trajectory file. Note that the generated trajectory is only a few 100s of fs, typically, 10s of ps are needed for even for basic properties. | ||
+ | |||
+ | Start vmd | ||
+ | |||
+ | < | ||
+ | vmd WATER-pos-1.xyz | ||
+ | </ | ||
+ | |||
+ | ==== g(r) ==== | ||
+ | |||
+ | In the menu go to : | ||
+ | |||
+ | Extensions/ | ||
+ | Utilities/ | ||
+ | |||
+ | 1st, set the unit cell as needed. Now improve the Graphics/ | ||
+ | |||
+ | 2nd, compute the O-O pair distribution function (Selections='' | ||
+ | |||
+ | How many neighbors does a given water molecule have on average (3, 3-4, 4, 4-5, 5)? | ||
+ | |||
+ | ==== IR spectrum ==== | ||
+ | |||
+ | Based on the time evolution of the dipole of the system, the IR spectral density can be estimated. To estimate the dipole from AIMD, wannier centers need to be computed. This is out of scope of the current tutorial (TODO: find link). We employ a simple approximation, | ||
+ | |||
+ | Create the following file | ||
+ | <code - charges.dat> | ||
+ | O -1.2 | ||
+ | H +0.6 | ||
+ | </ | ||
+ | |||
+ | Go to Extensions/ | ||
+ | Select the proper molecule (WATER-pos-1.xyz), | ||
+ | Utilities/ | ||
+ | Compute spectrum. | ||
+ | |||
+ | Where do you expect the OH stretch to be ? Is this reproduced ? | ||
+ | |||
+ | < | ||
+ | |||
+ | ====== AIMD of simle ions in water solution ====== | ||
+ | ===== 4th task: simple ions in solution ===== | ||
+ | |||
+ | < | ||
+ | |||
+ | Introduce an ion in your system, and equilibrate this system. Study its dynamics and solvation structure. | ||
+ | |||
+ | The easiest way to do so is to replace one or more water molecules (depending on the size of the ion) by the ion in question. Obviously, the configuration produced in this way is far from equilibrium, | ||
+ | |||
+ | Entertaining is to turn one H2O into H+, do you see Eigen and Zundel states and [[wp> | ||
====== Required files ====== | ====== Required files ====== | ||
Line 312: | Line 400: | ||
H -4.1388543582 | H -4.1388543582 | ||
H -4.3955669691 | H -4.3955669691 | ||
+ | </ | ||
+ | The following file should be the result of your edits to '' | ||
+ | <code - water_cheating.inp> | ||
+ | &GLOBAL | ||
+ | ! the project name is made part of most output files... useful to keep order | ||
+ | PROJECT WATER | ||
+ | ! various runtypes (energy, geo_opt, etc.) available. | ||
+ | RUN_TYPE MD | ||
+ | ! limit the runs to 5min | ||
+ | WALLTIME 1800 | ||
+ | ! reduce the amount of IO | ||
+ | IOLEVEL | ||
+ | &END GLOBAL | ||
+ | |||
+ | & | ||
+ | ! the electronic structure part of CP2K is named Quickstep | ||
+ | METHOD Quickstep | ||
+ | &DFT | ||
+ | ! basis sets and pseudopotential files can be found in cp2k/data | ||
+ | BASIS_SET_FILE_NAME HFX_BASIS | ||
+ | POTENTIAL_FILE_NAME GTH_POTENTIALS | ||
+ | |||
+ | ! Charge and multiplicity | ||
+ | CHARGE 0 | ||
+ | MULTIPLICITY 1 | ||
+ | |||
+ | &MGRID | ||
+ | ! PW cutoff ... depends on the element (basis) too small cutoffs lead to the eggbox effect. | ||
+ | ! certain calculations (e.g. geometry optimization, | ||
+ | ! NPT and cell optimizations, | ||
+ | | ||
+ | &END | ||
+ | |||
+ | &QS | ||
+ | ! use the GPW method (i.e. pseudopotential based calculations with the Gaussian and Plane Waves scheme). | ||
+ | | ||
+ | ! default threshold for numerics ~ roughly numerical accuracy of the total energy per electron, | ||
+ | ! sets reasonable values for all other thresholds. | ||
+ | | ||
+ | ! used for MD, the method used to generate the initial guess. | ||
+ | | ||
+ | &END | ||
+ | |||
+ | & | ||
+ | | ||
+ | &END | ||
+ | |||
+ | |||
+ | ! at the end of the SCF procedure generate cube files of the density | ||
+ | & | ||
+ | & | ||
+ | ! compute eigenvalues and homo-lumo gap each 10nd MD step | ||
+ | & | ||
+ | NLUMO 4 | ||
+ | NHOMO 4 | ||
+ | WRITE_CUBE .FALSE. | ||
+ | &EACH | ||
+ | MD 10 | ||
+ | &END | ||
+ | & | ||
+ | &END | ||
+ | |||
+ | ! use the OT METHOD for robust and efficient SCF, suitable for all non-metallic systems. | ||
+ | & | ||
+ | SCF_GUESS ATOMIC ! can be used to RESTART an interrupted calculation | ||
+ | MAX_SCF 30 | ||
+ | EPS_SCF 1.0E-6 ! accuracy of the SCF procedure typically 1.0E-6 - 1.0E-7 | ||
+ | &OT | ||
+ | ! an accurate preconditioner suitable also for larger systems | ||
+ | PRECONDITIONER FULL_SINGLE_INVERSE | ||
+ | ! the most robust choice (DIIS might sometimes be faster, but not as stable). | ||
+ | MINIMIZER DIIS | ||
+ | &END OT | ||
+ | & | ||
+ | MAX_SCF 10 | ||
+ | EPS_SCF 1.0E-6 ! must match the above | ||
+ | &END | ||
+ | ! do not store the wfn during MD | ||
+ | |||
+ | & | ||
+ | &END | ||
+ | &END | ||
+ | &END SCF | ||
+ | |||
+ | ! specify the exchange and correlation treatment | ||
+ | &XC | ||
+ | ! use a PBE functional | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | &END XC_FUNCTIONAL | ||
+ | ! adding Grimme' | ||
+ | & | ||
+ | | ||
+ | & | ||
+ | PARAMETER_FILE_NAME dftd3.dat | ||
+ | TYPE DFTD3 | ||
+ | REFERENCE_FUNCTIONAL PBE | ||
+ | R_CUTOFF [angstrom] 16 | ||
+ | & | ||
+ | &END VDW_POTENTIAL | ||
+ | &END XC | ||
+ | &END DFT | ||
+ | |||
+ | ! description of the system | ||
+ | &SUBSYS | ||
+ | & | ||
+ | ! unit cells that are orthorhombic are more efficient with CP2K | ||
+ | ABC [angstrom] 12.42 12.42 12.42 | ||
+ | &END CELL | ||
+ | |||
+ | ! atom coordinates can be in the &COORD section, | ||
+ | ! or provided as an external file. | ||
+ | & | ||
+ | COORD_FILE_NAME water.xyz | ||
+ | COORD_FILE_FORMAT XYZ | ||
+ | &END | ||
+ | |||
+ | ! MOLOPT basis sets are fairly costly, | ||
+ | ! but in the ' | ||
+ | ! their contracted nature makes them suitable | ||
+ | ! for condensed and gas phase systems alike. | ||
+ | &KIND H | ||
+ | BASIS_SET DZVP-GTH | ||
+ | POTENTIAL GTH-PBE-q1 | ||
+ | &END KIND | ||
+ | &KIND O | ||
+ | BASIS_SET DZVP-GTH | ||
+ | POTENTIAL GTH-PBE-q6 | ||
+ | &END KIND | ||
+ | &END SUBSYS | ||
+ | &END FORCE_EVAL | ||
+ | |||
+ | ! how to propagate the system, selection via RUN_TYPE in the &GLOBAL section | ||
+ | &MOTION | ||
+ | & | ||
+ | | ||
+ | | ||
+ | | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | | ||
+ | | ||
+ | | ||
+ | STEPS 1000 | ||
+ | # GLE thermostat as generated at http:// | ||
+ | # GLE provides an effective NVT sampling. | ||
+ | & | ||
+ | | ||
+ | TYPE GLE | ||
+ | & | ||
+ | NDIM 5 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | |||
+ | & | ||
+ | & | ||
+ | MD 1 | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | MD 500 | ||
+ | & | ||
+ | & | ||
+ | & | ||
+ | | ||
+ | & | ||
+ | MD 1 | ||
+ | & | ||
+ | & | ||
+ | &END PRINT | ||
+ | &END | ||
+ | & | ||
+ | RESTART_FILE_NAME WATER-1.restart | ||
+ | &END | ||
</ | </ | ||
exercises/2015_pitt/aimd.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1