Skip to main content

Thin Python wrapper for NextGenPB

Project description

PyPI GPL-3.0

ngpb4py

ngpb4py is a Python wrapper for running NextGenPB through a containerized workflow.

It provides:

  • a typed configuration object for .prm files
  • a high-level runner that stages inputs and executes NextGenPB
  • structured parsing of key log sections and supported output files

Installation

If Apptainer is already installed on your system, install the package normally:

pip install ngpb4py

If Apptainer is not installed, prefer the Conda-based setup provided by this repository so both ngpb4py and apptainer are installed together:

wget https://raw.githubusercontent.com/pedrishi/ngpb4py/refs/heads/main/environment.yml
conda env create -f environment.yml
conda activate ngpb4py

For development or local docs/testing, install the project with its development dependencies:

uv sync --group dev

ngpb4py expects an Apptainer runtime to be available locally.

Quick Start

Using an existing .prm file:

from ngpb4py import NgpbConfig, NgpbRunner

config = NgpbConfig.from_prm("examples/exercise1/options.prm")
result = NgpbRunner(nproc=4).run(config=config, verbose=1)

print(result.log.energies.total_electrostatic_energy_kt)

Or running with defaults directly on a new .pdb file:

from ngpb4py import NgpbRunner

result = NgpbRunner(nproc=4).run(config={"filetype": "pdb", "filename": "examples/simple_4LZT/4LZT.pdb"})

print(result.log.energies.total_electrostatic_energy_kt)

Documentation

Documentation can be found here

License

This project is licensed under the GNU GPL v3.0.

ngpb4py is a separate Python wrapper project. It is not the NextGenPB solver itself, and its license statement applies to the wrapper code in this repository.

NextGenPB is the upstream solver project. That project is distributed separately, includes its own copyright notices, and is also marked there as GPL-3.0 licensed.

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

ngpb4py-0.5.4.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

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

ngpb4py-0.5.4-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file ngpb4py-0.5.4.tar.gz.

File metadata

  • Download URL: ngpb4py-0.5.4.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ngpb4py-0.5.4.tar.gz
Algorithm Hash digest
SHA256 8f66b0f1acdef60bad5e73f6a17cca0a7a9690ffc956a447e993156059c21de3
MD5 8fb08cd6e882c6dfc375cf3bd09eef2c
BLAKE2b-256 35aedb7efd9bf4e894318314734e9391713dd17a140e55ed9513e1404012499e

See more details on using hashes here.

File details

Details for the file ngpb4py-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: ngpb4py-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ngpb4py-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6308eaba2382a72f2b1198e7d4c5764d7c65a48a207582663f545f6a1c980e5e
MD5 d343a43526e95c21f27e1c609b691a86
BLAKE2b-256 177c5827e11da3472af1316c1d5c8a06b0ec2f23dc2fecaeaefbd6f104899a17

See more details on using hashes here.

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