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

This installs ipykernel as well, so the environment is ready for Jupyter and IPython kernel use.

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.0.tar.gz (52.6 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.0-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gmxtopology-0.1.0.tar.gz
  • Upload date:
  • Size: 52.6 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.0.tar.gz
Algorithm Hash digest
SHA256 3c5ba0d232b74d01eedcf77bb5f0993a700a6f3072b4ac12e75eb41303b81c58
MD5 6af01ffe2eb1fe46850ab10692c2ef33
BLAKE2b-256 d56a54e1b9d128480f75d5f19891db16d49fe11ae00a5356333a0136d36029fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmxtopology-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: gmxtopology-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 817e3615d83761c4c5e29cbe5d524fb4b40699a74e80782d5ee844975dd76b13
MD5 1c6a4a18b93dbfe98d398062646698f8
BLAKE2b-256 1aa78660698679dc5d25e7cea3f1c058557b579e819ad89df27218bca5fc0161

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmxtopology-0.1.0-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