# Octopus (software)

Octopus is a software package for performing Kohn‍–‍Sham density functional theory (DFT) and time-dependent density functional theory (TDDFT) calculations.
Octopus employs pseudopotentials and real-space numerical grids to propagate the Kohn‍–‍Sham orbitals in real time under the influence of time-varying electromagnetic fields. Specific functionality is provided for simulating one-, two-, and three-dimensional systems. Octopus can calculate static and dynamic polarizabilities and first hyperpolarizabilities, static magnetic susceptibilities, absorption spectra, and perform molecular dynamics simulations with Ehrenfest and Car–Parrinello methods.
The code is written predominantly in Fortran and is released under the GPL.
The latest version 15.0 was released on October 10, 2024.

## Target problems

* Linear optical (i.e. electronic) response of molecules or clusters, also second-order nonlinear response.
* Non-linear response to classical high-intensity electromagnetic fields, taking into account both the ionic and electronic degrees of freedom.
* Ground-state and excited state electronic properties of systems with lower dimensionality, such as quantum dots.
* Photo-induced reactions of molecules (e.g., photo-dissociation, photo-isomerization, etc.).
* In the immediate future, extension of these procedures to systems that are infinite and periodic in one or more dimensions (polymers, slabs, nanotubes, solids), and to electronic transport.

## Theoretical basis

* The underlying theories are DFT and TDDFT. Also, the code may perform dynamics by considering the classical (i.e. point-particle) approximation for the nuclei. These dynamics may be non-adiabatic, since the system evolves following the Ehrenfest path. It is, however, a mean-field approach.
* Regarding TDDFT, one can use three different approaches:
** the standard TDDFT-based linear-response theory of Casida, which provides the excitation energies and oscillator strengths for ground-state to excited-state transitions.
** the explicit time-propagation of the TDDFT equations, which allows for the use of large external potentials, well beyond the range of validity of perturbation theory.
** the Sternheimer equation (density-functional perturbation theory) in the frequency domain, using only occupied states.

## Methodology

* As numerical representation, the code works without a basis set, relying on numerical meshes. Nevertheless, auxiliary basis sets (plane waves, atomic orbitals) are used when necessary. Recently, the code offers the possibility of working with non-uniform grids, which adapt to the inhomogeneity of the problem, and of making use of multigrid techniques to accelerate the calculations.
* For most calculations, the code relies on the use of pseudopotentials of two types: Troullier-Martins, and Hartwigsen-Goedecker-Hutter.
* In addition to being able to treat systems in the standard 3 dimensions, 2D and 1D modes are also available. These are useful for studying, e.g., the two-dimensional electron gas that characterizes a wide class of quantum dots.

## Technical aspects

* The code has been designed with emphasis on parallel scalability. In consequence, it allows for multiple task divisions, this utilises mesh division software, MPI and OpenMP.
* The language of most of the code is Fortran 90. Other languages, such as C, are also used.
* The package is licensed under the GNU General Public License (GPL). In consequence, it is available for use, inspection, and modification for anyone, at the Octopus git repository.