.. _module-api-mat: MAT commands ============ The MAT facade exposes the standalone MAT library through command objects. A command is constructed with its expression, configured with ``argument_*`` methods, and evaluated with ``execute()``. It is the boundary used by the native CLI and by other applications that need element, formula, or mixture results without depending on CLI text parsing: .. code-block:: cpp #include snt::api::MATMaterial command("0.965 0.035 "); command.argument_normalization("mass_fraction"); command.argument_mass_density(snt::puq::Quantity(1.02, "g/cm3")); command.argument_volume(snt::puq::Quantity(1.0, "L")); const auto result = command.execute(); const double total_mass_g = snt::mat::quantity_value(*result.matter.mass, "g"); ``MATElement``, ``MATSubstance``, and ``MATMaterial`` return ``MatElementResult``, ``MatSubstanceResult``, and ``MatMaterialResult`` from ``execute()``. Each result contains the corresponding typed MAT data records and optional matter values. ``argument_natural()`` selects the isotope mode, ``argument_matter()`` replaces all optional inputs, and the individual ``argument_number_density()``, ``argument_mass_density()``, ``argument_volume()``, and ``argument_mass()`` methods update one input. The facade does not add formatting, DIPL state, or a second physics implementation. The ``snt mat`` command parses options and formats these results. In a build with ``ENABLE_MAT=ON``, ``snt-api`` links ``snt-mat`` and the CLI links only ``snt-api``. When MAT is disabled, its facade source and CLI command are excluded and the command reports the required configuration option. See :doc:`MAT model and formula syntax <../mat/model>` and :doc:`physical assumptions and limits <../mat/limits>` for the model and conventions, the :doc:`CLI guide <../../integrations/cli>` for command usage, and the :doc:`generated MAT facade declarations <../../api/cpp/api/mat>` for the complete interface.