IMLCV.base.rounds
=================

.. py:module:: IMLCV.base.rounds


Attributes
----------

.. autoapisummary::

   IMLCV.base.rounds.X
   IMLCV.base.rounds.X2


Classes
-------

.. autoapisummary::

   IMLCV.base.rounds.TrajectoryInformation
   IMLCV.base.rounds.RoundInformation
   IMLCV.base.rounds.Rounds
   IMLCV.base.rounds.WeightOutput
   IMLCV.base.rounds.DataLoaderOutput
   IMLCV.base.rounds.KoopmanModel
   IMLCV.base.rounds.Covariances


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

.. py:class:: TrajectoryInformation

   .. py:attribute:: ti
      :type:  IMLCV.base.MdEngine.TrajectoryInfo


   .. py:attribute:: round
      :type:  int


   .. py:attribute:: num
      :type:  int


   .. py:attribute:: folder
      :type:  pathlib.Path


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



   .. py:attribute:: valid
      :type:  bool
      :value: True



   .. py:attribute:: finished
      :type:  bool
      :value: False



   .. py:method:: get_bias() -> IMLCV.base.bias.Bias | None


.. py:class:: RoundInformation

   .. py:attribute:: round
      :type:  int


   .. py:attribute:: valid
      :type:  bool


   .. py:attribute:: num
      :type:  int


   .. py:attribute:: num_vals
      :type:  jax.Array


   .. py:attribute:: tic
      :type:  IMLCV.base.MdEngine.StaticMdInfo


   .. py:attribute:: folder
      :type:  pathlib.Path


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



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



   .. py:method:: get_bias() -> IMLCV.base.bias.Bias


   .. py:method:: get_engine() -> IMLCV.base.MdEngine.MDEngine


