IMLCV.implementations.CV
========================

.. py:module:: IMLCV.implementations.CV


Attributes
----------

.. autoapisummary::

   IMLCV.implementations.CV.identity_trans
   IMLCV.implementations.CV.zero_trans
   IMLCV.implementations.CV.zero_flow
   IMLCV.implementations.CV.Volume
   IMLCV.implementations.CV.LatticeInvariants
   IMLCV.implementations.CV.LatticeInvariants2
   IMLCV.implementations.CV.un_atomize


Functions
---------

.. autoapisummary::

   IMLCV.implementations.CV._identity_trans
   IMLCV.implementations.CV._zero_cv_trans
   IMLCV.implementations.CV._zero_cv_flow
   IMLCV.implementations.CV._Volume
   IMLCV.implementations.CV._lattice_invariants
   IMLCV.implementations.CV._lattice_invariants_2
   IMLCV.implementations.CV._distance
   IMLCV.implementations.CV.distance_descriptor
   IMLCV.implementations.CV._position_index
   IMLCV.implementations.CV.position_index
   IMLCV.implementations.CV._dihedral
   IMLCV.implementations.CV.dihedral
   IMLCV.implementations.CV._sb_descriptor
   IMLCV.implementations.CV.sb_descriptor
   IMLCV.implementations.CV._soap_descriptor
   IMLCV.implementations.CV.soap_descriptor
   IMLCV.implementations.CV.NoneCV
   IMLCV.implementations.CV._rotate_2d
   IMLCV.implementations.CV.rotate_2d
   IMLCV.implementations.CV._project_distances
   IMLCV.implementations.CV.project_distances
   IMLCV.implementations.CV._scale_cv_trans
   IMLCV.implementations.CV.scale_cv_trans
   IMLCV.implementations.CV._trunc_svd
   IMLCV.implementations.CV.trunc_svd
   IMLCV.implementations.CV._inv_sigma_weighing
   IMLCV.implementations.CV.get_inv_sigma_weighing
   IMLCV.implementations.CV.kernel_dist
   IMLCV.implementations.CV.sinkhorn_divergence_2
   IMLCV.implementations.CV._sinkhorn_divergence_trans_2
   IMLCV.implementations.CV.get_sinkhorn_divergence_2
   IMLCV.implementations.CV._un_atomize
   IMLCV.implementations.CV._append_trans
   IMLCV.implementations.CV.append_trans
   IMLCV.implementations.CV._stack_reduce
   IMLCV.implementations.CV.stack_reduce
   IMLCV.implementations.CV._affine_trans
   IMLCV.implementations.CV.affine_2d
   IMLCV.implementations.CV._remove_mean
   IMLCV.implementations.CV.get_remove_mean_trans
   IMLCV.implementations.CV._normalize
   IMLCV.implementations.CV.get_normalize_trans
   IMLCV.implementations.CV._cv_slice
   IMLCV.implementations.CV._cv_index
   IMLCV.implementations.CV.get_non_constant_trans
   IMLCV.implementations.CV.get_feature_cov


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

.. py:function:: _identity_trans(x, nl, shmap, shmap_kwargs)

.. py:function:: _zero_cv_trans(x: IMLCV.base.CV.CV, nl, shmap, shmap_kwargs)

.. py:function:: _zero_cv_flow(x: IMLCV.base.CV.SystemParams, nl, shmap, shmap_kwargs)

.. py:data:: identity_trans

.. py:data:: zero_trans

.. py:data:: zero_flow

.. py:function:: _Volume(sp: IMLCV.base.CV.SystemParams, _nl, shmap, shmap_kwargs)

.. py:data:: Volume

.. py:function:: _lattice_invariants(sp: IMLCV.base.CV.SystemParams, nl, shmap, shmap_kwargs)

.. py:data:: LatticeInvariants

.. py:function:: _lattice_invariants_2(sp: IMLCV.base.CV.SystemParams, nl, shmap, shmap_kwargs)

