Slides Cp3
Slides Cp3
Moleculardynamics: ([email protected])
doingitbyCar....
andParrinello
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
CPpostprocessing:CPPP!
CPMDrun:whattodoinpractice
Set some ATOMC_POSITIONS
dt=XXX
Relax electronic wavefunction: orthogonalization=
(electron_dynamics='damp' 'Gram-Schmidt'
ion_dynamics='none')
27.211.. eV
o
Temperature: 315770 Kelvin
Let'slookatsomeinputfiles
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!!
...
...
...
Handsonexercise1:cponH2
Relax electronic wavefunction
&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
emass=1 emass=300
ion mass=1823 ion mass=1823
&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
&INPUTPP
prefix = 'cp' ,
fileout = 'postproc' ,
outdir = './tmp' ,
output = 'xsf' ,
ndr = 931 ,
lcharge = .false. ,
atomic_number(1)=1 ,
ldynamics = .true. ,
nframes = 200 ,
/