Skip to main content

A Multifidelity Machine Learning framework for Quantum Chemistry

Project description

Multifidelity Machine Learning for Quantum Chemistry (MFML-4-QC)

License: MIT Code style: black

MFML-4-QC is an open-source library that enables multifidelity machine learning for quantum chemical systems. While the multifidelity methods are model-architecture agnostic, this library provides a lightweight, ultra-fast Numba-compiled Kernel Ridge Regression (KRR) setup as the primary architecture. Users can seamlessly integrate their own custom ML models (e.g., from scikit-learn) and directly interface with quantum chemistry engines like ORCA and PySCF for automated data generation and active learning.

Key Features

  • Ultra-Fast Kernels: Compute Matérn, Gaussian, Laplacian, and Wasserstein kernels efficiently using JIT-compiled C-loops via Numba.
  • In-Memory Representations: Generate flattened Coulomb Matrices directly from .xyz trajectories without slow disk I/O.
  • Flexible ML Architectures: Use the built-in KRR or drop in any scikit-learn compatible estimator (e.g., RandomForestRegressor, MLPRegressor).
  • Quantum Chemistry Oracles: Abstract interfaces to automatically generate inputs, execute runs, and parse outputs from engines like ORCA and PySCF.

Installation (v1.0.0)

Prerequisites: Python 3.10 or higher. It is best to install within a fresh conda environment to avoid dependency clashes.

Installing from PyPI

Once a stable version is released, users can directly install the pakcage from PyPI using the pip call.

# Create and activate a fresh conda environment
conda create -n mfmlenv python=3.10 -y
conda activate mfmlenv

# Install the package
pip install mfml-4-qc

Install Directly From Source

You can also directly download the GitHub repo and install the package from there.

# Clone the repository
git clone https://github.com/vivinvinod/mfml-4-qc.git

# Create and activate a fresh conda environment
conda create -n mfmlenv python=3.10 -y
conda activate mfmlenv

# Install the package
pip install .

Additional Dependencies

If you plan to use the built-in PySCFEngine oracle, you can install the package with the optional PySCF dependency. (Note: PySCF can be a heavy dependency, which is why it is kept optional).

pip install .[pyscf]

To run the ORCAEngine you will need to install ORCA. See the official ORCA manual for details on how to do so.

Developer Installation

If you are beta testing, modifying the source code, or want to build the local documentation, install the package in "editable" mode (-e) with the [dev] flag. This installs testing tools (pytest, black etc) and the Sphinx documentation stack:

pip install -e .[dev]

Documentation and Examples

MFML-4-QC comes with a comprehensive documentation site that includes detailed API references and tutorials. An inbuilt 15 picosecond MD-trajectory of benzene is also provided as an inbuilt dataset for preliminary exploration of the package.

You can view the documentation at https://vivinvinod.github.io/mfml-4-qc/. To view the documentation locally, go to docs/build/html/ and open index.html in a browser of your choice. You can also browse the raw tutorial scripts directly in the examples/ directory of the code repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mfml_4_qc-1.0.0.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mfml_4_qc-1.0.0-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file mfml_4_qc-1.0.0.tar.gz.

File metadata

  • Download URL: mfml_4_qc-1.0.0.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for mfml_4_qc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 df9b52007ca6b354bf092b71c88137912df702692c5105f803f62d4f28059e52
MD5 939a45435245ffd65decf9007a12a9ad
BLAKE2b-256 4956777770ecb8bd549c8d18a629c11e33474ba66230c98eb0fcd0a1eddc551f

See more details on using hashes here.

File details

Details for the file mfml_4_qc-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mfml_4_qc-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for mfml_4_qc-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a6ef315a1a5652329031a7e6cc20a6a659f546297d5c02af98af6ae1a69af48
MD5 8fedb9eee1ea1626934178e6c83e65fe
BLAKE2b-256 7d38ce849a94e0eed7e60a5e0bc4c3328747c7983cea13fc78fb91f5ce3a20c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page