.. py:class:: Rounds

   Class that bundle all the information in a folder structure. The structure is shown below. Files within parentheses are not always present optional.


   folder/
       cv_0/
           cv.json
           round 0/
               static_trajectory info.h5
               bias.json
               engine.json
               (invalid)
               md_0/
                   trajectory_info.h5
                   bias.json
                   (bias_new.json)
                   (invalid)
                   (finished)

               md_1
                   ..
               ...
           round 1/
               ...
           ...
       cv_1/
           ...
       ...





   .. py:attribute:: folder
      :type:  pathlib.Path


   .. py:method:: create(folder: str | pathlib.Path = 'output', copy=True, new_folder=True) -> Rounds
      :staticmethod:



   .. py:method:: __getstate__()


   .. py:method:: __setstate__(state)


   .. py:method:: full_path(name: str | pathlib.Path) -> str


   .. py:method:: rel_path(name: str | pathlib.Path)


   .. py:method:: path(c: int | None = None, r: int | None = None, i: int | None = None) -> pathlib.Path


   .. py:method:: is_zipped(c, r) -> bool | None


   .. py:method:: zip_cv_round(c, r)


   .. py:method:: unzip_cv_round(c, r)


   .. py:method:: zip_cv(cv)


   .. py:method:: unzip_cv(cv)


   .. py:method:: zip_cv_rounds(begin=1, end=-2)


   .. py:method:: write_xyz(c: int | None = None, r: int | None = None, num: int = 1, repeat=None, minkowski_reduce=True, r_cut=None, only_finished=False, ext='xyz')


   .. py:method:: plot_round(c: int | None = None, r: int | None = None, name_bias=None, name_points=None, dlo_kwargs={}, plot_kwargs={}, plot_points=True, plot_fes=True)


   .. py:method:: plot_cv_discovery(start: int, end: int, additional_collective_variables: list[IMLCV.base.CV.CollectiveVariable] | None = None, additional_collective_variable_names: list[str] | None = None, additional_collective_variable_titles: list[str] | None = None, plot_biases=True, ignore_invalid=False, only_finished=False, get_fes_bias_kwargs={}, plot_kwargs={})


   .. py:method:: _c_vals() -> list[int]


   .. py:method:: _r_vals(c: int | None = None)


   .. py:method:: _i_vals(c: int | None = None, r: int | None = None)


   .. py:method:: _name_md(c, r)


   .. py:method:: _name_bias(c, r, i: int | None = None)


   .. py:method:: _num_vals(c, r: int | None = None)


   .. py:method:: add_cv(collective_variable: IMLCV.base.CV.CollectiveVariable, c: int | None = None)


   .. py:method:: add_round(bias: IMLCV.base.bias.Bias, stic: IMLCV.base.MdEngine.StaticMdInfo | None = None, mde=None, c: int | None = None, r: int | None = None)


   .. py:method:: iter(start=None, stop=None, num=3, ignore_invalid=False, only_finished=True, c: int | None = None, md_trajs: list[int] | None = None, print_timings=False) -> collections.abc.Iterable[tuple[RoundInformation, TrajectoryInformation]]


   .. py:method:: data_loader(num: int = 4, out: int = -1, split_data: bool = False, new_r_cut: float | None = -1.0, cv_round: int | None = None, ignore_invalid=False, md_trajs: list[int] | None = None, start: int | None = None, stop: int | None = None, time_series: bool = False, T_max_over_T=50, chunk_size: int | None = None, get_colvar: bool = True, min_traj_length: int | None = None, recalc_cv: bool = False, get_bias_list: bool = False, num_cv_rounds: int = 1, only_finished: bool = True, uniform: bool = True, lag_n: int = 1, colvar: IMLCV.base.CV.CollectiveVariable | None = None, check_dtau=True, verbose: bool = False, weight: bool = True, macro_chunk: int | None = 2000, macro_chunk_nl: int | None = 5000, only_update_nl: bool = False, n_max: int | float = 100000.0, wham: bool = True, scale_times: bool = False, reweight_to_fes: bool = False, reweight_inverse_bincount: bool = True, output_FES_bias: bool = False, weighing_method: str = 'WHAM', samples_per_bin: int = 10, min_samples_per_bin: int = 3, load_weight: bool = False)


   .. py:method:: iter_ase_atoms(r: int | None = None, c: int | None = None, num: int = 3, r_cut=None, minkowski_reduce=True, only_finished=False, ignore_invalid=False)


   .. py:method:: _trajectory_information(r: int, i: int, c: int | None = None) -> TrajectoryInformation


   .. py:method:: static_trajectory_information(c: int | None = None, r: int | None = None) -> IMLCV.base.MdEngine.StaticMdInfo


   .. py:method:: _round_information(c: int | None = None, r: int | None = None) -> RoundInformation


   .. py:property:: T


   .. py:property:: P


   .. py:property:: round


   .. py:method:: get_round(c: int | None = None)


   .. py:property:: cv


   .. py:method:: n(c: int | None = None, r: int | None = None)


   .. py:method:: invalidate_data(c: int | None = None, r: int | None = None, i: int | None = None)


   .. py:method:: validate_data(c: int | None = None, r: int | None = None, i: int | None = None)


   .. py:method:: finish_data(c: int | None = None, r: int | None = None, i: int | None = None)


   .. py:method:: is_valid(c: int | None = None, r: int | None = None, i: int | None = None)


   .. py:method:: is_finished(c: int | None = None, r: int | None = None, i: int | None = None)


   .. py:method:: get_collective_variable(c: int | None = None) -> IMLCV.base.CV.CollectiveVariable


   .. py:method:: get_static_trajectory_info(c: int | None = None, r: int | None = None)


   .. py:method:: get_bias(c: int | None = None, r: int | None = None, i: int | None = None) -> IMLCV.base.bias.Bias


   .. py:method:: get_engine(c: int | None = None, r: int | None = None) -> IMLCV.base.MdEngine.MDEngine


   .. py:method:: run(bias, steps)


   .. py:method:: run_par(biases: Sequence[IMLCV.base.bias.Bias], steps, plot=True, KEY=42, sp0: IMLCV.base.CV.SystemParams | None = None, ignore_invalid=False, md_trajs: list[int] | None = None, cv_round: int | None = None, wait_for_plots=False, min_traj_length=None, recalc_cv=False, only_finished=True, profile=False, chunk_size=None, macro_chunk=2000, lag_n=20, use_common_bias=True)


   .. py:method:: continue_run(steps: int, cv_round: int | None = None, round: int | None = None, plot=True, wait_for_plots=True)


   .. py:method:: _get_init(rounds: Rounds, KEY: jax.Array | int, common_bias_name: str | None, biases: Sequence[IMLCV.base.bias.Bias], ignore_invalid: bool = False, only_finished: bool = True, min_traj_length: int | None = None, recalc_cv: bool = False, chunk_size: int | None = None, md_trajs: list[int] | None = None, cv_round: int | None = None, sp0: IMLCV.base.CV.SystemParams | None = None, r: int | None = None, macro_chunk: int | None = 1000, lag_n: int = 20, out: int = 20000, use_energies: bool = False)
      :staticmethod:



   .. py:method:: run_md(steps: int, sp: IMLCV.base.CV.SystemParams | None, inputs: list[pathlib.Path] = [], outputs: list[pathlib.Path] = [])
      :staticmethod:



   .. py:method:: plot_md_run(rnds: Rounds, i: int, r: int, c: int, fut=None, inputs=[], outputs=[])
      :staticmethod:



   .. py:method:: update_CV(transformer: IMLCV.base.CVDiscovery.Transformer, dlo_kwargs=None, dlo: DataLoaderOutput | None = None, chunk_size=None, plot=True, new_r_cut=None, save_samples=True, save_multiple_cvs=False, jac=jax.jacrev, cv_round_from=None, cv_round_to=None, test=False, max_bias=None, transform_bias=True, samples_per_bin=5, min_samples_per_bin=1, percentile=0.1, use_executor=True, n_max=100000.0, vmax=100 * kjmol, macro_chunk=1000, macro_chunk_nl: int = 5000, verbose=False)


   .. py:method:: _update_CV(rounds: Rounds, transformer: IMLCV.base.CVDiscovery.Transformer, cv_round_from: int, cv_round_to: int, dlo_kwargs={}, dlo: DataLoaderOutput | None = None, chunk_size=None, macro_chunk=1000, macro_chunk_nl: int = 5000, plot=True, new_r_cut=None, save_samples=True, save_multiple_cvs=False, jac=jax.jacrev, test=False, max_bias=None, transform_bias=True, samples_per_bin=5, min_samples_per_bin=1, percentile=0.1, n_max=100000.0, vmax=100 * kjmol, verbose=True)
      :staticmethod:



   .. py:method:: transform_CV(cv_trans: IMLCV.base.CV.CvTrans, dlo_kwargs=None, dlo: DataLoaderOutput | None = None, chunk_size=None, cv_round_from=None, cv_round_to=None, new_r_cut=None, plot=True, vmax=100 * kjmol, verbose=True)


   .. py:method:: __update_CV(new_collective_variable: IMLCV.base.CV.CollectiveVariable, new_bias: IMLCV.base.bias.Bias, cv_round_from: int, cvs_new: list[IMLCV.base.CV.CV], dlo: DataLoaderOutput, new_r_cut=None, save_samples=True, save_multiple_cvs=False)


   .. py:method:: _copy_from_previous_round(dlo: DataLoaderOutput, new_cvs: list[IMLCV.base.CV.CV], invalidate: bool = False, cv_round: int | None = None)


