pylammpsmpi


Namepylammpsmpi JSON
Version 0.2.17 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-04-18 23:49:46
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 `pympipool` 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/58/0d/794b3eb19a662c0d7a96116323f4b144b3e9da03b01806c69a1e2d04d7a9/pylammpsmpi-0.2.17.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 `pympipool` 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.17",
    "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": "d5e00bbd114fb4de234e86017c4e5e8e0de41f64554c7a553e14348a29cf647d",
                "md5": "bb9cdcaefe7b167ea3d5731e17a749e9",
                "sha256": "aa9b26936512b49695f08a5f2cc747676a51cbdd3c06e78e877209341e5952ce"
            },
            "downloads": -1,
            "filename": "pylammpsmpi-0.2.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bb9cdcaefe7b167ea3d5731e17a749e9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 32032,
            "upload_time": "2024-04-18T23:49:44",
            "upload_time_iso_8601": "2024-04-18T23:49:44.969742Z",
            "url": "https://files.pythonhosted.org/packages/d5/e0/0bbd114fb4de234e86017c4e5e8e0de41f64554c7a553e14348a29cf647d/pylammpsmpi-0.2.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "580d794b3eb19a662c0d7a96116323f4b144b3e9da03b01806c69a1e2d04d7a9",
                "md5": "5be561062b87d9d5d62fccc8606f7967",
                "sha256": "51105e75a7d509ada82357ec9b09e1ac8726bc488d36db20ac1ae7b5b2fd0f4a"
            },
            "downloads": -1,
            "filename": "pylammpsmpi-0.2.17.tar.gz",
            "has_sig": false,
            "md5_digest": "5be561062b87d9d5d62fccc8606f7967",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 25160,
            "upload_time": "2024-04-18T23:49:46",
            "upload_time_iso_8601": "2024-04-18T23:49:46.780339Z",
            "url": "https://files.pythonhosted.org/packages/58/0d/794b3eb19a662c0d7a96116323f4b144b3e9da03b01806c69a1e2d04d7a9/pylammpsmpi-0.2.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-18 23:49:46",
    "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.26516s