pyiron-lammps

Parser for LAMMPS input and output files.

https://github.com/pyiron/pyiron_lammps

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Parser for LAMMPS input and output files.

Basic Info
  • Host: GitHub
  • Owner: pyiron
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 1.28 MB
Statistics
  • Stars: 2
  • Watchers: 7
  • Forks: 3
  • Open Issues: 0
  • Releases: 24
Created almost 3 years ago · Last pushed 6 months ago
Metadata Files
Readme License Code of conduct Citation Codeowners

README.md

pyiron_lammps

Pipeline codecov Binder

The pyiron_lammps packages provides primarily two functions. A write_lammps_structure() function to write an ase.atoms.Atoms structure to an LAMMPS data file and a parse_lammps_output_files() function to parse the log.lammps, dump.out and dump.h5 files from the LAMMPS thermo and dump commands.

Installation

The pyiron_lammps package is distributed via both pypi: pip install pyiron-lammps and conda-forge: conda install -c conda-forge pyiron_lammps

Write LAMMPS structure

The write_lammps_structure() function is designed to write an ase.atoms.Atoms structure to an LAMMPS data file: ```python from pyironlammps import writelammps_structure

writelammpsstructure( structure, potentialelements, units="metal", filename="lammps.data", workingdirectory=None, ) `` Thestructureparameter refers to thease.atoms.Atomsstructure and thepotentialelementsrefers to the list of elements implemented in the specific interatomic potential. For example the [NiAlH_jea.eam.alloy](https://github.com/lammps/lammps/blob/develop/potentials/NiAlH_jea.eam.alloy) potential implements the elementsNi,AlandH, so when writing a structure for a simulation with this potential thepotentialelements=["Ni", "Al", "H"]. It is important to maintain the order of the elements as LAMMPS internally references the elements based on their index, starting from one. Theunitsparameter refers to the LAMMPS internal [units](https://docs.lammps.org/units.html) to convert thease.atoms.Atomsobject which is defined in Angstrom to the length scale of the LAMMPS simulation. Finally,filenameparameter and the current working directoryworking_directory parameter are designed to select the location where the LAMMPS structure should be written. With the default parameters the LAMMPS structure is written in thelammps.data` file in the current directory.

Parse LAMMPS output

In addition to writing the LAMMPS input structure pyiron_lammps also provide the parse_lammps_output_files() function to parse the LAMMPS output files, namely the log.lammps, dump.out and dump.h5 files: ```python from pyironlammps import parselammpsoutputfiles

parselammpsoutputfiles( workingdirectory, structure, potentialelements, units="metal", dumph5filename="dump.h5", dumpoutfilename="dump.out", loglammpsfilename="log.lammps", ) `` In analogy to thewritelammpsstructure()function theworkingdirectoryparameter refers to the directory which contains the output files. Thestructureparameter reefers to thease.atoms.Atomsobject which should be used as template to parse the structure from the dump files. This structure is again required as LAMMPS internally references elements only by an index, so the template structure is required to map the elements from the interatomic potential back to the elements of thease.atoms.Atomsobject. In the same way thepotentialelementsrefers to the list of elements implemented in the specific interatomic potential. Theunitsparameter refers to the LAMMPS internal [units](https://docs.lammps.org/units.html) to convert thease.atoms.Atomsobject which is defined in Angstrom to the length scale of the LAMMPS simulation. Finally, the parametersdumph5filename,dumpoutfilenameandloglammpsfile_name` refer to the output file names.

For the dump.out file the following LAMMPS dump command should be added to the LAMMPS input file: dump 1 all custom 100 dump.out id type xsu ysu zsu fx fy fz vx vy vz dump_modify 1 sort id format line "%d %d %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g"

For the log.lammps file the following LAMMPS thermo command should be added to the LAMMPS input file: thermo_style custom step temp pe etotal pxx pxy pxz pyy pyz pzz vol thermo_modify format float %20.15g thermo 100

Usage

Currently, the pyiron_lammps parser is primarily used in the pyiron_atomistics package and its successor the atomistics package to provide a simple LAMMPS parser. It only depends on ase, numpy, pandas and scipy and has an optional dependency on h5py to parse the LAMMPS h5md format.

Owner

  • Name: pyiron
  • Login: pyiron
  • Kind: organization

pyiron - an integrated development environment (IDE) for materials science.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Janssen"
  given-names: "Jan"
  orcid: "https://orcid.org/0000-0001-9948-7119"
- family-names: "Surendralal"
  given-names: "Sudarsan"
  orcid: "https://orcid.org/0000-0003-0362-7549"
- family-names: "Lysogorskiy"
  given-names: "Yury"
  orcid: "https://orcid.org/000-0003-4617-3188"
- family-names: "Todorova"
  given-names: "Mira"
  orcid: "https://orcid.org/0000-0002-8053-9350"
- family-names: "Hickel"
  given-names: "Tilmann"
  orcid: "https://orcid.org/0000-0003-0698-4891"
- family-names: "Drautz"
  given-names: "Ralf"
  orcid: "https://orcid.org/0000-0001-7101-8804"
- family-names: "Neugebauer"
  given-names: "Joerg"
  orcid: "https://orcid.org/0000-0002-7903-2472"
title: "pyiron: An integrated development environment for computational materials science"
version: 0.1.8
doi: 10.1016/j.commatsci.2018.07.043
date-released: 2019-06-01
license: "BSD-3-Clause"
url: "http://github.com/pyiron"

GitHub Events

Total
  • Create event: 56
  • Issues event: 1
  • Release event: 9
  • Delete event: 46
  • Issue comment event: 93
  • Push event: 133
  • Pull request review comment event: 7
  • Pull request review event: 22
  • Pull request event: 105
Last Year
  • Create event: 56
  • Issues event: 1
  • Release event: 9
  • Delete event: 46
  • Issue comment event: 93
  • Push event: 133
  • Pull request review comment event: 7
  • Pull request review event: 22
  • Pull request event: 105

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 12
  • Total pull requests: 263
  • Average time to close issues: 6 months
  • Average time to close pull requests: 3 days
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 0.92
  • Average comments per pull request: 1.03
  • Merged pull requests: 226
  • Bot issues: 1
  • Bot pull requests: 136
Past Year
  • Issues: 2
  • Pull requests: 91
  • Average time to close issues: about 3 hours
  • Average time to close pull requests: about 4 hours
  • Issue authors: 2
  • Pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.87
  • Merged pull requests: 72
  • Bot issues: 1
  • Bot pull requests: 59
Top Authors
Issue Authors
  • jan-janssen (11)
  • dependabot[bot] (2)
Pull Request Authors
  • jan-janssen (154)
  • dependabot[bot] (115)
  • pre-commit-ci[bot] (66)
Top Labels
Issue Labels
dependencies (2)
Pull Request Labels
dependencies (115) python (7) format_black (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 560 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 25
  • Total maintainers: 2
pypi.org: pyiron-lammps

Vector-oriented LAMMPS interface to rapidly iterate over series of atomistic structures or interatomic potentials.

  • Homepage: https://github.com/pyiron/pyiron_lammps
  • Documentation: https://github.com/pyiron/pyiron_lammps
  • License: BSD 3-Clause License Copyright (c) 2023, pyiron 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.
  • Latest release: 0.4.6
    published 6 months ago
  • Versions: 25
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 560 Last month
Rankings
Dependent packages count: 6.6%
Average: 18.6%
Dependent repos count: 30.6%
Maintainers (2)
Last synced: 6 months ago