.. py:class:: WeightOutput(*args, **kwargs)

   Bases: :py:obj:`IMLCV.base.datastructures.MyPyTreeNode`


   Base class for dataclasses that should act like a JAX pytree node.


   .. py:attribute:: weights
      :type:  list[jax.Array]


   .. py:attribute:: p_select
      :type:  list[jax.Array]


   .. py:attribute:: time_scaling
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: bin_counts
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: grid_nums
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: FES_bias
      :type:  IMLCV.base.bias.Bias | None
      :value: None



   .. py:attribute:: FES_bias_std
      :type:  IMLCV.base.bias.Bias | None
      :value: None



   .. py:attribute:: labels
      :type:  list[int] | None
      :value: None



.. py:class:: DataLoaderOutput(*args, **kwargs)

   Bases: :py:obj:`IMLCV.base.datastructures.MyPyTreeNode`


   Base class for dataclasses that should act like a JAX pytree node.


   .. py:attribute:: sp
      :type:  list[IMLCV.base.CV.SystemParams]


   .. py:attribute:: cv
      :type:  list[IMLCV.base.CV.CV]


   .. py:attribute:: sti
      :type:  IMLCV.base.MdEngine.StaticMdInfo


   .. py:attribute:: ti
      :type:  list[IMLCV.base.MdEngine.TrajectoryInfo]


   .. py:attribute:: collective_variable
      :type:  IMLCV.base.CV.CollectiveVariable


   .. py:attribute:: labels
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: nl
      :type:  list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None
      :value: None



   .. py:attribute:: sp_t
      :type:  list[IMLCV.base.CV.SystemParams] | None
      :value: None



   .. py:attribute:: nl_t
      :type:  list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None
      :value: None



   .. py:attribute:: cv_t
      :type:  list[IMLCV.base.CV.CV] | None
      :value: None



   .. py:attribute:: ti_t
      :type:  list[IMLCV.base.MdEngine.TrajectoryInfo] | None
      :value: None



   .. py:attribute:: time_series
      :type:  bool
      :value: False



   .. py:attribute:: tau
      :type:  float | None
      :value: None



   .. py:attribute:: bias
      :type:  list[IMLCV.base.bias.Bias] | None
      :value: None



   .. py:attribute:: ground_bias
      :type:  IMLCV.base.bias.Bias | None
      :value: None



   .. py:attribute:: _weights
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: _weights_t
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: _rho
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: _rho_t
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: scaled_tau
      :type:  bool
      :value: False



   .. py:method:: __add__(other)


   .. py:method:: get_histo(data_nums: list[IMLCV.base.CV.CV], weights: None | list[jax.Array] = None, log_w=False, macro_chunk=320, verbose=False, shape_mask=None, nn=-1, f_func: Callable | None = None) -> jax.Array
      :staticmethod:



   .. py:method:: _histogram(metric: IMLCV.base.CV.CvMetric, n_grid=40, grid_bounds=None, chunk_size=None, chunk_size_mid=1)
      :staticmethod:



   .. py:method:: _unstack_weights(stack_dims, weights: jax.Array) -> list[jax.Array]
      :staticmethod:



   .. py:method:: norm_w(w_stacked: jax.Array, ret_n=False) -> jax.Array | tuple[jax.Array, jax.Array]
      :staticmethod:



   .. py:method:: check_w(w_stacked: jax.Array) -> jax.Array
      :staticmethod:



   .. py:method:: koopman_weight(w: list[jax.Array] | None = None, w_t: list[jax.Array] | None = None, samples_per_bin: int = 50, max_bins: int | float = 100000.0, out_dim: int = -1, chunk_size: int | None = None, indicator_CV: bool = True, koopman_eps: float = 1e-05, koopman_eps_pre: float = 0, cv_0: list[IMLCV.base.CV.CV] | None = None, cv_t: list[IMLCV.base.CV.CV] | None = None, macro_chunk: int = 1000, verbose: bool = False, max_features_koopman: int = 5000, margin: float = 0.1, add_1: bool | None = None, only_diag: bool = False, calc_pi: bool = False, sparse: bool = False, output_w_corr: bool = False, correlation: bool = True, return_km: bool = False, labels: jax.Array | list[int] | None = None, koopman_kwargs: dict = {})


   .. py:method:: wham_weight(samples_per_bin: int = 10, n_max: float | int = 100000.0, chunk_size: int | None = None, wham_eps=1e-07, cv_0: list[IMLCV.base.CV.CV] | None = None, cv_t: list[IMLCV.base.CV.CV] | None = None, macro_chunk: int | None = 1000, verbose: bool = False, margin: float = 0.1, bias_cutoff: float = 300 * kjmol, min_f_i: float = 1e-30, log_sum_exp: bool = True, return_bias: bool = False, return_std_bias: bool = False, min_samples: int = 3, lagrangian: bool = False, max_sigma: float = 5 * kjmol, sparse_inverse: bool = True, inverse_sigma_weighting: bool = False, output_bincount: bool = True, output_free_energy: bool = True, output_time_scaling: bool = True, smooth_bias: bool = False, max_bias_margin: float = 0.1, alpha_dirichlet: float = 1.0) -> WeightOutput


   .. py:method:: get_bincount(cv_0: list[IMLCV.base.CV.CV] | None = None, w: list[jax.Array] | None = None, n_hist=None, n_max=100000.0, margin=0.1, chunk_size=None, use_w=False, output_labels=False, samples_per_bin=20, min_samples_per_bin=1, macro_chunk=1000)


   .. py:method:: _transform(cv, nl, shmap, shmap_kwargs, argmask: jax.Array | None = None, pi: jax.Array | None = None, add_1: bool = False, add_1_pre: bool = False, q: jax.Array | None = None, l: jax.Array | None = None) -> jax.Array
      :staticmethod:



   .. py:method:: koopman_model(cv_0: list[IMLCV.base.CV.CV] | list[IMLCV.base.CV.SystemParams] | None = None, cv_t: list[IMLCV.base.CV.CV] | list[IMLCV.base.CV.SystemParams] | None = None, nl: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, nl_t: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, only_return_weights=False, symmetric=False, rho: list[jax.Array] | None = None, w: list[jax.Array] | None = None, rho_t: list[jax.Array] | None = None, w_t: list[jax.Array] | None = None, eps=1e-12, eps_pre=1e-12, max_features=5000, max_features_pre=5000, out_dim=-1, add_1=True, chunk_size=None, macro_chunk=1000, verbose=False, trans=None, T_scale: float = 1.0, only_diag=False, calc_pi=False, scaled_tau=None, sparse=True, correlation=True, auto_cov_threshold: float | None = None) -> KoopmanModel


   .. py:method:: filter_nans(x: list[IMLCV.base.CV.CV] | None = None, x_t: list[IMLCV.base.CV.CV] | None = None, macro_chunk=1000)


   .. py:method:: apply_cv(f: IMLCV.base.CV.CvTrans, x: list[IMLCV.base.CV.CV] | list[IMLCV.base.CV.SystemParams], x_t: list[IMLCV.base.CV.CV] | list[IMLCV.base.CV.SystemParams] | None = None, nl: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, nl_t: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, chunk_size: int | None = None, macro_chunk: int | None = 1000, shmap: bool = True, shmap_kwargs=ShmapKwargs.create(), verbose: bool = False, print_every: int = 10, jit_f: bool = True) -> tuple[list[IMLCV.base.CV.CV], list[IMLCV.base.CV.CV] | None]
      :staticmethod:



   .. py:method:: _apply(x: list[X], f: Callable[[X, IMLCV.base.CV.NeighbourList | None], X2], x_t: list[X] | None = None, nl: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, nl_t: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, macro_chunk: int | None = 1000, verbose: bool = False, jit_f: bool = True, print_every: int = 10) -> tuple[list[X2], list[X2] | None]
      :staticmethod:



   .. py:method:: _apply_bias(x: list[IMLCV.base.CV.CV], bias: IMLCV.base.bias.Bias, chunk_size=None, macro_chunk=1000, verbose=False, shmap=False, shmap_kwargs=ShmapKwargs.create(), jit_f=True) -> list[jax.Array]
      :staticmethod:



   .. py:method:: apply_bias(bias: IMLCV.base.bias.Bias, chunk_size=None, macro_chunk=1000, verbose=False, shmap=False) -> list[jax.Array]


   .. py:method:: get_point(point: IMLCV.base.CV.CV, sigma=0.01, key=jax.random.PRNGKey(0)) -> tuple[IMLCV.base.CV.CV, IMLCV.base.CV.SystemParams, IMLCV.base.CV.NeighbourList | IMLCV.base.CV.NeighbourListInfo | None, IMLCV.base.MdEngine.TrajectoryInfo]


   .. py:method:: get_fes_bias_from_weights(cv: list[IMLCV.base.CV.CV] | None = None, weights: list[jax.Array] | None = None, rho: list[jax.Array] | None = None, samples_per_bin=100, min_samples_per_bin: int | None = 5, n_grid=None, n_max=1000.0, max_bias=None, chunk_size=None, macro_chunk=1000, max_bias_margin=0.2, rbf_bias=True, kernel='gaussian', collective_variable: IMLCV.base.CV.CollectiveVariable | None = None, set_outer_border=True, rbf_degree: int | None = None)


   .. py:method:: _get_fes_bias_from_weights(T, weights: list[jax.Array], rho: list[jax.Array], collective_variable: IMLCV.base.CV.CollectiveVariable, cv: list[IMLCV.base.CV.CV], samples_per_bin=100, min_samples_per_bin: int | None = 5, n_max=1000.0, n_grid=None, max_bias=None, chunk_size=None, macro_chunk=1000, max_bias_margin=0.2, rbf_bias=True, kernel='gaussian', set_outer_border=True, rbf_degree: int | None = None) -> IMLCV.implementations.bias.RbfBias
      :staticmethod:



   .. py:method:: get_transformed_fes(new_cv: list[IMLCV.base.CV.CV], new_colvar: IMLCV.base.CV.CollectiveVariable, samples_per_bin=5, min_samples_per_bin: int = 1, chunk_size=1, smoothing=0.0, max_bias=None, shmap=False, n_grid_old=50, n_grid_new=30) -> IMLCV.implementations.bias.RbfBias


   .. py:method:: transform_FES(trans: IMLCV.base.CV.CvTrans, T: float | None = None, max_bias=100 * kjmol, n_grid=25)
      :abstractmethod:



   .. py:method:: recalc(chunk_size: int | None = None, macro_chunk: int | None = 1000, shmap: bool = False, verbose: bool = False)


   .. py:method:: calc_neighbours(r_cut, chunk_size=None, macro_chunk=1000, verbose=False, only_update=False, chunk_size_inner=10, max=(2, 2, 2))


