We present OptaDOS, a program for calculating core-electron and low-loss electron energy loss spectra (EELS) and optical spectra along with total-, projected- and joint-density of electronic states (DOS) from single-particle eigenenergies and dipole transition coefficients. Energy-loss spectroscopy is an important tool for probing bonding within a material. Interpreting these spectra can be aided by first principles calculations. The spectra are generated from the eigenenergies through integration over the Brillouin zone. An important feature of this code is that this integration is performed using a choice of adaptive or linear extrapolation broadening methods which we show produces higher accuracy spectra than standard fixed-width Gaussian broadening. OptaDOS may be straightforwardly interfaced to any electronic structure code. OptaDOS is freely available under the GNU General Public licence from http://www.optados.org. Program summary: Program title: OptaDOS. Catalogue identifier: AESK_v1_0. Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AESK_v1_0.html. Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland. Licencing provisions: GNU General Public License, version 3. No. of lines in distributed program, including test data, etc.: 110 299. No. of bytes in distributed program, including test data, etc.: 1 889 705. Distribution format: tar.gz. Programming language: Fortran 95. Computer: Any architecture with a Fortran 95 compiler. Operating system: Linux, Mac OS X. Has the code been vectorised or parallelised?: Yes, using MPI. RAM: 10 MB. Word size: 32 or 64. Classification: 7.2, 7.3. External routines: MPI to run in parallel, CASTEP or any other electronic structure code capable of generating single-point eigenenergies and dipole transition coefficients. Nature of problem:. Many properties of materials can be described using integration over the Brillouin zone such as core-level and low-loss EELS and optical spectra. This integration is performed computationally using a grid of k-points. The discrete energy eigenvalues must be interpolated into a continuous spectra. The most common method broadens the eigenvalues using a Gaussian function. Gaussian broadening suffers from slow convergence with number of k-points and a difficulty in resolving fine spectral features. Solution method:. OptaDOS improves the underlying Brillouin zone integration beyond fixed-width Gaussian broadening by using band gradients to perform adaptive and linearly extrapolated broadening. This increases the resolution of the predicted spectra. Unusual features:. Simple and user-friendly input system. Along with the usual band energies, band gradients are used to generate the linear extrapolation and adaptive broadening schemes producing a superior output able to represent both dispersive and localised bands concurrently. Additional comments:. The input data to OptaDOS are single-particle eigenenergies and dipole transition coefficients. OptaDOS has an interface to obtain these from the CASTEP plane wave density-functional theory (DFT) code. The interfacing of OptaDOS with other electronic structure codes, which are also capable of generating such inputs, is currently being undertaken. Running time:. A few seconds to ∼10 min. © 2014 Elsevier B.V. All rights reserved.