riverine.components
===================

.. py:module:: riverine.components


Classes
-------

.. autoapisummary::

   riverine.components.AbstractComponent
   riverine.components.Component
   riverine.components.Strand


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

.. py:class:: AbstractComponent

   Bases: :py:obj:`abc.ABC`


   Abstract class for a component in a mix.  Custom components that don't inherit from
   a concrete class should inherit from this class and implement the methods here.


   .. py:property:: name
      :type: str

      :abstractmethod:


      Name of the component.


   .. py:property:: location
      :type: tuple[str, riverine.locations.WellPos | None]



   .. py:property:: plate
      :type: str | None



   .. py:property:: is_mix
      :type: bool



   .. py:property:: well
      :type: riverine.locations.WellPos | None



   .. py:property:: _well_list
      :type: list[riverine.locations.WellPos]



   .. py:property:: volume
      :type: riverine.units.DecimalQuantity



   .. py:property:: concentration
      :type: riverine.units.DecimalQuantity

      :abstractmethod:


      (Source) concentration of the component as a pint Quantity.  NaN if undefined.


   .. py:method:: all_components() -> pandas.DataFrame
      :abstractmethod:


      A dataframe of all components.



   .. py:method:: with_reference(reference: riverine.references.Reference, *, inplace: bool = False) -> T
      :abstractmethod:



   .. py:method:: with_experiment(experiment: riverine.experiments.Experiment, *, inplace: bool = True) -> AbstractComponent
      :abstractmethod:



   .. py:method:: _structure(d: dict[str, Any], experiment: riverine.experiments.Experiment | None = None) -> AbstractComponent
      :classmethod:

      :abstractmethod:



   .. py:method:: _unstructure(experiment: riverine.experiments.Experiment | None = None) -> dict[str, Any]
      :abstractmethod:



   .. py:method:: printed_name(tablefmt: str | riverine.printing.TableFormat) -> str


   .. py:method:: _update_volumes(consumed_volumes: dict[str, riverine.units.DecimalQuantity] | None = None, made_volumes: dict[str, riverine.units.DecimalQuantity] | None = None, _cache_key=None) -> Tuple[dict[str, riverine.units.DecimalQuantity], dict[str, riverine.units.DecimalQuantity]]

      Given a



.. py:class:: Component

   Bases: :py:obj:`AbstractComponent`


   A single named component, potentially with a concentration and location.

   Location is stored as a `plate` and `well` property. `plate` is



   .. py:attribute:: name
      :type:  str

      Name of the component.


   .. py:method:: _get_name(_cache_key=None) -> str


   .. py:attribute:: concentration
      :type:  riverine.units.DecimalQuantity

      (Source) concentration of the component as a pint Quantity.  NaN if undefined.


   .. py:method:: _get_concentration(_cache_key=None) -> riverine.units.DecimalQuantity


   .. py:attribute:: plate
      :type:  str | None


   .. py:attribute:: well
      :type:  riverine.locations.WellPos | None


   .. py:attribute:: volume
      :type:  riverine.units.DecimalQuantity


   .. py:property:: location
      :type: tuple[str | None, riverine.locations.WellPos | None]



   .. py:method:: all_components_polars(_cache_key=None) -> polars.DataFrame


   .. py:method:: all_components() -> pandas.DataFrame

      A dataframe of all components.



   .. py:method:: _unstructure(experiment: riverine.experiments.Experiment | None = None) -> dict[str, Any]


   .. py:method:: _structure(d: dict[str, Any], experiment: riverine.experiments.Experiment | None = None) -> Component
      :classmethod:



   .. py:method:: with_experiment(experiment: riverine.experiments.Experiment, inplace: bool = True) -> AbstractComponent


   .. py:method:: with_reference(reference: riverine.references.Reference, inplace: bool = False) -> Component


.. py:class:: Strand

   Bases: :py:obj:`Component`


   A single named strand, potentially with a concentration, location and sequence.


   .. py:attribute:: sequence
      :type:  str | None
      :value: None



   .. py:method:: with_reference(reference: riverine.references.Reference, inplace: bool = False) -> Strand


