A collection of utility python functions for handling LAMMPS output and polymers in Python
Project description
Pylimer-Tools
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(boxSizes=[
allData["Lx"], allData["Ly"], allData["Lz"]])
universe.addAtomBondData(allData['atom_data'], allData['bond_data'])
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
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
Hashes for pylimer_tools-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46431278b3656bfa3877b8dc3719da2d06417be4a3e819e1943a1fce27019734 |
|
MD5 | dfc08ff710aa209998091fda3c12973a |
|
BLAKE2b-256 | 97dab99356ad35004fbdefbb16041f4d7b4239b7dd3b334c8fbe4c6feaf3247f |