Mbfit is a simulation package for Many-beam Bloch wave calculation, which is originally written by K. Tsuda. The details of theory will not be presented here. The main features of mbfit include:
Currently only the first three are implemented in EDM2.0-beta package. Let’s start with a simple tutorial.
The EDM code has some ability to edit the input files for mbfit, although this is not complete in all cases. Hence you may need to do some editing by hand. The mbfit ignores comment characters followed by “#” or “%” in an input file. The input file is consists of four main datablocks and their sub-datablocks. Any data in the COMMENT{ }COMMENT data block will also be ignored. There some example input files under directory /usr/local/edm/mbfit/: s1.txt, s2.txt, s3.txt, s3.txt: CBED simulations bl1.txt, bl2.txt: Bloch wave. ds.txt: Dispersion surface
Three IMPORTANT notes about input file format
The above input files are all annotated with self-explained text. All input files consist of 4 parts. Here are more details for them.
This tells mbfit what kind of simulation to do. The possible values are:
Usually you don’t need to change internal parameters. They are only useful for debugging the package. You can just leave it blank.
EPS_CONTROL_PARAMETERS{ }EPS_CONTROL_PARAMETERS
This data block contains unit cell and atom
sites information. It has three sub-datablocks:
LATTICE, ATOM, and LOW_ORDER_FG. This data block is the same for CBED
simulation,
Bloch Wave calculation and Dispersion surface calculation.
An example for cubic SiC:
CRYSTAL_STRUCTURE_DATA{
#
LATTICE{
216 # Number of space group
# lattice parameter [in Angstrom units]
4.358 # a
4.358 # b
4.358 # c
90.0 # alpha
90.0 # beta
90.0 # gamma
}LATTICE
#
ATOM{
2 # Number of independent sites.
# if you have n independent sites,
#then you should have n SITE{ }SITE sub-datablock.
#
SITE{
SI
0.0 # x (fractional coordinate)
0.0 # y
0.0 # z
ISO # ISO: isotropic-B / ANISO: anisotropic-B
0.25 # x (fractional
coordinate)
0.25 # y
0.25 # z
ISO # ISO: isotropic-B / ANISO: anisotropic-B
}ATOM
#
LOW_ORDER_FG{
# this is for refinement of structure parameters mode.
# just leave it as 0
# Nothing to do CBED simulation, Bloch wave, and Dispersion surface modes
0 # number of low-order g, this is for refinement of structure parameter
}LOW_ORDER_FG }CRYSTAL_STRUCTURE_DATA
This data block contains information for simulation conditions, such as incidence beam, accelerating voltage, thickness etc. Note that for different simulation modes, this data block has different sub-datablocks.
SIM_CALCULATION_CONDITION{
#
INCIDENT_BEAM{
1 1 1 # Incidence (upward)
1 1 1 # Surface normal (upward)
2 -2 0 # ZOLZ base vector
0.0 # H tilt
0.0 # K tilt
100.0 # Accelerating Voltage [kV]
}INCIDENT_BEAM
# CALC_KXY_RANGE{
0 # cal_range_flag [dummy: always 0]
2 # Calc. type [0:0D, 1:1D, 2:2D disk, 3:2D square]
# Calc. type: 0 for Bloch waves, 1 for
Dispersion surface
# Calc. Type: 2 and 3 for CBED simulation.
101 # numh: number of calc. points > 5 (total~sq(numh))
# the final image will be 101x101
-3.0 3.0 # h_begin, h_end
-3.0 3.0 # k_begin, k_end
}CALC_KXY_RANGE
#
BEAM_SEARCH{
# Automatic beam search
2 #
Beam search method [0:manual, 1:auto[wg], 2:[sg]]
400 4.0 0 0 # num_g_limit, g_max[A^{-1}], LaueZone_min, LaueZone_max
# num_g_limit: maximum number of g
# if you want to search higher Lauezones, set LaueZone_max>0
0.02 0.03 1e+11 # Sg_exact_max, Sg_bethe_max, ξg_max
# if the beam search method is 1, then the above line is Wg_exact_max,
Wg_bethe_max, ξg_max
}BEAM_SEARCH
# OUTPUT_REFLEX{
2 # Number of reflections to be calculated (0:all)
# indices hkl
0 0 0
2 -2 0
#
}OUTPUT_REFLEX
OUTPUT_THICKNESS{
# Number of thicknesses for output
2
# thicknesses (in Angstrom units)
250 500
}OUTPUT_THICKNESS
}SIM_CALCULATION_CONDITION
4.2 An example for Bloch wave
BLOCH_CALCULATION_CONDITION{
#
INCIDENT_BEAM{
1 1 1 # Incidence (upward)
1 1 1 # Surface normal (upward)
2 -2 0 # ZOLZ base vector
-1.0 # H tilt
0.0 # G tilt
100.0 # Accelerating Voltage [kV]
}INCIDENT_BEAM
#
CALC_KXY_RANGE{
0 # cal_range_flag
[0:manual]
0 # Calc. type [0:0D],
0 for Bloch wave
1 # numh: number of
calc. points
0.0 0.0 # h_begin, h_end
0.0 0.0 # k_begin, k_end
}CALC_KXY_RANGE
#
BEAM_SEARCH{
# Automatic beam search
2 #
Beam search [0:manual, 1:automatic-wg, 2:automatic-sg]
200 4.0 0 0 # num_g_limit, g_max[A^{-1}], LaueZone_min, LaueZone_max
# if you want to search higher Lauezones, set LaueZone_max>0
0.02 0.03 1e+11 # Sg_exact_max, Sg_bethe_max, ξg_max
}BEAM_SEARCH
#
CALC_RXY_RANGE{ 1
01 101 # Number of calculation
points for x, y (odd number)
-2.0 2.0 # x_begin, x_end (along the ZOLZ
base vector)
-2.0 2.0 # y_begin, x_end (perpendicular
to the ZOLZ base vector)
}CALC_RXY_RANGE
#
OUTPUT_BRANCH{
1 7 # Number of
branches to be calculated (begin, end)
}OUTPUT_BRANCH
}BLOCH_CALCULATION_CONDITION
4.3 An example for Dispersion surface
DISPSURF_CALCULATION_CONDITION{
#
INCIDENT_BEAM{
1 1 1 # Incidence (upward)
1 1 1 # Surface normal (upward)
2 -2 0 # ZOLZ base vector
0.0 # H tilt
0.0 # G tilt
100.0 # Accelerating Voltage [kV]
}INCIDENT_BEAM
#
CALC_KXY_RANGE{
0 # cal_range_flag
[dummy: always 0]
1 # Calc. type
[should be 1 for DISPSURF_MODE]
81 # numh: number
of calc. points > 5 (total~sq(numh))
-2.0 2.0 # h_begin, h_end
0.0 1.0 # g_begin, g_end
}CALC_KXY_RANGE
#
BEAM_SEARCH{
# Automatic beam search
2 #
Beam search [0:manual, 1:automatic-wg, 2:automatic-sg]
200 4.0 0 0 # num_g_limit, g_max[A^{-1}], LaueZone_min, LaueZone_max
# if you want to search higher Lauezones, set LaueZone_max>0
0.02 0.03 1e+11 # Sg_exact_max,
Sg_bethe_max, ξg_max
}BEAM_SEARCH
#
OUTPUT_BRANCH{
1 7 # Number of branches to be calculated (begin, end)
}OUTPUT_BRANCH
#
OUTPUT_REFLEX{
2 # Number of reflections (0 means no output of epsCg and
intensities)
# indices hkl
0 0 0 2 -2 0
}OUTPUT_REFLEX
#
OUTPUT_THICKNESS{
2 # Number of thicknesses for output
# (0: no intensity output) # thicknesses (Angstrom)
250 500 }OUTPUT_THICKNESS }
DISPSURF_CALCULATION_CONDITION
# s1.txt
# mbfit: a sample data for CBED simulation
# Comment lines: # or % or COMMENT{ }COMMENT
# ----------------------------------------------------------------------
# job type
# SIM_MODE: CBED simulations
# ----------
SIM_MODE
# ----------------------------------------------------------------------
# For changing internal control parameters
EPS_CONTROL_PARAMETERS{
}EPS_CONTROL_PARAMETERS
# ----------------------------------------------------------------------
# Crystal structural data block
CRYSTAL_STRUCTURE_DATA{
#
LATTICE{
227 # Number of space group
# lattice parameter [in Angstrom units]
5.43 # a
5.43 # b
5.43 # c
90.0 # alpha
90.0 # beta
90.0 # gamma
}LATTICE
#
ATOM{
1 # Number of independent sites.
##
SITE{
SI
0.0 # x (fractional coordinate)
0.0 # y
0.0 # z
ISO # ISO: isotropic-B / ANISO: anisotropic-B
0.5 # B [A^{2}]
1.0 # occupancy [0.0-1.0]
0 # f table (0:Mott+BK, 1:BK+BK)
}SITE
}ATOM
#
LOW_ORDER_FG{
0 # number of low-order g
}LOW_ORDER_FG
}CRYSTAL_STRUCTURE_DATA
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Simulation: calculation condition block
SIM_CALCULATION_CONDITION{
#
INCIDENT_BEAM{
1 1 1 # Incidence
(upward)
1 1 1 # Surface normal (upward)
2 -2 0 # ZOLZ base vector
0.0 # H tilt
0.0 # G tilt
100.0 # Accelerating Voltage [kV]
}INCIDENT_BEAM
#
CALC_KXY_RANGE{
0 # cal_range_flag [dummy: always 0]
2 # Calc. type [0:0D, 1:1D, 2:2D disk, 3:2D square]
101 # numh: number of calc. points > 5
(total~sq(numh))
-1.0 1.0 # hbgn, hend
-1.0 1.0 # gbgn, gend
}CALC_KXY_RANGE
#
#
BEAM_SEARCH{
# Automatic beam search
2
# Beam search [0:manual, 1:automatic-wg, 2:automatic-sg]
200 4.0 0 0 # num_g_limit,
g_max[A^{-1}], lz_min, lz_max
0.02 0.03 1e+11 # sg_exact_max, sg_bethe_max,
xi_g_max
}BEAM_SEARCH
#
COMMENT{ --------------------------------------------------
BEAM_SEARCH{
# Manual beam input
0 # Beam search method [0:manual, 1:auto[wg], 2:[sg]]
7 0 # num. of exact, num. of bethe
0 0 0 # hkl
2 -2 0
-2 2 0
2 0 -2
-2 0 2
0 2 -2
0 -2 2
}BEAM_SEARCH
}COMMENT --------------------------------------------------
#
OUTPUT_REFLEX{
0 # Number of reflections to be calculated (0:all)
# indices hkl
#
}OUTPUT_REFLEX
OUTPUT_THICKNESS{
# Number of thicknesses for output
1
# thicknesses (in Angstrom units)
250
}OUTPUT_THICKNESS
}SIM_CALCULATION_CONDITION