Quantum ESPRESSO Tutorial:car-parrinello Molecular Dynamics

Source: Internet
Author: User

These examples illustrate the applications of cp.x MD code in the Quantum ESPRESSO distribution. Since MD simulations usually take very long, we'll look in a small example, a single water molecule, to get familiar wit H all important options, features and the normal flow of execution for Car-parrinello simulations with the cp.x code.

Getting Ready

For the following tutorial your need to the cp.x and cppp.x executables availabl E. Download the exercise file examples_cp.tgz in a directory of your choice. Uncompress and unpack the archive and enter the created directory:

  TAR-XZVF examples_cp.tgz  CD EXAMPLES_CP  

Input File Structure

The input file for cp.x have a very similar structure as other programs in the Quantum ESPRESSO distrubution. The most notable differences is

  1. The type of calculation is either CP or vc-cp. In both cases a time step DT must is specified (in Hartree atomic units).
  2. No symmetry, no k-point list:only Gamma (k=0) is used
  3. For Ultrasoft pseudopotentials only:you need to specify a subset of the charge density grid (variables "nr1b", "NR2B", "N R3B ") conatining the augmentation charges
  4. There is the new flags, NDR=xx and NDW=yy. These is appended to the prefix value to form the directory for the restart files to read (=ndr) a Resta RT from or write (=NDW) a restart to. If XX is the same as YY and then the old restart would be overwritten. With continuously incrementing these numbers you can preserve a history of your restart files and has the option to start From previous intermediate results.

Initial wavefunction Optimization

Before we can start a Car-parrinello MD, we have to compute the ground state wavefunction. This is achieved viaDirect MinimizationOf the functional, not via Slf-consistency + diagonalization.cp.xContains-algorithms to does this:Steepest descendanddamped Dynamics. Both is very robust; Steepest descent is notoriously inefficient, damped dynamics are efficient only with a good value of the damping. Since computing the initial wavefunction takes only a small computational effort compared to the ' production ' run, Efficie Ncy here does isn't matter that much. During wavefunction optimization, we update the wavefunction, but not the atom positions, thus we set in the  &electrons  namelist the Keyword  electron_dynamics= ' SD '   (for steepest descent), but in The  &ions  namelist the Keyword  Ion_dynamics= ' None ' . See input File  h2o_mol1.in . You can monitor the progress of the calculation in the output file, or look at the energies in The  h2o_mol.evp  file. The dynamics is determined by a single parameter, dt2/(electron mass).

Mysterious errors in routine "ortho", performing iterative orthonormalization, is usually due to a too large time step. Especially at the beginning of the simulation, it may is useful to perform the first few time steps with Gram-schmid ortho Gonalization (keyword ' gram '): it's slower but safer than the default ' ortho ' (iterative) orthonormalization

In a second step, we want to continue the optimization and the damped dynamics algorithm, so we set the value of Restart_ Mode to ' restart ' and electron_dynamics to ' damp '. The damping parameter is not a set and default to 0.1. See Fileh2o_mol2.in. Now we would is ready to start a Car-parrinello MD.

Electron Density and Atom Position randomization

If we want to has a look in the electron density corresponding to the starting struction, we had to re-run the wavefunct Ion optimization with the keyword disk_io= "High" (normally the density is not needed and thus not written ), see file h2o_mol.cp-dens.in.

Since we were starting from optimized positions of the water molecule, we also want add some potential energy to the Syste M by randomizing the atom positions (we keep the oxygen fixed here) a little bit. The &ions section the keywords:

  TRANP (1) =. FALSE.  TRANP (2) =. TRUE.  AMPRP (2) = 0.1

meaning "randomization of the second atom type only" and "maximum random displacement 10% of the lattice constant".

After this run we had a restart with the re-optimized wavefunction for the randomized atom positions and a file with the Charge density in the restart directory. To visualize the charge density, we first need to run the post-processing program,cppp.x to create a. xsf file. The corresponding input File,  h2o_mol.cppp-dens.in  is pretty self explanatory. Note that both the value Of  prefix  and The value of The  NDR Span class= "Apple-converted-space" > keyword have to match The  Prefix  and  NDW value of the calculation that we want to postprocess. For a list of the available postprocessing options, see the Input_cppp file in the Doc directory of the Quantum ESPRESSO D Istrubution.

Structural optimization

Damped dynamics can be used in structural optimization as well. File h2o_mol3.in shows how to find the minimum energy structure using damped dynamics for both ions and E Lectrons. There is damping parameters, one for electrons and one for ions. As a rule of thumb, the latter should is an order of magnitude smaller than the former. If the convergence becomes sluggish (and it typically does close to the minimum) reduce the damping.

Car-parrinello Molecular Dynamics.

Now we is ready to start a Car-parrinello md:see input file h2o_mol4.in. We don ' t want the outputs from the previous runs of dynamics, so we first clean up the directory where files is written:< /c3>

   Rm-f H2o_mol.???

(Don ' t remove the H2o_mol_save directory). Note that we are restart with restart_mode= ' reset_counters '. This was a regular restart, but all averages and counters were reset. We also increment NDW, so we does not overwrite the initial wavefunction and has the option to go back in C ASE of problems.

Note that the input data for this run is read from step 2, not 3, i.e. the distorted H2O molecule, not the equilibrium on E. The atomic structure is a read from file as well if you restart from File:what are written in input dat is ignored.

For regular cp-dynamics, we set both Electron_dynamics and Ion_dynamics to  ' Verlet ' . We also initialize both the electronic and ionic velocities to 0. We now has to set a fictitious mass for the Cp-hamiltonian and has the make sure, this mass and the time step is pro Perly chosen, so we conserve and stay close to the born-oppenheimer surface. This was best-done by looking at the evolution of the energies in the file H2O_MOL.EVP. Column 1 is the time step number, column 2 the fictitious kinetic energy (in atomic units), column 4 the kinetic energy of The system, column 5 The potential energy of the system, and column 7 contains the Kelvin of the Classi Cal system and Column 8 the conserved quantity of the Cp-hamiltonian. These is affected by the proper choice of fictitious mass and time step. Play around with these numbers, to see how bad it can go, or how can improve on the current choice of Parameters.

A too large time step would manifest itself as a drift of the constant of motion, Column 8. A too heavy electron mass, or a too small energy gap on the system, may cause a loss of adiabaticity, leading Transfer from ionic to electronic degrees of freedom. A more subtle effect of an excessive electron mass are a "drag" effect on ions that spoils the quality of the Ionic traject Ories.

h2o_mol5.in continues the trajectory by restarting from the previous run. Note that we had to go the restart_mode= ' restart ' and remove the quench of electronic and ionic Velocities.&NBSP; h2o_mol6.in  finally Restarts the trajectory with a nose-hoover thermostat controlling the ionic kinetic energy. This would oscillate around the prescribed temperature ' TEMPW ' (43K in this case). The important parameter are ' fnosep ', the frequency of the thermostat in THz. This should is chosen to being comparable with the center of the vibrational spectrum of the system, in order to excite as Ma NY vibrational modes as possible. Don ' t be scared by the large oscillations around the equilibrium temperature:nose ' thermostats does not impose a fixed temp Erature, they add or remove energy from the system so and on the average the temperature is constant.

Quantum ESPRESSO Tutorial:car-parrinello Molecular Dynamics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.