Skip to content

emdgroup/mdfactory

Repository files navigation

MDFactory logo banner

CI Docs Issues PRs MIT License

MDFactory

MDFactory is a high-throughput library for setting up molecular dynamics (MD) simulations. It provides a flexible and efficient framework for creating, parameterizing, and running MD simulations across various systems and engines.

Features

  • System building — Mixedbox, bilayer, and LNP build types from YAML or CSV input
  • Parametrization — OpenFF/SMIRNOFF and CGenFF with automatic per-molecule caching
  • Batch processing — CSV-driven Nextflow pipelines for parallel builds and GROMACS runs on HPC
  • Analysis — Registered analysis and artifact types with parquet output, local or SLURM execution
  • Data integration — Push/pull/sync across SQLite, CSV, and Palantir Foundry backends

Installation

Using pixi (recommended)

pixi manages both conda and pip dependencies in a single tool. All conda-forge-only packages (rdkit, openff-*, openmm) are declared in pyproject.toml under [tool.pixi.*].

git clone https://github.com/emdgroup/mdfactory.git
cd mdfactory
pixi install          # creates the environment and installs everything
pixi run mdfactory    # run the CLI
pixi run -e dev test  # run the test suite

Without pixi

Create a conda environment with the conda-forge-only packages first, then pip-install the project:

conda create -n mdfactory -c conda-forge python rdkit \
    openff-toolkit openff-interchange openff-nagl openff-units openmm
conda activate mdfactory
pip install -e .[dev]

Quick Start

  1. Initialize your configuration (interactive wizard):

    mdfactory config init
  2. Create a YAML file describing your system (system.yaml):

    engine: gromacs
    simulation_type: mixedbox
    parametrization: smirnoff
    system:
      species:
        - smiles: "O"
          resname: SOL
          count: 900
        - smiles: "CCO"
          resname: ETH
          count: 100
      target_density: 1.0
  3. Build the simulation:

    mkdir -p simulation_dir
    mdfactory build system.yaml simulation_dir

See the Quick Start guide for details on bulk CSV input and Nextflow pipelines.

Configuration

MDFactory stores its configuration at ~/.config/mdfactory/config.ini (or the platform-appropriate location via platformdirs). Use the CLI to manage it:

mdfactory config init   # interactive setup wizard
mdfactory config show   # display active configuration
mdfactory config path   # print config file path
mdfactory config edit   # open config in $EDITOR

See the Configuration guide for full details.

License

This project is licensed under the MIT License.

Citation

If you use MDFactory in your research, please cite this repository.

Support

For questions, bug reports, or feature requests, please open an issue on the GitHub repository.

About

Library to parametrize, setup, run, analyze and manage MD simulations at high-throughput scale

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages