Perl scripts to generate phonon dispersion and DOS plots from CASTEP calculations
This repo contains a public copy of the phonon/bandstructure dispersion and DOS plotting scripts from the CASTEP distribution.
These scripts read the .phonon or .bands output files written by CASTEP containing the phonon and electronic eigenvalues respectively, and generate near publication-quality plots.
Both will generate easy to parse, tabular data, or of invoked with the -xg or -gp flag will directly invoke either the xmgrace or gnuplot plotting packages.
Example dispersion.pl -xg -symmetry fcc <seed>.phonon
Usage:
-xgWrite a script and invoke GRACE to plot data.-gpWrite a script and invoke GNUPLOT to plot data.-monoCreate monochrome xmgrace plot-psInvoke GRACE to plot data and write as a PostScript file.-epsInvoke GRACE to plot data and write as an encapsulated PostScript (EPS) file.-npDo not plot data, write a GRACE script.-njDo not attempt to perform eigenvector matching on phonon data for joined dispersion plots-bsRead band-structure from <>.castep or <>.bands.-upExtract and plot only spin up from <>.castep or <>.bands (implies -bs).-downExtract and plot only spin down from <>.castep or <>.bands (implies -bs).-symmetry SYMLabel plot according to Brillouin Zone of SYM=sc/fcc/bcc/hexagonal/tetragonal/orthorhombic....-expt FILERead experimental data from EXPT and overplot.-datReread standard output from previous run and plot.-ftol fSet maximum discrepancy tolerance for phonon branch joining.-sf sMultiply frequencies by scaling factor of s.-units sConvert output to specified units for plotting.-vBe verbose about progres
Example dos.pl -xg -w 10 <seedname>.phonon
-gpWrite a script and invoke GNUPLOT to plot data.-psInvoke GRACE to plot data and write as a PostScript file.-epsInvoke GRACE to plot data and write as an encapsulated PostScript (EPS) file.-npDo not plot data, write a GRACE script.-bsRead band-structure from <>.castep or <>.bands.-mirrorPlot spin-polarized electronic DOS using "mirror" plot.-b wSet histogram resolution for binning (eV or cm**-1).-irExtract ir intensities and model (fundamentals-only) ir spectrum from .phonon.-ramanExtract raman intensities and model (fundamentals-only) raman spectrum from .phonon.-temp TTemperature to use (in raman spectrum modelling).-expt FILERead experimental data from EXPT and overplot.-datReread standard output from previous run and plot.-w sSet Gaussian/Lorentzian FWHM for broadening.-lorentzUse Lorentzian broadening instead of Gaussian-units sConvert output to specified units for plotting.-vBe verbose about progress-zPrint zero-point energy