.. py:data:: LatticeInvariants2

.. py:function:: _distance(x: IMLCV.base.CV.SystemParams, *_)

.. py:function:: distance_descriptor()

.. py:function:: _position_index(sp: IMLCV.base.CV.SystemParams, _nl, shmap, shmap_kwargs, idx)

.. py:function:: position_index(indices, sp)

.. py:function:: _dihedral(sp: IMLCV.base.CV.SystemParams, _nl, shmap, shmap_kwargs, numbers)

.. py:function:: dihedral(numbers: tuple[int, int, int, int] | jax.Array)

   from https://stackoverflow.com/questions/20305272/dihedral-torsion-
   angle-from-four-points-in-cartesian- coordinates-in-python.

   :param numbers: list with index of 4 atoms that form dihedral


.. py:function:: _sb_descriptor(sp: IMLCV.base.CV.SystemParams, nl: IMLCV.base.CV.NeighbourList, shmap, shmap_kwargs, r_cut, chunk_size_atoms, chunk_size_neigbourgs, reduce, reshape, n_max, l_max, bessel_fun='jax', mul_Z=False)

.. py:function:: sb_descriptor(r_cut, n_max: int, l_max: int, reduce=True, reshape=True, chunk_size_atoms=None, chunk_size_neigbourgs=None, bessel_fun='jax', mul_Z=True) -> IMLCV.base.CV.CvTrans

.. py:function:: _soap_descriptor(sp: IMLCV.base.CV.SystemParams, nl: IMLCV.base.CV.NeighbourList, shmap, shmap_kwargs, r_cut, reduce, reshape, n_max, l_max, sigma_a, r_delta, num, basis, mul_Z=True)

.. py:function:: soap_descriptor(r_cut, n_max: int, l_max: int, sigma_a: float, r_delta: float, reduce=True, reshape=True, num=50, basis='cos', mul_Z=True) -> IMLCV.base.CV.CvTrans

.. py:function:: NoneCV() -> IMLCV.base.CV.CollectiveVariable

.. py:function:: _rotate_2d(cv: IMLCV.base.CV.CV, _nl: IMLCV.base.CV.NeighbourList, shmap, shmap_kwargs, alpha)

.. py:function:: rotate_2d(alpha)

.. py:function:: _project_distances(cvs: IMLCV.base.CV.CV, nl, shmap, shmap_kwargs, a: float)

   projects the distances to a reaction coordinate


.. py:function:: project_distances(a)

.. py:function:: _scale_cv_trans(x, nl, shmap, shmap_kwargs, upper, lower, mini, diff)

.. py:function:: scale_cv_trans(array: IMLCV.base.CV.CV, lower: float = 0.0, upper: float = 1.0)

   axis 0 is batch axis


.. py:function:: _trunc_svd(x: IMLCV.base.CV.CV, nl: IMLCV.base.CV.NeighbourList | None, shmap, shmap_kwargs, m_atomic, v, cvi_shape)

.. py:function:: trunc_svd(m: IMLCV.base.CV.CV, range=Ellipsis) -> tuple[IMLCV.base.CV.CV, IMLCV.base.CV.CvTrans]

.. py:function:: _inv_sigma_weighing(x: IMLCV.base.CV.CV, nl: IMLCV.base.CV.NeighbourList, shmap, shmap_kwargs, mu: list[jax.Array] | None, sigma: list[jax.Array], norm: list[jax.Array], info: IMLCV.base.CV.NeighbourListInfo | None = None)

.. py:function:: get_inv_sigma_weighing(cv_0: list[IMLCV.base.CV.CV], nli: IMLCV.base.CV.NeighbourListInfo, remove_mean=True)

.. py:function:: kernel_dist(p1: jax.Array, p2: jax.Array, xi=2.0)

