ORCA Environment for DFT Calculations

Find here an example docker script to use when building your ORCA environment

To perform Density Functional Theory (DFT) calculations using ORCA within the DECTRIS CLOUD, you must first build a dedicated execution environment. In DECTRIS Cloud, environments are packaged as Docker containers, allowing them to be used for both interactive sessions and batch jobs.

The provided Dockerfile and execution script serve as a reference implementation for setting up ORCA alongside its required dependencies, specifically OpenMPI and a pre-configured Python virtual environment for data analysis.

Prerequisites & Licensing

Important: The ORCA installer is not provided by DECTRIS due to licensing restrictions. ORCA is distributed under a specific agreement that you must comply, and its redistribution is not permitted in DECTRIS CLOUD.

  1. Download the Installer: You must download the appropriate .run file (e.g., orca_6_1_0_linux_x86-64_shared_openmpi418.run) directly from the Official ORCA Website using your licensed account.
  2. Build Context: Upload the installer as Support File when building your Docker environment. Make sure the file is correctly uploaded before starting the build.
  3. Version Matching: If you use a version other than 6.1.0, ensure you update the filename accordingly in the COPY and RUN commands within the Dockerfile.
  4. Make sure to replace the file names highlighted in blue to the appropriate .run file name that you own.

Example Execution Script

FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive

# 1) System packages + build tools
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
wget \
curl \
tar \
bzip2 \
xz-utils \
sudo \
bc \
binutils \
build-essential \
gcc \
g++ \
gfortran \
python3 \
python3-venv \
python3-dev \
python3-setuptools \
libgomp1 \
libquadmath0 \
libgfortran5 \
libevent-dev \
libhwloc-dev \
libfabric-dev \
zlib1g-dev \
libstdc++6 \
libgcc-s1 \
&& rm -rf /var/lib/apt/lists/*

# 2) Download and compile OpenMPI 4.1.8
WORKDIR /tmp/openmpi
RUN set -eux; \
wget -q https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.8.tar.gz; \
tar -xzf openmpi-4.1.8.tar.gz; \
cd openmpi-4.1.8; \
./configure --prefix=/opt/openmpi --enable-mpi-fortran; \
make -j"$(nproc)"; \
make install; \
cd /; \
rm -rf /tmp/openmpi

# OpenMPI env
ENV PATH="/opt/openmpi/bin:${PATH}"
ENV LD_LIBRARY_PATH="/opt/openmpi/lib:${LD_LIBRARY_PATH:-}"

# 3) Python virtual environment 'plotting'
RUN python3 -m venv /opt/plotting
ENV PATH="/opt/plotting/bin:${PATH}"
RUN pip install --upgrade pip && \
pip install numpy plotly matplotlib h5py hdf5plugin argparse pandas

# 4) Install ORCA (robust extract)
RUN mkdir -p /opt/orca
WORKDIR /root

# You must provide this file in the build context (not redistributed due to license)
COPY orca_6_1_0_linux_x86-64_shared_openmpi418.run .

RUN set -eux; \
chmod +x orca_6_1_0_linux_x86-64_shared_openmpi418.run; \
mkdir -p /tmp/orca_extract; \
./orca_6_1_0_linux_x86-64_shared_openmpi418.run --noexec --target /tmp/orca_extract; \
cp -a /tmp/orca_extract/* /opt/orca/; \
rm -rf /tmp/orca_extract; \
rm -f orca_6_1_0_linux_x86-64_shared_openmpi418.run; \
chmod -R 755 /opt/orca; \
# Verify we have an ORCA executable somewhere under /opt/orca
find /opt/orca -maxdepth 4 -type f -name orca -perm -111 -print | head -n 1 | grep -q orca

# 5) Finalize environment
ENV PATH="/opt/orca:/opt/openmpi/bin:/opt/plotting/bin:${PATH}"
ENV LD_LIBRARY_PATH="/opt/orca/lib:/opt/openmpi/lib:${LD_LIBRARY_PATH:-}"

# Interactive shell setup
RUN echo 'export PATH="/opt/orca:/opt/openmpi/bin:/opt/plotting/bin:$PATH"' >> /etc/bash.bashrc && \
echo 'export LD_LIBRARY_PATH="/opt/orca/lib:/opt/openmpi/lib:${LD_LIBRARY_PATH:-}"' >> /etc/bash.bashrc

WORKDIR /home


Key Technical Details

  • Pathing: The environment automatically adds ORCA and OpenMPI to the system PATH and LD_LIBRARY_PATH.
  • Python Environment: A virtual environment is located at /opt/plotting, containing numpy, matplotlib, and plotly for post-calculation data processing.
  • Parallelization: The OpenMPI 4.1.8 build is compiled from source within the container to ensure maximum stability for parallel jobs.

Running a Calculation

To run a calculation, you need a compatible ORCA input file (typically with a .inp extension). This file defines the computational method, basis set, and molecular structure.

Detailed documentation on input syntax and available features can be found in the official manual:


REFERENCE


Neese, F., Wennmohs, F., Becker, U., & Riplinger, C. (2020). The ORCA quantum chemistry program package. The Journal of Chemical Physics, 152(22), 224108. https://doi.org/10.1063/5.0004608


Was this article helpful?