yasfpy.benchmark.mstm3#

Convenience wrapper around the MSTM3 binary.

Provides a small manager used in benchmarks and regression comparisons.

Attributes#

Classes#

MSTM3Manager

Manage MSTM3 benchmark runs.

Module Contents#

class yasfpy.benchmark.mstm3.MSTM3Manager(config_path=None, binary=None, input_file='mstm3.inp', output_file='mstm3.dat')#

Manage MSTM3 benchmark runs.

The manager can generate an MSTM3 input file from a YASF configuration, run the external MSTM3 binary, and parse the resulting output file into basic scattering quantities.

Notes

This helper is intended for benchmarking/regression comparisons rather than production simulations.

binary: str = './mstm'#
input_file: str = 'mstm3.inp'#
output_file: str = 'mstm3.dat'#
config#
clean()#

Delete generated MSTM3 files.

run(runner=None, cleanup=True)#

Run MSTM3 and parse output.

Parameters:
  • runner – Optional pyperf.Runner to benchmark the command. When omitted, the binary is executed directly and outputs are parsed.

  • cleanup – If True, remove generated input/output files afterwards.

export(file=None, cleanup=False)#

Run MSTM3 and export parsed results.

Parameters:
  • file – Output filename. Supported extensions are .json, .yaml/.yml, and .bz2.

  • cleanup – If True, also remove generated MSTM3 files afterwards.

yasfpy.benchmark.mstm3.mstm#