.. py:function:: sinkhorn_divergence_2(x1: IMLCV.base.CV.CV, x2: IMLCV.base.CV.CV, nl1: IMLCV.base.CV.NeighbourListInfo, nl2: IMLCV.base.CV.NeighbourListInfo, z_scale: jax.Array, alpha=0.01, jacobian=False, lse=True, exp_factor: jax.Array | None = None, mass_weight=True, dist_fun=kernel_dist, scale_std=True, xi=2.0) -> IMLCV.base.CV.CV

   caluculates the sinkhorn divergence between two CVs. If x2 is batched, the resulting divergences are stacked


.. py:function:: _sinkhorn_divergence_trans_2(cv: IMLCV.base.CV.CV, nl: IMLCV.base.CV.NeighbourList | None, shmap, shmap_kwargs, nli: IMLCV.base.CV.NeighbourListInfo, pi: IMLCV.base.CV.CV, alpha_rematch, z_scale: jax.Array, exp_factor: jax.Array | None = None, jacobian=False)

.. py:function:: get_sinkhorn_divergence_2(nli: IMLCV.base.CV.NeighbourListInfo | IMLCV.base.CV.NeighbourList, pi: IMLCV.base.CV.CV, alpha_rematch: float | None = 0.1, jacobian=True, scale_z=False) -> IMLCV.base.CV.CvTrans

   Get a function that computes the sinkhorn divergence between two point clouds. p_i and nli are the points to match against.


.. py:function:: _un_atomize(x: IMLCV.base.CV.CV, nl, shmap, shmap_kwargs)

.. py:data:: un_atomize

.. py:function:: _append_trans(x: IMLCV.base.CV.CV, nl, shmap, shmap_kwargs, v: jax.Array)

.. py:function:: append_trans(v: jax.Array)

.. py:function:: _stack_reduce(cv: IMLCV.base.CV.CV, nl: IMLCV.base.CV.NeighbourList | None, shmap, shmap_kwargs, op)

.. py:function:: stack_reduce(op=jnp.mean)

.. py:function:: _affine_trans(x: IMLCV.base.CV.CV, nl, shmap, shmap_kwargs, C)

.. py:function:: affine_2d(old: jax.Array, new: jax.Array)

   old: set of coordinates in the original space, new: set of coordinates in the new space


.. py:function:: _remove_mean(cv: IMLCV.base.CV.CV, nl: IMLCV.base.CV.NeighbourList | None, shmap, shmap_kwargs, mean)

.. py:function:: get_remove_mean_trans(c: IMLCV.base.CV.CV, range=Ellipsis)

.. py:function:: _normalize(cv: IMLCV.base.CV.CV, nl: IMLCV.base.CV.NeighbourList | None, shmap, shmap_kwargs, mu, std_inv)

.. py:function:: get_normalize_trans(c: IMLCV.base.CV.CV, remove_mu=True, range=Ellipsis)

.. py:function:: _cv_slice(cv: IMLCV.base.CV.CV, nl: IMLCV.base.CV.NeighbourList, shmap, shmap_kwargs, indices)

.. py:function:: _cv_index(cv: IMLCV.base.CV.CV, nl: IMLCV.base.CV.NeighbourList, shmap, shmap_kwargs, indices)

.. py:function:: get_non_constant_trans(c: list[IMLCV.base.CV.CV], c_t: list[IMLCV.base.CV.CV] | None = None, nl: IMLCV.base.CV.NeighbourList | None = None, nl_t: IMLCV.base.CV.NeighbourList | None = None, w: list[jax.Array] | None = None, epsilon=1e-14, max_functions=None, tr: IMLCV.base.CV.CvTrans | None = None)

.. py:function:: get_feature_cov(c_0: list[IMLCV.base.CV.CV], c_tau: list[IMLCV.base.CV.CV], nl: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, nl_tau: list[IMLCV.base.CV.NeighbourList] | IMLCV.base.CV.NeighbourList | None = None, w: list[jax.Array] | None = None, trans: IMLCV.base.CV.CvTrans | None = None, epsilon=0.1, smallest_correlation=1e-12, max_functions=None) -> IMLCV.base.CV.CvTrans

