Skip to main content

Multi-CPU / multi-GPU parallel tempering

Project description

pypi version license DOI

Parallel tempering is a simulation method that accelerates sampling of configuration space in systems with rugged energy landscapes. Applications range from the simulation of biomolecules to studies of phase transitions in condensed matter or spin glasses. The key idea is to perform Monte Carlo or molecular dynamics simulations of independent replicas of the system of interest at different state conditions (say, temperatures). During the simulation, the states of pairs of replicas are exchanged in a way that respects detailed balance. Through these exchanges replicas can overcome energy barriers and sample the configuration space more efficiently.

Since replicas evolve independently between exchanges, the algorithm is straightforward to parallelize. atooms-pt relies on mpi4py to distribute groups of replicas to multiple CPUs and/or GPUs and it builds on the atooms framework to decouple the algorithm from the underlying simulation backend. The scalability is excellent up to several tens of CPUs or GPUs. The preferred simulation backend is RUMD, a molecular dynamics code running entirely on GPUs that is very efficient even on small system sizes, say of a few hundreds particles.

Quick start

>From the command line:

pt.py --steps 10 -T 1.0,0.9,0.8 -e 50000 -i data/kalj.xyz.gz /tmp/output_dir

This will run 10 steps of parallel tempering simulation for three replicas, starting from the configuration in data/kalj.xyz.gz and writing output to /tmp/output_dir. The replicas are simulated at temperatures 1.0, 0.9 and 0.8 and temperature exchanges are attempted every 50000 steps of the underlying simulation backend.

The same simulation can be ran from python:

from atooms.backends.rumd import Rumd
from atooms.simulation import Simulation
from atooms.parallel_tempering import ParallelTempering

temperatures = [1.0, 0.9, 0.8]

# Create backends and wrap them as simulation instances
backend = [Rumd(integrator='nvt', temperature=T) for T in temperatures]
sim = [Simulation(s) for s in backend]
pt = ParallelTempering(sim, params=temperatures,
                       output_path='/tmp/output_dir',
                       steps=10, exchange_interval=50000)
pt.run()

The current implementation targets the RUMD molecular dynamics package, but any atooms simulation backend (for instance, LAMMPS) should work just fine.

Requirements

Installation

>From the python package index

pip install atooms-pt

>From the code repository

git clone https://gitlab.info-ufr.univ-montp2.fr/atooms/parallel_tempering.git
python setup.py install

Acknowledgments

This code was developed in the context of PRACE (“Partnership for Advanced Computing in Europe”) project 2010PA1751 “Multi-GPU parallel tempering simulations”.

Authors

Daniele Coslovich: http://www.coulomb.univ-montp2.fr/perso/daniele.coslovich/

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

atooms_pt-1.1.1-py2.py3-none-any.whl (16.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file atooms_pt-1.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: atooms_pt-1.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.12

File hashes

Hashes for atooms_pt-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6905150d4f99ec459fa72ccc0acdb06bfcc9efb142cee81ed0061b92f4a5af38
MD5 1428668ee7943e65e2b260ae28872f2b
BLAKE2b-256 50c2603a69fd5b688efc7433dea6784d0943a2bc2cbc637e9f7819aea4336769

See more details on using hashes here.

Supported by

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