CPMD.pdf

download CPMD.pdf

of 36

Transcript of CPMD.pdf

  • 8/12/2019 CPMD.pdf

    1/36

    Car-Parrinello moleculardynamics

    www.cpmd.org

  • 8/12/2019 CPMD.pdf

    2/36

    This article was rated Number Five in the Physical ReviewLetters Top 10 papers.

    Here it is again! The essay!Read this article and write a 2 page reportof the famous Car-Parrinello approach.

  • 8/12/2019 CPMD.pdf

    3/36

    (1) The CPMD code is a parallellized plane wave /pseudopotential implementation of DFT, particularlydesigned for molecular dynamics (MD) simulations. It isdistributed free of charge for non-profit organizations(academic users).

    (2) CPMD is especially suitable for systems with largeband gaps, such as covalent molecules, metal

    clusters (not all), and semiconductor materials.Several thousands of researchers use it, andcorrespondingly, it contains numerous advanced options.

    (3) In the context of DFT computing, the program is old-fashioned (plane waves, periodic boundary conditions,pseudopotentials) but reliable and robust.

  • 8/12/2019 CPMD.pdf

    4/36

    Capabilities Wavefunction optimization: direct minimization (ODIIS) and

    diagonalization (Lanczos, Davidson)

    Geometry optimization: local optimization and simulated annealing Molecular dynamics: NVE, NVT, NPTensembles Path integral MD, free-energy path-smapling methods Response functions and many electronic structure properties (e.g.

    Wannier functions) Time-dependent DFT (excitations, MD in excited states) LDA, LSD, and many popular GGAs (and others, TPSS, hybrids) Isolated systems and systems withperiodic boundary conditions

    (with k-points)

    Hybrid quantum chemical / molecular mechanics calculations(QM/MM) Coarse-grained non-Markovianmetadynamics Works with norm-conserving and ultrasoftpseudopotentials

  • 8/12/2019 CPMD.pdf

    5/36

    Methods to compute the ground state wavefunction inCPMD program:

    Default settings: ODIIS (Direct Inversion of the Iterative Subspace), usesoccupied orbitals only, not suitable for metals

    Steepest descent: simplest minimization algorithm, occupied orbitals only,rather slow

    Preconditioned conjugate gradient (PCG): the minimizer improves steepestdescent, occupied orbitals only

    Lanczos diagonalization: full diagonalization with unoccupied orbitals,compatible with a free-energy functional, suitable for all kinds of systems,expensive

    Davidson diagonalization: faster than Lanczos, but not compatible with thenovel free-energy functional

    CP-dynamics with simulated annealing: gradual removal of electronkinetic energy, atoms fixed (see the original Car-Parrinello article)

  • 8/12/2019 CPMD.pdf

    6/36

    Molecular dynamics and ab initiomolecular dynamics

    The aim is to model detailedmicroscopic dynamical behavior ofmany different types of systems in physics, chemistry, and biology. Thehistory goes back to 1950s when first computer simulations of simple

    systems were performed (Fermi and colleagues).

    MD is a technique to investigateequilibrium and transport

    properties of many-body systems. The nuclear motion of theparticles is modeled using the laws of classical mechanics. This is agood approximation as far as the properties are not related to themotion of light atoms (i.e., hydrogens) or vibrations with a frequency such that h> kBT.

  • 8/12/2019 CPMD.pdf

    7/36

    Equations of MotionLet us consider a system of Nparticles moving under the influence

    of a potential function U. Particles are described by ionic positionsand momenta.

    Hamiltonian:

    Forces:

    Equations of motion:

    Newtons second law:

  • 8/12/2019 CPMD.pdf

    8/36

    The equations of motion can be achieved also by using the Lagrangeformalism. The Lagrange function is

    and the associated Euler-Lagrange equation

    leads to the same final result. The two formulations are equivalent,

    but the ab initioliterature almost exclusively uses the Lagrangiantechniques. The equations of motion aretime-reversibleand the thetotal energy is a constant of motion.

  • 8/12/2019 CPMD.pdf

    9/36

    Statistical ensembles Statistical mechanics connects the microscopic details of a system(molecular dynamics) with physical observables (thermodynamicproperties, diffusion, spectra).

    Statistical mechanics is based on Gibbs ensemble concept: Manyindividual microscopic configurations of a very large system lead tothe same macroscopic properties (it is not necessary to know themall).

    Statistical ensembles are usually characterized by fixed values ofthermodynamical variables (E,T,P,V,N,)

    Fundamental ensembles: Microcanonical (NVE), canonical (NVT),isothermal-isobaric (NPT), and grand canonical (VT).

    The thermodynamic variables that characterize the ensemble canbe regarded as experimental control parameters.

  • 8/12/2019 CPMD.pdf

    10/36

    Numerical integrationIn computer experiments, one cannot generate the true trajectory of asystem with a given set of initial positions and velocities. For all potentials

    U,only numerical integration techniquescan be applied (discretizationof time).

    Many methods have been developed; we are interested in the ones thatexhibitlong-time energy conservation and short-time reversibility.

    Velocity Verlet algorithmlooks like a Taylor expansion for thecoordinates:

    This equation is combined with the updated velocities

    To perform a computer experiment, one has to choose the initial valuesfor the positions and velocities together with an appropriate time step.

  • 8/12/2019 CPMD.pdf

    11/36

    The first part of the simulation is the equilibration phase in which strong

    fluctuation may occur. Once all important properties are sufficientlyequlibrated, the actual simulation is performed (data collecting).

    Finally, observables are calculated from the trajectory. Some quantities thatcan be easly calculated are:

    The average (ionic) temperature

    The diffusion constant for large time

    The pair correlation function

    Temporal Fourier of the velocity-velocity autocorrelation function isproportional to the density of normal modes (vDOS).

  • 8/12/2019 CPMD.pdf

    12/36

    Thermostats and barostatsIn the framework statistical mechanics, all ensembles can beformally obtained from the microcanonicalNVEensemble bysuitable Laplace transforms of its partition function (cf. bath orreservoir in thermodynamics).

    The same basic idea is used in computer simulations: additionaldegrees of freedomfor controlling selected quantities (e.g.temperature, pressure). The simulation is performed in an extendedNVE ensemblewith a modified total energy, and the resultingdistribution function is that of the targeted ensemble.

    Thermostats and barostats are used to impose temperatureinstead of energy and / or pressure instead of volume as externalcontrol parameters.

  • 8/12/2019 CPMD.pdf

    13/36

  • 8/12/2019 CPMD.pdf

    14/36

    Barostats:

    Keeping the pressure constant is a desirable feature for many MD applications.

    The concept of barostats and constant-pressure MD was introduced byAndersen in 1980. His method was devised for isotropic fluctuations in thevolume of the supercell.

    An extension consists in allowing for changes of the the shape of thecomputational cell to occur as a result of applying external pressure, includingthe possibility of non-isotropic external stress. The additional degrees of freedomin the Parrinello-Rahman approachare the lattice vectors of the supercell.

    The variable-cell approaches make it possible to study dynamically structuralphase transitions in solids at finite temperatures.

    The lattice vectorsa1, a2 and a3 of the simulation cell are expressed asadditional dynamical variables in the extended Lagrangian of the system.

    A moder formulation of barostats combines the equation of motion also withthermostats (Martyna et al.)

  • 8/12/2019 CPMD.pdf

    15/36

    Ab initioMD - prefaceIn the following, two most popular extensions of classical molecular dynamics toincludefirst-principles derived potential functionswill be discussed. Thefocus is in the KS method of DFT.

    The general form of KS equations:

    A unitary transformation within the space of occupied orbitals yields thecanonical (familiar) form

    and the KS forceacting on the orbitals can be expressed as

  • 8/12/2019 CPMD.pdf

    16/36

    Born-Oppenheimer MDThe interaction energy U(RN) in classical MD has the same physical meaningas the KS energy within the Born-Oppenheimer (BO) approximation. The KS

    energydepends only on the nuclear positionsand defines a hypersurfacefor the movement of the nuclei. The Lagrangian in BO dynamics is therefore

    and the minimization is constraint to orthogonal sets of KS orbitals. Theequations of motion are

    A classical MD program can be easily turned into a BOMD program byreplacing the energy and force routines by the corresponding routines from aquantum chemistry program. Extensions to other ensembles are alsostraightforward.

  • 8/12/2019 CPMD.pdf

    17/36

    Forces in BOMD:

    The forces needed in BOMD implementation are

    They can be calculated from the extended energy functional

    The KS orbitals are assumed to be optimized, i.e. the term in brackets is(almost) zero and the forces simplify

    The accuracy of the forces in BOMD depends on the accuracy of the energyfunctional minimization (has to be done separately for each time step).

  • 8/12/2019 CPMD.pdf

    18/36

    Car-Parrinello MDThe basic idea of Car-Parrinello approach can be viewed to exploit the time-scale separation of fast electronic and slow nuclear motionby

    transforming that into classical-mechanical adiabatic energy-scale separationin the framework of dynamical systems theory.

    The two component quantum / classical problem is mapped ontotwo-component purely classical problem with two separate energy scalesatthe expense of loosing the explicit time-dependence of the quantum

    subsystem dynamics. This is achieved by considering the theextended KSenergy functional, KS , to be dependent on the orbitals and nuclearpositions.

    Similarly, as nuclear forces can be achieved as derivatives of the Lagrangian

    with respect to the nuclear coordinates, one can assume thatforces onorbitals(now interpreted as classical fields) can be obtained as functionalderivatives of KSwith respect to the orbitals.

    In CPMD, there is deterministicallyonly one wavefunction optimizationstepper time step (cf. several iterations in BOMD).

  • 8/12/2019 CPMD.pdf

    19/36

    Car and Parrinello postulated the followingLagrangian:

    The corresponding Newtonian equations of motion are obtained from theassociatedEuler-Lagrange equations

    as in classical mechanics, but here both for the nuclear positions and the

    orbitals. The resultingCar-Parrinello equations of motionare

    Where is the fictious mass or inertia parameter assigned to the orbitaldegrees of freedom. Note that the constraints within KS lead to constraintforces in the equations of motion.

  • 8/12/2019 CPMD.pdf

    20/36

    The constant of motion is

    According to the CP equations of motion, the nuclei evolve in time at a certain(instantaneous) physical temperature, whereas a fictitious temperature" is

    associated to the electronic degrees of freedom. In this terminology, lowelectronic temperature" or cold electrons" means that the electronicsubsystem is close to its instantaneous minimum energy, i.e. close to the exactBO surface. Thus, a ground-state wavefunction optimized for the initialconguration of the nucleiwill stay close to its ground state also during time

    evolution if it is kept at a sufficiently low temperature.The remaining task is to separate in practice nuclear and electronic motion suchthat the fast electronic subsystem stays cold also for long times but still followsthe slow nuclear motion adiabatically. Simultaneously, the nuclei are kept at a

    much higher temperature. This can be achieved in nonlinear classical dynamicsvia decoupling of the two subsystems and adiabatic time evolution. This ispossible if the power spectra of both dynamics do not have substantialoverlapin the frequency domain so that energy transfer from the hot nucleito the cold electrons" becomes practically impossible on the relevant time

    scales.

  • 8/12/2019 CPMD.pdf

    21/36

    Forces in CPMD:

    The forces needed are the partial derivative of the KS energy with respect to theindependent variables (nuclear coordinates and orbitals). The orbital forces arecalculated as the action of the KS Hamiltonian on the orbitals

    The forces with respect to nuclear positions are (as in BOMD)

    In CPMD these are the correct forces and calculated from the analytic energyexpression. Constraint forces are

    where the latter arises only for atomic basis sets (not present for plane waves).

  • 8/12/2019 CPMD.pdf

    22/36

    How to control adiabaticity?A simple harmonic analysis of the frequency spectrum of the orbital classicalfields close to the minimum defining the ground state yields

    where j and i are the eigenvalues of occupied and unoccupied orbitals,respectively. This is in particular true for the lowest frequency, and an analytic

    estimate for the lowest possible electronic frequency

    shows that this frequency increases like the square root of the electronic energydifference Egap between the lowest unoccupied and the highest occupied orbital.On the other hand, it increases similarly for a decreasing fictitious massparameter.

  • 8/12/2019 CPMD.pdf

    23/36

    For adiabatic separation, the frequency difference emin

    - nmax

    should belarge. Both the highest phonon frequency and the energy gap are quantitiesthat are dictated by the physics of the system. Therefore, the only parameterto control adiabatic separation is the fictitious mass. However,decreasing not only shifts the electronic spectrum upwards on the frequency

    scale, but also stretches the entire frequency spectrum. This leads to anincrease of the maximum frequency according to

    where Ecut is the largest kinetic energy in terms of a plane wave basis set.Here, a limitation to decrease arbitrarily kicks in due to the maximum lengthof the molecular dynamics time step tmax that can be used. The time step isinversely proportional to the highest frequency in the system, and thus

    governs the largest time step that is possible.

  • 8/12/2019 CPMD.pdf

    24/36

    One has to make a compromise on the control parameter :

    Typical values for large-gap systemsare=300-1500 a.u. together with atime step2-10 a.u. (0.048-0.242 fs)

    For systems involvinghydrogen, I have previously used=400 a.u. andtime step3 a.u. (0.072 fs)

    Long trajectories with better statistics make the errors from large fictitiousmasses more evident; there is a trend to stay away from aggressively large

    fictitious masses and time steps, and use more concervative parameters. Poor mans choicefor keeping and time step larger, is to chooseheavier nuclear masses(isotopes, e.g. deuterium). That depresses thelargest phonon or vibrational frequency of the nuclei (renormalization ofdynamical quantities, isotope effect).

  • 8/12/2019 CPMD.pdf

    25/36

    Velocity-Verlet equations for CPMD:

    The constrain forces complicate the velocity-Verlet method slightly for CPMD.The Lagrange parametersijhave to be calculated to be consistent with thediscretization method employed.

    For the case of overlap matrices that are not position dependent (plane wavebasis set) the constraint term only appears in the equation for orbitals

    The velocity-Verlet scheme for wavefunctions has to incorporate the constraint

    by using the RATTLE algorithm.

  • 8/12/2019 CPMD.pdf

    26/36

    Comparing BOMD and CPMDThe comparison between the twomethods is a delicate issue. It

    depends on the chosen accuracyof energy conservation.

    Microcanonical simulationof 8 Si atoms at 360-370 K.

    CPMD: time step 5/10 a.u.

    =400 me

    BOMD: time step 10/100 a.u.

    (0.24 and 2.4 fs)

  • 8/12/2019 CPMD.pdf

    27/36

    One major advantage of CPMD is the fact that a full wavefunctionoptimization has to be performedonly once (beginning). A disadvantageis the red-shift in the dynamics of light atoms (drag) due to thefictitious electron dynamics.

    BO dynamics does not suffer from the latter, but itmay be expensive for

    systems where the convergence of the wavefunction is difficult. Recentdevelopments in usingwavefunction extrapolation to improve thequality of the initial guess wavefunction have improved the situationconsiderably.

  • 8/12/2019 CPMD.pdf

    28/36

    In conclusion, BOMD can be made as fast as CPMD

    (as measured as the amount of CPU time spent perpicosecond) at the expense of sacrificing accuracy in

    terms of energy conservation.

    The CPMD program itself contains options for bothMD alternatives!

  • 8/12/2019 CPMD.pdf

    29/36

    My examples:ATP hydrolysis in water

    andmelt-quenching of amorphous

    DVD-RAM materials

  • 8/12/2019 CPMD.pdf

    30/36

    ATP hydrolysis in water:

    Methyltriphosphate (reactive partof ATP) complexed withMg2+ andembedded in a box of water (54 H2Omolecules, box side 13.1 ), periodic

    boundary conditions Plane wave cutoff70 Ry, PBE96functional

    Electron fictitious mass=400 a.u.and time step3 a.u

    Temperature310 K, rescaling

    Three reactions (constrained),

    duration 9-13 ps

    J. Akola and R.O. Jones, J. Phys. Chem. B 107,11774 (2003).

  • 8/12/2019 CPMD.pdf

    31/36

    Ge2Sb2Te5 alloys

    DVD-RAM (and Blu-ray)

  • 8/12/2019 CPMD.pdf

    32/36

    Simulation method Density functional theory (DFT) of electronic structure Car-Parrinello molecular dynamics (CPMD, www.cpmd.org) with

    periodic boundary conditions Scalar-relativistic TM91 pseudopotentials1

    PBE962 for the exchange-correlation energy functional (GGA) Born-Oppenheimer MD (time step 125-250 a.u. 3-6 fs),

    wavefunction extrapolation Nos-Hoover-chain thermostat, chain length 4, frequency 800 cm-1

    plane wave basis set, cut-off energy 20 Ry Melt-quenching from the hot liquid to solid amorphous phase

    (process duration0.3-0.5 ns)

    Massively-parallel DFT/MD simulations (thousands of CPUs) on IBMBlue Gene/L/P in FZ Jlich

    1N.L. Troullier and J.L. Martins, PRB 43, 1993 (1991).2J.P. Perdew, K. Burke, and Ernzerhof, PRL 77, 3865 (1996).

  • 8/12/2019 CPMD.pdf

    33/36

    Starting structure,

    c-GST

    512 atomic sites, rocksalt (NaCl)

    structure (c-GST) Te occupies Cl sites (256 atoms)

    Ge, Sb, and vacancies occupy Nasites randomly

    Metastable ordered(crystalline) phaseAmorphousdisordered phase

    10% vacancies 460 atomsaltogether

    Box size 24.6 (=5.9 g/cm3)

    Final structure, a-

    GST

  • 8/12/2019 CPMD.pdf

    34/36

    Radial distribution functions (a-GST)

    J. Akola and R.O. Jones, PRB 76, 235201 (2007).

    Coordination numbers: Ge 4.2, Sb 3.7, and Te 2.9 (compare with 8-Nrule)

    Few Te-Te bonds,long-range order(>10 ).

    Dominant, partialcoordinationnumbers 3.6 (Ge)and 2.9 (Sb)

    Wrong bonds:

    Ge-Gecoordination 0.4

    Ge-Sb almostnegligible

    Sb-Sb bondspresent (0.6)

    l-GST, red (900 K);c-GST, blue (300 K)

  • 8/12/2019 CPMD.pdf

    35/36

    Diffusion at 900 K (melting point)

    Linear mean-squaredisplacement (MSD)diffusion constants

    Sb is more mobile(DSb=4.7x10-5 cm2s-1)

    Fluctuations due toconcerted motion(creation/annihilation ofcavities)

    Viscocity 1.2 cP (expt.~1.9 cP, GeTe)

  • 8/12/2019 CPMD.pdf

    36/36

    GST - vibrationalfrequencies (vDOS)

    Two methods:

    Finite differences (energygradients for the optimizedgeometry, bottom curve)

    Power spectra (MD at 300 K,

    FFT of the velocity-velocityautocorrelation function)

    Projections onto differentelements enable vibrational

    mode characterization

    Visible contribution fromtetrahedral Ge!

    Tetrahedral Ge

    Ge-Ge bonds (few)

    J. Akola and R.O. Jones, J. Phys.: Cond. Mat.20, 465103 (2008).