overreact/coords.py
def _get_improper_axes(
    atomcoords,
    groups,
    axes,
    rotor_class,
    proper_axes=None,
    rtol=0.0,
    atol=1.0e-2,
    slack=1.888,
):
    """Get improper symmetry axes and their orders.

    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.
    axes : array-like
        Normalized principal axes of inertia.
    rotor_class : tuple of str
        Rigid rotor classification.
    proper_axes : sequence of tuples of int, array-like, optional
        Proper symmetry axes of rotation.
    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
    -------
    sequence of tuples of int, array-like

    Examples
    --------
    >>> from overreact import _datasets as datasets

    >>> data = datasets.logfiles["tanaka1996"]["methane@UMP2/cc-pVTZ"]
    >>> groups = _equivalent_atoms(data.atommasses, data.atomcoords)
    >>> moments, axes, atomcoords = inertia(data.atommasses, data.atomcoords)
    >>> rotor_class = _classify_rotor(moments)
    >>> _get_improper_axes(atomcoords, groups, axes, rotor_class)
    [(4, (0.0, 0.0, -1.0)),
     (4, (0.0, -1.0, 0.0)),
     (4, (-1.0, 0.0, 0.0))]
    """
    rtol, atol = slack * rtol, slack * atol

    if rotor_class[1] == "atomic" or len(atomcoords) == 1:
        return list()

    axes = np.asarray(axes)
    atomcoords = np.asarray(atomcoords)

    if proper_axes is None:
        proper_axes = _get_proper_axes(
            atomcoords, groups, axes, rotor_class, rtol=rtol, atol=atol
        )

    found_axes = list()
    for n, ax in proper_axes:
        found_axes = _update_improper_axes(
            n,
            ax,
            found_axes,
            atomcoords=atomcoords,
            groups=groups,
            rtol=rtol,
            atol=atol,
        )
    return sorted(found_axes, reverse=True)
Get improper symmetry axes and their orders.

    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.
    axes : array-like
        Normalized principal axes of inertia.
    rotor_class : tuple of str
        Rigid rotor classification.
    proper_axes : sequence of tuples of int, array-like, optional
        Proper symmetry axes of rotation.
    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
    -------
    sequence of tuples of int, array-like

    Examples
    --------
    >>> from overreact import _datasets as datasets

    >>> data = datasets.logfiles["tanaka1996"]["methane@UMP2/cc-pVTZ"]
    >>> groups = _equivalent_atoms(data.atommasses, data.atomcoords)
    >>> moments, axes, atomcoords = inertia(data.atommasses, data.atomcoords)
    >>> rotor_class = _classify_rotor(moments)
    >>> _get_improper_axes(atomcoords, groups, axes, rotor_class)
    [(4, (0.0, 0.0, -1.0)),
     (4, (0.0, -1.0, 0.0)),
     (4, (-1.0, 0.0, 0.0))]
    
Get improper symmetry axes and their orders.
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.
axes : array-like
Normalized principal axes of inertia.
rotor_class : tuple of str
Rigid rotor classification.
proper_axes : sequence of tuples of int, array-like, optional
Proper symmetry axes of rotation.
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

sequence of tuples of int, array-like

Examples

>>> from overreact import _datasets as datasets


Get improper symmetry axes and their orders . 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 . axes : array - like Normalized principal axes of inertia . rotor_class : tuple of str Rigid rotor classification . proper_axes : sequence of tuples of int array - like optional Proper symmetry axes of rotation . 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 sequence of tuples of int array - like Examples >>> from overreact import _datasets as datasets
def _get_improper_axes(
    atomcoords,
    groups,
    axes,
    rotor_class,
    proper_axes=None,
    rtol=0.0,
    atol=1.0e-2,
    slack=1.888,
):
    rtol, atol = slack * rtol, slack * atol
    if rotor_class[1] == "atomic" or len(atomcoords) == 1:
        return list()
    axes = np.asarray(axes)
    atomcoords = np.asarray(atomcoords)
    if proper_axes is None:
        proper_axes = _get_proper_axes(
            atomcoords, groups, axes, rotor_class, rtol=rtol, atol=atol
        )
    found_axes = list()
    for n, ax in proper_axes:
        found_axes = _update_improper_axes(
            n,
            ax,
            found_axes,
            atomcoords=atomcoords,
            groups=groups,
            rtol=rtol,
            atol=atol,
        )
    return sorted(found_axes, reverse=True)
def _get_improper_axes ( atomcoords , groups , axes , rotor_class , proper_axes = None , rtol = 0.0 , atol = 1.0e-2 , slack = 1.888 , ) : rtol , atol = slack * rtol , slack * atol if rotor_class [ 1 ] == "atomic" or len ( atomcoords ) == 1 : return list ( ) axes = np . asarray ( axes ) atomcoords = np . asarray ( atomcoords ) if proper_axes is None : proper_axes = _get_proper_axes ( atomcoords , groups , axes , rotor_class , rtol = rtol , atol = atol ) found_axes = list ( ) for n , ax in proper_axes : found_axes = _update_improper_axes ( n , ax , found_axes , atomcoords = atomcoords , groups = groups , rtol = rtol , atol = atol , ) return sorted ( found_axes , reverse = True )
Get improper symmetry axes and their orders.
Get improper symmetry axes and their orders .
"""Get improper symmetry axes and their orders.

    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.
    axes : array-like
        Normalized principal axes of inertia.
    rotor_class : tuple of str
        Rigid rotor classification.
    proper_axes : sequence of tuples of int, array-like, optional
        Proper symmetry axes of rotation.
    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
    -------
    sequence of tuples of int, array-like

    Examples
    --------
    >>> from overreact import _datasets as datasets

    >>> data = datasets.logfiles["tanaka1996"]["methane@UMP2/cc-pVTZ"]
    >>> groups = _equivalent_atoms(data.atommasses, data.atomcoords)
    >>> moments, axes, atomcoords = inertia(data.atommasses, data.atomcoords)
    >>> rotor_class = _classify_rotor(moments)
    >>> _get_improper_axes(atomcoords, groups, axes, rotor_class)
    [(4, (0.0, 0.0, -1.0)),
     (4, (0.0, -1.0, 0.0)),
     (4, (-1.0, 0.0, 0.0))]
    """
atomcoords
groups
axes
rotor_class
proper_axes
rtol
atol
slack