The easiest and performance wise way to run

QuantumEspresso on your machine

by Roberto Innocente <inno at>

QuantumEspresso is a suite of packages for the calculations of electronic structure and materials modeling.
Today, many apps, and with them also QuantumEspresso can be run conveniently
in a virtual environment, insulated from the machine and the software of the machine that hosts them.

Most of you are already aware of virtual machines and the way to use them. Virtual machines are supported by Full Virtualization : a program called hypervisor pretends to be a bare machine and so can load over itself any operating system.

There is a more lightweight sort of virtualization that reached maturity later on Linux and became popular in the last years : os-level virtualization .
With this virtualization the Linux os keeps insulated the activities in containers ( the equivalent of a VM in this context).
In this case the programs inside the container use the operating system services of the host and so they can't be apps for another os.
The good of this is that each process of the containers is a process of the host and so there is almost no penalty associated with this.
Furthermore for all the containers there is only one host os to take care of.
The most popular tool to provide os-level virtualization on Linux is Docker .


Docker runs containers formed according to images .
The docker image for QuantumEspresso is very large ( up to 2 GB or more).

In any case prepare a sufficient space on disk, checking :

Docker engine is the new way to call the client/server application once simply called docker and made of :



What to install on your machine

$ curl -L`uname -s`-`uname -m` >/tmp/docker-machine &&
  chmod +x /tmp/docker-machine &&
  sudo cp /tmp/docker-machine /usr/local/bin/docker-machine

docker-machine is installed along the Docker Toolbox on Win and Mac and so there is no need for a separate installation.

Different versions of Docker

Even if Docker is relatively recent, there is now a plethora of different docker versions.


Docker Engine

You should install it on Linux machines. For the other platforms is part of the Toolbox. Requires a Linux kernel at least 3.10. It uses the native Linux containers (cgroup/namespace) of the host.

On Ubuntu 16.04 install it with :

sudo apt update
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt install -yq apt-transport-https ca-certificates
sudo echo "deb ubuntu-xenial main" >>/etc/apt/sources.list 
sudo apt-key add \
     --keyserver hkp:// \
     --recv-keys  58118E89F3A912897C070ADBF76221572C52609D 
sudo apt update
sudo apt-cache policy docker-engine

sudo apt install -yq docker-engine
sudo service docker start

sudo groupadd docker
sudo usermod -aG docker *your_username*

On Centos 7.X :

sudo yum update
sudo yum update

sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
name=Docker Repository

sudo yum install docker-engine
sudo systemctl enable docker.service
sudo systemctl start docker
sudo groupadd docker
sudo usermod -aG docker **your_username**

Docker Toolbox

For other OS, Docker developed a Linux microkernel ( boot2docker ), that can run the docker daemon and containers and is installable over a Virtual Machine ( in particular it will install Oracle VirtualBox ).
This is the legacy solution that, for the time being, I suggest you to use if you don’t run Linux. Here the instructions for Mac and Win :

Recently Docker released new versions of docker based on OS specific hypervisor ( xhyve and hyper-v ) for
MacOS and Windows, it called them Docker for Mac and Docker for Windows .

I suggest you don’t try first these two new solutions.

Docker for Mac

Requires a Mac produced after 2010 with processor supporting ept and unrestricted mode .

Requires at least 4 GB RAM.

Requires macOS at least Yosemite 10.10.3, but better ElCapitan 10.11 or newer .

This version uses a Mac specific Hypervisor : HyperKit ( based on xhyve ) .

Docker for Windows

Requires 64 bit Windows 10 Pro/Enterprise/Student Edition (November update 1511, build at least 10586).

Uses Hyper-V on Windows 10.

The last beta version can run both Linux and Windows containers.

QuantumEspresso images

Some QuantumEspresso images are available on the standard registry/repository . You can list them with :

$ docker search rinnocente

In particular, for QE version 6.0, images available are :

Only local access allowed :

You can use locally the container without logging in typing :

$ docker run -it -u qe rinnocente/qe-full-6.0 /bin/bash

in this way you will be inside the container as user qe .

Also remote access via ssh :

If you want to access directly the container from outside your machine or you want to share the container with collaborators, then you have to start it in background with a running sshd .

You can run the container in background with sshd typing :

$ CONT=`docker run -P -d -t rinnocente/qe-full-6.0`
$ PORT=`docker port $CONT 22 |sed -e 's#.*:##'`
$ ssh -p $PORT qe@

Change the password that initially is set to mammamia , with the passwd command.

More information available at dockerhub : or at github