<commit_before>#-------------------------------------------------------------------------------
# Name:        grad
# Purpose:     Encapsulation of parsing/handling of data from gradient files.
#
# Author:      <NAME>
#                <EMAIL>
#
# Created:     28 Oct 2014
# Copyright:   (c) <NAME> 2015
# License:     The MIT License; see "license.txt" for full license terms
#                   and contributor agreement.
#
#       This file is part of opan (OpenAnharmonic), a system for automated
#       computation of anharmonic properties of molecular systems via wrapper
#       calls to computational/quantum chemical software packages.
#
#       http://www.github.com/bskinn/opan
#
#-------------------------------------------------------------------------------

""" Module implementing imports of gradient data from external computations.

The abstract superclass :class:`SuperOpanGrad` defines a common initializer
and common method(s) that for use by subclasses importing
gradient data from external computational packages.

|

**Implemented Subclasses**

:class:`OrcaEngrad` -- Imports '.engrad' files from |orca|

|

**Requirements**

 *  The import for each external software package SHOULD have
    its own subclass.

 *  Each subclass MUST implement a ``_load(**kwargs)`` method as the
    entry point for import of gradient data.

 *  The gradient data MUST be stored:

    *   In the instance member ``self.gradient``

    *   As a one-dimensional ``np.array``

    *   With `dtype` descended from ``np.float``

    *   In units of Hartrees per Bohr
        :math:`\\left(\\frac{\\mathrm{E_h}}{\\mathrm B}\\right)`

    *   With elements ordered as:

    .. math::

        \\left[
        \\frac{\\partial E}{\\partial x_1},
        \\frac{\\partial E}{\\partial y_1},
        \\frac{\\partial E}{\\partial z_1},
        \\frac{\\partial E}{\\partial x_2},
        \\frac{\\partial E}{\\partial y_2},
        \\dots
        \\frac{\\partial E}{\\partial y_N},
        \\frac{\\partial E}{\\partial z_N},
        \\right]

 *  The geometry data MUST be stored:

    *   In the instance member ``self.geom``

    *   As a one-dimensional ``np.array``

    *   With `dtype` descended from ``np.float``

    *   In units of Bohrs :math:`\\left(\\mathrm B\\right)`

    *   With elements ordered as:

    .. math::

        \\left[x_1, y_1, z_1, x_2, y_2, \\dots, y_N, z_N\\right]

 *  The atoms list MUST be stored:

    *   In the instance member ``self.atom_syms``

    *   As a `list` of `str`, with each atom specified by an ALL-CAPS
        atomic symbol (:data:`opan.const.atom_sym` may be helpful)

 *  Subclasses MAY define an unlimited number of class and/or
    instance variables in addition to those defined above, of
    unrestricted type.

|

**Superclass**

.. autoclass:: SuperOpanGrad

|

**Subclasses**<commit_msg>DOC: Tweaked LaTeX in grad.py<commit_after>#-------------------------------------------------------------------------------
# Name:        grad
# Purpose:     Encapsulation of parsing/handling of data from gradient files.
#
# Author:      <NAME>
#                <EMAIL>
#
# Created:     28 Oct 2014
# Copyright:   (c) <NAME> 2015
# License:     The MIT License; see "license.txt" for full license terms
#                   and contributor agreement.
#
#       This file is part of opan (OpenAnharmonic), a system for automated
#       computation of anharmonic properties of molecular systems via wrapper
#       calls to computational/quantum chemical software packages.
#
#       http://www.github.com/bskinn/opan
#
#-------------------------------------------------------------------------------

""" Module implementing imports of gradient data from external computations.

The abstract superclass :class:`SuperOpanGrad` defines a common initializer
and common method(s) that for use by subclasses importing
gradient data from external computational packages.

|

**Implemented Subclasses**

:class:`OrcaEngrad` -- Imports '.engrad' files from |orca|

|

**Requirements**

 *  The import for each external software package SHOULD have
    its own subclass.

 *  Each subclass MUST implement a ``_load(**kwargs)`` method as the
    entry point for import of gradient data.

 *  The gradient data MUST be stored:

    *   In the instance member ``self.gradient``

    *   As a one-dimensional ``np.array``

    *   With `dtype` descended from ``np.float``

    *   In units of Hartrees per Bohr
        :math:`\\left(\\frac{\\mathrm{E_h}}{\\mathrm B}\\right)`

    *   With elements ordered as:

    .. math::

        \\left[
        \\begin{array}{cccccccc}
        \\frac{\\partial E}{\\partial x_1} &
        \\frac{\\partial E}{\\partial y_1} &
        \\frac{\\partial E}{\\partial z_1} &
        \\frac{\\partial E}{\\partial x_2} &
        \\frac{\\partial E}{\\partial y_2} &
        \\dots &
        \\frac{\\partial E}{\\partial y_N} &
        \\frac{\\partial E}{\\partial z_N} \\\\
        \\end{array}
        \\right]

 *  The geometry data MUST be stored:

    *   In the instance member ``self.geom``

    *   As a one-dimensional ``np.array``

    *   With `dtype` descended from ``np.float``

    *   In units of Bohrs :math:`\\left(\\mathrm B\\right)`

    *   With elements ordered as:

    .. math::

        \\left[
        \\begin{array}{cccccccc}
            x_1 & y_1 & z_1 & x_2 & y_2 & \\dots & y_N & z_N \\\\
        \\end{array}
        \\right]

 *  The atoms list MUST be stored:

    *   In the instance member ``self.atom_syms``

    *   As a `list` of `str`, with each atom specified by an ALL-CAPS
        atomic symbol (:data:`opan.const.atom_sym` may be helpful)

 *  Subclasses MAY define an unlimited number of class and/or
    instance variables in addition to those defined above, of
    unrestricted type.

|

**Superclass**

.. autoclass:: SuperOpanGrad

|

**Subclasses**
{'fraction_non_alphanumeric': 0.17280163599182005, 'fraction_numerical': 0.006816632583503749, 'mean_word_length': 2.0283797729618165, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5776615', 'n_tokens_mistral': 1772, 'n_tokens_neox': 1649, 'n_words': 571}