Skip to main content

A collection of utility python functions for handling LAMMPS output and polymers in Python

Project description

Pylimer-Tools

Run Tests Publish Documentation PyPI version PyPI download month PyPI license

A collection of utility python functions for handling LAMMPS output and polymers in Python.

This toolbox provides means to read LAMMPS output: be it data, dump or thermodynamic data files. Additionally, it provides various methods to calculate with the read data, such as computing the radius of gyration, mean end to end distance, or simply splitting a polymer network back up into its chains.

Installation

Use pip:

pip install pylimer-tools

Usage

NOTE: currently, this release's API is unstable and subject to change.

See the documentation (or in markdown format) for a current list of all available functions.

Example

An example useage can be found in the CLI application or in the following code snippet:

import numpy as np

from pylimer_tools.entities.universum import Universum
from pylimer_tools.io.readLammpData import readLammpData

allData = readLammpData("some_lammps_output_file.dat")
universe = Universum(allData['atom_data'], allData['bond_data'], boxSizes=[
                      allData["Lx"], allData["Ly"], allData["Lz"]])
print("Size: {}. Volume: {} u^3".format(
    universe.getSize(), universe.getVolume()))
print("Mean bond length: {} u".format(
    np.mean([m.computeBondLengths().mean() for m in universe])))
print("Mean end to end distance: {} u".format(
    np.mean([m.computeEndToEndDistance() for m in universe])))

Project details


Download files

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

Source Distribution

pylimer-tools-0.0.5.tar.gz (36.7 kB view hashes)

Uploaded Source

Built Distribution

pylimer_tools-0.0.5-py3-none-any.whl (48.0 kB view hashes)

Uploaded Python 3

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