.. py:class:: KoopmanModel(*args, **kwargs)

   Bases: :py:obj:`IMLCV.base.datastructures.MyPyTreeNode`


   Base class for dataclasses that should act like a JAX pytree node.


   .. py:attribute:: s
      :type:  jax.Array


   .. py:attribute:: cov
      :type:  Covariances


   .. py:attribute:: W0
      :type:  jax.Array


   .. py:attribute:: W1
      :type:  jax.Array


   .. py:attribute:: argmask
      :type:  jax.Array | None


   .. py:attribute:: shape
      :type:  int


   .. py:attribute:: cv_0
      :type:  list[IMLCV.base.CV.CV] | list[IMLCV.base.CV.SystemParams]


   .. py:attribute:: cv_t
      :type:  list[IMLCV.base.CV.CV] | list[IMLCV.base.CV.SystemParams]


   .. py:attribute:: nl
      :type:  list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None


   .. py:attribute:: nl_t
      :type:  list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None


   .. py:attribute:: w
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: rho
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: w_t
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: rho_t
      :type:  list[jax.Array] | None
      :value: None



   .. py:attribute:: eps
      :type:  float
      :value: 1e-10



   .. py:attribute:: eps_pre
      :type:  float | None
      :value: None



   .. py:attribute:: only_diag
      :type:  bool
      :value: False



   .. py:attribute:: calc_pi
      :type:  bool
      :value: True



   .. py:attribute:: scaled_tau
      :type:  bool
      :value: False



   .. py:attribute:: add_1
      :type:  bool
      :value: False



   .. py:attribute:: max_features
      :type:  int
      :value: 5000



   .. py:attribute:: max_features_pre
      :type:  int
      :value: 5000



   .. py:attribute:: out_dim
      :type:  int | None
      :value: None



   .. py:attribute:: correlation_whiten
      :type:  bool
      :value: True



   .. py:attribute:: verbose
      :type:  bool
      :value: True



   .. py:attribute:: tau
      :type:  float | None
      :value: None



   .. py:attribute:: T_scale
      :type:  float
      :value: 1.0



   .. py:attribute:: trans
      :type:  IMLCV.base.CV.CvTrans | IMLCV.base.CV.CvTrans | None
      :value: None



   .. py:attribute:: constant_threshold
      :type:  float
      :value: 1e-10



   .. py:method:: create(w: list[jax.Array] | None, rho: list[jax.Array] | None, w_t: list[jax.Array] | None, rho_t: list[jax.Array] | None, cv_0: list[IMLCV.base.CV.CV] | list[IMLCV.base.CV.SystemParams], cv_t: list[IMLCV.base.CV.CV] | list[IMLCV.base.CV.SystemParams], nl: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, nl_t: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, add_1=True, eps: float = 1e-14, eps_pre: float = 0, symmetric=False, out_dim=-1, max_features=5000, max_features_pre=5000, tau=None, macro_chunk=1000, chunk_size=None, verbose=True, trans: IMLCV.base.CV.CvTrans | None = None, T_scale: float = 1.0, only_diag=False, calc_pi=False, use_scipy=False, auto_cov_threshold=None, sparse=True, scaled_tau=False, only_return_weights=False, correlation_whiten=False, out_eps=None, constant_threshold: float = 1e-10)
      :staticmethod:



   .. py:method:: _add_1(cv, nl, shmap, shmap_kwargs)
      :staticmethod:



   .. py:property:: tot_trans


   .. py:method:: f(out_dim=None, remove_constant=True, n_skip: int | None = None)


   .. py:method:: g(out_dim=None, n_skip=None, remove_constant=True)


   .. py:method:: koopman_weight(verbose=False, chunk_size=None, macro_chunk=1000, retarget=True, epsilon=1e-06, max_entropy=True, out_dim=None) -> tuple[list[jax.Array], list[jax.Array], list[jax.Array] | None, bool]


   .. py:method:: weighted_model(chunk_size=None, macro_chunk=1000, out_dim=None, **kwargs) -> KoopmanModel


   .. py:method:: get_n_skip(n_skip: int | None = None, remove_constant=True)


   .. py:method:: timescales(remove_constant=True, n_skip=None)


