0% found this document useful (0 votes)
127 views41 pages

Slides Cp3

This document provides an overview of Born-Oppenheimer molecular dynamics (BOMD) and Car-Parrinello molecular dynamics (CPMD). In BOMD, ions are treated classically while electrons are treated quantum mechanically, decoupling ion and electron dynamics. In CPMD, ions are also treated classically but electrons are assigned a "fake" kinetic energy, coupling ion and electron dynamics and making the method computationally cheaper than BOMD. The document then discusses practical considerations for running CPMD simulations, including relaxing electronic degrees of freedom, relaxing ion positions, and performing molecular dynamics runs. Input and output files are described along with typical quantities of interest.

Uploaded by

gunarmota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
127 views41 pages

Slides Cp3

This document provides an overview of Born-Oppenheimer molecular dynamics (BOMD) and Car-Parrinello molecular dynamics (CPMD). In BOMD, ions are treated classically while electrons are treated quantum mechanically, decoupling ion and electron dynamics. In CPMD, ions are also treated classically but electrons are assigned a "fake" kinetic energy, coupling ion and electron dynamics and making the method computationally cheaper than BOMD. The document then discusses practical considerations for running CPMD simulations, including relaxing electronic degrees of freedom, relaxing ion positions, and performing molecular dynamics runs. Input and output files are described along with typical quantities of interest.

Uploaded by

gunarmota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Giovanni Borghi

Moleculardynamics: ([email protected])
doingitbyCar....

andParrinello

Hands-on Shanghai, July 2013


BornOppenheimermoleculardynamics
Ionsaretreatedclassically Relax electrons
Electronsaretreatedquantummechanically
Ionicmass>>>>Electronicmass:iondynamicsisdecoupledfrom
electrondynamics;i.e.ionicforcesaredeterminedbytheground
stateelectronicchargedensityforeveryionicconfiguration
Move ions

Ions: heavy, Electrons: light,


but computationally but computationally
light heavy

CarParrinellomoleculardynamics
Move
Ionsaretreatedclassically ions & electrons
Electronsaretreatedquantummechanically,buttheyare
assignedafake,unphysical,kineticenergy Cheaper!
Iondynamicsandelectrondynamicsaremoreorlesscoupled,
dependingonionicand(fake)electronicmassvalues(thefake
electronicmassisnotnecessarilythephysicalone)
CPtrick:fakeLangevin
dynamics
Fake because electrons are quantum, they obey Schroedinger
equation with a single time derivative, rather than a double one
TheCPsuiteonmylaptop

Online input description


http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_CP.html
http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_CPPP.html
RunningCP!

CPpostprocessing:CPPP!
CPMDrun:whattodoinpractice
Set some ATOMC_POSITIONS

dt=XXX
Relax electronic wavefunction: orthogonalization=
(electron_dynamics='damp' 'Gram-Schmidt'
ion_dynamics='none')

dt=XXX (larger number)


orthogonalization=
If you want ions at 'ortho' (default)
equilibrium positions:
(electron_dynamics='damp'
ion_dynamics='damp') Now initial positions are set!
ion_velocities='from_input'
('random', 'zero')
Perform MD run: electron_velocities='default'
(electron_dynamics='verlet' ('zero')
ion_dynamics='verlet') Now initial velocities are set!
CPunits:atomicunits Unless differently
specified!!

2.418 x 10-5 ps.

27.211.. eV
o
Temperature: 315770 Kelvin
Let'slookatsomeinputfiles

Simple case: H2 molecule

Ionic mass

H H
Onefirstrelaxeselectronic
degreesoffreedom:
dtsmall+'ortho'
ordtlarge+'Gram-Schmidt'

NeveruseGramSchmidtinmolecular
(undamped)dynamics:itdoesnotwork!
Then:
largerdt,and'ortho'

'ortho'isthedefault
orthogonalization
Ionic+electronicrelaxation:
structuraloptimization
MDrun,nodamping,
'verlet'dynamics
CPunits:atomicunits Unless differently
specified!!

In the input file:

Ecutwfc ---> Ry (0.5 EH) Ecutrho ---> Ry (0.5 EH)

Ionic mass ---> a.m.u (=1/12 of C12 mass, =1823 me)

ATOMIC_POSITIONS: (Bohr, angstrom, crystal)

Tempw --->oK fnosep --->THz (3 THz=100 cm-1)

In the output file:


Electronic eigenvalues ---> (eV), ion temperature (oK)
In 'prefix.evp':
Time---> picoseconds (ps)
Ionic temperature (tempp) ---> oK
Units should be specified either in input/output files, or in
the online input description
Whatdowehaveasoutput?
&control
outdir='outdir',
prefix='prefix',
ndr=$ndr, ndw=$ndw
restart_mode= 'from_scratch'
('restart','reset_counters')

