casanovoutils.residues
======================

.. py:module:: casanovoutils.residues

.. autoapi-nested-parse::

   Utilities for loading and distributing the amino acid residue mass vocabulary.



Attributes
----------

.. autoapisummary::

   casanovoutils.residues.COMMANDS


Functions
---------

.. autoapisummary::

   casanovoutils.residues.get_residues
   casanovoutils.residues.dump_residues
   casanovoutils.residues.main


Module Contents
---------------

.. py:function:: get_residues(residues_path: Optional[os.PathLike] = None) -> dict[str, float]

   Load a mapping of amino acid residue names to masses from a YAML file.

   If ``residues_path`` is not provided, the function loads a default
   ``residues.yaml`` file located in the same directory as this module.

   :param residues_path: Path to a YAML file containing residue mass information.
                         If ``None`` (default), the bundled ``residues.yaml`` file is used.
   :type residues_path: PathLike, optional

   :returns: A dictionary mapping residue identifiers (typically one-letter or
             multi-character amino acid codes) to their corresponding masses.
   :rtype: dict[str, float]


.. py:function:: dump_residues(destination_path: os.PathLike) -> None

   Copy the default ``residues.yaml`` file included with this package to a
   specified destination.

   :param destination_path: Path to copy the YAML file to. May be a directory or a file path.
   :type destination_path: PathLike

   :rtype: None


.. py:data:: COMMANDS
   :type:  casanovoutils.types.Commands

.. py:function:: main() -> None

