The 31th CMD workshop”Practice of Esopt”
Introduction
Koichi KusakabeGrad. Sch. Eng. Sci, Osaka University

Let’s start the X window system
 We use machines operated by a Linux system .
 Each user is identified by “user id” & “password”.

 Your terminal might start by pushing the monitor button.

Use the id of “cmd” for ubuntsu with pw, “c.m.dworkshop”.
cmdパスワード

Access to the PC cluster in phys.sci.
 Login the X terminal machine: Account : stud** or cmd
 Password : none or “cmdworkshop”

 Open a terminal window, and access `cmd2’.
[stud** ~]$ ssh –Y –l stud** cmd2.phys.sci.osaka-u.ac.jp
passwd:…
[stud**@cmd2 ~]$Preparation for the program package
 Copy the program package.
Type the red characters in a single line without “return” in the middle.

[stud**@cmd2 ~] cp /home/CMD/teac01/ESoptCMD31-fw.tgz .
“a space and a period” are requested.

 Unpack the package by tar command.
[stud**@cmd2 ~] tar zxvf ESopt-CMD31-fw.tgz

How to compile the program?
 Change the directry to the main directry of ESopt, checkthe header of makefile, then `make’.
[stud**@cmd2 ~]$ cd ESopt-CMD31-fw[stud**@cmd2 ~/ESopt-CMD31-fw]$ lsarray_symmet.f90 evl.f90
initkb.f90 ….
….
[stud**@cmd2 ~/ESopt-CMD31-fw]$ head makefile# The makefile for ES_opt#
DESTDIR=Si-banddestination#

Please rewrite this line!!!

<= this is the…
[stud**@cmd2 ~/ESopt-CMD31-fw]$ cp INPUT_DATA/CORD-Si-b
INPUT_DATA/CORD[stud**@cmd2 ~/ESopt-CMD31-fw]$ make < input_makeRun the program Change the directory to the destination written

