Skip to main content

Next-generation Python interface to the HepMC high-energy physics event record API

Project description

pyhepmc-ng is an alternative wrapper of the HepMC-v3 C++ library.

The official wrapper is pyhepmc. Why should you use this one?

pyhepmc-ng is easy to install

The command pip install pyhepmc-ng just works! You only need a compiler that supports C++14, everything else is handled by pip.

Under the hood, the bindings are build with the excellent pybind11 library. pybind11 is automatically installed as a requirement by pip. You don't need an external installation of the HepMC library, either. A copy of this light-weight library is included.

The original pyhepmc package is not easy to install. It uses SWIG to create the bindings, which has to be installed separately. It also requires you to install the C++ library HepMC separately. When you try a pip-install, it will in general not work out-of-the-box. Instead you will get intimidating error messages, which are difficult to decipher.

pyhepmc-ng is actively developed

The last release of pyhepmc was May 2013.

pyhepmc-ng is unit tested

Everything in pyhepmc-ng is unit tested. A few bugs were already found in HepMC3 in this way, notably in the HEPEVT_Wrapper class.

pyhepmc-ng supports Pythonic code

pyhepmc-ng is not a blind mapping of C++ code to Python. It uses Python idioms where it is 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
  • ReaderAscii and WriterAscii support the context manager protocol

License: pyhepmc-ng is covered by the BSD license, but the license only applies to the binding code. The HepMC code is covered by the GPL-v3 license.

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.2.tar.gz (79.2 kB view details)

Uploaded Source

Built Distribution

pyhepmc_ng-0.2-py2.7-macosx-10.13-x86_64.egg (378.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pyhepmc_ng-0.2.tar.gz
  • Upload date:
  • Size: 79.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyhepmc_ng-0.2.tar.gz
Algorithm Hash digest
SHA256 30023d4994e62f0eca717b09fb0d4844b7014547c39c416e6a8ce0308fa998ab
MD5 a308967882553c4192d9eebdd8913c2e
BLAKE2b-256 18ebc8a43c549b2501af008153d188354f31dfde83181c51152903036b96fd56

See more details on using hashes here.

File details

Details for the file pyhepmc_ng-0.2-py2.7-macosx-10.13-x86_64.egg.

File metadata

File hashes

Hashes for pyhepmc_ng-0.2-py2.7-macosx-10.13-x86_64.egg
Algorithm Hash digest
SHA256 45af6aa04f35d4f89deaf0c8bcce994e8e53a07a39172226cec71d6f2fd5f3aa
MD5 f5d1a5e90b68c839fa1a4bec8a522f98
BLAKE2b-256 6ef5f11485655e4271fa1aeef3cc669bf32f218d93fc2a9a143703f44baad3ac

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