pylammpsmpi


Namepylammpsmpi JSON
Version 0.2.26 PyPI version JSON
download
home_pageNone
SummaryParallel Lammps Python interface - control a mpi4py parallel LAMMPS instance from a serial python process or a Jupyter notebook
upload_time2024-11-20 19:17:12
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.9
licenseBSD 3-Clause License Copyright (c) 2018, Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords pyiron
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pylammpsmpi - Parallel Lammps Python interface
[![Coverage Status](https://coveralls.io/repos/github/pyiron/pylammpsmpi/badge.svg?branch=main)](https://coveralls.io/github/pyiron/pylammpsmpi?branch=main)
[![Python package](https://github.com/pyiron/pylammpsmpi/workflows/Python%20package/badge.svg)](https://github.com/pyiron/pylammpsmpi/actions)

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 the `LammpsBase`, it implements the same commands like the 
  default `lammps.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 leveraging 
  `mpi4py` parallel LAMMPS instances.
* `pylammpsmpi.LammpsConcurrent`: Inspired by the `concurrent.futures` module in the standard python library the 
  `pylammpsmpi.LammpsConcurrent` interface implements the same API as the `pylammpsmpi.LammpsBase` class but rather than 
  holding the controlling process until the `mpi4py` parallel LAMMPS instance finishes the execution of a given set of
  commands, the `pylammpsmpi.LammpsConcurrent` interface returns a `concurrent.futures.Future` object. This enables the 
  development of asynchronous / concurrent workflows.
* `pylammpsmpi.LammpsLibrary`: Finally, the `pylammpsmpi.LammpsLibrary` interface adds a higher level interface on top 
  of the default `lammps.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
* [Installation](https://pylammpsmpi.readthedocs.io/en/latest/installation.html)
  * [conda-based installation](https://pylammpsmpi.readthedocs.io/en/latest/installation.html#conda-based-installation)
  * [pypi-based installation](https://pylammpsmpi.readthedocs.io/en/latest/installation.html#pypi-based-installation)
* [Interfaces](https://pylammpsmpi.readthedocs.io/en/latest/interfaces.html) 
  * [LammpsBase](https://pylammpsmpi.readthedocs.io/en/latest/interfaces.html#lammpsbase)
  * [LammpsConcurrent](https://pylammpsmpi.readthedocs.io/en/latest/interfaces.html#lammpsconcurrent)
  * [LammpsLibrary](https://pylammpsmpi.readthedocs.io/en/latest/interfaces.html#lammpslibrary)
* [Development](https://pylammpsmpi.readthedocs.io/en/latest/development.html) 

# 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},
    }

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pylammpsmpi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": "pyiron",
    "author": null,
    "author_email": "Jan Janssen <janssen@mpie.de>",
    "download_url": "https://files.pythonhosted.org/packages/e2/92/37f123adc87c166ff4069ccdc687b09dc9435d5d6938ba6ef8c2b442769a/pylammpsmpi-0.2.26.tar.gz",
    "platform": null,
    "description": "# pylammpsmpi - Parallel Lammps Python interface\n[![Coverage Status](https://coveralls.io/repos/github/pyiron/pylammpsmpi/badge.svg?branch=main)](https://coveralls.io/github/pyiron/pylammpsmpi?branch=main)\n[![Python package](https://github.com/pyiron/pylammpsmpi/workflows/Python%20package/badge.svg)](https://github.com/pyiron/pylammpsmpi/actions)\n\nWith `pylammpsmpi` you can control a `mpi4py` parallel LAMMPS instance from a serial python process or a Jupyter \nnotebook. Internally `pylammpsmpi` leverages the `executorlib` communication interface to connect the serial python \nprocess the user interacts with, with the `mpi4py` parallel LAMMPS instance. The advantage of separating the `mpi4py` \nparallel LAMMPS instance from the rest of the workflow is that the workflow can be written as serial python code, while\nstill benefiting from the parallel performance of LAMMPS. Still this comes at the cost of additional data transfer, as \nthe LAMMPS pointers cannot be transferred this way and the linked data has to be copied instead. So copying large \natomistic structures can decrease the performance of the `pylammpsmpi` interface in comparison to writing your own fully\n`mpi4py` parallel LAMMPS workflows.\n\n# Interfaces\nThe `pylammpsmpi` module implements three different interfaces for different use cases:\n\n* `pylammpsmpi.LammpsBase`: The most basic interface is the `LammpsBase`, it implements the same commands like the \n  default `lammps.lammps` interface and returns the same datatypes. With this API compatibility to the standard \n  interface, this interface is commonly the easiest way to accelerate a serial LAMMPS based workflow by leveraging \n  `mpi4py` parallel LAMMPS instances.\n* `pylammpsmpi.LammpsConcurrent`: Inspired by the `concurrent.futures` module in the standard python library the \n  `pylammpsmpi.LammpsConcurrent` interface implements the same API as the `pylammpsmpi.LammpsBase` class but rather than \n  holding the controlling process until the `mpi4py` parallel LAMMPS instance finishes the execution of a given set of\n  commands, the `pylammpsmpi.LammpsConcurrent` interface returns a `concurrent.futures.Future` object. This enables the \n  development of asynchronous / concurrent workflows.\n* `pylammpsmpi.LammpsLibrary`: Finally, the `pylammpsmpi.LammpsLibrary` interface adds a higher level interface on top \n  of the default `lammps.lammps` interface. This higher level interface provides direct access to the commands and \n  thermodynamic properties used in the LAMMPS input files. Especially for experienced LAMMPS users who are familiar with\n  the LAMMPS input files this interface simplifies switching from file based input to using the python interface.\n\nThe choice of interface depends on the users background, experience and the simulation protocol the user wants to\nimplement. Still internally all three interfaces are based on the `pylammpsmpi.LammpsConcurrent` interface, so they use \nan additional thread to connect the `mpi4py` parallel LAMMPS instance to the serial python process or Jupyter notebook.\n\n# Documentation\n* [Installation](https://pylammpsmpi.readthedocs.io/en/latest/installation.html)\n  * [conda-based installation](https://pylammpsmpi.readthedocs.io/en/latest/installation.html#conda-based-installation)\n  * [pypi-based installation](https://pylammpsmpi.readthedocs.io/en/latest/installation.html#pypi-based-installation)\n* [Interfaces](https://pylammpsmpi.readthedocs.io/en/latest/interfaces.html) \n  * [LammpsBase](https://pylammpsmpi.readthedocs.io/en/latest/interfaces.html#lammpsbase)\n  * [LammpsConcurrent](https://pylammpsmpi.readthedocs.io/en/latest/interfaces.html#lammpsconcurrent)\n  * [LammpsLibrary](https://pylammpsmpi.readthedocs.io/en/latest/interfaces.html#lammpslibrary)\n* [Development](https://pylammpsmpi.readthedocs.io/en/latest/development.html) \n\n# License\n`pylammpsmpi` is released under the BSD license https://github.com/pyiron/pylammpsmpi/blob/main/LICENSE . It is a \nspin-off of the `pyiron` project https://github.com/pyiron/pyiron therefore if you use `pylammpsmpi` for calculation \nwhich result in a scientific publication, please cite: \n\n    @article{pyiron-paper,\n      title = {pyiron: An integrated development environment for computational materials science},\n      journal = {Computational Materials Science},\n      volume = {163},\n      pages = {24 - 36},\n      year = {2019},\n      issn = {0927-0256},\n      doi = {https://doi.org/10.1016/j.commatsci.2018.07.043},\n      url = {http://www.sciencedirect.com/science/article/pii/S0927025618304786},\n      author = {Jan Janssen and Sudarsan Surendralal and Yury Lysogorskiy and Mira Todorova and Tilmann Hickel and Ralf Drautz and J\u00f6rg Neugebauer},\n      keywords = {Modelling workflow, Integrated development environment, Complex simulation protocols},\n    }\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2018, Max-Planck-Institut f\u00fcr Eisenforschung GmbH - Computational Materials Design (CM) Department All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Parallel Lammps Python interface - control a mpi4py parallel LAMMPS instance from a serial python process or a Jupyter notebook",
    "version": "0.2.26",
    "project_urls": {
        "Documentation": "https://github.com/pyiron/pylammpsmpi",
        "Homepage": "https://github.com/pyiron/pylammpsmpi",
        "Repository": "https://github.com/pyiron/pylammpsmpi"
    },
    "split_keywords": [
        "pyiron"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6968456906489c8f131616178595106cb0ea1ecb1e33561314c23dd5d8df9068",
                "md5": "bf0d76261fedcf571e04841278c7170d",
                "sha256": "618650e29b17431656b76fd5dd81df80aa93bd5b4e7e05898743867fb0577f2d"
            },
            "downloads": -1,
            "filename": "pylammpsmpi-0.2.26-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bf0d76261fedcf571e04841278c7170d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 30752,
            "upload_time": "2024-11-20T19:17:09",
            "upload_time_iso_8601": "2024-11-20T19:17:09.515109Z",
            "url": "https://files.pythonhosted.org/packages/69/68/456906489c8f131616178595106cb0ea1ecb1e33561314c23dd5d8df9068/pylammpsmpi-0.2.26-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e29237f123adc87c166ff4069ccdc687b09dc9435d5d6938ba6ef8c2b442769a",
                "md5": "23af05c752d7dcb39bfa7245f8603af9",
                "sha256": "417b6e2d0a8275591819a7ee266e9a276053d1e7d4ff4b401df412a57630e26c"
            },
            "downloads": -1,
            "filename": "pylammpsmpi-0.2.26.tar.gz",
            "has_sig": false,
            "md5_digest": "23af05c752d7dcb39bfa7245f8603af9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 27299,
            "upload_time": "2024-11-20T19:17:12",
            "upload_time_iso_8601": "2024-11-20T19:17:12.783976Z",
            "url": "https://files.pythonhosted.org/packages/e2/92/37f123adc87c166ff4069ccdc687b09dc9435d5d6938ba6ef8c2b442769a/pylammpsmpi-0.2.26.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-20 19:17:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pyiron",
    "github_project": "pylammpsmpi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pylammpsmpi"
}
        
Elapsed time: 0.49364s