overreact/thermo/_gas.py
def _check_vibfreqs(vibfreqs=None, cutoff=-50.0):
    """Check vibrational frequencies and return them.

    This is mostly a helper to `_vibrational_temperature` and
    `_head_gordon_damping`.

    Parameters
    ----------
    vibfreqs : array-like
        Frequency magnitudes in cm-1.
    cutoff : float
        Imaginary frequencies smaller (in magnitude) than this value will be
        inverted (sign flipped).

    Returns
    -------
    array-like

    Notes
    -----
    We probably profit from QRRHO in cases where small imaginary vibrational
    frequencies are present. Obviously, for this to make sense in a the QRRHO
    context, values are only acceptable when smaller than ~100 cm**-1. More
    reasonably, values should be smaller than ~50 cm**-1. This is the current
    default. It is your responsability to ensure reliable values, which
    broadly means no imaginary frequency larger than this cutoff (unless we
    are dealing with transition states).

    Examples
    --------
    >>> _check_vibfreqs()
    array([], dtype=float64)
    >>> _check_vibfreqs(100.0)
    array([100.])
    >>> _check_vibfreqs([5.0, 10.0])
    array([ 5., 10.])
    >>> _check_vibfreqs([-5.0, 15.0, 100.0])
    array([  5.,  15., 100.])
    >>> _check_vibfreqs([-55.0, 15.0, 100.0])
    array([ 15., 100.])
    >>> _check_vibfreqs([-55.0, -5.0, 15.0, 100.0])
    array([  5.,  15., 100.])
    """
    if vibfreqs is None:
        return np.array([])
    vibfreqs = np.atleast_1d(vibfreqs)
    # TODO(schneiderfelipe): give a warning when we have two or more negative
    # values outside the cutoff, since it is certainly a sign of a bad
    # structure.
    return np.abs(vibfreqs[vibfreqs > cutoff])
Check vibrational frequencies and return them.

    This is mostly a helper to `_vibrational_temperature` and
    `_head_gordon_damping`.

    Parameters
    ----------
    vibfreqs : array-like
        Frequency magnitudes in cm-1.
    cutoff : float
        Imaginary frequencies smaller (in magnitude) than this value will be
        inverted (sign flipped).

    Returns
    -------
    array-like

    Notes
    -----
    We probably profit from QRRHO in cases where small imaginary vibrational
    frequencies are present. Obviously, for this to make sense in a the QRRHO
    context, values are only acceptable when smaller than ~100 cm**-1. More
    reasonably, values should be smaller than ~50 cm**-1. This is the current
    default. It is your responsability to ensure reliable values, which
    broadly means no imaginary frequency larger than this cutoff (unless we
    are dealing with transition states).

    Examples
    --------
    >>> _check_vibfreqs()
    array([], dtype=float64)
    >>> _check_vibfreqs(100.0)
    array([100.])
    >>> _check_vibfreqs([5.0, 10.0])
    array([ 5., 10.])
    >>> _check_vibfreqs([-5.0, 15.0, 100.0])
    array([  5.,  15., 100.])
    >>> _check_vibfreqs([-55.0, 15.0, 100.0])
    array([ 15., 100.])
    >>> _check_vibfreqs([-55.0, -5.0, 15.0, 100.0])
    array([  5.,  15., 100.])
    
Check vibrational frequencies and return them.
This is mostly a helper to `_vibrational_temperature` and
`_head_gordon_damping`.

Parameters

vibfreqs : array-like
Frequency magnitudes in cm-1.
cutoff : float
Imaginary frequencies smaller (in magnitude) than this value will be
inverted (sign flipped).

Returns

array-like

Notes

We probably profit from QRRHO in cases where small imaginary vibrational
frequencies are present. Obviously, for this to make sense in a the QRRHO
context, values are only acceptable when smaller than ~100 cm**-1. More
reasonably, values should be smaller than ~50 cm**-1. This is the current
default. It is your responsability to ensure reliable values, which
broadly means no imaginary frequency larger than this cutoff (unless we
are dealing with transition states).

Examples


Check vibrational frequencies and return them . This is mostly a helper to ` _vibrational_temperature ` and ` _head_gordon_damping ` . Parameters vibfreqs : array - like Frequency magnitudes in cm - 1 . cutoff : float Imaginary frequencies smaller ( in magnitude ) than this value will be inverted ( sign flipped ) . Returns array - like Notes We probably profit from QRRHO in cases where small imaginary vibrational frequencies are present . Obviously for this to make sense in a the QRRHO context values are only acceptable when smaller than ~100 cm ** - 1 . More reasonably values should be smaller than ~50 cm ** - 1 . This is the current default . It is your responsability to ensure reliable values which broadly means no imaginary frequency larger than this cutoff ( unless we are dealing with transition states ) . Examples
def _check_vibfreqs(vibfreqs=None, cutoff=-50.0):
    if vibfreqs is None:
        return np.array([])
    vibfreqs = np.atleast_1d(vibfreqs)
    return np.abs(vibfreqs[vibfreqs > cutoff])
def _check_vibfreqs ( vibfreqs = None , cutoff = - 50.0 ) : if vibfreqs is None : return np . array ( [ ] ) vibfreqs = np . atleast_1d ( vibfreqs ) return np . abs ( vibfreqs [ vibfreqs > cutoff ] )
Check vibrational frequencies and return them.
Check vibrational frequencies and return them .
"""Check vibrational frequencies and return them.

    This is mostly a helper to `_vibrational_temperature` and
    `_head_gordon_damping`.

    Parameters
    ----------
    vibfreqs : array-like
        Frequency magnitudes in cm-1.
    cutoff : float
        Imaginary frequencies smaller (in magnitude) than this value will be
        inverted (sign flipped).

    Returns
    -------
    array-like

    Notes
    -----
    We probably profit from QRRHO in cases where small imaginary vibrational
    frequencies are present. Obviously, for this to make sense in a the QRRHO
    context, values are only acceptable when smaller than ~100 cm**-1. More
    reasonably, values should be smaller than ~50 cm**-1. This is the current
    default. It is your responsability to ensure reliable values, which
    broadly means no imaginary frequency larger than this cutoff (unless we
    are dealing with transition states).

    Examples
    --------
    >>> _check_vibfreqs()
    array([], dtype=float64)
    >>> _check_vibfreqs(100.0)
    array([100.])
    >>> _check_vibfreqs([5.0, 10.0])
    array([ 5., 10.])
    >>> _check_vibfreqs([-5.0, 15.0, 100.0])
    array([  5.,  15., 100.])
    >>> _check_vibfreqs([-55.0, 15.0, 100.0])
    array([ 15., 100.])
    >>> _check_vibfreqs([-55.0, -5.0, 15.0, 100.0])
    array([  5.,  15., 100.])
    """ # TODO(schneiderfelipe): give a warning when we have two or more negative # values outside the cutoff, since it is certainly a sign of a bad # structure.
vibfreqs
cutoff