EVERY ... iprint_stdout, iprint, isave STEPS

Prints in Saves quantities


Prints in: inside 'outdir':
standard output:
'prefix'.pos (ion positions), 'prefix'_$ndr.save
my_simulation.out
'prefix'.vel (ion velocities),
'prefix'.cel (cell parameters),
'prefix'.evp (energies, potentials),
'prefix'.eig (electronic eigenvalues),
...
every iprint_output steps,
we get a summary of
energy, positions,
velocities, cell parameters
Interestingfile:'prefix'.evp

nfi---> number of iterations


ekinc---> electron fake kinetic energy
temphc(oK)---> temperature due to cell kinetic energy
tempp(oK)---> temperature due to ionic displacements within the cell
etot---> dft total energy (without ionic and cell kinetic energy)
enthal---> etot+external_pressure*volume
econs---> etot+kinetic_energy_due_to_ions_moving
econt---> econs+ekinc+(thermostat_total_energy)
tps(ps)---> time
...

...

...

...
Handsonexercise1:cponH2
Relax electronic wavefunction

Damped dynamics Undamped dynamics


electrons+ions

Care in choosing Role of electronic


damping fake mass
and vs
time step ionic mass
Sampleinputfiles:H.erelax.start.in

&control &electrons
calculation='cp', electron_dynamics='xxx',
restart_mode='from_scratch', electron_damping=xxx,
nstep=xxx, iprint=2, isave=20, startingwfc='random', ampre=0.01,
dt=xxx, emass=xxx, emass_cutoff=3.,
ndr=90, ndw=91, orthogonalization='xxx',
pseudo_dir='./pseudo/', /
outdir='./tmp/', &ions
/ ion_dynamics='none',
&system ion_radius(1)=1.0,
ibrav=0, /
nat=2, ntyp=1, nbnd=1, nspin=1, ATOMIC_SPECIES
ecutwfc=30.0, ecutrho=120.0, H 1.00 H.pz-vbc.UPF
/ ATOMIC_POSITIONS angstrom
H -0.4 0. 0.
H 0.4 0. 0.
CELL_PARAMETERS angstrom
20.0 0. 0.
0.0 20.0 0.
0.0 0. 20.
Sampleinputfiles:H.erelax.restart.in

&control &electrons
calculation='cp', electron_dynamics='xxx',
restart_mode='restart', electron_damping=xxx
nstep=xxx, iprint=2, isave=40, ortho_max=100,
dt=xxx, emass=xxx,
ndr=91, ndw=92, emass_cutoff=3.,
pseudo_dir='./pseudo/', /
outdir='./tmp/', &ions
etot_conv_thr=1.e-7, ion_dynamics='none',
/ ion_radius(1)=1.0,
&system /
ibrav=0, ATOMIC_SPECIES
nat=2, ntyp=1, nbnd=1, nspin=1, H 1.00 H.pz-vbc.UPF
ecutwfc=30.0, ecutrho=120.0, ATOMIC_POSITIONS angstrom
/ H -0.4 0. 0.
H 0.4 0. 0.
CELL_PARAMETERS angstrom
20.0 0. 0.
0.0 20.0 0.
0.0 0. 20.
Sampleinputfiles:H.ionrelax.in
&electrons
electron_dynamics='xxx',
&control electron_damping=0.001,
calculation='cp', ortho_max=100,
restart_mode='restart', emass=500,
nstep=xxx, iprint=2, isave=20, emass_cutoff=3.,
dt=xxx, electron_velocities='zero',
ndr=94, ndw=941, /
pseudo_dir='./pseudo/', &ions
outdir='./tmp/', ion_dynamics='xxx',
ekin_conv_thr=xxx, ion_velocities='zero',
etot_conv_thr=xxx, ion_radius(1)=1.0,
forc_conv_thr=xxx, ion_damping=0.01
/ /
&system ATOMIC_SPECIES
ibrav=0, H 1.00 H.pz-vbc.UPF
nat=2, ntyp=1, nbnd=1, nspin=1, ATOMIC_POSITIONS angstrom
ecutwfc=30.0, ecutrho=120.0, H -0.4 0. 0.
/ H 0.4 0. 0.
CELL_PARAMETERS angstrom
20.0 0. 0.
0.0 20.0 0.
0.0 0. 20.
Sampleinputfiles:H.md.in