in the header of the makefile
DESTDIR=Si-band <= you may rewrite this name.
 If you have a working directory named `Si-band’,

you may submit a job using the queing system,[stud**@cmd2 ~/ESopt-CMD31-fw]$ cd Si-band[stud**@cmd2 Si-band]$ qsub qsub
[stud**@cmd2 Si-band]$ qstat

What happens, when you compile it?
 At beginning, make creates executable file,“opt”.
 Once “opt” is made, make will create a working
directry for each project given inINPUT_DATA/CORD.
 The name of the working directry is given in theheader of makefile.
 Some temporary data files are created in a subdirectry “mknon”.

Bulk modulus: Second derivative of E(V)Vdp Vd 2 E,Bulk modulus at T=0: B0  2dVdVB ' B0V0B0V  V0 / V  0Murnaghan eq. of states: E V   E0  1 .
B0 '  B0 '1B'
10
calc_mode: bas
band_calc: metal
Ecut = 40 Ry.

“Total energy” is seenby looking atMONIT/energy.
In this calculation,“murnfit” tells that
B0=89GPa.

A non-linear fitting problem
 Murnaghan’s equation of states
B0 'B0V V0 / V 
CE (V ) 1B0 '  B0 '1 V 1 B0 '  V  
B 'V B ' V    V  000

B0 ' ( B0 '1), B0,   C ,   1  B0 'B0 'We let four sets of (V, E(V)) be (xi,yi) (i=1,4).
yx 1   1 y 2    x2 y   x
 3  3x1 1   x2 1      ,   ,   x3 1  g    y4    x4    x4    
Finding  which gives
g()=0 is important.

Trial 1: Bulk modulus of c-BN
 Change the directory to the destination in “makefile” as,

DESTDIR=cBN <= you may rewrite this name.
 If you see utility/cBN_scripts, CORD files for the test as well assome utility scripts, chev.sh, sub.sh, and summ.sh are stored.
[stud**@cmd2 ~/ESopt-CMD31-fw]$ cd utility/cBN_scripts[stud**@cmd2 cBN_scripts]$ cp CORD_5 ../../INPUT_DATA/CORD[stud**@cmd2 cBN_scripts]$ cd ../../[stud**@cmd2 ~/ESopt-CMD31-fw]$ head makefile[stud**@cmd2 ~/ESopt-CMD31-fw]$ make < input_make[stud**@cmd2 ~/ESopt-CMD31-fw]$ cd cBN[stud**@cmd2 cBN]$ qsub qsub Create a0ene.dat and a0ene.dati. (An example is in utility/cBN_scripts)
 You can do the fitting by asking murnfit in fit_esopt.
[stud**@cmd2 cBN]$ pushd ../fit_esopt
Equilibrium volume: V0[stud**@cmd2 fit_esopt]$ make
Bulk modulus: B0[stud**@cmd2 fit_esopt]$ popd
Pressure deriv. of bulk modulus: B0’[stud**@cmd2 cBN]$ ../fit_esopt/murnfit

Flow diagram to check accuracy
Select the target system
GoodP.P.
NoAre P.P.s available？

Create P.P.

Convergence?
Logarithmic derivative?

Not good

Yes
Test of P.P. OK？

No

Test calc.
Estimation of params.

Accuracy？
Band str.? Ghost?

Yes
Estimation of Ecutetc. OK？

GoodNoYesYesCalc. of the target!

Accuracy OK？
Rebuild of P.P.？

NoInterpretationof the result

Ecut dependence of the total energy
calc_mode: bas
band_calc: metal

For an ordinal use, 40 Ry may be allowed.
To have a converged stress tensor, Ecut > 60 Ry would be required.

Trial 2: Cutoff check of PP
 Select an element among “Al, Ca, Cu, Mg, Mn, Si”.
 You can see an example of “CORD” for them in INPUT_DATA.

 Change the directory to the destination in “makefile” like,DESTDIR=Al <= you may rewrite this name.
 Using an example, try the cutoff test.
[stud**@cmd2 ~/ESopt-CMD31-fw]$ cp INPUT_DATA/CORD-Al
INPUT_DATA/CORD[stud**@cmd2 ~/ESopt-CMD31-fw]$ emacs INPUT_DATA/CORD… please “edit” the input file “CORD”. …
[stud**@cmd2 ~/ESopt-CMD31-fw]$ head makefile[stud**@cmd2 ~/ESopt-CMD31-fw]$ make < input_make[stud**@cmd2 ~/ESopt-CMD31-fw]$ cd Al[stud**@cmd2 Al]$ qsub qsub Create a data file of “the lattice constant a” v.s. “the total energy”.
 Total energy may be seen in MONIT/energy, RESULTS/Htot001 (for basicmode), or STRUCT/result0001 (for extended mode).

Some post-processing commands
 For writing a band structure calculation,
 Select band_calc = ‘bands’ in INPUT_DATA/CORD,
 Do ‘make’ after checking
INPUT_DATA/kpoint Top of the ‘makefile’ Do run your job by ‘qsub qsub’ in the working
directry.
 After finishing the job, you can type,
$ ../utility/vbpef2gp –s –e fort.50
 $ gnuplot
 We now see the functions of ‘xcrysden’ by seeing ‘axsf’ file inyour ‘Si-band’.
Kohn-Sham band structure of Si
calc_mode: basband_calc: bands

For this band calculation, Ecut = 60 Ry is used.
ncband=6 in CORD is used to obtain unoccupied levels.

Band structures of SWNT
Tight binding modelwith p orbitals only

DFT-LDA using optimizedstructure1/3-rule in a simple TBM band structure

Saito, Dresselhaus, Dresselhaus, ‘Physical Properties of Carbon Nanotubes’,
Imperial College Press.

LDA band structures for thin SWNT

Machón, et al. Phys. Rev. B 66, 155410 (2002).

Trial 3: band structure of CNT
 We can use prepared inputs as follows.
[stud**@cmd2 ~/ESopt-CMD31-fw]$ cp INPUT_DATA/CORD-50Tube-b
INPUT_DATA/CORD# Check E_cut in CORD
[stud**@cmd2 ~/ESopt-CMD31-fw]$ cp INPUT_DATA/kpoint-b
INPUT_DATA/kpoint[stud**@cmd2 ~/ESopt-CMD31-fw]$ emacs –nw makefile<< rewrite header of makefile so that “DEST-DIR = Tube-band” >>[stud**@cmd2 ~/ESopt-CMD31-fw]$ make < input_make[stud**@cmd2 ~/ESopt-CMD31-fw]$ cd Tube-band[stud**@cmd2 Tube-b]$ qsub qsub
# We need to wait for a while. If we need, please see the result tomorrow.

[stud**@cmd2 Tube-b]$ ../utility/vbpef2gp –s –e fort.50[stud**@cmd2 Tube-b]$ gnuplot
gnuplot> load ‘bandfig.gp’The 29th CMD workshop”Practice of Esopt”
Overview of optimization problems
Koichi KusakabeGrad. Sch. Eng. Sci, Osaka University

Multi-dimensional optimization problem
We regard next quantities as
the variables determining ofthe system.
1. Electronic state
2. Atomic position
3. Unit cell (lattice parameters)

Restricted by the periodic boundary
condition, various electronic states
appear depending on atomic positionin the variable unit cell.

Multi-dimensional optimization problem
In the actual simulation, we have

3. Electronic state
2. Atomic positions
1. Unit cellto be optimized in an order ofthe number.

Multi-dimensional optimization problem
Structural change given by modification of lattice vectors
induced by difference between internal stress and theexternal pressure.

a3a3

a2

a2
a1

a1

9 - 3 = 6 degrees of freedom after removing total rotation of the system.
1. Lattice constants
2. Elastic constants
3. Structural transformation← optimization of all parameters← deformation of stable structure← molecular dynamics

Multi-dimensional optimization problem
Structural change and electronic structure of the structure
obtained by shift in atomic position due to the interatomic force.

Optimization ofElectronic state

Interatomic force
ESopt
Shift in the 3×Natom structural parameters
Change in the crystal symmetry
We can determine,
1. Stable atomic configuration
2. Intermediate state (transition state), reaction energy

Multi-dimensional optimization problem
 Perform optimization of essential parameters tomake the energy be the lowest. Theoptimization is done with respect to Lattice constants
 Atomic configuration
 Electronic structure The optimization process is very similar,

because all of the procedure is regarded as
motion of a particle on an energy surface.

Multi-dimensional optimization problem
 Technique of the optimization
 Global search ： most powerful. Global structure of theenergy surface should be known before the optimization.
 Searching methods utilizing a gradient vector ： very fast.
Optimization follows a line toward the minimal point.

P2

L2

L1

P1

Multi-dimensional optimization problem
 Available methods
 Metadynamics ： search of potential minimal points
beyond a potential barrier Search of saddle points ： force inversion technique
Making the change in thepotential surface, a motion go
beyond the barrier is realized.

P2

L2

L1

Force inversion make the motion
going up the hill.

P1

Methods to find the transition states
Nudged elastic band method：• Replicas （yellow points）feel repulsion.
• They give a path through TS.

Force inversion：• If the landscape is simple,• The transition state is fixed.

BO surface

L2

P2

P2

L2

L1

L1

P1

P1
28

Minimum search on the Born-Oppenheimer(BO) surface

If one look for the minimum locally around this point, one cannot
find existence of another true minimum.
• Electronic structure at this point shows only local stability.
• Even if one make small vibration around this local minimum, only
stable oscillation will appear.
In this situation, we need global search on the BO surface.
But, search in the whole 3×Natom-dimensional space ispractically impossible.
: At present, for the first-order transition, the first-principles
molecular dynamics can do little without wisdom on materials.

Search for the saddle point on the BO surface
If one has some locally stable points, the saddle point of the BO surface may
be found. But, we could have difficulty even in this case.

One dimensional search:
Optimization methods which cansearch a minimum point in asection perpendicular to thereaction coordinate may give thesaddle point.

In this case, this saddle point
given by the one dimensional
search does not tell us the true
potential barrier, since we haveanother way to go without thebarrier.

Unstable fixed points

A saddle point

If we optimize all the coordinate
other than the reaction coordinate,
the saddle point is given.
But, we may have restriction due toundesired symmetry in thesimulation due to1) Finite simulation cell2) Assumed symmetry in the run.

A unstable fixed
point which may
be obtained as asaddle point in a
A section of BOS
restricted search.
At the unstable fixed point, interatomicforces are balanced. If one look at thesecond-order derivative (the Hessianmatrix), we may have several paths tosome stable points.

An example in the structural transformationof carbon systems
by Y. Tateyama et al.

The force inversion techniquedetermines two saddle points fromthe graphite to two diamondstructures.

Saddle point

Unstable fixed point

The meta-dynamics simulation
Following the motion of a system inthe molecular dynamics, we add
artificial potential to the true potential.

Vg ( x)  W exp( x(t )  x(ti ) 2h 2 )2ti tUtilizing this technique, we can reach 1)
the lowest saddle point, and 2) a stablestructure beyond the saddle point. If weproceed to perform this simulation without
removing Vg, we should reach all of thelocal minima on the BO surface.

A. Laio, M. Parrinello, Proc. Natl. Acad. Sci. U.S.A. 99, 12562 (2002).
R. Martonak, et al., Phys. Rev. Lett. 90, 075503 (2003).

Recommended procedure of the structural
optimization
 The case of bulk crystal structure Rough estimation of the stable structure with theconstant-pressure MD.
 Optimization of the lattice constant by accurate
electronic structure calculation.
 Estimation of the bulk modulus and the elasticconstants. Comparison with the experimentallyobserved values.
 Confirmation of positivity in the phonon modes.
 If an imaginary frequency appears, this may
indicate that the simulation cell is too small. Try
the larger simulation cell.

MD simulation of graphite in high pressureStructural optimization method
 Optimization of bulk crystal structure Estimate roughly by the constant pressure mode.
 Improve the accuracy, optimize lattice constantsfor the case with the unit e.
 Calculate the bulk modulus and elastic constants
and compare the real observation.
 Check that phonon modes have positive real
frequency. (We need the super cell technique.) If an imaginary frequency appears, find aconstraint in the simulation, remove therestriction and re-optimize the parameters.