Skip to main content

rmc_dft

en ja

rmc_dft is a Python package for constructing and running RMC-DFT workflows that alternate the generation of three-dimensional structural models consistent with experimental data using Reverse Monte Carlo (RMC) and energy/force-based structural relaxation using DFT.

The current working implementation uses RMC_POT + VASP. It contains the practical machinery required for repeated RMC/VASP calculations, parameter updates, restart handling, per-run initialization scripts, and result archiving.

Current status

Originally, rmc_dft contained both the RMC_POT utility layer and the RMC-DFT workflow implementation.

In v0.7.0, the RMC_POT input, execution, and analysis functionality was separated into the independent rmc_util package. The current rmc_dft package is responsible for the VASP side and the RMC-DFT workflow, while RMC_POT handling is provided by rmc_util.

New code should import RMC_POT-related classes directly from rmc_util.

from rmc_dft import Config, Vasp, VaspIncar, VaspKpoints
from rmc_util import RmcPot, RmcPotDat, RmcPotHst

This separation gives the packages distinct roles: standalone RMC_POT handling belongs to rmc_util, while workflows combining RMC and DFT belong to rmc_dft.

Installation

Install the released package from PyPI:

pip install rmc-dft

Current RMC_POT-based workflows use rmc_util.

The RMC_POT and VASP executables themselves are not included in this package. They must be installed and configured separately to run the current RMC-DFT workflow.

Current functionality

Iterative RMC_POT / VASP execution

The current production workflow alternates RMC_POT and VASP calculations:

initial structure
      |
      v
   RMC_POT
      |
      v
     VASP
      |
      v
   RMC_POT
      |
      v
     VASP
      |
     ...

The RMC side uses classes such as RmcPot, RmcPotDat, RmcPotLog, and RmcPotHst from rmc_util. The DFT side uses classes such as Vasp, VaspIncar, VaspKpoints, and VaspLog from rmc_dft.

Scripted calculation parameters

RMC and VASP parameters can be modified from Python initialization scripts.

The current workflow mainly uses:

rmc_init.py
rmc_vasp_init.py

Numbered initialization files can be used to change parameters for specific runs:

rmc_init_N.py
rmc_vasp_init_N.py

CONTINUE_NUMBERED_INIT controls whether a numbered initialization remains active for subsequent runs or returns to the normal initialization file. Initialization files are loaded immediately before the corresponding run, allowing later calculation parameters to be changed while a long RMC-DFT calculation is still running.

Restart

Restart utilities inspect saved RMC/VASP results and determine whether execution should resume from the RMC or VASP stage.

Results are archived in per-run directories such as rmc_log* and dft_log*, providing the state required for continued calculations and inspection of calculation history.

VASP handling

The current VASP implementation includes functionality for:

  • reading and updating INCAR
  • configuring KPOINTS
  • building POTCAR
  • local, MPI, and job-based VASP execution
  • reading VASP output such as OUTCAR
  • archiving calculation results
  • transferring structures between POSCAR/CONTCAR and RMC CFG
  • helper analysis of structures, atomic motion, and forces

RmcDft

RmcDft is the integrated class for alternating RMC and DFT calculations.

from rmc_dft import Config, RmcDft

config = Config("config.yml")

rmc_dft = RmcDft(
    config=config,
)

rmc_dft.run()

Config currently contains backend-selection settings such as:

rmc_code = "RmcPot"
dft_code = "Vasp"

and RmcDft has a structure for selecting RMC and DFT implementations by name.

However, the backends actually connected at present are RMC_POT and VASP. Other names such as RMCProfile or Quantum ESPRESSO are not currently available simply by changing these configuration values.

Practical RMC-DFT scripts

The current working code also includes lower-level workflow scripts in addition to the RmcDft class.

rmc_vasp_script.py handles alternating RMC/VASP execution, restart, numbered initialization files, and log-directory management.

rmc_vasp_script_sequence.py supports manually specified RMC/VASP execution sequences as well as continuation into the normal RMC-DFT loop.

Some files retain the historical rmc_vasp name. The package and the overall workflow are now named rmc_dft.

Design goal and future direction

The essential idea of RMC-DFT is not to permanently bind the workflow to one RMC program and one DFT program. The workflow consists of:

  1. using RMC to generate a three-dimensional structural model consistent with experimental data,
  2. using DFT to relax that structure according to energy and atomic forces, and
  3. repeatedly transferring the structure between these two stages.

The current implementation realizes this workflow with RMC_POT and VASP. The longer-term design goal of rmc_dft is to make the workflow independent of a specific RMC code or DFT code.

The energy/force-based relaxation stage also does not necessarily have to remain DFT-only. For systems where it is appropriate, the intended architecture should allow structural relaxation using a machine-learning potential (MLP). This would allow DFT and MLP relaxation to be selected according to the required accuracy, system size, and computational cost.

Conceptually, the intended future architecture is:

                    RMC modeling / experimental-data fitting
                              |
                    +---------+---------+
                    |                   |
                 RMC_POT            other RMC
                    |                   |
                    +---------+---------+
                              |
                           structure
                              |
                    +---------+---------+
                    |                   |
                    DFT                MLP
              (VASP, etc.)      structure relaxation
                    |                   |
                    +---------+---------+
                              |
                           structure
                              |
                             ...

This is a design goal, not a statement that all of these backends are already implemented. The currently operational backends are RMC_POT and VASP.

Relationship with rmc_util

General RMC_POT functionality has been separated into rmc_util.

rmc_util can be used independently for RMC_POT fixed/free-format input handling, structural constraints, execution, and analysis of log, HST, FIT, and PPCF output.

rmc_dft uses that layer for the RMC side and focuses on structure transfer between RMC and DFT, iterative execution, restart handling, VASP calculation setup and execution, and overall workflow control.

This separation allows the general RMC_POT functionality to be reused outside RMC-DFT while keeping rmc_dft focused on the coupled workflow.

Documentation

References

Metadata

Release files for rmc-dft 0.7.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rmc-dft 0.7.5
File Size Uploaded
rmc_dft-0.7.5.tar.gz 61.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rmc-dft 0.7.5
File Interpreter ABI Platform
rmc_dft-0.7.5-py3-none-any.whl Python 3 none any Details

Total release size: 132.9 kB

Release files / rmc_dft-0.7.5.tar.gz

Download URL rmc_dft-0.7.5.tar.gz
Size 61.8 kB
Tags Source
SHA-256 checksum
How to use checksums
44e805cde60489d6db956b21a46195e7af6dce944a776689ef4fbd22a6ac7cf5
BLAKE2b-256 checksum
How to use checksums
f7d264910f85cdcc89704c34c2991541977bdde217a0f77e410134aab918ca6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / rmc_dft-0.7.5-py3-none-any.whl

Download URL rmc_dft-0.7.5-py3-none-any.whl
Size 71.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a65d8741aa44590316a9635fb5e7c9fc24a349faf3835c4c68905876012bb46b
BLAKE2b-256 checksum
How to use checksums
7fe3c990e0c49eee374a059f36dff57618615d72d4636390eb342fc8d573ffe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.5 This release

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page