.. py:data:: X

.. py:data:: X2

.. py:class:: Covariances(*args, **kwargs)

   Bases: :py:obj:`IMLCV.base.datastructures.MyPyTreeNode`


   Base class for dataclasses that should act like a JAX pytree node.


   .. py:attribute:: rho_00
      :type:  jax.Array


   .. py:attribute:: rho_01
      :type:  jax.Array | None


   .. py:attribute:: rho_10
      :type:  jax.Array | None


   .. py:attribute:: rho_11
      :type:  jax.Array | None


   .. py:attribute:: pi_s_0
      :type:  jax.Array | None


   .. py:attribute:: pi_s_1
      :type:  jax.Array | None


   .. py:attribute:: sigma_0
      :type:  jax.Array


   .. py:attribute:: sigma_1
      :type:  jax.Array | None


   .. py:attribute:: W_0
      :type:  jax.Array | None
      :value: None



   .. py:attribute:: W_1
      :type:  jax.Array | None
      :value: None



   .. py:attribute:: only_diag
      :type:  bool
      :value: False



   .. py:attribute:: trans_f
      :type:  IMLCV.base.CV.CvTrans | IMLCV.base.CV.CvTrans | None
      :value: None



   .. py:attribute:: trans_g
      :type:  IMLCV.base.CV.CvTrans | IMLCV.base.CV.CvTrans | None
      :value: None



   .. py:attribute:: symmetric
      :type:  bool
      :value: False



   .. py:method:: create(cv_0: list[X], cv_1: list[X] | None = None, nl: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, nl_t: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, w: list[jax.Array] | None = None, w_t: list[jax.Array] | None = None, calc_pi=False, macro_chunk=1000, chunk_size=None, only_diag=False, trans_f: IMLCV.base.CV.CvTrans | IMLCV.base.CV.CvTrans | None = None, trans_g: IMLCV.base.CV.CvTrans | IMLCV.base.CV.CvTrans | None = None, symmetric=False, calc_C00=True, calc_C01=True, calc_C10=True, calc_C11=True, shmap_kwargs=ShmapKwargs.create(), verbose=True) -> Covariances
      :staticmethod:



   .. py:property:: pi_0


   .. py:property:: pi_1


   .. py:property:: C00


   .. py:property:: C01


   .. py:property:: C10


   .. py:property:: C11


   .. py:property:: sigma_0_inv


   .. py:property:: sigma_1_inv


   .. py:method:: whiten_rho(choice, epsilon: float = 0.0001, max_features=None, verbose=False) -> jax.Array


   .. py:method:: mask(eps_pre: float | None, max_features: int = 2000, auto_cov_threshold: float | None = None)


   .. py:method:: decompose(out_dim: int | None = None, sparse=True, out_eps: float | None = None)


   .. py:method:: symmetrize()


