openmc.ParticleList
- class openmc.ParticleList(iterable=(), /)[source]
A collection of SourceParticle objects.
- Parameters:
particles (list of SourceParticle) – Particles to collect into the list
- export_to_hdf5(filename: str | PathLike, **kwargs)[source]
Export particle list to an HDF5 file.
This method write out an .h5 file that can be used as a source file in conjunction with the
openmc.FileSourceclass.- Parameters:
filename (path-like) – Path to source file to write
**kwargs – Keyword arguments to pass to
h5py.File
See also
- classmethod from_hdf5(filename: str | PathLike) ParticleList[source]
Create particle list from an HDF5 file.
- Parameters:
filename (path-like) – Path to source file to read.
- Return type:
ParticleList instance
- classmethod from_mcpl(filename: str | PathLike) ParticleList[source]
Create particle list from an MCPL file.
- Parameters:
filename (path-like) – Path to MCPL file to read.
- Return type:
ParticleList instance