MIT Photonic Bands (MPB) is a free program to compute the band
structures (dispersion relations) and electromagnetic modes of
periodic dielectric structures, and is applicable both to photonic
crystals (photonic band-gap materials) and a wide range of other
optical problems. Its features include: fully-vectorial, 3D
computations; a flexible user-interface based upon the GNU Guile
scripting language; output in HDF format; and iterative, targeted
eigensolver methods to address very large problems by solving for only
a few states near a specified frequency.
More information on MPB, including a detailed manual, can be found
online at the MPB home page:
A typical invocation of MPB looks like:
mpb foo.ctl >& foo.out
This causes MPB to process the control file foo.ctl and redirect its output
to foo.out. (One typically redirects output to a file, as the output is
verbose and contains a number of comma-delimited datasets that one can
extract by grepping.)
You can also use MPB in an interactive mode, in which you can type in
MPB commands (in Scheme/Guile) and immediately see their results.
Interactive mode is entered when you invoke
mpb with no control files, or if your control files dont contain any
run statements (which disable interactive mode), or if the last control file ends
(set! interactive? true) in which case interactive mode is entered after the control files
Another useful feature is that you can alter parameters in your control files
from the command line, by including definitions of the form
variable=value as arguments to
mpb (before the control files). This overrides the values of variables
define-param in the control file (including all of the predefined MPB input variables).
Multiple control files and definitions are executed in sequence, in
the order they are specified on the command line.