howto:md
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
md [2014/02/09 14:41] – converted from doc/tutorialCp2k.html, Credit: Fawzi Mohamed oschuett | howto:md [2024/01/03 13:10] (current) – oschuett | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <note warning>This text is probably out of date and needs to be revised.</ | + | This page has been moved to: https://manual.cp2k.org/trunk/methods/sampling/molecular_dynamics.html |
- | + | ||
- | ====== Molecular Dynamics ====== | + | |
- | Molecular dynamics a good method to perform thermodynamical averages, and to look at dynamical properties. It also a good starting point for many other more advanced techniques. | + | |
- | + | ||
- | During an MD one expects the density to change more or less continuously, | + | |
- | Indeed cp2k can use different extrapolations techniques ('' | + | |
- | + | ||
- | For MD a good guess is '' | + | |
- | + | ||
- | ===== Trajectory ===== | + | |
- | With the printkey '' | + | |
- | + | ||
- | An interesting file to check is the '' | + | |
- | < | + | |
- | md_step, time[fs], e_kin [hartree], temp[K], e_pot [hartree], e_tot [hartree], cpu_time_per_step [s] | + | |
- | </code> | + | |
- | You should always check it and look at how the system equilibrates. | + | |
- | + | ||
- | The .ener file and other interesting trajectory files are all controlled with subsections of '' | + | |
- | + | ||
- | ===== MD Convergence ===== | + | |
- | If the MD has to be trusted then one should be sure that the trajectory can be trusted. Actually a simple, and very sensitive test that there are no big technical errors is to perform an NVE trajectory and look at the energy conservation. The energy conservation has normally two features, short time oscillations (that are larger when the system is not yet equilibrated) and a long range drift. If you express these in //K/text//, then you can compare them with the temperature that you are simulating at. Another (equivalent) possibility is to express them as fraction of the kinetic energy. The oscillation and drift (normally per //ps//, but it also depends on how many picoseconds you want to simulate, and if you want an NVE trajectory) should be small with respect to the kinetic energy (1% or less is a good value, but obviously it depends on the accuracy that you want to achieve, more might be acceptable, or less needed). | + | |
- | + | ||
- | To improve the energy conservation one can either improve the forces with EPS_SCF and EPS_DEFAULT, | + | |
- | + | ||
- | Conserving the total energy well is not enough if the system is very heterogeneous and the interesting part is small. In that case there is the risk that even a large error on it might pass unnoticed. If this is to be excepted (for example the atom with the sharpest gaussian basis set is in the interesting part) then checking that part of the system (oscillations, | + | |
- | + | ||
- | ===== Equilibration ===== | + | |
- | For the result to be meaningful the system should be equilibrated, | + | |
- | + | ||
- | So at the beginning you should build your system in some meaningful way, or from classical simulations. To have a better starting point you can optimize the energy (if your system is small), you anneal it, but it is not always needed. Then you can equilibrate it at a given temperature. | + | |
- | + | ||
- | To equilibrate a system one can use a crude velocity rescale when he is too far away from the goal temperature (as established by '' | + | |
- | Doing an NVE simulation with TEMP_TOL is better way to equilibrate than using the NVT ensamble that uses the Nose-Hoover chain thermostats and might give spurios effects if you are far from equilibrium, | + | |
- | It should be taken into account that the temperature is not constant, but does oscillate in the NVE ensamble, these oscillations are connected with the specific heat and are inversely proportional with sqrt(N) where N is the system size.</p> | + | |
- | <p>A faster way to equilibrate the system is to use '' | + |
howto/md.txt · Last modified: 2024/01/03 13:10 by oschuett