Skip to main content

Github Actions Build Status Coverage Status

This repository hosts the source files for both the Pyedr and Panedr packages.

pyedr and panedr are compatible with Python 3.6 and greater.

Pyedr

Pyedr provides a means of reading a Gromacs EDR binary XDR file and return its contents as a dictionary of numpy arrays. Pyedr exposes the following functions:

  • edr_to_dict: returns a dictionary of NumPy arrays keyed by the energy type from a given path to an EDR file.

  • read_edr: parses an EDR file and returns the energy terms in a nested list

  • get_unit_dictionary: Returns a dictionary that holds the units of each energy term found in the EDR file.

Panedr

Panedr uses the Pyedr library to read a Gromacs EDR binary energy XDR file and returns its contents as a pandas dataframe. Panedr exposes the following functions:

  • edr_to_df: which gets the path to an EDR file and returns a pandas DataFrame.

  • get_unit_dictionary: Returns a dictionary that holds the units of each energy term found in the EDR file.

Example

Using pyedr:

import pyedr

# Read the EDR file
path = 'ener.edr'
dic = pyedr.edr_to_dict(path)

# The `verbose` optional parameter can be set to True to display the
# progress on stderr
dic = pyedr.edr_to_dict(path, verbose=True)

# Get the average pressure after the first 10 ns
pressure_avg = dic['Pressure'][dic['Time'] > 10000].mean()

# Get the units of the EDR entries
unit_dict = pyedr.get_unit_dictionary(path)
unit_dict["Temperature"]  # returns "K"

Using panedr:

import panedr

# Read the EDR file
path = 'ener.edr'
df = panedr.edr_to_df(path)

# The `verbose` optional parameter can be set to True to display the
# progress on stderr
df = panedr.edr_to_df(path, verbose=True)

# Get the average pressure after the first 10 ns
pressure_avg = df['Pressure'][df['Time'] > 10000].mean()

# Get the units of the EDR entries
unit_dict = panedr.get_unit_dictionary(path)
unit_dict["Temperature"]  # returns "K"

Install

You can install pyedr and panedr using pip:

pip install pyedr

# installing panedr automatically installs pyedr
pip install panedr

If you are using conda and conda-forge, you can install with:

conda install -c conda-forge pyedr

# install panedr automatically installs pyedr
conda install -c conda-forge panedr

Tests

The pyedr and panedr repositories contains a series of tests. If you downloaded or cloned the code from the repository, you can run the tests. To do so, install pytest, and, in the directory of the panedr source code, run:

For pyedr:

pytest -v pyedr/pyedr/tests

For panedr:

pytest -v panedr/panedr/tests

License

Pyedr and Panedr translate part of the source code of Gromacs into Python. Therefore, Panedr is distributed under the same GNU Lesser General Public License version 2.1 as Gromacs. See the license for more details.

Metadata

Release files for panedr 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for panedr 0.8.0
File Size Uploaded Provenance
panedr-0.8.0.tar.gz 17.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for panedr 0.8.0
File Interpreter ABI Platform
panedr-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.1 kB

Release files / panedr-0.8.0.tar.gz

Download URL panedr-0.8.0.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
50ecac36810d12db77903048b4972a234b6e3b2c122ffa2a158eba0ff69effc4
BLAKE2b-256 checksum
How to use checksums
8ef9af3e6f5627a9c92f5577eda9e670992e35806b31155b4b371ee44b249436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / panedr-0.8.0-py3-none-any.whl

Download URL panedr-0.8.0-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e988c60ae02d9212692eaa03554d0c8c5042fcff7173082f0afa685117797634
BLAKE2b-256 checksum
How to use checksums
638d9ecc9ccd64365c75be17ca7fe15234359c19f97220a29df68acc07e6c9dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Security for panedr 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page