\section{Introduction} 

The development of theoretical methods for the simulation of electronic systems is an active area of study. This interest has been fueled by the success of theoretical tools like density functional theory (DFT)~\cite{Hohenberg_1964,Kohn_1965} that can predict many properties with good accuracy at a relatively modest computational cost. On the other hand, these same tools are not good enough for many applications~\cite{Cohen_2008}, and more accurate and more efficient methods are required.

Current research in the area covers a broad range of aspects of electronic structure simulations: the development of novel theoretical frameworks, new or improved methods to calculate properties within existing theories, or even more efficient and scalable algorithms. In most cases, this theoretical work requires the development of test implementations to assess the properties and predictive power of the new methods. 

The development of methods for the simulations of electrons requires continual feedback and iteration between theory and results from implementation, so the translation to code of new theory needs to be easy to implement and to modify. This is a factor that is usually not considered when comparing the broad range of methods and codes used by chemists, physicists and material scientists. 

The most popular representations for electronic structure rely on basis sets that usually have a certain physical connection to the system being simulated. In chemistry, the method of choice is to use atomic orbitals as a basis to describe the orbitals of a molecule. When these atomic orbitals are expanded in Gaussian functions, it leads to an efficient method as many integrals can be calculated from analytic formulae~\cite{szabo1996modern}. In condensed-matter physics, the traditional basis is a set of plane waves, which correspond to the eigenstates of a homogeneous electron gas. These physics-inspired basis sets have, however, some limitations. For example, it is not trivial to simulate crystalline systems using atomic orbitals~\cite{Dovesi_2014}, and, on the other hand, in plane-wave approaches finite systems must be approximated as periodic systems using a super-cell approach. 

Several alternatives to atomic-orbital and plane-wave basis sets exist~\cite{White_1989,Tsuchida_1995,Harrison_2004,16008435,Genovese_2011}. One particular approach that does not depend on a basis set uses a grid to directly represent fields in real-space. The method was pioneered by Becke~\cite{Becke_1989}, who used a combination of radial grids centered around each atom. In 1994 Chelikowsky, Troullier and Saad~\cite{Chelikowsky_1994} presented a practical approach for the solution of the Kohn-Sham (KS) equations using uniform grids combined with pseudo-potentials. What made the approach competitive was the use of high-order finite differences to control the error of the Laplacian without requiring very dense meshes. From that moment, several real-space implementations have been presented~\cite{Seitsonen_1995,Hoshi_1995,Gygi_1995,Briggs_1996,Fattebert_1996,Beck_1997,Ono_1999,Beck_2000,Nardelli_2001,Marques_2003,Pask_2005,Kronik_2006,Schmid_2006,Krotscheck_2007,Bernholc_2008,Shimojo_2008,Goto_2009,Enkovaara_2010,Iwata_2010,Sasaki_2011,Ono_2011}.

Discretizing in real-space grids does not benefit from a direct physical connection to the system being simulated. However, the method has other advantages. In first place, a real-space discretization is, in most cases, straight-forward to perform starting from the continuum description of the electronic problem. Operations like integration are directly translated into sums over the grid and differential operators can be discretized using finite differences. In fact, most electronic structure codes must rely on an auxiliary real-space discretization used, for example, for the calculation of the exchange and correlation (xc) term of DFT.

Grids are flexible enough to directly simulate different kinds of systems: finite, and fully or partially periodic. It is also possible to perform simulations with reduced (or increased) dimensionality. Additionally, the discretization error can be systematically and continuously controlled by adjusting the spacing between mesh points, and the physical extension of the grid.

The simple discretization and flexibility of the real space grids makes them an ideal framework to implement, develop and test new ideas. Modern electronic structure codes are quite complex, which means that researchers seldom can write a standalone code from scratch, but instead need to resort to existing codes to implement their developments.

From the many codes available, in our experience the real-space code Octopus~\cite{Marques_2003,Castro_2006} provides an ideal framework for theory-development work. To illustrate this point, in this article we will explore some recent advances that have been made in computational electronic structure and that have been developed using the Octopus code as a base. We will pay special attention to the most unusual capabilities of the code, and in particular to the ones that have not been described in previous articles~\cite{Marques_2003,Castro_2006,Andrade_2012}.