PyLammpstrj
This module gives several utilities for LAMMPS trajectory files (i.e. files output with the dump command) processing.
Usage example
The first module method to use is pylammpstrj.read to generate a pylammpstrj.PyTrajectory object. A start step can optionally be given to skip configurations until start.
This trajectory object holds the informations about: the atoms (as a list of lists of pylammpstrj.PyAtom objects), the simulation boxes (as a list of pylammpstrj.PyBox objects), the dump_format of the file, the fields_names of the file, the additional_fields (see details below), the number of atoms in each configurations (N_atoms), the number of configurations (N_configurations).
Then, processings can be issued on this trajectory:
- atoms can be selected with the
PyTrajectory.select_atomsmethod, when the selection is provided as three arguments: astrmatching a field name, a comparison operator (one ofpylammpstrj.LESS_THAN,pylammpstrj.LESS_THAN_EQUAL_TO, ...,pylammpstrj.GREATER_THAN), and a value (either afloat,int, orstrdepending on the target field).
By default, this method returns a newpylammpstrj.PyTrajectory, but this behavior can be changed with theinplaceboolean argument) in which case the method returnsNone. - an atom property can also be averaged over the atoms at each configuration with
PyTrajectory.average_property. This method takes only a field name (asstr) to return a list offloatof lengthPyTrajectory.N_configurationsrepresenting the average of the property at each configuration.
Copyright
Copyright 2024 Heiarii Lou Chao.
Release files for pylammpstrj 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pylammpstrj-1.0.2.tar.gz | 51.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pylammpstrj-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ x86-64 | Details |
Total release size: 153.4 kB
Release files / pylammpstrj-1.0.2.tar.gz
| Download URL | pylammpstrj-1.0.2.tar.gz |
|---|---|
| Size | 51.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
097e7cf4b6a2c0dc6d5a319dad836736c0dced0911c8c1fb07781109b54d0b01
|
|
BLAKE2b-256 checksum How to use checksums |
3afba71ddf18e67e9ed88b62f3991a654453e1c0bcb643cff7043771bd8195f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / pylammpstrj-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pylammpstrj-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 101.7 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9952c9ffdc370f18f05469858becbf496740129de194b0908812a2eeae88d385
|
|
BLAKE2b-256 checksum How to use checksums |
53f01e7f5d9b4840a63142c13b35bbba27b9aaa312dd0f12f6437fd1e6d1ef04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|