&control &electrons
calculation='cp', electron_dynamics='xxx',
restart_mode='reset_counters', ortho_max=100,
nstep=100, iprint=1, isave=10, emass=500,
dt=8, emass_cutoff=3.,
ndr=92, ndw=932, /
pseudo_dir='./pseudo/', &ions
outdir='./tmp/', ion_dynamics='xxx',
/ ion_radius(1)=1.0
&system /
ibrav=0, ATOMIC_SPECIES
nat=2, ntyp=1, nbnd=1, nspin=1, H 1.00 H.pz-vbc.UPF
ecutwfc=30.0, ecutrho=120.0, ATOMIC_POSITIONS angstrom
/ H -0.4 0. 0.
H 0.4 0. 0.
CELL_PARAMETERS angstrom
20.0 0. 0.
0.0 20.0 0.
0.0 0. 20.
Someplots:
Adjustingtheelectronicdampingforoptimalconvergence
Someplots:
Adjustingtheionicdampingforoptimalconvergence
Electron&ionmass:theirrole

1823

This is the true picture What happens if we increase emass?

emass=1 emass=300
ion mass=1823 ion mass=1823

1 vs 1823 300 vs 1823


Alargeelectronmass'drags'theions
Handsonexercise2:silicon
Relax electronic wavefunction

Undamped dynamics Undamped dynamics


electrons+ions electrons+ions
no thermostat with thermostat

How a Nose thermostat works.


Behavior of the different energy terms
in the output files of cp.
Sampleinputfiles:Si.erelax.start.in

&control &electrons
calculation='cp', electron_dynamics='xxx',
restart_mode='from_scratch', electron_damping=0.1,
nstep=xxx, iprint=20, isave=20, startingwfc='random', ampre=0.01,
dt=xxx, orthogonalization='xxx',
ndr=90, ndw=91, emass=xxx, emass_cutoff=3.,
pseudo_dir='./pseudo/', /
outdir='./tmp/', &ions
/ ion_dynamics='xxx',
&system ion_radius(1)=1.0,
ibrav=0, /
nat=xxx, ntyp=1, nbnd=xxx, nspin=1, ATOMIC_SPECIES
ecutwfc=20.0, ecutrho=80.0, Si 28.0855 Si.pz-vbc.UPF
/ ATOMIC_POSITIONS angstrom
.
Sampleinputfiles:Si.erelax.restart.in

&control &electrons
calculation='cp', electron_dynamics='xxx',
restart_mode='restart', electron_damping=xxx,
nstep=xxx, iprint=10, isave=50, emass=700., emass_cutoff=3.,
dt=xxx, /
ndr=91, ndw=92, &ions
pseudo_dir='./pseudo/', ion_dynamics='xxx',
outdir='./tmp/', ion_radius(1)=1.0,
etot_conv_thr=xxx /
/ ATOMIC_SPECIES
&system Si 28.0855 Si.pz-vbc.UPF
ibrav=0, ATOMIC_POSITIONS angstrom
nat=xxx, ntyp=1, nbnd=xxx, nspin=1,
ecutwfc=20.0, ecutrho=80.0,
/
Sampleinputfiles:Si.md.in

&control &electrons
calculation='cp', electron_dynamics='xxx',
restart_mode='reset_counters', ortho_max=100,
nstep=4000, iprint=10, isave=100, emass=100., emass_cutoff=3.,
dt=4.0, /
ndr=92, ndw=931, &ions
pseudo_dir='./pseudo/', ion_dynamics='xxx',
outdir='./tmp/', ion_radius(1)=1.0
/ /
&system ATOMIC_SPECIES
ibrav=0, Si 28.0855 Si.pz-vbc.UPF
nat=16, ntyp=1, nbnd=32, nspin=1, ATOMIC_POSITIONS angstrom
ecutwfc=20.0, ecutrho=80.0,
/
Sampleinputfiles:Si.md_th.in

&control &electrons
calculation='cp', electron_dynamics='xxx',
restart_mode='reset_counters', ortho_max=100,
nstep=6000, iprint=10, isave=100, emass=100., emass_cutoff=3.,
dt=4.0, /
ndr=92, ndw=932, &ions
pseudo_dir='./pseudo/', ion_dynamics='verlet',
outdir='./tmp/', ion_temperature='nose',
/ tempw=300, fnosep=xxx,
&system ion_radius(1)=1.0,
ibrav=0, /
nat=xxx, ntyp=1, nbnd=xxx, nspin=1, ATOMIC_SPECIES
ecutwfc=20.0, ecutrho=80.0, Si 28.0855 Si.pz-vbc.UPF
/
Someplots
Etot,econs,econt(nothermostat)
Econs,econt(nothermostat)
Ekinc(nothermostat)
Temperature(nothermostat)
Temperature(thermostat)
Etot,econs,econt(thermostat)
Econsetotandtemperature

Which is the proportionality


coefficient?
cppp.xinputfile:movies

&INPUTPP
prefix = 'cp' ,
fileout = 'postproc' ,
outdir = './tmp' ,
output = 'xsf' ,
ndr = 931 ,
lcharge = .false. ,
atomic_number(1)=1 ,
ldynamics = .true. ,
nframes = 200 ,
/

This produces a film .axsf


that you can open with
xcrysden

You might also like