Skip to main content

A Python library for parsing and editing GROMACS topology files.

Project description

gmxtopology

Description

gmxtopology is a Python package for parsing and editing GROMACS topology files.

Package layout

The main flow is organized around a few top-level modules:

  • gmxtopology.topology: topology data models
  • gmxtopology.io: topology file reading and writing
  • gmxtopology.parser: section parsing and dispatch
  • gmxtopology.lookup: parameter lookup and virtual-site reduction helpers
  • gmxtopology.schema: schema objects used by the parser
  • gmxtopology.interaction_specs: GROMACS interaction tables

Installation

pip install gmxtopology

For Jupyter/IPython kernel support, install the optional notebook extra:

pip install "gmxtopology[notebook]"

From source:

pip install git+https://github.com/vojtechkostal/gmxtopology.git

Usage

See examples/example.ipynb for a fuller walkthrough.

from gmxtopology import Topology

# load topology from file
fn_top = "./examples/topol.top"
top = Topology(fn_top)

# modifying topology parameters
for atom in top.molecules['POPC'][0].atoms:
    atom.update(charge=0.0)

for atomtype in top.atomtypes:
    atomtype.update(sigma=0.31)

# remove virtual sites from a molecule
top.molecules['SOL'][0].remove_vsites()

# write topology into a file
top.write("./examples/topol-processed.top", overwrite=True)

Publishing

GitHub Trusted Publishing is set up via publish.yml. The one-time PyPI and TestPyPI configuration steps are documented in docs/publishing.md.

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

gmxtopology-0.1.1.tar.gz (52.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gmxtopology-0.1.1-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file gmxtopology-0.1.1.tar.gz.

File metadata

  • Download URL: gmxtopology-0.1.1.tar.gz
  • Upload date:
  • Size: 52.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gmxtopology-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bde8ffd048a7ccd31b8015f91bd6a94aff0a226245bcd5ebdbeff2609ac00c96
MD5 db8d8b79e61e5b56b52d64ec26a44e53
BLAKE2b-256 f29bf17ec54828f07be4c7c09270c64c3cd3d99410c342d911a4aa1c3e17e08e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmxtopology-0.1.1.tar.gz:

Publisher: publish.yml on vojtechkostal/gmxtopology

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gmxtopology-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gmxtopology-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gmxtopology-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 84f20405312b9dffe3294e45991b6fdfcab9c341198a0a86061c5f537f031218
MD5 2349783c49299218361425c37c7507d9
BLAKE2b-256 94541fe9d1b57b904fcc17351d86e7abe732258fb0be1205cbe2a81d90eff875

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmxtopology-0.1.1-py3-none-any.whl:

Publisher: publish.yml on vojtechkostal/gmxtopology

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page