overreact/coords.py
def _has_inversion_center(atomcoords, groups, rtol=0.0, atol=1.0e-2, slack=1.888):
    """Check whether the molecule has an inversion center.

    Parameters
    ----------
    atomcoords : array-like
        Atomic coordinates centered at the center of mass.
    groups : sequence of sequence of int
        Groups of symmetry equivalent atoms, in ascending order of size.
    rtol : float, optional
        The relative tolerance parameter (see `numpy.isclose`).
    atol : float, optional
        The absolute tolerance parameter (see `numpy.isclose`).
    slack : float, optional
        Number to multiply rtol and atol prior comparisons.

    Returns
    -------
    bool

    Examples
    --------
    >>> _has_inversion_center([[0, 0, -1], [0, 0, 1]], [[0, 1]])
    True
    >>> _has_inversion_center([[0, 0, -1],
    ...                        [0, 0,  1],
    ...                        [1, 1,  1]], [[0, 1], [2]])
    False
    """
    rtol, atol = slack * rtol, slack * atol

    atomcoords = np.asarray(atomcoords)
    return all(
        _is_symmetric(atomcoords[group], _operation("i"), rtol=rtol, atol=atol)
        for group in groups[::-1]
    )
Check whether the molecule has an inversion center.

    Parameters
    ----------
    atomcoords : array-like
        Atomic coordinates centered at the center of mass.
    groups : sequence of sequence of int
        Groups of symmetry equivalent atoms, in ascending order of size.
    rtol : float, optional
        The relative tolerance parameter (see `numpy.isclose`).
    atol : float, optional
        The absolute tolerance parameter (see `numpy.isclose`).
    slack : float, optional
        Number to multiply rtol and atol prior comparisons.

    Returns
    -------
    bool

    Examples
    --------
    >>> _has_inversion_center([[0, 0, -1], [0, 0, 1]], [[0, 1]])
    True
    >>> _has_inversion_center([[0, 0, -1],
    ...                        [0, 0,  1],
    ...                        [1, 1,  1]], [[0, 1], [2]])
    False
    
Check whether the molecule has an inversion center.
Parameters

atomcoords : array-like
Atomic coordinates centered at the center of mass.
groups : sequence of sequence of int
Groups of symmetry equivalent atoms, in ascending order of size.
rtol : float, optional
The relative tolerance parameter .
atol : float, optional
The absolute tolerance parameter .
slack : float, optional
Number to multiply rtol and atol prior comparisons.

Returns

bool

Examples


Check whether the molecule has an inversion center . Parameters atomcoords : array - like Atomic coordinates centered at the center of mass . groups : sequence of sequence of int Groups of symmetry equivalent atoms in ascending order of size . rtol : float optional The relative tolerance parameter . atol : float optional The absolute tolerance parameter . slack : float optional Number to multiply rtol and atol prior comparisons . Returns bool Examples
def _has_inversion_center(atomcoords, groups, rtol=0.0, atol=1.0e-2, slack=1.888):
    rtol, atol = slack * rtol, slack * atol
    atomcoords = np.asarray(atomcoords)
    return all(
        _is_symmetric(atomcoords[group], _operation("i"), rtol=rtol, atol=atol)
        for group in groups[::-1]
    )
def _has_inversion_center ( atomcoords , groups , rtol = 0.0 , atol = 1.0e-2 , slack = 1.888 ) : rtol , atol = slack * rtol , slack * atol atomcoords = np . asarray ( atomcoords ) return all ( _is_symmetric ( atomcoords [ group ] , _operation ( "i" ) , rtol = rtol , atol = atol ) for group in groups [ : : - 1 ] )
Check whether the molecule has an inversion center.
Check whether the molecule has an inversion center .
"""Check whether the molecule has an inversion center.

    Parameters
    ----------
    atomcoords : array-like
        Atomic coordinates centered at the center of mass.
    groups : sequence of sequence of int
        Groups of symmetry equivalent atoms, in ascending order of size.
    rtol : float, optional
        The relative tolerance parameter (see `numpy.isclose`).
    atol : float, optional
        The absolute tolerance parameter (see `numpy.isclose`).
    slack : float, optional
        Number to multiply rtol and atol prior comparisons.

    Returns
    -------
    bool

    Examples
    --------
    >>> _has_inversion_center([[0, 0, -1], [0, 0, 1]], [[0, 1]])
    True
    >>> _has_inversion_center([[0, 0, -1],
    ...                        [0, 0,  1],
    ...                        [1, 1,  1]], [[0, 1], [2]])
    False
    """
atomcoords
groups
rtol
atol
slack