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
just works! You only need a compiler that
supports C++11, everything else is handled by pip.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyhepmc_ng-0.4.3.tar.gz
.
File metadata
- Download URL: pyhepmc_ng-0.4.3.tar.gz
- Upload date:
- Size: 220.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffe9f189ef8ad42cfbd98e39d90125c481c1ff740a78f3df1a9cbded25077ef7 |
|
MD5 | d1cd0a3d03a13d5acb4ef401c61959a7 |
|
BLAKE2b-256 | 5286635dca2a46d6c61cf3ed39a55100dd0730977a43cfc3d754ee619f8e0d13 |