Skip to main content

Next-generation Python interface to the HepMC3 C++ library

Project description

A Python wrapper for the HepMC3 C++ library.

Another wrapper is pyhepmc. Why should you use this one?

pyhepmc-ng is easy to install

The command pip install pyhepmc-ng should work on all Python versions > 2.7 and all common architectures.

Under the hood, the bindings are build with the excellent pybind11 library. External installations of pybind11 or HepMC3 are not required, pyhepmc-ng includes the lightweight source code of both libraries with the submodule feature of git.

pyhepmc-ng is actively developed

pyhepmc-ng is part of the Scikit-HEP project, which aims to provide all tools needed by particle physicists to do data analysis in Python. It is also gets official support from the HepMC3 project.

pyhepmc-ng is unit tested

Everything in pyhepmc-ng is unit tested.

pyhepmc-ng is Pythonic

pyhepmc-ng is a hand-crafted mapping of C++ code to Python. It supports Python idioms where appropriate.

  • C++ methods which act like properties are represented as properties, e.g. GenParticle::set_status and GenParticle::status are mapped to a single GenParticle.status field in Python
  • Tuples and lists are implicitly convertible to FourVectors
  • Vectors of objects on the C++ side are mapped to Python lists
  • ReaderAscii and WriterAscii support the context manager protocol
  • A convenient open function is provided for reading and writing HepMC files

Documentation

pyhepmc-ng currently has no separate documentation, but it mirrors the C++ interface of the HepMC3 library, which is documented here: http://hepmc.web.cern.ch/hepmc.

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

pyhepmc_ng-0.4.4.tar.gz (227.4 kB view details)

Uploaded Source

File details

Details for the file pyhepmc_ng-0.4.4.tar.gz.

File metadata

  • Download URL: pyhepmc_ng-0.4.4.tar.gz
  • Upload date:
  • Size: 227.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for pyhepmc_ng-0.4.4.tar.gz
Algorithm Hash digest
SHA256 a7f08021ec561a5874d488a93f1e74d0cdf154a5fd184df5c5d97bb7c89ffd44
MD5 e814bf24ff7b5d50a25caeb635a28858
BLAKE2b-256 89ac2a3ffeae492faa276947f214cf476ff8209458e10be6272c64ef1ac6044c

See more details on using hashes here.

Supported by

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