Skip to main content

rmc_dft

en ja

GitHub GitHub Pages Ohara Lab

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.

Installing example scripts

rmc_dft install <category> copies all files in the selected category into the current directory without creating a category directory. Supported categories: analyze, check, edit, job, make, plot, run, and tools.

rmc_dft install analyze
rmc_dft install check
rmc_dft install edit
rmc_dft install job
rmc_dft install make
rmc_dft install plot
rmc_dft install run
rmc_dft install tools
rmc_dft install all
rmc_dft install plot --force

Existing files prevent copying unless --force is supplied. All 44 original files must be packaged under src/rmc_dft/scripts/ with their original directory structure.

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

rmc_dft install all copies all eight categories into their respective subdirectories under the current directory. Only category names or all are accepted; individual file paths are not supported.

Metadata

Release files for rmc-dft 0.7.12

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.12
File Size Uploaded Provenance Actions
rmc_dft-0.7.12.tar.gz 35.4 kB With provenance Details for rmc_dft-0.7.12.tar.gz

Built distribution (wheel)

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

Total release size: 74.0 kB

Release files / rmc_dft-0.7.12.tar.gz

Download URL rmc_dft-0.7.12.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d63a8d500f2db4313f71f7b2334586cd747a3ecd45a693b4f9f09923d61fe92a
BLAKE2b-256 checksum
How to use checksums
928eab564c06f30624aa855bc64f986eca82b370f201fb5b45ee2f8d402fce0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

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

Download URL rmc_dft-0.7.12-py3-none-any.whl
Size 38.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c9720c347a66bc2e3c452b82739334d16b662b101248222f5d073e6663b6775
BLAKE2b-256 checksum
How to use checksums
8aa42ddf95f0b9cfc3a80e6c022db1f19be590de77886714ebf4a75dc548a3da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Security for rmc-dft 0.7.12

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rmc_dft-0.7.12.tar.gz

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 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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