Skip to main content

Machine Learning Collective Variables for Enhanced Sampling

CODE Documentation Status GitHub Actions Build Status codecov license

PAPER paper preprint

The documentation is available at:


mlcolvar is a Python library aimed to help design data-driven collective-variables (CVs) for enhanced sampling simulations. The key features are:

  1. A unified framework to help test and use (some) of the CVs proposed in the literature.
  2. A modular interface to simplify the development of new approaches and the contamination between them.
  3. A streamlined distribution of CVs in the context of advanced sampling.

The library is built upon the PyTorch ML library as well as the Lightning high-level framework.


Some of the CVs which are implemented, organized by learning setting:

  • Unsupervised: PCA, (Variational) AutoEncoders [1,2]
  • Supervised: LDA [3], DeepLDA [4], DeepTDA [5]
  • Time-informed: TICA [6], DeepTICA/SRVs [7,8], VDE [9]

And many others can be implemented based on the building blocks or with simple modifications. Check out the tutorials and the examples section of the documentation.


Install with pip

The library is available on PyPi and can be installed with pip. This is the preferred choice for users as it automatically installs the package requirements.

pip install mlcolvar

To validate your installation, install the test extras and run pytest against the installed package:

pip install mlcolvar[test]
pytest --pyargs mlcolvar.tests

Clone from GitHub

The library can also be installed cloning the repository from GitHub. This is the preferred choice for developers as it provides more flexibility and allows editable installation.

git clone https://github.com/luigibonati/mlcolvar.git
cd mlcolvar
pip -e install .

PLUMED interface: the resulting CVs can be deployed for enhancing sampling with the PLUMED package via the pytorch interface, available since version 2.9.


Notes: in early versions (v<=0.2.*) the library was called mlcvs. This is still accessible for compatibility with PLUMED masterclasses in the releases or by cloning the pre-lightning branch.


Copyright (c) 2023 Luigi Bonati, Enrico Trizio, Andrea Rizzi and Michele Parrinello. Structure of the project is based on Computational Molecular Science Python Cookiecutter.

Metadata

Release files for mlcolvar 1.3.1

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

Source distribution (sdist)

Source distribution for mlcolvar 1.3.1
File Size Uploaded
mlcolvar-1.3.1.tar.gz 353.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mlcolvar 1.3.1
File Interpreter ABI Platform
mlcolvar-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 747.6 kB

Release files / mlcolvar-1.3.1.tar.gz

Download URL mlcolvar-1.3.1.tar.gz
Size 353.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a5f230257826af558feb18d054a7442758177dc8f74dadca3fbee2eaa208ed88
BLAKE2b-256 checksum
How to use checksums
c7469f4ae48fd5d872c904a8fe664c3b71981fd296697a007c8a848711063954
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / mlcolvar-1.3.1-py3-none-any.whl

Download URL mlcolvar-1.3.1-py3-none-any.whl
Size 394.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a55c6a5575580beb926060b2e7bdff2d9cb2d729dd034dd645de09a68bbbaabe
BLAKE2b-256 checksum
How to use checksums
230d477c417bbe13a208b759031d29820d302189b3a0661869ae76bda20ee2bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

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