Parallel Lammps Python interface - control a mpi4py parallel LAMMPS instance from a serial python process or a Jupyter notebook
Project description
pylammpsmpi - Parallel Lammps Python interface
With pylammpsmpi
you can control a mpi4py
parallel LAMMPS instance from a serial python process or a Jupyter
notebook. Internally pylammpsmpi
leverages the executorlib
communication interface to connect the serial python
process the user interacts with, with the mpi4py
parallel LAMMPS instance. The advantage of separating the mpi4py
parallel LAMMPS instance from the rest of the workflow is that the workflow can be written as serial python code, while
still benefiting from the parallel performance of LAMMPS. Still this comes at the cost of additional data transfer, as
the LAMMPS pointers cannot be transferred this way and the linked data has to be copied instead. So copying large
atomistic structures can decrease the performance of the pylammpsmpi
interface in comparison to writing your own fully
mpi4py
parallel LAMMPS workflows.
Interfaces
The pylammpsmpi
module implements three different interfaces for different use cases:
pylammpsmpi.LammpsBase
: The most basic interface is theLammpsBase
, it implements the same commands like the defaultlammps.lammps
interface and returns the same datatypes. With this API compatibility to the standard interface, this interface is commonly the easiest way to accelerate a serial LAMMPS based workflow by leveragingmpi4py
parallel LAMMPS instances.pylammpsmpi.LammpsConcurrent
: Inspired by theconcurrent.futures
module in the standard python library thepylammpsmpi.LammpsConcurrent
interface implements the same API as thepylammpsmpi.LammpsBase
class but rather than holding the controlling process until thempi4py
parallel LAMMPS instance finishes the execution of a given set of commands, thepylammpsmpi.LammpsConcurrent
interface returns aconcurrent.futures.Future
object. This enables the development of asynchronous / concurrent workflows.pylammpsmpi.LammpsLibrary
: Finally, thepylammpsmpi.LammpsLibrary
interface adds a higher level interface on top of the defaultlammps.lammps
interface. This higher level interface provides direct access to the commands and thermodynamic properties used in the LAMMPS input files. Especially for experienced LAMMPS users who are familiar with the LAMMPS input files this interface simplifies switching from file based input to using the python interface.
The choice of interface depends on the users background, experience and the simulation protocol the user wants to
implement. Still internally all three interfaces are based on the pylammpsmpi.LammpsConcurrent
interface, so they use
an additional thread to connect the mpi4py
parallel LAMMPS instance to the serial python process or Jupyter notebook.
Documentation
License
pylammpsmpi
is released under the BSD license https://github.com/pyiron/pylammpsmpi/blob/main/LICENSE . It is a
spin-off of the pyiron
project https://github.com/pyiron/pyiron therefore if you use pylammpsmpi
for calculation
which result in a scientific publication, please cite:
@article{pyiron-paper,
title = {pyiron: An integrated development environment for computational materials science},
journal = {Computational Materials Science},
volume = {163},
pages = {24 - 36},
year = {2019},
issn = {0927-0256},
doi = {https://doi.org/10.1016/j.commatsci.2018.07.043},
url = {http://www.sciencedirect.com/science/article/pii/S0927025618304786},
author = {Jan Janssen and Sudarsan Surendralal and Yury Lysogorskiy and Mira Todorova and Tilmann Hickel and Ralf Drautz and Jörg Neugebauer},
keywords = {Modelling workflow, Integrated development environment, Complex simulation protocols},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pylammpsmpi-0.2.26.tar.gz
.
File metadata
- Download URL: pylammpsmpi-0.2.26.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 417b6e2d0a8275591819a7ee266e9a276053d1e7d4ff4b401df412a57630e26c |
|
MD5 | 23af05c752d7dcb39bfa7245f8603af9 |
|
BLAKE2b-256 | e29237f123adc87c166ff4069ccdc687b09dc9435d5d6938ba6ef8c2b442769a |
Provenance
The following attestation bundles were made for pylammpsmpi-0.2.26.tar.gz
:
Publisher:
deploy.yml
on pyiron/pylammpsmpi
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pylammpsmpi-0.2.26.tar.gz
- Subject digest:
417b6e2d0a8275591819a7ee266e9a276053d1e7d4ff4b401df412a57630e26c
- Sigstore transparency entry: 150264225
- Sigstore integration time:
- Predicate type:
File details
Details for the file pylammpsmpi-0.2.26-py3-none-any.whl
.
File metadata
- Download URL: pylammpsmpi-0.2.26-py3-none-any.whl
- Upload date:
- Size: 30.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 618650e29b17431656b76fd5dd81df80aa93bd5b4e7e05898743867fb0577f2d |
|
MD5 | bf0d76261fedcf571e04841278c7170d |
|
BLAKE2b-256 | 6968456906489c8f131616178595106cb0ea1ecb1e33561314c23dd5d8df9068 |
Provenance
The following attestation bundles were made for pylammpsmpi-0.2.26-py3-none-any.whl
:
Publisher:
deploy.yml
on pyiron/pylammpsmpi
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pylammpsmpi-0.2.26-py3-none-any.whl
- Subject digest:
618650e29b17431656b76fd5dd81df80aa93bd5b4e7e05898743867fb0577f2d
- Sigstore transparency entry: 150264228
- Sigstore integration time:
- Predicate type: