\section{The Octopus code}

Octopus was started around 2000 in the group of professor Angel Rubio who, at that moment, was at the University of Valladolid, Spain. The first article using Octopus was published in 2001~\cite{Marques_2001}. Today, the code has grown to 200,000 lines of code. Octopus receives contributions from many developers from several countries and its results have been used for hundreds of scientific publications.

The original purpose of Octopus was to perform real-time time-dependent density functional theory (TDDFT) calculations, a method that had been recently proposed at the time for the calculation of excited-state properties in molecules~\cite{Yabana_1996}. Beyond this original feature, over the time the code has become able to perform many types of calculations of ground-state and excited-state properties. These include most of the standard features of a modern electronic-structure package and some not-so-common capabilities. 

Among the current capabilities of Octopus are an efficient real-time TDDFT implementation for both finite and periodic systems~\cite{Bertsch_2000,Aggarwal_2012}. Some of the research presented in this article is based on that feature, such as the simulation of photoemission, quantum optimal control, and plasmonic systems. The code can also perform molecular-dynamics simulations in the Born-Oppenheimer and Ehrenfest approximations. It also implements a modified Ehrenfest approach for adiabatic molecular dynamics~\cite{Alonso_2008,Andrade_2009} that has favorable scaling for large systems. Octopus can perform linear-response TDDFT calculations in different frameworks; these implementations are discussed in sections~\ref{sec:sternheimer} and~\ref{sec:casida}. For visualization, analysis and post-processing, Octopus can export quantities such as the density, orbitals, the current density, or the time-dependent electron localization function~\cite{Burnus_2005} to different formats, including the required DFT data to perform GW/Bethe-Salpeter calculations with the BerkeleyGW code~\cite{Deslippe_2012}.

Octopus is publicly and freely available under the GPL free/open-source license, this includes all the releases as well as the development version. The code is written using the principles of object oriented programming. This means that the code is quite flexible and modular. It provides a full toolkit for code developers to perform the operations required for the implementation of new approaches for electronic-structure calculations.

In order to control the quality of the package, Octopus uses continuous integration tools. The code includes a set of tests that checks most of the functionality by verifying the calculation results. After a new change is commited to the main repository, a set of servers with different configurations compiles the code and runs a series of short tests. This setup quickly detects most of the problems in a commit, from syntax that a compiler will not accept, to unexpected changes in the results. Every night a more comprehensive set of tests is executed by these same servers. The test-suite framework is quite general and is also successfully in use for the BerkeleyGW \cite{Deslippe_2012} and APE \cite{Oliveira2008} codes.
