Restarts¶
The main results of a BAND calculation are stored in the RUNKF file. If you save this file you can use it to restart your calculation. The input for the restart calculation is essentially the same, except for some extra keys, like Restart
, Grid
, and DensityPlot
.
Plots of the density (and many other symmetric properties) can can be obtained with the key DensityPlot
. Density and orbital plot restarts require the specification of the Grid
key.
With the subkey SCF
you can start the SCF procedure with the last solution from the restart file. This can be useful if the SCF did not converge or if you want to compute some post-SCF properties (e.g. the DOS or the band structure). Similarly, a geometry optimization can be restarted with the subkey GeometryOptimization
You can use the geometry of a previous calculation.
Some examples are available in the $ADFHOME/examples/band
directory and are discussed in the Examples section.
Example: Restart SCF for properties calculation |
Example: Restart the SCF |
Example: Properties on a grid |
Restart key¶
Restart
Tells the program that it should restart with the restart file.
Restart File filename {option} UseDensityMatrix True/False End
File
- filename is the name of the restart file
UseDensityMatrix
- If True, SCF the density matrix will be used. Requires you to set the “Save DensityMatrix” in the previous run.
options is the program part to do a restart for:
- SCF (from orbitals or density matrix), see See example RestartSCF.
- GeometryOptimization
- Geometry
- OrbitalPlot
- DensityPlot
- NOCVdRhoPlot
- NOCVOrbitalPlot
Usually the input for a restart is the same as for the original calculation, where you add some extra options.
Grid¶
Grid (block-type)
Used for restart options
OrbitalPlot
,DensityPlot
,NOCVOrbitalPlot
andNOCVdRhoPlot
. There are two ways to define your grid. The most easy way is to use the Type key which can have the values Coarse, Medium, and Fine, for exampleGrid Type Coarse End
This generates automatically a grid around the atoms in the unit cell. The alternative is to specify everything by hand. The following input would create a cube from (-1,-1,-1) to (1,1,1)
Grid -1 -1 -1 ! Starting point 1 0 0 0.1 ! vec1 and dvec1 0 1 0 0.1 ! vec2 and dvec2 0 0 1 0.1 ! vec3 and dvec3 20 20 20 ! nr. of steps along three directions End
Plots of the density, potential, and many more properties¶
DensityPlot (block-type)
Goes together with the
Restart%DensityPlot
andGrid
keys. Example input... Restart vi File my.runkf DensityPlot End Grid Type Coarse End DensityPlot rho(fit) vxc[rho] End ...
After such a run you get a TAPE41 file that you should rename to my.t41, and view with ADFview.
The most common properties to plot are:
rho(fit)
The fitted density.v(coulomb)
The Coulomb potential.vxc[rho(fit)]
the XC potential (using the fitted density)vxc[rho]
XC potential of the exact densityrho
The density|gradRho|
The norm of the gradient of the densitytau
The symmetric kinetic energy densityLDOS
The local density of states. (See LDOS key)elf[rho]
The electron localization function
Some more specialized options are:
rho(deformation/fit)
the fitted deformation densityrho(atoms)
The density of the startup atomsv(coulomb/atoms)
The Coulomb potential of the start densitys[rho]
Reduced density gradient. Common ingredient for XC functionalss[rho(fit)]
Same as above, now for the fit densityalpha[rho]
Ingredient for some meta-GGAs
In the BAND example directory there is the Frags_COCu example which shows how this can be used in combination with the
Fragment
key.
Orbital plots¶
OrbitalPlot (block-type)
Goes together with the
Restart%OrbitalPlot
andGrid
keys. In the BAND example directory there is the Cu_slab example that shows how this can be used. Example input... Restart File my.runkf OrbitalPlot End Grid Type Coarse End OrbitalPlot 1 Band 5 8 ! for k-point 1 plot bands 5 to 8 5 Band 6 ! for k-point 5 plot band 6 6 -0.2 +0.3 ! for k-point 6 plot bands between -0.2 and +0.3 a.u. w.r.t Fermi level End ...
After such a run you get a TAPE41 file that you should rename to my.t41, and view with ADFview.
NOCV Orbital Plots¶
NOCVOrbitalPlot (block-type)
Goes together with the
Restart%NOCVOrbitalPlot
andGrid
keys. See example PEDANOCV_MgO+CO. Example input... Restart File my.runkf NOCVOrbitalPlot End Grid Type Coarse End NOCVOrbitalPlot 1 Band 5 8 ! for k-point 1 plot NOCV Orbitals 5 to 8 End ...
After such a run you get a TAPE41 file that you should rename to my.t41, and view with ADFview.
NOCV Deformation Density Plots¶
NOCVdRhoPlot (block-type)
Goes together with the
Restart%NOCVdRhoPlot
andGrid
keys. See example PEDANOCV_MgO+CO. Example input... Restart File my.runkf NOCVdRhoPlot End Grid Type Coarse End NOCVdRhoPlot 1 Band 5 8 ! for k-point 1 plot NOCV deformation densities 5 to 8 End ...
After such a run you get a TAPE41 file that you should rename to my.t41, and view with ADFview.
LDOS (STM)¶
LDOS (block-type)
Local Density-Of-States information. This can be used to generate STM images in the Tersoff-Hamann approximation.[35]
LDOS { Shift eshift } { DeltaNeg deneg } { DeltaPos depos } End
Shift
- (Default: 0.0 a.u.) The energy bias with respect to the fermi level in a.u..
DeltaNeg
- (Default: 1e-4 a.u.) defines the lower bound energy as eshift-deneg.
DeltaPos
- (Default: 1e-4 a.u.) defines the upper bound energy as eshift+depos.
The local density of states is integrated over the resulting interval. Example of an LDOS restart
Restart File my.runkf DensityPlot End Grid Type Coarse End DensityPlot LDOS Shift 0.1 DeltaNeg .001 DeltaPos 0 End
According to this example, we restart from the result file of a previous calculation. The calculation will generate a file TAPE41 which can be viewed with ADFview. (Rename the file to my.t41)
See also Restart, and DensityPlot.
Complete example scripts for visualization¶
Below follows a complete example how to use BAND for visualizing. We start with the normal calculation for e.g. a Li slab
#!/bin/sh
# Contents of the file LiSlab.job
"$ADFBIN/band" << eor
TITLE Li Slab
UNITS
length Angstrom
angle Degree
END
ATOMS Li
Li 0.0 0.0 0.0
Li -1.745 -1.745 -1.745
END
Lattice
3.49 0.000000 0
0.000000 3.49 0
End
BasisDefaults
BasisType DZ
Core Large
End
XC
LDA SCF VWN
END
end input
eor
# store the result file
mv RUNKF LiSlab.runkf
Note that we store the result file in “LiSlab.runkf”. In the next run we use this file to generate the plot file. The job is essentially a copy of the first job with some extra lines. In this case we instruct the program to generate plot information for the density and the LDOS
#!/bin/sh
# Contents of the file LiSlab_restart.job
"$ADFBIN/band" << eor
TITLE Li Slab
UNITS
length Angstrom
angle Degree
END
Restart
File LiSlab.runkf
DensityPlot
End
Grid
Type Coarse
End
DensityPlot
rho(fit)
LDOS
End
LDOS
shift 0.0
End
ATOMS
Li 0.0 0.0 0.0
Li -1.745 -1.745 -1.745
END
Lattice
3.49 0.000000 0
0.000000 3.49 0
End
BasisDefaults
BasisType DZ
Core Large
End
XC
LDA SCF VWN
END
end input
eor
# Store the result file, and more importantly, the plot file (.t41)
mv RUNKF LiSlab_restart.runkf
mv TAPE41 LiSlab.t41
And then you can visualize the result with ADFview.
$ADFBIN/ADFview LiSlab.runkf
It is most convenient to start ADFview from the .runkf file rather than from the .t41.
Save¶
With “Save -something-” directives you can tell BAND to save extra information.
TAPE10
One option is “Save TAPE10”, which will cause the file with the grid to be saved.
DensityMatrix
The “Save DensityMatrix” command causes the density matrix to be written to the RUNKF file, needed with Restart%UseDensityMatrix true
.