From 076b7bdf15e75a142500aa4f6aac2d56287180ca Mon Sep 17 00:00:00 2001 From: "Jonathan M. Waldrop" Date: Fri, 8 Aug 2025 12:59:44 -0500 Subject: [PATCH 1/4] fixes from pre-commit --- .clang-format | 4 +- .flake8 | 2 + .github/workflows/pull_request.yaml | 2 +- .github/.licenserc.yaml => .licenserc.yaml | 2 + LICENSE | 2 +- docs/requirements.txt | 4 +- docs/source/background/motivation.rst | 2 +- docs/source/conf.py | 45 ++++--- docs/source/developer/adding_an_operator.rst | 14 +- .../design/chemical_system/molecule.rst | 2 +- .../design/chemical_system/system.rst | 10 +- docs/source/developer/design/dsl.rst | 2 +- .../design/quantum_mechanics/braket/index.rst | 28 ++-- .../operator/hamiltonian.rst | 18 +-- .../operator/operator_base.rst | 14 +- .../wavefunction/architecture.rst | 14 +- include/chemist/basis_set/ao_basis_set.hpp | 2 +- .../basis_set/atomic_basis_set_traits.hpp | 2 +- .../basis_set/atomic_basis_set_view.hpp | 2 +- include/chemist/basis_set/shell.hpp | 2 +- include/chemist/basis_set/shell_traits.hpp | 2 +- include/chemist/basis_set/shell_view.hpp | 2 +- include/chemist/density/density.hpp | 2 +- include/chemist/detail_/tmp_utils.hpp | 2 +- include/chemist/electron/electron.hpp | 2 +- include/chemist/electron/electron_class.hpp | 2 +- include/chemist/electron/many_electrons.hpp | 2 +- include/chemist/molecule/atom.hpp | 8 +- include/chemist/molecule/molecule_class.hpp | 8 +- include/chemist/nucleus/nuclei.hpp | 6 +- include/chemist/nucleus/nucleus_view.hpp | 6 +- include/chemist/point/point_set.hpp | 6 +- include/chemist/point_charge/charges.hpp | 6 +- .../point_charge/point_charge_class.hpp | 4 +- .../point_charge/point_charge_view.hpp | 2 +- .../quantum_mechanics/braket/braket_class.hpp | 4 +- .../braket/detail_/braket_base.hpp | 10 +- .../braket/tensor_element.hpp | 2 +- .../braket/tensor_representation.hpp | 2 +- .../operator/core_hamiltonian.hpp | 2 +- .../quantum_mechanics/operator/coulomb.hpp | 8 +- .../quantum_mechanics/operator/density.hpp | 2 +- .../detail_/linear_combination_impl.hpp | 2 +- .../operator/detail_/operator_impl.hpp | 2 +- .../detail_/unpack_linear_combination.hpp | 2 +- .../operator/electronic_hamiltonian.hpp | 2 +- .../quantum_mechanics/operator/exchange.hpp | 8 +- .../operator/exchange_correlation.hpp | 6 +- .../quantum_mechanics/operator/fock.hpp | 2 +- .../operator/hamiltonian.hpp | 2 +- .../quantum_mechanics/operator/identity.hpp | 10 +- .../quantum_mechanics/operator/kinetic.hpp | 8 +- .../quantum_mechanics/operator/operator.hpp | 2 +- .../operator/operator_base.hpp | 2 +- .../operator/operator_fwd.hpp | 2 +- .../operator/operator_visitor.hpp | 2 +- .../quantum_mechanics/operator/typedefs.hpp | 2 +- .../quantum_mechanics/wavefunction/cmos.hpp | 2 +- .../detail_/wavefunction_impl.hpp | 2 +- .../wavefunction/determinant.hpp | 2 +- .../quantum_mechanics/wavefunction/mos.hpp | 2 +- .../wavefunction/natural.hpp | 2 +- .../wavefunction/transformed.hpp | 2 +- .../wavefunction/wavefunction_class.hpp | 2 +- .../wavefunction/wavefunction_fwd.hpp | 2 +- include/chemist/traits/density_traits.hpp | 2 +- include/chemist/traits/electron_traits.hpp | 2 +- .../traits/quantum_mechanics_traits.hpp | 12 +- src/chemist/basis_set/ao_basis_set.cpp | 2 +- src/chemist/basis_set/atomic_basis_set.cpp | 2 +- .../basis_set/atomic_basis_set_view.cpp | 2 +- .../basis_set/detail_/ao_basis_set_pimpl.hpp | 2 +- .../detail_/atomic_basis_set_pimpl.hpp | 2 +- .../detail_/atomic_basis_set_view_pimpl.hpp | 2 +- .../basis_set/detail_/compute_n_aos.hpp | 2 +- src/chemist/basis_set/detail_/shell_pimpl.hpp | 2 +- .../basis_set/detail_/shell_view_pimpl.hpp | 2 +- src/chemist/basis_set/shell.cpp | 2 +- src/chemist/basis_set/shell_view.cpp | 2 +- .../detail_/chemical_system_pimpl.hpp | 4 +- .../detail_/chemical_system_view_pimpl.hpp | 4 +- src/chemist/density/decomposable_density.cpp | 2 +- src/chemist/density/density_class.cpp | 2 +- src/chemist/detail_/container_pimpl.hpp | 4 +- .../molecule/detail_/molecule_view_pimpl.hpp | 4 +- src/chemist/nucleus/detail_/nuclei_subset.hpp | 4 +- src/chemist/nucleus/detail_/nuclei_union.hpp | 4 +- .../nucleus/detail_/nucleus_view_list.hpp | 4 +- .../quantum_mechanics/operator/coulomb.cpp | 2 +- .../operator/detail_/get_terms.hpp | 2 +- .../operator/electronic_hamiltonian.cpp | 2 +- .../quantum_mechanics/operator/exchange.cpp | 2 +- .../operator/exchange_correlation.cpp | 2 +- .../operator/hamiltonian.cpp | 2 +- .../quantum_mechanics/operator/kinetic.cpp | 2 +- .../operator/operator_visitor.cpp | 2 +- src/python/basis_set/export_ao_basis_set.cpp | 2 +- .../basis_set/export_atomic_basis_set.cpp | 2 +- .../export_atomic_basis_set_view.cpp | 2 +- src/python/basis_set/export_basis_set.hpp | 2 +- .../basis_set/export_contracted_gaussian.cpp | 2 +- .../export_contracted_gaussian_view.cpp | 2 +- src/python/basis_set/export_primitive.cpp | 2 +- .../basis_set/export_primitive_view.cpp | 2 +- src/python/basis_set/export_shell.cpp | 2 +- src/python/basis_set/export_shell_view.cpp | 2 +- src/python/electron/export_electron.hpp | 2 +- src/python/electron/export_electron_class.cpp | 2 +- src/python/electron/export_many_electrons.cpp | 2 +- tests/cxx/doc_snippets/catch.hpp | 2 +- tests/cxx/doc_snippets/chemist_examples.hpp | 2 +- .../cxx/unit_tests/basis_set/ao_basis_set.cpp | 2 +- .../unit_tests/basis_set/atomic_basis_set.cpp | 2 +- .../basis_set/atomic_basis_set_view.cpp | 2 +- .../basis_set/detail_/ao_basis_set_pimpl.cpp | 2 +- .../detail_/atomic_basis_set_pimpl.cpp | 2 +- .../detail_/atomic_basis_set_view_pimpl.cpp | 2 +- .../basis_set/detail_/compute_n_aos.cpp | 2 +- tests/cxx/unit_tests/catch.hpp | 2 +- .../unit_tests/electron/electron_class.cpp | 2 +- .../quantum_mechanics/braket/braket_class.cpp | 2 +- .../braket/detail_/braket_base.cpp | 2 +- .../operator/core_hamiltonian.cpp | 2 +- .../quantum_mechanics/operator/coulomb.cpp | 2 +- .../quantum_mechanics/operator/density.cpp | 2 +- .../detail_/linear_combination_impl.cpp | 2 +- .../operator/detail_/operator_impl.cpp | 2 +- .../detail_/unpack_linear_combination.cpp | 2 +- .../operator/electronic_hamiltonian.cpp | 2 +- .../quantum_mechanics/operator/exchange.cpp | 2 +- .../operator/exchange_correlation.cpp | 2 +- .../quantum_mechanics/operator/fock.cpp | 2 +- .../operator/hamiltonian.cpp | 2 +- .../quantum_mechanics/operator/identity.cpp | 2 +- .../quantum_mechanics/operator/kinetic.cpp | 2 +- .../quantum_mechanics/wavefunction/cmos.cpp | 2 +- .../detail_/wavefunction_impl.cpp | 2 +- .../wavefunction/determinant.cpp | 2 +- .../quantum_mechanics/wavefunction/mos.cpp | 2 +- .../wavefunction/natural.cpp | 2 +- .../wavefunction/transformed.cpp | 2 +- .../traits/quantum_mechanics_traits.cpp | 2 +- .../python/doc_snippets/test_atom_example.py | 12 +- .../python/doc_snippets/test_doc_snippets.py | 5 +- .../doc_snippets/test_molecule_example.py | 7 +- .../doc_snippets/test_nucleus_example.py | 4 +- .../unit_tests/basis_set/test_ao_basis_set.py | 50 ++++--- .../basis_set/test_atomic_basis_set.py | 124 +++++++++++------- .../basis_set/test_atomic_basis_set_view.py | 83 +++++++----- .../basis_set/test_contracted_gaussian.py | 56 +++++--- .../test_contracted_gaussian_view.py | 57 ++++---- .../unit_tests/basis_set/test_primitive.py | 30 +++-- .../basis_set/test_primitive_view.py | 31 +++-- .../python/unit_tests/basis_set/test_shell.py | 91 ++++++++----- .../unit_tests/basis_set/test_shell_view.py | 79 +++++++---- .../chemical_system/test_chemical_system.py | 4 +- .../test_chemical_system_view.py | 4 +- .../electron/test_electron_class.py | 4 +- .../electron/test_many_electrons.py | 4 +- .../chemical_system/molecule/test_atom.py | 56 ++++---- .../chemical_system/molecule/test_molecule.py | 19 +-- .../molecule/test_molecule_view.py | 8 +- .../chemical_system/nucleus/test_nuclei.py | 20 +-- .../nucleus/test_nuclei_view.py | 20 +-- .../chemical_system/nucleus/test_nucleus.py | 42 +++--- .../nucleus/test_nucleus_view.py | 20 +-- .../point_charge/test_charge_view.py | 9 +- .../point_charge/test_charges.py | 5 +- .../point_charge/test_charges_view.py | 5 +- .../point_charge/test_point_charge.py | 5 +- .../fragmenting/capping/test_cap.py | 6 +- .../fragmenting/capping/test_cap_set.py | 6 +- .../test_fragmented_chemical_system.py | 15 ++- .../fragmenting/test_fragmented_molecule.py | 15 ++- .../fragmenting/test_fragmented_nuclei.py | 12 +- tests/python/unit_tests/point/test_point.py | 4 +- .../python/unit_tests/point/test_point_set.py | 5 +- .../unit_tests/point/test_point_set_view.py | 19 ++- .../unit_tests/point/test_point_view.py | 4 +- .../unit_tests/quantum_mechanics/test_qm.py | 6 +- .../wavefunction/test_aos.py | 6 +- tests/python/unit_tests/test_chemist.py | 5 +- 182 files changed, 826 insertions(+), 642 deletions(-) create mode 100644 .flake8 rename .github/.licenserc.yaml => .licenserc.yaml (96%) diff --git a/.clang-format b/.clang-format index 1c27bb27a..a9b825916 100644 --- a/.clang-format +++ b/.clang-format @@ -34,7 +34,7 @@ AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: true BinPackArguments: true BinPackParameters: true -BraceWrapping: +BraceWrapping: AfterClass: false AfterControlStatement: false AfterEnum: false @@ -65,7 +65,7 @@ DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -IncludeCategories: +IncludeCategories: - Regex: '^"' Priority: 1 - Regex: '^<' diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..d6ddc11ac --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +ignore = E741, W503 diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index c860bbb9d..0bd3deb46 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -24,7 +24,7 @@ jobs: check_formatting: uses: NWChemEx/.github/.github/workflows/check_formatting.yaml@master with: - license_config: ".github/.licenserc.yaml" + license_config: ".licenserc.yaml" test_nwx_docs: uses: NWChemEx/.github/.github/workflows/test_nwx_docs.yaml@master diff --git a/.github/.licenserc.yaml b/.licenserc.yaml similarity index 96% rename from .github/.licenserc.yaml rename to .licenserc.yaml index 44694acc7..4b97e7a8f 100644 --- a/.github/.licenserc.yaml +++ b/.licenserc.yaml @@ -24,5 +24,7 @@ header: - docs/requirements.txt - docs/source/bibliography/*.bib - version.txt + - build/ + - .flake8 comment: never diff --git a/LICENSE b/LICENSE index 4947287f7..f433b1a53 100644 --- a/LICENSE +++ b/LICENSE @@ -174,4 +174,4 @@ incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS \ No newline at end of file + END OF TERMS AND CONDITIONS diff --git a/docs/requirements.txt b/docs/requirements.txt index e9cfa410b..6eabf9afe 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ GitPython +setuptools sphinx==v7.2.6 sphinx_rtd_theme==1.3.0 -sphinxcontrib-bibtex -setuptools sphinx_tabs +sphinxcontrib-bibtex diff --git a/docs/source/background/motivation.rst b/docs/source/background/motivation.rst index f3b2528a3..87c018fdf 100644 --- a/docs/source/background/motivation.rst +++ b/docs/source/background/motivation.rst @@ -21,7 +21,7 @@ Chemist Motivation .. note:: - Some of the todos on this page are partially addressed in the overview and + Some of the todos on this page are partially addressed in the overview and should be moved here. TODO: explain traditional stack (UI to computation) diff --git a/docs/source/conf.py b/docs/source/conf.py index 764aeef24..5f1720314 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,13 +21,14 @@ # http://www.sphinx-doc.org/en/master/config import os + import git # -- Project information ----------------------------------------------------- -project = u'Chemist' -copyright = u'2020, NWChemEx Community' -author = u'NWChemEx Community' +project = "Chemist" +copyright = "2020, NWChemEx Community" +author = "NWChemEx Community" ############################################################################## # Shouldn't need to change anything below this point # @@ -61,35 +62,39 @@ # If your documentation needs a minimal Sphinx version, state it here. # -needs_sphinx = '1.3' +needs_sphinx = "1.3" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.githubpages', - 'sphinx.ext.autosummary', 'sphinx_rtd_theme', 'sphinxcontrib.bibtex', - 'sphinx_tabs.tabs' + "sphinx.ext.autodoc", + "sphinx.ext.mathjax", + "sphinx.ext.githubpages", + "sphinx.ext.autosummary", + "sphinx_rtd_theme", + "sphinxcontrib.bibtex", + "sphinx_tabs.tabs", ] # Add any paths that contain templates here, relative to this directory. -#templates_path = ['_templates'] +# templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = 'en' +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -97,7 +102,7 @@ exclude_patterns = [] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" # Should figures be numbered? numfig = True @@ -107,20 +112,20 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx_rtd_theme" -html_logo = 'assets/logo.png' +html_logo = "assets/logo.png" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # -html_theme_options = {'logo_only': True} +html_theme_options = {"logo_only": True} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] +# html_static_path = ['_static'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. @@ -135,12 +140,12 @@ # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = project + 'doc' +htmlhelp_basename = project + "doc" # -- Extension configuration ------------------------------------------------- # -- Options for bibtex ------------------------------------------------------ -bibtex_bibfiles = ['bibliography/background.bib'] -bibtex_reference_style = 'super' -bibtex_default_style = 'plain' +bibtex_bibfiles = ["bibliography/background.bib"] +bibtex_reference_style = "super" +bibtex_default_style = "plain" diff --git a/docs/source/developer/adding_an_operator.rst b/docs/source/developer/adding_an_operator.rst index be0b3b178..6475e39d0 100644 --- a/docs/source/developer/adding_an_operator.rst +++ b/docs/source/developer/adding_an_operator.rst @@ -19,20 +19,20 @@ Notes on Adding an Operator To add a new operator to Chemist requires modifications in several places. They are collected here for convenience. -- Forward declare it in +- Forward declare it in include/chemist/quantum_mechanics/operator/operator_fwd.hpp -- Declare the class in +- Declare the class in include/chemist/quantum_mechanics/operator/.hpp - Define the class in src/chemist/quantum_mechanics/operator/.cpp -- Add it to the OperatorVisitor class in +- Add it to the OperatorVisitor class in include/chemist/quantum_mechanics/operator/operator_visitor.hpp -- Define the new OperatorVisitor functions in +- Define the new OperatorVisitor functions in src/chemist/quantum_mechanics/operator/operator_visitor.cpp -- Add unit tests to +- Add unit tests to tests/cxx/unit_tests/quantum_mechanics/operator/.cpp - Add unit tests to tests/python/unit_tests/quantum_mechanics/operator/.py - + .. note:: "" in the above file names should be replaced with your @@ -40,4 +40,4 @@ are collected here for convenience. As a helpful hint, copy/paste ``kinetic.hpp`` / ``kinetic.cpp`` for one- particle operators and ``Coulomb.hpp`` / ``Coulomb.cpp`` for two-particle -operators and then find/replace the name. \ No newline at end of file +operators and then find/replace the name. diff --git a/docs/source/developer/design/chemical_system/molecule.rst b/docs/source/developer/design/chemical_system/molecule.rst index 6337b2e65..bda6f9076 100644 --- a/docs/source/developer/design/chemical_system/molecule.rst +++ b/docs/source/developer/design/chemical_system/molecule.rst @@ -335,4 +335,4 @@ Future Considerations - Could template ``Atom`` on the type of the nucleus and introduce additional nucleus types in cases where the nucleus is to be treated quantum - mechanically. \ No newline at end of file + mechanically. diff --git a/docs/source/developer/design/chemical_system/system.rst b/docs/source/developer/design/chemical_system/system.rst index 9baa97b29..009f98f85 100644 --- a/docs/source/developer/design/chemical_system/system.rst +++ b/docs/source/developer/design/chemical_system/system.rst @@ -30,9 +30,9 @@ What is a Chemical System? Many quantum chemistry codes talk about the "molecule" as being the input to the code; however, in chemistry, molecules are simply sets of atoms. Even with the general definition adopted in :ref:`md_what_is_a_molecule` there are often -additional parts to the system being studied -- for example external fields -- -that are not captured by the "molecule" concept. We define the chemical system -to be the entire system we are trying to model. This will almost always +additional parts to the system being studied -- for example external fields -- +that are not captured by the "molecule" concept. We define the chemical system +to be the entire system we are trying to model. This will almost always include a molecule. .. _csd_considerations: @@ -76,6 +76,4 @@ Model parameters In many cases it is a fine-line between model parameters and the system being modeled. Generally speaking we prefer to treat model parameters separate from the chemical system when they can be clearly distinguished. - Of note the AO basis set is considered separately. - - + Of note the AO basis set is considered separately. diff --git a/docs/source/developer/design/dsl.rst b/docs/source/developer/design/dsl.rst index e714a827c..7b1f90656 100644 --- a/docs/source/developer/design/dsl.rst +++ b/docs/source/developer/design/dsl.rst @@ -18,7 +18,7 @@ DSL Component These are notes on designing the DSL component. -- We'll need DSLs for combining wavefunctions, operators, and potentially +- We'll need DSLs for combining wavefunctions, operators, and potentially BraKets and chemical systems. - This component is an attempt to create a reusable DSL framework. It stops shy of evaluating the expression that is created. diff --git a/docs/source/developer/design/quantum_mechanics/braket/index.rst b/docs/source/developer/design/quantum_mechanics/braket/index.rst index b85fc73f1..5a83d30b1 100644 --- a/docs/source/developer/design/quantum_mechanics/braket/index.rst +++ b/docs/source/developer/design/quantum_mechanics/braket/index.rst @@ -18,33 +18,33 @@ Design of the BraKet Component ############################## -This is a collection of notes on the design of the classes for the BraKet +This is a collection of notes on the design of the classes for the BraKet component and should be formalized at some point. - In prototyping ``BraKet`` and ``TensorRepresentation`` were property types; however, this was burdensome when vector spaces/wavefunctions exhibited - inheritance, e.g., if x inherits from y, then the property type - ``BraKet, y>`` was different from + inheritance, e.g., if x inherits from y, then the property type + ``BraKet, y>`` was different from ``BraKet, x>``. Moreover because the latter property type did not inherit from the former, implicit conversion could not happen. With ``BraKet`` (and ``TensorRepresentation``) being traditional classes we can define our own implicit conversions easily. -- Rigorously kets are vectors and bras are operations which project onto a +- Rigorously kets are vectors and bras are operations which project onto a vector. -- The "projection" part of the bra involves antilinear projection on to a +- The "projection" part of the bra involves antilinear projection on to a vector. In practice, bras are labeled with the complex conjugate of the vector they project on to, i.e., if u is the complex conjugate of v than the bra which projects on to u is actually labeled v. - - The points here being: one, we don't expect the user to specify the - projection, it's implied, and two based on the labeling convention we need + - The points here being: one, we don't expect the user to specify the + projection, it's implied, and two based on the labeling convention we need to internally take the complex conjugate of whatever the user gives us. - Following from the last points a bra-ket is rigorously a scalar; however, since this scalar is a tensor element it is also common to represent the entire tensor by specifying a generic element of the tensor in bra-ket form. - - Think of :math:`\textbf{A}=\braket{i\mid A\mid j}` as the analog of + - Think of :math:`\textbf{A}=\braket{i\mid A\mid j}` as the analog of :math:`\textbf{A} = a_{ij}`. - From a design standpoint this means we want to be able to specify both an entire tensor and a tensor element with bra-ket objects. The two are @@ -52,13 +52,13 @@ component and should be formalized at some point. generic vector (which we represent by the entire vector space it can stand for). - - We have separate base classes for Wavefunction and VectorSpace. Should + - We have separate base classes for Wavefunction and VectorSpace. Should we have separate base classes for scalar vs tensor BraKets? - - Users likely will expect "Wavefunction, Operator, Wavefunction" to - evaluate to a scalar (or vector depending on the operator) and - "VectorSpace, Operator, VectorSpace" to evaluate to a - tensor. + - Users likely will expect "Wavefunction, Operator, Wavefunction" to + evaluate to a scalar (or vector depending on the operator) and + "VectorSpace, Operator, VectorSpace" to evaluate to a + tensor. - Define ``TensorRepresentation`` for ``BraKet`` that evaluate to tensors and ``TensorElement`` for ``BraKet`` that evaluate to an element of the tensor. @@ -75,4 +75,4 @@ component and should be formalized at some point. .. figure:: assets/braket_hierarchy.png :align: center - BraKet class hierarcy. \ No newline at end of file + BraKet class hierarcy. diff --git a/docs/source/developer/design/quantum_mechanics/operator/hamiltonian.rst b/docs/source/developer/design/quantum_mechanics/operator/hamiltonian.rst index b6365e497..162a57010 100644 --- a/docs/source/developer/design/quantum_mechanics/operator/hamiltonian.rst +++ b/docs/source/developer/design/quantum_mechanics/operator/hamiltonian.rst @@ -22,8 +22,8 @@ These are musings on the design of the Hamiltonian class and should be turned into full documentation at some point. - The Hamiltonian will always be an indefinite operator. - - - This is necessary because, in general, it will contain a mix of one- and + + - This is necessary because, in general, it will contain a mix of one- and two-particle operators. Bra-kets of such an operator only makes sense with many-particle wavefunctions. @@ -35,18 +35,18 @@ into full documentation at some point. Hamiltonian has. On the other this will complicate interfaces. - Order of parameters can be managed by convention. - Is it templated on operators present or particles present? - - If on particles, how do we know that it say contains not just single + - If on particles, how do we know that it say contains not just single ``Electron`` terms, but also terms that depend on pairs of ``Electron`` objects? .. code-block:: c++ - + // These are the proposed templating schemes // Templated on operators ("easily" deduced from ctor) Hamiltonian H0; - // Templated on particle types (no distinction of what definite terms appear) + // Templated on particle types (no distinction of what definite terms appear) Hamiltonian H1 // Templated on definite sizes @@ -59,10 +59,10 @@ Creation, usage APIs: .. code-block:: c++ auto [T_e, V_en, V_ee, V_en, V_nn] = get_operators(); - + // Works with C++17, could deduce any of the above types Hamiltonian H(T_e + V_en + V_ee + V_en + V_nn); - + // If templated, SFINAE could be used to enable/disable these functions T_e = H.T_e(); // Takes an optional offset in case there's more than one @@ -93,9 +93,9 @@ example: using pt0 = EvaluateBraKet>; using pt1 = EvaluateBraKet>; -Here Hamiltonians of ``H_type0`` could only be passed to ``pt0`` and +Here Hamiltonians of ``H_type0`` could only be passed to ``pt0`` and Hamiltonians of ``H_type1`` could only be passed to ``pt1``. More than likely ``pt0`` could handle Hamiltonians of ``H_type1`` (though it is unlikely that ``pt1`` could handle Hamiltonians of ``H_type0``). -Verdict: Go with type-erased to avoid combinatorial interaction of terms. \ No newline at end of file +Verdict: Go with type-erased to avoid combinatorial interaction of terms. diff --git a/docs/source/developer/design/quantum_mechanics/operator/operator_base.rst b/docs/source/developer/design/quantum_mechanics/operator/operator_base.rst index 2b968bd61..aa030d697 100644 --- a/docs/source/developer/design/quantum_mechanics/operator/operator_base.rst +++ b/docs/source/developer/design/quantum_mechanics/operator/operator_base.rst @@ -21,22 +21,22 @@ Design of the OperatorBase Class These are just some notes of things I thought about when I wrote the class. They should be formalized at a later point. -- Architecture called for templating on particle type, i.e., +- Architecture called for templating on particle type, i.e., ``OperatorBase``. - Problem for Python exposure unless we expose each separately. - Would have ``T...`` values of: ``Electron``, ``ManyElectron``, ``Nucleus``, ``Nuclei``, ``Density``, ``ChargeSet``, and pairs of these. - That's already 42 possible types (assuming we don't ever need other + That's already 42 possible types (assuming we don't ever need other densities, triples of particles, or more exotic particles like muons). - Internally rely on ``std::vector``? - Provide a class ``OperatorImpl`` for factoring out the common template pieces. ``OperatorImpl`` derives form ``OperatorBase``. APIs should - not rely on ``OperatorImpl``, rather they should rely on + not rely on ``OperatorImpl``, rather they should rely on ``OperatorBase`` or the class that derives from ``OperatorImpl``. -- Can't be in namespace ``operator`` (C++ keyword), so we opted for +- Can't be in namespace ``operator`` (C++ keyword), so we opted for ``qm_operator``. - Use visitor pattern to implement generic algorithms. Algorithms specific to @@ -69,8 +69,8 @@ and each operator overloads it like: } }; -The visitor will then be called with the derived class. This requires the +The visitor will then be called with the derived class. This requires the visitor to define an overload for each operator it might get. The easiest -solution is to brute force enumerate the possible overloads in +solution is to brute force enumerate the possible overloads in ``OperatorVisitor``, implementing them all so that they error. Derived classes -can then override the ones they want to handle. \ No newline at end of file +can then override the ones they want to handle. diff --git a/docs/source/developer/design/quantum_mechanics/wavefunction/architecture.rst b/docs/source/developer/design/quantum_mechanics/wavefunction/architecture.rst index 9f63e38dd..ab94a50ed 100644 --- a/docs/source/developer/design/quantum_mechanics/wavefunction/architecture.rst +++ b/docs/source/developer/design/quantum_mechanics/wavefunction/architecture.rst @@ -227,12 +227,12 @@ whereas ``VectorSpace`` objects are used to request the entire tensor. - ``Wavefunction``. Base class signifying that something is an element of a ``VectorSpace`` object. Strictly speaking this means that ``Wavefunction`` - objects are vectors or basis functions an not everything derived from - ``Wavefunction`` will strictly be a wavefunction. However, we felt the more - apt names, ``Vector`` or ``BasisFunction``, were respectively too likely to - collide with other libraries (including the standard library) or be - misconstrued as AO-specific. -- ``ImplicitVector``. Code factorization for representing a wavefunction belongs + objects are vectors or basis functions an not everything derived from + ``Wavefunction`` will strictly be a wavefunction. However, we felt the more + apt names, ``Vector`` or ``BasisFunction``, were respectively too likely to + collide with other libraries (including the standard library) or be + misconstrued as AO-specific. +- ``ImplicitVector``. Code factorization for representing a wavefunction belongs to an ``ImplicitSpace`` object. - ``Determinant``. A class representing a wavefunction formed by taking determinants of single-product wavefunctions. @@ -322,7 +322,7 @@ Summary Addressed by the ``Antisymmetrize`` and ``Symmetrize`` classes. :ref:`wf_basis_function_vs_basis_set` - Addressed with the ``Wavefunction`` and ``VectorSpace`` classes, where the + Addressed with the ``Wavefunction`` and ``VectorSpace`` classes, where the former is an element of the latter. :ref:`wf_implicit_vs_explicit` diff --git a/include/chemist/basis_set/ao_basis_set.hpp b/include/chemist/basis_set/ao_basis_set.hpp index 7202339c5..f3db8f972 100644 --- a/include/chemist/basis_set/ao_basis_set.hpp +++ b/include/chemist/basis_set/ao_basis_set.hpp @@ -429,4 +429,4 @@ using AOBasisSetF = AOBasisSet; extern template class AOBasisSet; extern template class AOBasisSet; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/include/chemist/basis_set/atomic_basis_set_traits.hpp b/include/chemist/basis_set/atomic_basis_set_traits.hpp index d4ec83401..df48775e3 100644 --- a/include/chemist/basis_set/atomic_basis_set_traits.hpp +++ b/include/chemist/basis_set/atomic_basis_set_traits.hpp @@ -66,4 +66,4 @@ struct AtomicBasisSetTraits using const_shell_reference = typename AtomicBSType::const_reference; }; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/include/chemist/basis_set/atomic_basis_set_view.hpp b/include/chemist/basis_set/atomic_basis_set_view.hpp index 20509d779..9ef757fc9 100644 --- a/include/chemist/basis_set/atomic_basis_set_view.hpp +++ b/include/chemist/basis_set/atomic_basis_set_view.hpp @@ -711,4 +711,4 @@ extern template class AtomicBasisSetView; extern template class AtomicBasisSetView; extern template class AtomicBasisSetView; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/include/chemist/basis_set/shell.hpp b/include/chemist/basis_set/shell.hpp index 94f88059a..f1fd84650 100644 --- a/include/chemist/basis_set/shell.hpp +++ b/include/chemist/basis_set/shell.hpp @@ -546,4 +546,4 @@ using ShellF = Shell; extern template class Shell; extern template class Shell; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/include/chemist/basis_set/shell_traits.hpp b/include/chemist/basis_set/shell_traits.hpp index ee54f4c7c..d84b9d9f2 100644 --- a/include/chemist/basis_set/shell_traits.hpp +++ b/include/chemist/basis_set/shell_traits.hpp @@ -48,4 +48,4 @@ struct ShellTraits using const_pure_reference = typename ShellType::const_pure_reference; }; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/include/chemist/basis_set/shell_view.hpp b/include/chemist/basis_set/shell_view.hpp index 49ba7c5c7..c225b1692 100644 --- a/include/chemist/basis_set/shell_view.hpp +++ b/include/chemist/basis_set/shell_view.hpp @@ -558,4 +558,4 @@ extern template class ShellView; extern template class ShellView; extern template class ShellView; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/include/chemist/density/density.hpp b/include/chemist/density/density.hpp index af7d138e7..0d8303b20 100644 --- a/include/chemist/density/density.hpp +++ b/include/chemist/density/density.hpp @@ -17,4 +17,4 @@ #pragma once #include #include -#include \ No newline at end of file +#include diff --git a/include/chemist/detail_/tmp_utils.hpp b/include/chemist/detail_/tmp_utils.hpp index 22bb311c5..fab5f87fd 100644 --- a/include/chemist/detail_/tmp_utils.hpp +++ b/include/chemist/detail_/tmp_utils.hpp @@ -59,4 +59,4 @@ template using enable_mutable_to_const_t = std::enable_if_t && std::is_same_v>; -} // namespace chemist::detail_ \ No newline at end of file +} // namespace chemist::detail_ diff --git a/include/chemist/electron/electron.hpp b/include/chemist/electron/electron.hpp index 078632288..e9d5cfc72 100644 --- a/include/chemist/electron/electron.hpp +++ b/include/chemist/electron/electron.hpp @@ -16,4 +16,4 @@ #pragma once #include -#include \ No newline at end of file +#include diff --git a/include/chemist/electron/electron_class.hpp b/include/chemist/electron/electron_class.hpp index 457ccf9bc..4d3f292f7 100644 --- a/include/chemist/electron/electron_class.hpp +++ b/include/chemist/electron/electron_class.hpp @@ -53,4 +53,4 @@ class Electron { } }; -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/include/chemist/electron/many_electrons.hpp b/include/chemist/electron/many_electrons.hpp index 48731a602..04ef4c46d 100644 --- a/include/chemist/electron/many_electrons.hpp +++ b/include/chemist/electron/many_electrons.hpp @@ -107,4 +107,4 @@ class ManyElectrons : public utilities::IndexableContainerBase { size_type m_n_electrons_ = 0; }; -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/include/chemist/molecule/atom.hpp b/include/chemist/molecule/atom.hpp index 490426bcc..ca52fb223 100644 --- a/include/chemist/molecule/atom.hpp +++ b/include/chemist/molecule/atom.hpp @@ -103,7 +103,7 @@ class Atom { * @throw None No throw guarantee. */ Atom() : - m_nuke_(), m_n_electrons_(0){} // Explicitly initialize members + m_nuke_(), m_n_electrons_(0) {} // Explicitly initialize members ; /** @@ -119,9 +119,9 @@ class Atom { * there is insufficient memory to perform the copy. */ ///@{ - Atom(const Atom& rhs) = default; - Atom(Atom&& rhs) noexcept = default; - Atom& operator=(const Atom& rhs) = default; + Atom(const Atom& rhs) = default; + Atom(Atom&& rhs) noexcept = default; + Atom& operator=(const Atom& rhs) = default; Atom& operator=(Atom&& rhs) noexcept = default; ///@} diff --git a/include/chemist/molecule/molecule_class.hpp b/include/chemist/molecule/molecule_class.hpp index db0d9f28c..0c709b372 100644 --- a/include/chemist/molecule/molecule_class.hpp +++ b/include/chemist/molecule/molecule_class.hpp @@ -523,14 +523,14 @@ void Molecule::save(Archive& ar) const { template void Molecule::load(Archive& ar) { bool has_pimpl = false; - ar& has_pimpl; + ar & has_pimpl; if(has_pimpl) { charge_type q; multiplicity_type m; nuclei_type nuclei; - ar& q; - ar& m; - ar& nuclei; + ar & q; + ar & m; + ar & nuclei; Molecule(q, m, nuclei).swap(*this); } } diff --git a/include/chemist/nucleus/nuclei.hpp b/include/chemist/nucleus/nuclei.hpp index 2144632ec..bcd4576de 100644 --- a/include/chemist/nucleus/nuclei.hpp +++ b/include/chemist/nucleus/nuclei.hpp @@ -291,18 +291,18 @@ template void Nuclei::save(Archive& ar) const { ar& size(); if(size()) { - for(const auto& x : *this) ar& x.as_nucleus(); + for(const auto& x : *this) ar & x.as_nucleus(); } } template void Nuclei::load(Archive& ar) { size_type size; - ar& size; + ar & size; if(size) { value_type p; for(size_type _ = 0; _ < size; ++_) { - ar& p; + ar & p; push_back(p); } } diff --git a/include/chemist/nucleus/nucleus_view.hpp b/include/chemist/nucleus/nucleus_view.hpp index 6d314a85c..23755453f 100644 --- a/include/chemist/nucleus/nucleus_view.hpp +++ b/include/chemist/nucleus/nucleus_view.hpp @@ -168,9 +168,9 @@ class NucleusView std::decay_t, NucleusType>>> NucleusView& operator=(NucleusType2&& other) { base_type::operator=(std::forward(other)); - (*m_pname_) = other.name(); - (*m_pZ_) = other.Z(); - (*m_pmass_) = other.mass(); + (*m_pname_) = other.name(); + (*m_pZ_) = other.Z(); + (*m_pmass_) = other.mass(); return *this; } diff --git a/include/chemist/point/point_set.hpp b/include/chemist/point/point_set.hpp index 74ddfa70c..4f79147a5 100644 --- a/include/chemist/point/point_set.hpp +++ b/include/chemist/point/point_set.hpp @@ -305,7 +305,7 @@ template void PointSet::save(Archive& ar) const { ar& this->size(); if(this->size()) { - for(const auto& x : *this) ar& x.as_point(); + for(const auto& x : *this) ar & x.as_point(); } } @@ -313,11 +313,11 @@ template template void PointSet::load(Archive& ar) { size_type size; - ar& size; + ar & size; if(size) { value_type p; for(size_type _ = 0; _ < size; ++_) { - ar& p; + ar & p; push_back(p); } } diff --git a/include/chemist/point_charge/charges.hpp b/include/chemist/point_charge/charges.hpp index db11476cc..a16fc722f 100644 --- a/include/chemist/point_charge/charges.hpp +++ b/include/chemist/point_charge/charges.hpp @@ -312,7 +312,7 @@ template void Charges::save(Archive& ar) const { ar& this->size(); if(this->size()) { - for(const auto& x : *this) ar& x.as_point_charge(); + for(const auto& x : *this) ar & x.as_point_charge(); } } @@ -320,11 +320,11 @@ template template void Charges::load(Archive& ar) { size_type size; - ar& size; + ar & size; if(size) { value_type p; for(size_type _ = 0; _ < size; ++_) { - ar& p; + ar & p; push_back(p); } } diff --git a/include/chemist/point_charge/point_charge_class.hpp b/include/chemist/point_charge/point_charge_class.hpp index ea6775f82..fdc81466f 100644 --- a/include/chemist/point_charge/point_charge_class.hpp +++ b/include/chemist/point_charge/point_charge_class.hpp @@ -266,14 +266,14 @@ template template void PointCharge::save(Archive& ar) const { point_type::save(ar); - ar& m_q_; + ar & m_q_; } template template void PointCharge::load(Archive& ar) { point_type::load(ar); - ar& m_q_; + ar & m_q_; } extern template class PointCharge; diff --git a/include/chemist/point_charge/point_charge_view.hpp b/include/chemist/point_charge/point_charge_view.hpp index a0cde8bcf..73e479910 100644 --- a/include/chemist/point_charge/point_charge_view.hpp +++ b/include/chemist/point_charge/point_charge_view.hpp @@ -139,7 +139,7 @@ class PointChargeView std::decay_t, ChargeType>>> PointChargeView& operator=(ChargeType2&& charge) { point_view_type::operator=(std::forward(charge)); - (*m_pq_) = charge.charge(); + (*m_pq_) = charge.charge(); return *this; } diff --git a/include/chemist/quantum_mechanics/braket/braket_class.hpp b/include/chemist/quantum_mechanics/braket/braket_class.hpp index 90205e785..c15945537 100644 --- a/include/chemist/quantum_mechanics/braket/braket_class.hpp +++ b/include/chemist/quantum_mechanics/braket/braket_class.hpp @@ -153,7 +153,7 @@ class BraKet * throw guarantee. */ BraKet(const BraKet& other) : - BraKet(other.bra(), other.op(), other.ket()){}; + BraKet(other.bra(), other.op(), other.ket()) {}; /** @brief Initializes *this by taking the state from @p other. * @@ -401,4 +401,4 @@ bool BraKet::operator==( } } -} // namespace chemist::braket \ No newline at end of file +} // namespace chemist::braket diff --git a/include/chemist/quantum_mechanics/braket/detail_/braket_base.hpp b/include/chemist/quantum_mechanics/braket/detail_/braket_base.hpp index 8ae313429..1b7086dd5 100644 --- a/include/chemist/quantum_mechanics/braket/detail_/braket_base.hpp +++ b/include/chemist/quantum_mechanics/braket/detail_/braket_base.hpp @@ -110,10 +110,10 @@ class BraKetBase { protected: /// Protected so derived class can use them, but users can't (avoid slicing) ///@{ - BraKetBase() noexcept = default; - BraKetBase(const BraKetBase&) = default; - BraKetBase(BraKetBase&&) noexcept = default; - BraKetBase& operator=(const BraKetBase&) = default; + BraKetBase() noexcept = default; + BraKetBase(const BraKetBase&) = default; + BraKetBase(BraKetBase&&) noexcept = default; + BraKetBase& operator=(const BraKetBase&) = default; BraKetBase& operator=(BraKetBase&&) noexcept = default; ///@} @@ -124,4 +124,4 @@ class BraKetBase { virtual bool are_equal_(const_base_reference rhs) const noexcept = 0; }; -} // namespace chemist::braket::detail_ \ No newline at end of file +} // namespace chemist::braket::detail_ diff --git a/include/chemist/quantum_mechanics/braket/tensor_element.hpp b/include/chemist/quantum_mechanics/braket/tensor_element.hpp index 35209f6cb..83cbee2be 100644 --- a/include/chemist/quantum_mechanics/braket/tensor_element.hpp +++ b/include/chemist/quantum_mechanics/braket/tensor_element.hpp @@ -34,4 +34,4 @@ class TensorElement : public detail_::BraKetBase> { using result_type = ElementType; }; -} // namespace chemist::braket \ No newline at end of file +} // namespace chemist::braket diff --git a/include/chemist/quantum_mechanics/braket/tensor_representation.hpp b/include/chemist/quantum_mechanics/braket/tensor_representation.hpp index e5f6f5e98..3269b8872 100644 --- a/include/chemist/quantum_mechanics/braket/tensor_representation.hpp +++ b/include/chemist/quantum_mechanics/braket/tensor_representation.hpp @@ -37,4 +37,4 @@ class TensorRepresentation : public detail_::BraKetBase { using result_type = tensorwrapper::Tensor; }; -} // namespace chemist::braket \ No newline at end of file +} // namespace chemist::braket diff --git a/include/chemist/quantum_mechanics/operator/core_hamiltonian.hpp b/include/chemist/quantum_mechanics/operator/core_hamiltonian.hpp index fb1267698..ed973b917 100644 --- a/include/chemist/quantum_mechanics/operator/core_hamiltonian.hpp +++ b/include/chemist/quantum_mechanics/operator/core_hamiltonian.hpp @@ -112,4 +112,4 @@ class CoreHamiltonian : public detail_::LinearCombinationImpl { */ CoreHamiltonian& operator=(CoreHamiltonian&& other) noexcept = default; }; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/coulomb.hpp b/include/chemist/quantum_mechanics/operator/coulomb.hpp index a768d5e1e..16d606ce6 100644 --- a/include/chemist/quantum_mechanics/operator/coulomb.hpp +++ b/include/chemist/quantum_mechanics/operator/coulomb.hpp @@ -47,9 +47,9 @@ class Coulomb : public detail_::OperatorImpl, /// All implemented by OperatorImpl. This exposes them to the user. ///@{ - Coulomb(const Coulomb&) = default; - Coulomb(Coulomb&& rhs) noexcept = default; - Coulomb& operator=(const Coulomb&) = default; + Coulomb(const Coulomb&) = default; + Coulomb(Coulomb&& rhs) noexcept = default; + Coulomb& operator=(const Coulomb&) = default; Coulomb& operator=(Coulomb&& rhs) noexcept = default; ///@} @@ -121,4 +121,4 @@ extern template class Coulomb; extern template class Coulomb; extern template class Coulomb; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/density.hpp b/include/chemist/quantum_mechanics/operator/density.hpp index 1422f64ad..7c4ed24cb 100644 --- a/include/chemist/quantum_mechanics/operator/density.hpp +++ b/include/chemist/quantum_mechanics/operator/density.hpp @@ -258,4 +258,4 @@ class Density orbitals_type m_orbitals_; }; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/detail_/linear_combination_impl.hpp b/include/chemist/quantum_mechanics/operator/detail_/linear_combination_impl.hpp index 1b2e3ae69..4d1fe0221 100644 --- a/include/chemist/quantum_mechanics/operator/detail_/linear_combination_impl.hpp +++ b/include/chemist/quantum_mechanics/operator/detail_/linear_combination_impl.hpp @@ -226,4 +226,4 @@ class LinearCombinationImpl : public OperatorBase { container_type m_terms_; }; -} // namespace chemist::qm_operator::detail_ \ No newline at end of file +} // namespace chemist::qm_operator::detail_ diff --git a/include/chemist/quantum_mechanics/operator/detail_/operator_impl.hpp b/include/chemist/quantum_mechanics/operator/detail_/operator_impl.hpp index 195bebfa3..ff4d41399 100644 --- a/include/chemist/quantum_mechanics/operator/detail_/operator_impl.hpp +++ b/include/chemist/quantum_mechanics/operator/detail_/operator_impl.hpp @@ -340,4 +340,4 @@ auto operator*(const LHSType& lhs, lhs, static_cast(rhs)); } -} // namespace chemist::qm_operator::detail_ \ No newline at end of file +} // namespace chemist::qm_operator::detail_ diff --git a/include/chemist/quantum_mechanics/operator/detail_/unpack_linear_combination.hpp b/include/chemist/quantum_mechanics/operator/detail_/unpack_linear_combination.hpp index 6d8c712f0..8f13cf6f6 100644 --- a/include/chemist/quantum_mechanics/operator/detail_/unpack_linear_combination.hpp +++ b/include/chemist/quantum_mechanics/operator/detail_/unpack_linear_combination.hpp @@ -190,4 +190,4 @@ struct UnpackLinearCombination { container_type m_terms; }; -} // namespace chemist::qm_operator::detail_ \ No newline at end of file +} // namespace chemist::qm_operator::detail_ diff --git a/include/chemist/quantum_mechanics/operator/electronic_hamiltonian.hpp b/include/chemist/quantum_mechanics/operator/electronic_hamiltonian.hpp index 224105266..d3f71f411 100644 --- a/include/chemist/quantum_mechanics/operator/electronic_hamiltonian.hpp +++ b/include/chemist/quantum_mechanics/operator/electronic_hamiltonian.hpp @@ -131,4 +131,4 @@ class ElectronicHamiltonian ElectronicHamiltonian& operator=(ElectronicHamiltonian&& other) noexcept = default; }; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/exchange.hpp b/include/chemist/quantum_mechanics/operator/exchange.hpp index 7e760d224..fd842e210 100644 --- a/include/chemist/quantum_mechanics/operator/exchange.hpp +++ b/include/chemist/quantum_mechanics/operator/exchange.hpp @@ -48,9 +48,9 @@ class Exchange /// All implemented by OperatorImpl. This exposes them to the user. ///@{ - Exchange(const Exchange&) = default; - Exchange(Exchange&& rhs) noexcept = default; - Exchange& operator=(const Exchange&) = default; + Exchange(const Exchange&) = default; + Exchange(Exchange&& rhs) noexcept = default; + Exchange& operator=(const Exchange&) = default; Exchange& operator=(Exchange&& rhs) noexcept = default; ///@} @@ -117,4 +117,4 @@ extern template class Exchange>; extern template class Exchange>; extern template class Exchange>; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/exchange_correlation.hpp b/include/chemist/quantum_mechanics/operator/exchange_correlation.hpp index 59994c3c8..8d46d9645 100644 --- a/include/chemist/quantum_mechanics/operator/exchange_correlation.hpp +++ b/include/chemist/quantum_mechanics/operator/exchange_correlation.hpp @@ -92,8 +92,8 @@ class ExchangeCorrelation /// All implemented by OperatorImpl. This exposes them to the user. ///@{ - ExchangeCorrelation(const ExchangeCorrelation&) = default; - ExchangeCorrelation(ExchangeCorrelation&& rhs) noexcept = default; + ExchangeCorrelation(const ExchangeCorrelation&) = default; + ExchangeCorrelation(ExchangeCorrelation&& rhs) noexcept = default; ExchangeCorrelation& operator=(const ExchangeCorrelation&) = default; ExchangeCorrelation& operator=(ExchangeCorrelation&& rhs) noexcept = default; @@ -189,4 +189,4 @@ extern template class ExchangeCorrelation>; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/fock.hpp b/include/chemist/quantum_mechanics/operator/fock.hpp index 7d3ce4e22..ed182060d 100644 --- a/include/chemist/quantum_mechanics/operator/fock.hpp +++ b/include/chemist/quantum_mechanics/operator/fock.hpp @@ -101,4 +101,4 @@ class Fock : public detail_::LinearCombinationImpl { */ Fock& operator=(Fock&& other) noexcept = default; }; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/hamiltonian.hpp b/include/chemist/quantum_mechanics/operator/hamiltonian.hpp index 71095d48a..3a5828459 100644 --- a/include/chemist/quantum_mechanics/operator/hamiltonian.hpp +++ b/include/chemist/quantum_mechanics/operator/hamiltonian.hpp @@ -150,4 +150,4 @@ class Hamiltonian : public detail_::LinearCombinationImpl { */ Hamiltonian& operator=(Hamiltonian&& other) noexcept = default; }; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/identity.hpp b/include/chemist/quantum_mechanics/operator/identity.hpp index be95b13ee..fed344431 100644 --- a/include/chemist/quantum_mechanics/operator/identity.hpp +++ b/include/chemist/quantum_mechanics/operator/identity.hpp @@ -36,10 +36,10 @@ class Identity : public detail_::OperatorImpl { public: /// All are implemented by OperatorImpl. This exposes them to the user. ///@{ - Identity() noexcept = default; - Identity(const Identity&) = default; - Identity(Identity&& rhs) noexcept = default; - Identity& operator=(const Identity&) = default; + Identity() noexcept = default; + Identity(const Identity&) = default; + Identity(Identity&& rhs) noexcept = default; + Identity& operator=(const Identity&) = default; Identity& operator=(Identity&& rhs) noexcept = default; ///@} @@ -47,4 +47,4 @@ class Identity : public detail_::OperatorImpl { ~Identity() noexcept = default; }; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/kinetic.hpp b/include/chemist/quantum_mechanics/operator/kinetic.hpp index 28fc35b1f..9bed8b085 100644 --- a/include/chemist/quantum_mechanics/operator/kinetic.hpp +++ b/include/chemist/quantum_mechanics/operator/kinetic.hpp @@ -61,9 +61,9 @@ class Kinetic /// All are implemented by OperatorImpl. This exposes them to the user. ///@{ - Kinetic(const Kinetic&) = default; - Kinetic(Kinetic&& rhs) noexcept = default; - Kinetic& operator=(const Kinetic&) = default; + Kinetic(const Kinetic&) = default; + Kinetic(Kinetic&& rhs) noexcept = default; + Kinetic& operator=(const Kinetic&) = default; Kinetic& operator=(Kinetic&& rhs) noexcept = default; ///@} @@ -100,4 +100,4 @@ extern template class Kinetic; extern template class Kinetic; extern template class Kinetic; extern template class Kinetic; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/operator.hpp b/include/chemist/quantum_mechanics/operator/operator.hpp index 30b290017..67922a59e 100644 --- a/include/chemist/quantum_mechanics/operator/operator.hpp +++ b/include/chemist/quantum_mechanics/operator/operator.hpp @@ -27,4 +27,4 @@ #include #include #include -#include \ No newline at end of file +#include diff --git a/include/chemist/quantum_mechanics/operator/operator_base.hpp b/include/chemist/quantum_mechanics/operator/operator_base.hpp index cd01ff87f..1b5ed4f1e 100644 --- a/include/chemist/quantum_mechanics/operator/operator_base.hpp +++ b/include/chemist/quantum_mechanics/operator/operator_base.hpp @@ -156,4 +156,4 @@ class OperatorBase { virtual bool are_equal_(const_base_reference other) const noexcept = 0; }; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/operator_fwd.hpp b/include/chemist/quantum_mechanics/operator/operator_fwd.hpp index 9736aca52..a368a98ef 100644 --- a/include/chemist/quantum_mechanics/operator/operator_fwd.hpp +++ b/include/chemist/quantum_mechanics/operator/operator_fwd.hpp @@ -40,4 +40,4 @@ class ExchangeCorrelation; class Identity; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/operator_visitor.hpp b/include/chemist/quantum_mechanics/operator/operator_visitor.hpp index 718c50e86..4e784ee1b 100644 --- a/include/chemist/quantum_mechanics/operator/operator_visitor.hpp +++ b/include/chemist/quantum_mechanics/operator/operator_visitor.hpp @@ -100,4 +100,4 @@ class OperatorVisitor { #undef OVERLOADS #undef CONST_OVERLOAD #undef OVERLOAD -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/include/chemist/quantum_mechanics/operator/typedefs.hpp b/include/chemist/quantum_mechanics/operator/typedefs.hpp index 16456dc1c..34611e12c 100644 --- a/include/chemist/quantum_mechanics/operator/typedefs.hpp +++ b/include/chemist/quantum_mechanics/operator/typedefs.hpp @@ -67,4 +67,4 @@ using xc_e_type = ExchangeCorrelation>; using XC_e_type = ExchangeCorrelation>; -} // namespace chemist::qm_operator::types \ No newline at end of file +} // namespace chemist::qm_operator::types diff --git a/include/chemist/quantum_mechanics/wavefunction/cmos.hpp b/include/chemist/quantum_mechanics/wavefunction/cmos.hpp index 4a991c412..ab43ffd88 100644 --- a/include/chemist/quantum_mechanics/wavefunction/cmos.hpp +++ b/include/chemist/quantum_mechanics/wavefunction/cmos.hpp @@ -53,4 +53,4 @@ class CMOs : public Natural { } }; -} // namespace chemist::wavefunction \ No newline at end of file +} // namespace chemist::wavefunction diff --git a/include/chemist/quantum_mechanics/wavefunction/detail_/wavefunction_impl.hpp b/include/chemist/quantum_mechanics/wavefunction/detail_/wavefunction_impl.hpp index 70b3cf6b0..2d5c27dba 100644 --- a/include/chemist/quantum_mechanics/wavefunction/detail_/wavefunction_impl.hpp +++ b/include/chemist/quantum_mechanics/wavefunction/detail_/wavefunction_impl.hpp @@ -58,4 +58,4 @@ class WavefunctionImpl : public Wavefunction { } }; -} // namespace chemist::wavefunction::detail_ \ No newline at end of file +} // namespace chemist::wavefunction::detail_ diff --git a/include/chemist/quantum_mechanics/wavefunction/determinant.hpp b/include/chemist/quantum_mechanics/wavefunction/determinant.hpp index a315c8cf3..b2c89a493 100644 --- a/include/chemist/quantum_mechanics/wavefunction/determinant.hpp +++ b/include/chemist/quantum_mechanics/wavefunction/determinant.hpp @@ -212,4 +212,4 @@ class Determinant orbital_space_type m_orbitals_; }; -} // namespace chemist::wavefunction \ No newline at end of file +} // namespace chemist::wavefunction diff --git a/include/chemist/quantum_mechanics/wavefunction/mos.hpp b/include/chemist/quantum_mechanics/wavefunction/mos.hpp index 144df2d05..ee8176415 100644 --- a/include/chemist/quantum_mechanics/wavefunction/mos.hpp +++ b/include/chemist/quantum_mechanics/wavefunction/mos.hpp @@ -52,4 +52,4 @@ class MOs : public Transformed { } }; -} // namespace chemist::wavefunction \ No newline at end of file +} // namespace chemist::wavefunction diff --git a/include/chemist/quantum_mechanics/wavefunction/natural.hpp b/include/chemist/quantum_mechanics/wavefunction/natural.hpp index 96b06b3c8..edcfff0d8 100644 --- a/include/chemist/quantum_mechanics/wavefunction/natural.hpp +++ b/include/chemist/quantum_mechanics/wavefunction/natural.hpp @@ -165,4 +165,4 @@ class Natural : public Transformed { tensor_type m_matrix_; }; -} // namespace chemist::wavefunction \ No newline at end of file +} // namespace chemist::wavefunction diff --git a/include/chemist/quantum_mechanics/wavefunction/transformed.hpp b/include/chemist/quantum_mechanics/wavefunction/transformed.hpp index c54126f3f..3eed53ccb 100644 --- a/include/chemist/quantum_mechanics/wavefunction/transformed.hpp +++ b/include/chemist/quantum_mechanics/wavefunction/transformed.hpp @@ -253,4 +253,4 @@ class Transformed : public VectorSpace { transform_type m_c_; }; -} // namespace chemist::wavefunction \ No newline at end of file +} // namespace chemist::wavefunction diff --git a/include/chemist/quantum_mechanics/wavefunction/wavefunction_class.hpp b/include/chemist/quantum_mechanics/wavefunction/wavefunction_class.hpp index 7b5e51cc7..8acf2d21b 100644 --- a/include/chemist/quantum_mechanics/wavefunction/wavefunction_class.hpp +++ b/include/chemist/quantum_mechanics/wavefunction/wavefunction_class.hpp @@ -102,4 +102,4 @@ class Wavefunction { virtual bool are_equal_(const_base_reference rhs) const noexcept = 0; }; -} // namespace chemist::wavefunction \ No newline at end of file +} // namespace chemist::wavefunction diff --git a/include/chemist/quantum_mechanics/wavefunction/wavefunction_fwd.hpp b/include/chemist/quantum_mechanics/wavefunction/wavefunction_fwd.hpp index ebb555fae..29d55f91f 100644 --- a/include/chemist/quantum_mechanics/wavefunction/wavefunction_fwd.hpp +++ b/include/chemist/quantum_mechanics/wavefunction/wavefunction_fwd.hpp @@ -36,4 +36,4 @@ class Transformed; class VectorSpace; class Wavefunction; -} // namespace chemist::wavefunction \ No newline at end of file +} // namespace chemist::wavefunction diff --git a/include/chemist/traits/density_traits.hpp b/include/chemist/traits/density_traits.hpp index 9d15db5be..e648bb891 100644 --- a/include/chemist/traits/density_traits.hpp +++ b/include/chemist/traits/density_traits.hpp @@ -61,4 +61,4 @@ struct ChemistClassTraits> { using const_view_type = value_type; }; -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/include/chemist/traits/electron_traits.hpp b/include/chemist/traits/electron_traits.hpp index 955808e69..0c71e57ca 100644 --- a/include/chemist/traits/electron_traits.hpp +++ b/include/chemist/traits/electron_traits.hpp @@ -58,4 +58,4 @@ struct ChemistClassTraits { using const_view_type = const value_type&; }; -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/include/chemist/traits/quantum_mechanics_traits.hpp b/include/chemist/traits/quantum_mechanics_traits.hpp index 90e10422b..be8a3d097 100644 --- a/include/chemist/traits/quantum_mechanics_traits.hpp +++ b/include/chemist/traits/quantum_mechanics_traits.hpp @@ -79,8 +79,9 @@ static constexpr auto is_vector_space_v = * @tparam KetType The type of the object occupying hte ket slot of the BraKet. */ template -static constexpr auto is_tensor_element_v = is_wavefunction_v&& - is_operator_v&& is_wavefunction_v; +static constexpr auto is_tensor_element_v = + is_wavefunction_v && is_operator_v && + is_wavefunction_v; /** @brief Determines if the template type parameters passed to a BraKet object * make it result in the tensor representation of the operator. @@ -97,7 +98,8 @@ static constexpr auto is_tensor_element_v = is_wavefunction_v&& * @tparam KetType The type of the object occupying hte ket slot of the BraKet. */ template -static constexpr auto is_tensor_representation_v = is_vector_space_v&& - is_operator_v&& is_vector_space_v; +static constexpr auto is_tensor_representation_v = + is_vector_space_v && is_operator_v && + is_vector_space_v; -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/chemist/basis_set/ao_basis_set.cpp b/src/chemist/basis_set/ao_basis_set.cpp index 8ae1749ba..d21e5b885 100644 --- a/src/chemist/basis_set/ao_basis_set.cpp +++ b/src/chemist/basis_set/ao_basis_set.cpp @@ -211,4 +211,4 @@ typename AO_BS::const_reference AO_BS::at_(size_type i) const { template class AOBasisSet; template class AOBasisSet; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/src/chemist/basis_set/atomic_basis_set.cpp b/src/chemist/basis_set/atomic_basis_set.cpp index 267561b04..3a5215c08 100644 --- a/src/chemist/basis_set/atomic_basis_set.cpp +++ b/src/chemist/basis_set/atomic_basis_set.cpp @@ -283,4 +283,4 @@ typename ATOMIC_BASIS_SET::const_reference ATOMIC_BASIS_SET::at_( template class AtomicBasisSet; template class AtomicBasisSet; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/src/chemist/basis_set/atomic_basis_set_view.cpp b/src/chemist/basis_set/atomic_basis_set_view.cpp index 5f334ea29..388d7b5f4 100644 --- a/src/chemist/basis_set/atomic_basis_set_view.cpp +++ b/src/chemist/basis_set/atomic_basis_set_view.cpp @@ -246,4 +246,4 @@ template class AtomicBasisSetView; template class AtomicBasisSetView; template class AtomicBasisSetView; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/src/chemist/basis_set/detail_/ao_basis_set_pimpl.hpp b/src/chemist/basis_set/detail_/ao_basis_set_pimpl.hpp index 46db94f63..ec48ee743 100644 --- a/src/chemist/basis_set/detail_/ao_basis_set_pimpl.hpp +++ b/src/chemist/basis_set/detail_/ao_basis_set_pimpl.hpp @@ -273,4 +273,4 @@ class AOBasisSetPIMPL { std::vector m_exps_; }; // class AOBasisSetPIMPL -} // namespace chemist::basis_set::detail_ \ No newline at end of file +} // namespace chemist::basis_set::detail_ diff --git a/src/chemist/basis_set/detail_/atomic_basis_set_pimpl.hpp b/src/chemist/basis_set/detail_/atomic_basis_set_pimpl.hpp index 4dcea3fed..e5b9db372 100644 --- a/src/chemist/basis_set/detail_/atomic_basis_set_pimpl.hpp +++ b/src/chemist/basis_set/detail_/atomic_basis_set_pimpl.hpp @@ -250,4 +250,4 @@ bool ATOMIC_BASIS_SET_PIMPL::operator==( #undef ATOMIC_BASIS_SET_PIMPL -} // namespace chemist::basis_set::detail_ \ No newline at end of file +} // namespace chemist::basis_set::detail_ diff --git a/src/chemist/basis_set/detail_/atomic_basis_set_view_pimpl.hpp b/src/chemist/basis_set/detail_/atomic_basis_set_view_pimpl.hpp index 03d5e5a52..791c23cd3 100644 --- a/src/chemist/basis_set/detail_/atomic_basis_set_view_pimpl.hpp +++ b/src/chemist/basis_set/detail_/atomic_basis_set_view_pimpl.hpp @@ -163,4 +163,4 @@ AtomicBasisSetViewPIMPL::AtomicBasisSetViewPIMPL( } } -} // namespace chemist::basis_set::detail_ \ No newline at end of file +} // namespace chemist::basis_set::detail_ diff --git a/src/chemist/basis_set/detail_/compute_n_aos.hpp b/src/chemist/basis_set/detail_/compute_n_aos.hpp index a28e8cc50..4abc96135 100644 --- a/src/chemist/basis_set/detail_/compute_n_aos.hpp +++ b/src/chemist/basis_set/detail_/compute_n_aos.hpp @@ -26,4 +26,4 @@ auto compute_n_aos(AngularMomentumType L, ShellType purity) { return is_pure ? (2ul * L + 1ul) : ((L * L + 3ul * L + 2ul) / 2ul); } -} // namespace chemist::basis_set::detail_ \ No newline at end of file +} // namespace chemist::basis_set::detail_ diff --git a/src/chemist/basis_set/detail_/shell_pimpl.hpp b/src/chemist/basis_set/detail_/shell_pimpl.hpp index 7c3092b49..b730903fc 100644 --- a/src/chemist/basis_set/detail_/shell_pimpl.hpp +++ b/src/chemist/basis_set/detail_/shell_pimpl.hpp @@ -55,4 +55,4 @@ class ShellPIMPL { typename shell_traits::pure_type m_pure = shell_traits::pure_type::pure; }; -} // namespace chemist::basis_set::detail_ \ No newline at end of file +} // namespace chemist::basis_set::detail_ diff --git a/src/chemist/basis_set/detail_/shell_view_pimpl.hpp b/src/chemist/basis_set/detail_/shell_view_pimpl.hpp index e490df43b..2c9b70fe9 100644 --- a/src/chemist/basis_set/detail_/shell_view_pimpl.hpp +++ b/src/chemist/basis_set/detail_/shell_view_pimpl.hpp @@ -52,4 +52,4 @@ class ShellViewPIMPL { typename shell_traits::cg_reference m_cg; }; -} // namespace chemist::basis_set::detail_ \ No newline at end of file +} // namespace chemist::basis_set::detail_ diff --git a/src/chemist/basis_set/shell.cpp b/src/chemist/basis_set/shell.cpp index c76453fd0..0ac1e7a61 100644 --- a/src/chemist/basis_set/shell.cpp +++ b/src/chemist/basis_set/shell.cpp @@ -202,4 +202,4 @@ typename SHELL::size_type SHELL::size_() const noexcept { template class Shell; template class Shell; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/src/chemist/basis_set/shell_view.cpp b/src/chemist/basis_set/shell_view.cpp index b9bd2a609..4e2877f93 100644 --- a/src/chemist/basis_set/shell_view.cpp +++ b/src/chemist/basis_set/shell_view.cpp @@ -200,4 +200,4 @@ template class ShellView; template class ShellView; template class ShellView; -} // namespace chemist::basis_set \ No newline at end of file +} // namespace chemist::basis_set diff --git a/src/chemist/chemical_system/detail_/chemical_system_pimpl.hpp b/src/chemist/chemical_system/detail_/chemical_system_pimpl.hpp index 23d1f01ff..ecb540d16 100644 --- a/src/chemist/chemical_system/detail_/chemical_system_pimpl.hpp +++ b/src/chemist/chemical_system/detail_/chemical_system_pimpl.hpp @@ -127,7 +127,7 @@ class ChemicalSystemPIMPL { */ template void save(Archive& ar) const { - ar& m_mol_; + ar & m_mol_; } /** @brief Deserializes the ChemicalSystemPIMPL @@ -138,7 +138,7 @@ class ChemicalSystemPIMPL { */ template void load(Archive& ar) { - ar& m_mol_; + ar & m_mol_; } protected: diff --git a/src/chemist/chemical_system/detail_/chemical_system_view_pimpl.hpp b/src/chemist/chemical_system/detail_/chemical_system_view_pimpl.hpp index 371019c1c..3c6087789 100644 --- a/src/chemist/chemical_system/detail_/chemical_system_view_pimpl.hpp +++ b/src/chemist/chemical_system/detail_/chemical_system_view_pimpl.hpp @@ -64,9 +64,9 @@ class ChemicalSystemViewPIMPL { /// Will be implemented generically by the main class ///@{ - ChemicalSystemViewPIMPL(ChemicalSystemViewPIMPL&&) noexcept = delete; + ChemicalSystemViewPIMPL(ChemicalSystemViewPIMPL&&) noexcept = delete; ChemicalSystemViewPIMPL& operator=(const ChemicalSystemViewPIMPL&) = delete; - ChemicalSystemViewPIMPL& operator=(ChemicalSystemViewPIMPL&&) = delete; + ChemicalSystemViewPIMPL& operator=(ChemicalSystemViewPIMPL&&) = delete; ///@} /// Mutable reference to the Molecule stored in *this diff --git a/src/chemist/density/decomposable_density.cpp b/src/chemist/density/decomposable_density.cpp index 17dd231f3..81a4d260a 100644 --- a/src/chemist/density/decomposable_density.cpp +++ b/src/chemist/density/decomposable_density.cpp @@ -20,4 +20,4 @@ namespace chemist { template class DecomposableDensity; -} \ No newline at end of file +} diff --git a/src/chemist/density/density_class.cpp b/src/chemist/density/density_class.cpp index 14f760863..433841931 100644 --- a/src/chemist/density/density_class.cpp +++ b/src/chemist/density/density_class.cpp @@ -20,4 +20,4 @@ namespace chemist { template class Density; -} \ No newline at end of file +} diff --git a/src/chemist/detail_/container_pimpl.hpp b/src/chemist/detail_/container_pimpl.hpp index b61be977f..19e8a3923 100644 --- a/src/chemist/detail_/container_pimpl.hpp +++ b/src/chemist/detail_/container_pimpl.hpp @@ -65,13 +65,13 @@ class ContainerPIMPL { /// Protected to avoid slicing, but to make sure it's usable by derived /// class ///@{ - ContainerPIMPL(const ContainerPIMPL& rhs) = default; + ContainerPIMPL(const ContainerPIMPL& rhs) = default; ContainerPIMPL& operator=(const ContainerPIMPL& rhs) = default; ///@} /// Deleted to avoid slicing ///@{ - ContainerPIMPL(ContainerPIMPL&& rhs) = delete; + ContainerPIMPL(ContainerPIMPL&& rhs) = delete; ContainerPIMPL& operator=(ContainerPIMPL&& rhs) = delete; ///@} private: diff --git a/src/chemist/molecule/detail_/molecule_view_pimpl.hpp b/src/chemist/molecule/detail_/molecule_view_pimpl.hpp index 97e48cf42..771348871 100644 --- a/src/chemist/molecule/detail_/molecule_view_pimpl.hpp +++ b/src/chemist/molecule/detail_/molecule_view_pimpl.hpp @@ -47,9 +47,9 @@ class MoleculeViewPIMPL { /// Deleted b/c parent_type implements generically ///@{ - MoleculeViewPIMPL(MoleculeViewPIMPL&&) noexcept = delete; + MoleculeViewPIMPL(MoleculeViewPIMPL&&) noexcept = delete; MoleculeViewPIMPL& operator=(const MoleculeViewPIMPL&) = delete; - MoleculeViewPIMPL& operator=(MoleculeViewPIMPL&&) = delete; + MoleculeViewPIMPL& operator=(MoleculeViewPIMPL&&) = delete; ///@} /// Direct access to state (no checks for nullptr; left to parent_type) diff --git a/src/chemist/nucleus/detail_/nuclei_subset.hpp b/src/chemist/nucleus/detail_/nuclei_subset.hpp index db0292ad5..30b0c41a0 100644 --- a/src/chemist/nucleus/detail_/nuclei_subset.hpp +++ b/src/chemist/nucleus/detail_/nuclei_subset.hpp @@ -93,9 +93,9 @@ class NucleiSubset : public NucleiViewPIMPL { // Deleted to avoid accidental slicing, NucleiView implements them for user ///@{ - NucleiSubset(NucleiSubset&&) = delete; + NucleiSubset(NucleiSubset&&) = delete; NucleiSubset& operator=(const NucleiSubset& rhs) = delete; - NucleiSubset& operator=(NucleiSubset&& rhs) = delete; + NucleiSubset& operator=(NucleiSubset&& rhs) = delete; ///@} /** @brief Determines if *this is value equal to @p rhs. diff --git a/src/chemist/nucleus/detail_/nuclei_union.hpp b/src/chemist/nucleus/detail_/nuclei_union.hpp index bf6aafd82..a9eec7773 100644 --- a/src/chemist/nucleus/detail_/nuclei_union.hpp +++ b/src/chemist/nucleus/detail_/nuclei_union.hpp @@ -93,9 +93,9 @@ class NucleiUnion : public NucleiViewPIMPL { /// Implemented generically by NucleiView, deleted to avoid slicing ///@{ - NucleiUnion(NucleiUnion&&) = delete; + NucleiUnion(NucleiUnion&&) = delete; NucleiUnion& operator=(const NucleiUnion&) = delete; - NucleiUnion& operator=(NucleiUnion&&) = delete; + NucleiUnion& operator=(NucleiUnion&&) = delete; ///@} /** @brief Are the Nuclei aliased by *this and @p rhs value equal? diff --git a/src/chemist/nucleus/detail_/nucleus_view_list.hpp b/src/chemist/nucleus/detail_/nucleus_view_list.hpp index 974ce3ad5..714e52fc6 100644 --- a/src/chemist/nucleus/detail_/nucleus_view_list.hpp +++ b/src/chemist/nucleus/detail_/nucleus_view_list.hpp @@ -87,9 +87,9 @@ class NucleusViewList : public NucleiViewPIMPL { /// Implemented generically by NucleiView, deleted to avoid slicing ///@{ - NucleusViewList(NucleusViewList&&) = delete; + NucleusViewList(NucleusViewList&&) = delete; NucleusViewList& operator=(const NucleusViewList&) = delete; - NucleusViewList& operator=(NucleusViewList&&) = delete; + NucleusViewList& operator=(NucleusViewList&&) = delete; ///@} /** @brief Are the Nuclei aliased by *this and @p rhs value equal? diff --git a/src/chemist/quantum_mechanics/operator/coulomb.cpp b/src/chemist/quantum_mechanics/operator/coulomb.cpp index 0942435f7..31a1ab595 100644 --- a/src/chemist/quantum_mechanics/operator/coulomb.cpp +++ b/src/chemist/quantum_mechanics/operator/coulomb.cpp @@ -39,4 +39,4 @@ template class Coulomb; template class Coulomb; template class Coulomb; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/src/chemist/quantum_mechanics/operator/detail_/get_terms.hpp b/src/chemist/quantum_mechanics/operator/detail_/get_terms.hpp index 81fce24ad..e90e9c115 100644 --- a/src/chemist/quantum_mechanics/operator/detail_/get_terms.hpp +++ b/src/chemist/quantum_mechanics/operator/detail_/get_terms.hpp @@ -78,4 +78,4 @@ ReturnType get_terms(OperatorType&& container) { return ReturnType(std::move(ops)); } -} // namespace chemist::qm_operator::detail_ \ No newline at end of file +} // namespace chemist::qm_operator::detail_ diff --git a/src/chemist/quantum_mechanics/operator/electronic_hamiltonian.cpp b/src/chemist/quantum_mechanics/operator/electronic_hamiltonian.cpp index 6c496e94b..db4c4d4d4 100644 --- a/src/chemist/quantum_mechanics/operator/electronic_hamiltonian.cpp +++ b/src/chemist/quantum_mechanics/operator/electronic_hamiltonian.cpp @@ -24,4 +24,4 @@ ElectronicHamiltonian::core_hamiltonian() const { return detail_::get_terms(*this); } -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/src/chemist/quantum_mechanics/operator/exchange.cpp b/src/chemist/quantum_mechanics/operator/exchange.cpp index 0eb4a14bf..63ce5c156 100644 --- a/src/chemist/quantum_mechanics/operator/exchange.cpp +++ b/src/chemist/quantum_mechanics/operator/exchange.cpp @@ -34,4 +34,4 @@ template class Exchange>; template class Exchange>; template class Exchange>; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/src/chemist/quantum_mechanics/operator/exchange_correlation.cpp b/src/chemist/quantum_mechanics/operator/exchange_correlation.cpp index c3feeffd9..a1ca1973d 100644 --- a/src/chemist/quantum_mechanics/operator/exchange_correlation.cpp +++ b/src/chemist/quantum_mechanics/operator/exchange_correlation.cpp @@ -36,4 +36,4 @@ template class ExchangeCorrelation>; template class ExchangeCorrelation>; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/src/chemist/quantum_mechanics/operator/hamiltonian.cpp b/src/chemist/quantum_mechanics/operator/hamiltonian.cpp index 9f2be9dd9..19cfa617e 100644 --- a/src/chemist/quantum_mechanics/operator/hamiltonian.cpp +++ b/src/chemist/quantum_mechanics/operator/hamiltonian.cpp @@ -30,4 +30,4 @@ Hamiltonian::const_core_hamiltonian_reference Hamiltonian::core_hamiltonian() return detail_::get_terms(*this); } -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/src/chemist/quantum_mechanics/operator/kinetic.cpp b/src/chemist/quantum_mechanics/operator/kinetic.cpp index df6598be4..15aeedb0f 100644 --- a/src/chemist/quantum_mechanics/operator/kinetic.cpp +++ b/src/chemist/quantum_mechanics/operator/kinetic.cpp @@ -34,4 +34,4 @@ template class Kinetic; template class Kinetic; template class Kinetic; -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/src/chemist/quantum_mechanics/operator/operator_visitor.cpp b/src/chemist/quantum_mechanics/operator/operator_visitor.cpp index cf4522b2b..1b8a2c431 100644 --- a/src/chemist/quantum_mechanics/operator/operator_visitor.cpp +++ b/src/chemist/quantum_mechanics/operator/operator_visitor.cpp @@ -68,4 +68,4 @@ DENSITY_OVERLOADS(ExchangeCorrelation); #undef CONST_OVERLOAD #undef OVERLOAD -} // namespace chemist::qm_operator \ No newline at end of file +} // namespace chemist::qm_operator diff --git a/src/python/basis_set/export_ao_basis_set.cpp b/src/python/basis_set/export_ao_basis_set.cpp index 433279d65..562935cba 100644 --- a/src/python/basis_set/export_ao_basis_set.cpp +++ b/src/python/basis_set/export_ao_basis_set.cpp @@ -60,4 +60,4 @@ void export_ao_basis_set(python_module_reference m) { detail_::export_ao_basis_set_("AOBasisSetD", m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/basis_set/export_atomic_basis_set.cpp b/src/python/basis_set/export_atomic_basis_set.cpp index b88c935a0..5fecf1a99 100644 --- a/src/python/basis_set/export_atomic_basis_set.cpp +++ b/src/python/basis_set/export_atomic_basis_set.cpp @@ -83,4 +83,4 @@ void export_atomic_basis_set(python_module_reference m) { detail_::export_atomic_basis_set_("AtomicBasisSetD", m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/basis_set/export_atomic_basis_set_view.cpp b/src/python/basis_set/export_atomic_basis_set_view.cpp index 40485ce5d..69066a2e3 100644 --- a/src/python/basis_set/export_atomic_basis_set_view.cpp +++ b/src/python/basis_set/export_atomic_basis_set_view.cpp @@ -73,4 +73,4 @@ void export_atomic_basis_set_view(python_module_reference m) { detail_::export_abs_view_("AtomicBasisSetViewD", m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/basis_set/export_basis_set.hpp b/src/python/basis_set/export_basis_set.hpp index 17d63f3c8..cf0926b33 100644 --- a/src/python/basis_set/export_basis_set.hpp +++ b/src/python/basis_set/export_basis_set.hpp @@ -44,4 +44,4 @@ inline void export_basis_set(python_module_reference m) { export_ao_basis_set(mbasis_set); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/basis_set/export_contracted_gaussian.cpp b/src/python/basis_set/export_contracted_gaussian.cpp index 77b5bb74c..56234edb2 100644 --- a/src/python/basis_set/export_contracted_gaussian.cpp +++ b/src/python/basis_set/export_contracted_gaussian.cpp @@ -57,4 +57,4 @@ void export_contracted_gaussian(python_module_reference m) { detail_::export_contracted_gaussian_("ContractedGaussianD", m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/basis_set/export_contracted_gaussian_view.cpp b/src/python/basis_set/export_contracted_gaussian_view.cpp index c63f90f9b..815039016 100644 --- a/src/python/basis_set/export_contracted_gaussian_view.cpp +++ b/src/python/basis_set/export_contracted_gaussian_view.cpp @@ -53,4 +53,4 @@ void export_contracted_gaussian_view(python_module_reference m) { detail_::export_cg_view_("ContractedGaussianViewD", m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/basis_set/export_primitive.cpp b/src/python/basis_set/export_primitive.cpp index c372daa76..9116fc474 100644 --- a/src/python/basis_set/export_primitive.cpp +++ b/src/python/basis_set/export_primitive.cpp @@ -54,4 +54,4 @@ void export_primitive(python_module_reference m) { detail_::export_primitive_("PrimitiveD", m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/basis_set/export_primitive_view.cpp b/src/python/basis_set/export_primitive_view.cpp index 2f9336137..c56f6ad14 100644 --- a/src/python/basis_set/export_primitive_view.cpp +++ b/src/python/basis_set/export_primitive_view.cpp @@ -57,4 +57,4 @@ void export_primitive_view(python_module_reference m) { detail_::export_primitive_view_("PrimitiveViewD", m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/basis_set/export_shell.cpp b/src/python/basis_set/export_shell.cpp index 3c96112c8..e63e8be37 100644 --- a/src/python/basis_set/export_shell.cpp +++ b/src/python/basis_set/export_shell.cpp @@ -76,4 +76,4 @@ void export_shell(python_module_reference m) { detail_::export_shell_("ShellD", m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/basis_set/export_shell_view.cpp b/src/python/basis_set/export_shell_view.cpp index 45da00f3e..3651bf132 100644 --- a/src/python/basis_set/export_shell_view.cpp +++ b/src/python/basis_set/export_shell_view.cpp @@ -67,4 +67,4 @@ void export_shell_view(python_module_reference m) { detail_::export_shell_view_("ShellViewD", m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/electron/export_electron.hpp b/src/python/electron/export_electron.hpp index 1ea2bf0cd..e6cfc90c5 100644 --- a/src/python/electron/export_electron.hpp +++ b/src/python/electron/export_electron.hpp @@ -27,4 +27,4 @@ inline void export_electron(python_module_reference m) { export_many_electrons(m); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/electron/export_electron_class.cpp b/src/python/electron/export_electron_class.cpp index ea3b73a46..96a36fca2 100644 --- a/src/python/electron/export_electron_class.cpp +++ b/src/python/electron/export_electron_class.cpp @@ -27,4 +27,4 @@ void export_electron_class(python_module_reference m) { .def(pybind11::self != pybind11::self); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/src/python/electron/export_many_electrons.cpp b/src/python/electron/export_many_electrons.cpp index 7a54a2c92..ac796b30e 100644 --- a/src/python/electron/export_many_electrons.cpp +++ b/src/python/electron/export_many_electrons.cpp @@ -32,4 +32,4 @@ void export_many_electrons(python_module_reference m) { .def(pybind11::self != pybind11::self); } -} // namespace chemist \ No newline at end of file +} // namespace chemist diff --git a/tests/cxx/doc_snippets/catch.hpp b/tests/cxx/doc_snippets/catch.hpp index 73d7d0e99..42e8ef612 100644 --- a/tests/cxx/doc_snippets/catch.hpp +++ b/tests/cxx/doc_snippets/catch.hpp @@ -17,4 +17,4 @@ #pragma once #include #include -#include \ No newline at end of file +#include diff --git a/tests/cxx/doc_snippets/chemist_examples.hpp b/tests/cxx/doc_snippets/chemist_examples.hpp index 375c1ce48..da990a624 100644 --- a/tests/cxx/doc_snippets/chemist_examples.hpp +++ b/tests/cxx/doc_snippets/chemist_examples.hpp @@ -19,4 +19,4 @@ int nucleus_example(); int atom_example(); int molecule_example(); int system_example(); -} // namespace chemist_examples \ No newline at end of file +} // namespace chemist_examples diff --git a/tests/cxx/unit_tests/basis_set/ao_basis_set.cpp b/tests/cxx/unit_tests/basis_set/ao_basis_set.cpp index cc2ed3eac..6a4917034 100644 --- a/tests/cxx/unit_tests/basis_set/ao_basis_set.cpp +++ b/tests/cxx/unit_tests/basis_set/ao_basis_set.cpp @@ -193,4 +193,4 @@ TEMPLATE_TEST_CASE("AOBasisSet", "", float, double) { REQUIRE(aobs2 == aobs1); } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/basis_set/atomic_basis_set.cpp b/tests/cxx/unit_tests/basis_set/atomic_basis_set.cpp index e3068e5c1..6d66bf767 100644 --- a/tests/cxx/unit_tests/basis_set/atomic_basis_set.cpp +++ b/tests/cxx/unit_tests/basis_set/atomic_basis_set.cpp @@ -278,4 +278,4 @@ TEMPLATE_TEST_CASE("AtomicBasisSet", "", float, double) { } SECTION("operator!=") { REQUIRE(abs0 != abs1); } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/basis_set/atomic_basis_set_view.cpp b/tests/cxx/unit_tests/basis_set/atomic_basis_set_view.cpp index aec902547..48a35a209 100644 --- a/tests/cxx/unit_tests/basis_set/atomic_basis_set_view.cpp +++ b/tests/cxx/unit_tests/basis_set/atomic_basis_set_view.cpp @@ -455,4 +455,4 @@ TEMPLATE_TEST_CASE("AtomicBasisSetView", "", float, double) { REQUIRE(cview0 != abs1); } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/basis_set/detail_/ao_basis_set_pimpl.cpp b/tests/cxx/unit_tests/basis_set/detail_/ao_basis_set_pimpl.cpp index 9e9d2042e..380a2f6a4 100644 --- a/tests/cxx/unit_tests/basis_set/detail_/ao_basis_set_pimpl.cpp +++ b/tests/cxx/unit_tests/basis_set/detail_/ao_basis_set_pimpl.cpp @@ -117,4 +117,4 @@ TEMPLATE_TEST_CASE("AOBasisSetPIMPL", "", float, double) { REQUIRE(has_abs.max_l() == 1); } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/basis_set/detail_/atomic_basis_set_pimpl.cpp b/tests/cxx/unit_tests/basis_set/detail_/atomic_basis_set_pimpl.cpp index ef5f1558d..862ce7d40 100644 --- a/tests/cxx/unit_tests/basis_set/detail_/atomic_basis_set_pimpl.cpp +++ b/tests/cxx/unit_tests/basis_set/detail_/atomic_basis_set_pimpl.cpp @@ -241,4 +241,4 @@ TEMPLATE_TEST_CASE("AtomicBasisSetPIMPL", "", float, double) { } } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/basis_set/detail_/atomic_basis_set_view_pimpl.cpp b/tests/cxx/unit_tests/basis_set/detail_/atomic_basis_set_view_pimpl.cpp index b2c12ed9c..6cf415179 100644 --- a/tests/cxx/unit_tests/basis_set/detail_/atomic_basis_set_view_pimpl.cpp +++ b/tests/cxx/unit_tests/basis_set/detail_/atomic_basis_set_view_pimpl.cpp @@ -142,4 +142,4 @@ TEMPLATE_TEST_CASE("AtomicBasisSetViewPIMPL", "", float, double) { } } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/basis_set/detail_/compute_n_aos.cpp b/tests/cxx/unit_tests/basis_set/detail_/compute_n_aos.cpp index 3838f59e1..d183a7fd4 100644 --- a/tests/cxx/unit_tests/basis_set/detail_/compute_n_aos.cpp +++ b/tests/cxx/unit_tests/basis_set/detail_/compute_n_aos.cpp @@ -37,4 +37,4 @@ TEST_CASE("compute_n_aos") { SECTION("L = 2") { REQUIRE(compute_n_aos(l2, purity) == 6); } SECTION("L = 3") { REQUIRE(compute_n_aos(l3, purity) == 10); } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/catch.hpp b/tests/cxx/unit_tests/catch.hpp index 73d7d0e99..42e8ef612 100644 --- a/tests/cxx/unit_tests/catch.hpp +++ b/tests/cxx/unit_tests/catch.hpp @@ -17,4 +17,4 @@ #pragma once #include #include -#include \ No newline at end of file +#include diff --git a/tests/cxx/unit_tests/electron/electron_class.cpp b/tests/cxx/unit_tests/electron/electron_class.cpp index 900e5251a..fb73b2451 100644 --- a/tests/cxx/unit_tests/electron/electron_class.cpp +++ b/tests/cxx/unit_tests/electron/electron_class.cpp @@ -29,4 +29,4 @@ TEST_CASE("Electron") { SECTION("operator==") { REQUIRE(e == Electron{}); } SECTION("operator!=") { REQUIRE_FALSE(e != Electron{}); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/braket/braket_class.cpp b/tests/cxx/unit_tests/quantum_mechanics/braket/braket_class.cpp index e0aff8e7d..7f1c62921 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/braket/braket_class.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/braket/braket_class.cpp @@ -157,4 +157,4 @@ TEMPLATE_LIST_TEST_CASE("BraKet", "", bra_ket_tuples) { BraKet diff(ket, op, bra); REQUIRE(o_ij != diff); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/braket/detail_/braket_base.cpp b/tests/cxx/unit_tests/quantum_mechanics/braket/detail_/braket_base.cpp index afef8fa54..7a6ecd551 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/braket/detail_/braket_base.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/braket/detail_/braket_base.cpp @@ -76,4 +76,4 @@ TEST_CASE("BraKetBase") { REQUIRE(braket.are_different(rhs)); } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/core_hamiltonian.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/core_hamiltonian.cpp index 09fa98df2..80a936a0e 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/core_hamiltonian.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/core_hamiltonian.cpp @@ -49,4 +49,4 @@ TEST_CASE("CoreHamiltonian") { test_chemist::test_copy_and_move(defaulted, H); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/coulomb.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/coulomb.cpp index 6186b11be..2805c8134 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/coulomb.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/coulomb.cpp @@ -80,4 +80,4 @@ TEMPLATE_LIST_TEST_CASE("Coulomb", "", types2test) { REQUIRE(std::as_const(defaulted).rhs_particle() == corr_rhs_defaulted); REQUIRE(std::as_const(value).rhs_particle() == corr_rhs_value); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/density.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/density.cpp index ef373f466..2e522f893 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/density.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/density.cpp @@ -118,4 +118,4 @@ TEST_CASE("Density") { REQUIRE(value != defaulted); REQUIRE_FALSE(defaulted != density_type{}); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/linear_combination_impl.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/linear_combination_impl.cpp index 56808dc4f..d65668548 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/linear_combination_impl.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/linear_combination_impl.cpp @@ -140,4 +140,4 @@ TEST_CASE("LinearCombinationImpl") { REQUIRE(copy_defaulted == H); REQUIRE(copy_H == defaulted); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/operator_impl.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/operator_impl.cpp index 1e267ddd1..34cacd417 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/operator_impl.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/operator_impl.cpp @@ -104,4 +104,4 @@ TEST_CASE("OperatorImpl") { REQUIRE_FALSE(t.are_different(t_e_type{})); REQUIRE(t.are_different(T)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/unpack_linear_combination.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/unpack_linear_combination.cpp index 11c5af12f..745b6e103 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/unpack_linear_combination.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/detail_/unpack_linear_combination.cpp @@ -122,4 +122,4 @@ TEST_CASE("UnpackLinearCombination") { corr.emplace_back(std::make_pair(1.0, V_nn.clone())); compare_terms(ops.m_terms, corr); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/electronic_hamiltonian.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/electronic_hamiltonian.cpp index 3f8def3ec..3a1d8c6c3 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/electronic_hamiltonian.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/electronic_hamiltonian.cpp @@ -58,4 +58,4 @@ TEST_CASE("ElectronicHamiltonian") { CoreHamiltonian corr(T_e + V_en); REQUIRE(H.core_hamiltonian() == corr); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/exchange.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/exchange.cpp index 23ea5a162..69e776a08 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/exchange.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/exchange.cpp @@ -76,4 +76,4 @@ TEMPLATE_LIST_TEST_CASE("Exchange", "", types2test) { REQUIRE(std::as_const(defaulted).rhs_particle() == corr_rhs_defaulted); REQUIRE(std::as_const(value).rhs_particle() == corr_rhs_value); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/exchange_correlation.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/exchange_correlation.cpp index 67d113d96..ffb72345b 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/exchange_correlation.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/exchange_correlation.cpp @@ -89,4 +89,4 @@ TEMPLATE_LIST_TEST_CASE("ExchangeCorrelation", "", types2test) { xc_functional::NONE); REQUIRE(std::as_const(value).functional_name() == xc_functional::PBE); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/fock.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/fock.cpp index 3b2a082d5..85bca8154 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/fock.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/fock.cpp @@ -55,4 +55,4 @@ TEST_CASE("Fock") { test_chemist::test_copy_and_move(defaulted, H); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/hamiltonian.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/hamiltonian.cpp index de10da557..e375fe309 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/hamiltonian.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/hamiltonian.cpp @@ -64,4 +64,4 @@ TEST_CASE("Hamiltonian") { CoreHamiltonian corr(T_e + V_en); REQUIRE(H.core_hamiltonian() == corr); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/identity.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/identity.cpp index 167d64da4..7d23e7b89 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/identity.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/identity.cpp @@ -27,4 +27,4 @@ TEST_CASE("Identity") { REQUIRE(defaulted == Identity{}); test_chemist::test_copy_and_move(defaulted); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/operator/kinetic.cpp b/tests/cxx/unit_tests/quantum_mechanics/operator/kinetic.cpp index cf30f0008..6d519e8ba 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/operator/kinetic.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/operator/kinetic.cpp @@ -53,4 +53,4 @@ TEMPLATE_LIST_TEST_CASE("Kinetic", "", types2test) { REQUIRE(std::as_const(defaulted).particle() == corr_defaulted); REQUIRE(std::as_const(value).particle() == corr_value); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/cmos.cpp b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/cmos.cpp index 07d20908b..e3245edbb 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/cmos.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/cmos.cpp @@ -88,4 +88,4 @@ TEST_CASE("CMOs") { REQUIRE_FALSE(other_defaulted.are_equal(defaulted)); REQUIRE_FALSE(defaulted.are_equal(other_defaulted)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/detail_/wavefunction_impl.cpp b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/detail_/wavefunction_impl.cpp index 5eb09ee72..7d4349a89 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/detail_/wavefunction_impl.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/detail_/wavefunction_impl.cpp @@ -57,4 +57,4 @@ TEST_CASE("WavefunctionImpl>") { REQUIRE_FALSE(defaulted.are_different(determinant_type{})); REQUIRE(defaulted.are_different(value)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/determinant.cpp b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/determinant.cpp index f78c2b272..ddf318d10 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/determinant.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/determinant.cpp @@ -103,4 +103,4 @@ TEST_CASE("Determinant") { REQUIRE_FALSE(defaulted != determinant_type{}); REQUIRE(defaulted != value); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/mos.cpp b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/mos.cpp index 3797bb94b..22960c42b 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/mos.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/mos.cpp @@ -82,4 +82,4 @@ TEST_CASE("MOs") { REQUIRE_FALSE(other_defaulted.are_equal(defaulted)); REQUIRE_FALSE(defaulted.are_equal(other_defaulted)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/natural.cpp b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/natural.cpp index b205802ce..f91c7736f 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/natural.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/natural.cpp @@ -98,4 +98,4 @@ TEST_CASE("Natural") { REQUIRE(defaulted != value); REQUIRE_FALSE(defaulted != value_defaulted); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/transformed.cpp b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/transformed.cpp index 2a42a0291..9d5b3e832 100644 --- a/tests/cxx/unit_tests/quantum_mechanics/wavefunction/transformed.cpp +++ b/tests/cxx/unit_tests/quantum_mechanics/wavefunction/transformed.cpp @@ -107,4 +107,4 @@ TEST_CASE("Transformed") { REQUIRE(defaulted != to_space_type(aos, c_default)); REQUIRE_FALSE(defaulted != to_space_type(aos_defaulted, c_default)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/traits/quantum_mechanics_traits.cpp b/tests/cxx/unit_tests/traits/quantum_mechanics_traits.cpp index dfb9ddc09..6a91889b8 100644 --- a/tests/cxx/unit_tests/traits/quantum_mechanics_traits.cpp +++ b/tests/cxx/unit_tests/traits/quantum_mechanics_traits.cpp @@ -68,4 +68,4 @@ TEST_CASE("is_tensor_representation_v") { STATIC_REQUIRE_FALSE(is_tensor_representation_v); STATIC_REQUIRE_FALSE( is_tensor_representation_v); -} \ No newline at end of file +} diff --git a/tests/python/doc_snippets/test_atom_example.py b/tests/python/doc_snippets/test_atom_example.py index bf6c06853..b94d19d48 100644 --- a/tests/python/doc_snippets/test_atom_example.py +++ b/tests/python/doc_snippets/test_atom_example.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist -class TestStringMethods(unittest.TestCase): +class TestStringMethods(unittest.TestCase): def testAtom(self): # Creating Atom objects using different constructors # Begin constructors @@ -43,6 +43,14 @@ def testAtom(self): # Explicit constructor with the given states a6 = chemist.Atom("He", 2, 4.0026, 0.0, 0.0, 1.0, 2.0, 3) + # a0 and a5 are the same + assert a0 == a5 + + # a0, a1, a2, and a3 are all different + assert a0 != a1 + assert a0 != a2 + assert a0 != a3 + # a5 and a6 are different atoms assert a5 != a6 diff --git a/tests/python/doc_snippets/test_doc_snippets.py b/tests/python/doc_snippets/test_doc_snippets.py index c9833d6dc..09d51353c 100644 --- a/tests/python/doc_snippets/test_doc_snippets.py +++ b/tests/python/doc_snippets/test_doc_snippets.py @@ -14,11 +14,12 @@ # limitations under the License. # import os -import parallelzone as pz import sys import unittest -if __name__ == '__main__': +import parallelzone as pz + +if __name__ == "__main__": # Make a RuntimeView and hold it until all tests run so MPI isn't shut # down rv = pz.runtime.RuntimeView() diff --git a/tests/python/doc_snippets/test_molecule_example.py b/tests/python/doc_snippets/test_molecule_example.py index b77d41963..519d36d74 100644 --- a/tests/python/doc_snippets/test_molecule_example.py +++ b/tests/python/doc_snippets/test_molecule_example.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestStringMethods(unittest.TestCase): - def testMolecule(self): # Begin constructors # Default constructor, no atoms, charge = 0.0, multiplicity = 1 @@ -49,6 +49,7 @@ def testMolecule(self): # Accessing the charge m1_charge = m1.charge() + assert m1_charge == 0.0 assert m0.charge() == 0.0 assert m1.charge() == 0.0 assert m2.charge() == 1.0 @@ -65,7 +66,7 @@ def testMolecule(self): # Comparing Molecule objects assert m0 != m1 assert m1 != m2 - assert m2 == m2 # This might be a typo in the original C++ code. m2 is being compared to itself. + assert m2 == m2 # Modifying the properties of a Molecule object m1.set_charge(1) diff --git a/tests/python/doc_snippets/test_nucleus_example.py b/tests/python/doc_snippets/test_nucleus_example.py index c48fc416d..ff7255c72 100644 --- a/tests/python/doc_snippets/test_nucleus_example.py +++ b/tests/python/doc_snippets/test_nucleus_example.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestStringMethods(unittest.TestCase): - def testAtom(self): # Creating Nucleus objects using different constructors n0 = chemist.Nucleus() diff --git a/tests/python/unit_tests/basis_set/test_ao_basis_set.py b/tests/python/unit_tests/basis_set/test_ao_basis_set.py index 0ea5b922b..be4c17c52 100644 --- a/tests/python/unit_tests/basis_set/test_ao_basis_set.py +++ b/tests/python/unit_tests/basis_set/test_ao_basis_set.py @@ -12,27 +12,33 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import AOBasisSetF, AOBasisSetD -from chemist.basis_set import AtomicBasisSetF, AtomicBasisSetD -from chemist.basis_set import ShellF, ShellD -from chemist.basis_set import ContractedGaussianF, ContractedGaussianD -from chemist.basis_set import PrimitiveF, PrimitiveD -from chemist import PointF, PointD -from chemist import ShellType import unittest +from chemist import PointD, PointF, ShellType +from chemist.basis_set import ( + AOBasisSetD, + AOBasisSetF, + AtomicBasisSetD, + AtomicBasisSetF, + ContractedGaussianD, + ContractedGaussianF, + PrimitiveD, + PrimitiveF, + ShellD, + ShellF, +) + def make_aobs_test_case(aobs_type): """ The test cases for AOBasisSetF and AOBasisSetD are basically the same aside - from the types of the class. This function essentially templates the test + from the types of the class. This function essentially templates the test case on the type of the point. :param point_type: Either ``AOBasisSetF`` or ``AOBasisSetD`` """ class TestAOBasisSet(unittest.TestCase): - def test_ctor(self): self.assertEqual(self.defaulted.n_shells(), 0) self.assertEqual(self.defaulted.n_aos(), 0) @@ -62,7 +68,8 @@ def test_n_shells(self): def test_shell(self): self.assertEqual( self.has_abs.shell(0), - self.shell_type(self.pure, 0, [0.0], [0.1], 1.0, 1.1, 1.2)) + self.shell_type(self.pure, 0, [0.0], [0.1], 1.0, 1.1, 1.2), + ) def test_primitive_range(self): self.assertEqual(self.has_abs.primitive_range(0), (0, 1)) @@ -76,8 +83,10 @@ def test_n_primitives(self): self.assertEqual(self.has_abs.n_primitives(), 1) def test_primitive(self): - self.assertEqual(self.has_abs.primitive(0), - self.prim_type(0.0, 0.1, 1.0, 1.1, 1.2)) + self.assertEqual( + self.has_abs.primitive(0), + self.prim_type(0.0, 0.1, 1.0, 1.1, 1.2), + ) def test_empty(self): self.assertTrue(self.defaulted.empty()) @@ -115,9 +124,9 @@ def test_comparisons(self): self.assertNotEqual(self.defaulted, self.has_abs) self.assertTrue(self.defaulted != self.has_abs) - other_abs = self.abs_type("name", 1, - self.center_type(2.0, 2.1, - 2.2), [self.shell]) + other_abs = self.abs_type( + "name", 1, self.center_type(2.0, 2.1, 2.2), [self.shell] + ) has_different_abs = aobs_type() has_different_abs.add_center(other_abs) self.assertNotEqual(self.has_abs, has_different_abs) @@ -140,11 +149,12 @@ def setUp(self): # Some inputs self.pure = ShellType.pure - self.shell = self.shell_type(self.pure, 0, [0.0], [0.1], 0.2, 0.3, - 0.4) - self.abs = self.abs_type("name", 1, - self.center_type(1.0, 1.1, - 1.2), [self.shell]) + self.shell = self.shell_type( + self.pure, 0, [0.0], [0.1], 0.2, 0.3, 0.4 + ) + self.abs = self.abs_type( + "name", 1, self.center_type(1.0, 1.1, 1.2), [self.shell] + ) # The instances being tested self.defaulted = aobs_type() diff --git a/tests/python/unit_tests/basis_set/test_atomic_basis_set.py b/tests/python/unit_tests/basis_set/test_atomic_basis_set.py index af1540df6..d49678db4 100644 --- a/tests/python/unit_tests/basis_set/test_atomic_basis_set.py +++ b/tests/python/unit_tests/basis_set/test_atomic_basis_set.py @@ -12,26 +12,31 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import AtomicBasisSetF, AtomicBasisSetD -from chemist.basis_set import ShellF, ShellD -from chemist.basis_set import ContractedGaussianF, ContractedGaussianD -from chemist.basis_set import PrimitiveF, PrimitiveD -from chemist import PointF, PointD -from chemist import ShellType import unittest +from chemist import PointD, PointF, ShellType +from chemist.basis_set import ( + AtomicBasisSetD, + AtomicBasisSetF, + ContractedGaussianD, + ContractedGaussianF, + PrimitiveD, + PrimitiveF, + ShellD, + ShellF, +) + def make_abs_test_case(abs_type): """ - The test cases for AtomicBasisSetF and AtomicBasisSetD are basically the - same aside from the types of the class. This function essentially templates + The test cases for AtomicBasisSetF and AtomicBasisSetD are basically the + same aside from the types of the class. This function essentially templates the test case on the type of the point. :param point_type: Either ``AtomicBasisSetF`` or ``AtomicBasisSetD`` """ class TestAtomicBasisSet(unittest.TestCase): - def test_ctor(self): self.assertEqual(self.defaulted.n_aos(), 0) self.assertEqual(self.defaulted.n_primitives(), 0) @@ -41,8 +46,9 @@ def test_ctor(self): self.assertEqual(self.with_inputs0.basis_set_name, "name") self.assertEqual(self.with_inputs0.atomic_number, 0) - self.assertEqual(self.with_inputs0.center, - self.center_type(0.0, 0.1, 0.2)) + self.assertEqual( + self.with_inputs0.center, self.center_type(0.0, 0.1, 0.2) + ) self.assertEqual(self.with_inputs0.n_aos(), 0) self.assertEqual(self.with_inputs0.n_primitives(), 0) self.assertTrue(self.with_inputs0.empty()) @@ -51,8 +57,9 @@ def test_ctor(self): self.assertEqual(self.with_inputs1.basis_set_name, "name") self.assertEqual(self.with_inputs1.atomic_number, 1) - self.assertEqual(self.with_inputs1.center, - self.center_type(1.0, 1.1, 1.2)) + self.assertEqual( + self.with_inputs1.center, self.center_type(1.0, 1.1, 1.2) + ) self.assertEqual(self.with_inputs1.n_aos(), 0) self.assertEqual(self.with_inputs1.n_primitives(), 0) self.assertTrue(self.with_inputs1.empty()) @@ -61,8 +68,9 @@ def test_ctor(self): self.assertIsNone(self.with_inputs2.basis_set_name) self.assertIsNone(self.with_inputs2.atomic_number) - self.assertEqual(self.with_inputs2.center, - self.center_type(2.0, 2.1, 2.2)) + self.assertEqual( + self.with_inputs2.center, self.center_type(2.0, 2.1, 2.2) + ) self.assertEqual(self.with_inputs2.n_aos(), 0) self.assertEqual(self.with_inputs2.n_primitives(), 0) self.assertTrue(self.with_inputs2.empty()) @@ -71,8 +79,9 @@ def test_ctor(self): self.assertIsNone(self.with_inputs3.basis_set_name) self.assertIsNone(self.with_inputs3.atomic_number) - self.assertEqual(self.with_inputs3.center, - self.center_type(3.0, 3.1, 3.2)) + self.assertEqual( + self.with_inputs3.center, self.center_type(3.0, 3.1, 3.2) + ) self.assertEqual(self.with_inputs3.n_aos(), 0) self.assertEqual(self.with_inputs3.n_primitives(), 0) self.assertTrue(self.with_inputs3.empty()) @@ -81,8 +90,9 @@ def test_ctor(self): self.assertEqual(self.with_inputs4.basis_set_name, "name") self.assertEqual(self.with_inputs4.atomic_number, 4) - self.assertEqual(self.with_inputs4.center, - self.center_type(0.0, 0.0, 0.0)) + self.assertEqual( + self.with_inputs4.center, self.center_type(0.0, 0.0, 0.0) + ) self.assertEqual(self.with_inputs4.n_aos(), 0) self.assertEqual(self.with_inputs4.n_primitives(), 0) self.assertTrue(self.with_inputs4.empty()) @@ -91,8 +101,9 @@ def test_ctor(self): self.assertIsNone(self.with_inputs5.basis_set_name) self.assertIsNone(self.with_inputs5.atomic_number) - self.assertEqual(self.with_inputs5.center, - self.center_type(5.0, 5.1, 5.2)) + self.assertEqual( + self.with_inputs5.center, self.center_type(5.0, 5.1, 5.2) + ) self.assertEqual(self.with_inputs5.n_aos(), 1) self.assertEqual(self.with_inputs5.n_primitives(), 1) self.assertFalse(self.with_inputs5.empty()) @@ -101,8 +112,9 @@ def test_ctor(self): self.assertEqual(self.with_inputs6.basis_set_name, "name") self.assertEqual(self.with_inputs6.atomic_number, 6) - self.assertEqual(self.with_inputs6.center, - self.center_type(6.0, 6.1, 6.2)) + self.assertEqual( + self.with_inputs6.center, self.center_type(6.0, 6.1, 6.2) + ) self.assertEqual(self.with_inputs6.n_aos(), 1) self.assertEqual(self.with_inputs6.n_primitives(), 1) self.assertFalse(self.with_inputs6.empty()) @@ -134,17 +146,20 @@ def test_center(self): self.defaulted.center = self.center_type(100.0, 100.0, 100.0) - self.assertEqual(self.defaulted.center, - self.center_type(100.0, 100.0, 100.0)) + self.assertEqual( + self.defaulted.center, self.center_type(100.0, 100.0, 100.0) + ) def test_add_shell(self): self.assertTrue(self.defaulted.is_null()) - self.defaulted.add_shell(self.pure, 0, - self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0)) + self.defaulted.add_shell( + self.pure, 0, self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0) + ) self.assertFalse(self.defaulted.is_null()) - self.assertEqual(self.defaulted.center, - self.center_type(0.0, 0.0, 0.0)) + self.assertEqual( + self.defaulted.center, self.center_type(0.0, 0.0, 0.0) + ) self.assertEqual(self.defaulted.n_aos(), 1) self.assertEqual(self.defaulted.n_primitives(), 1) self.assertFalse(self.defaulted.empty()) @@ -165,8 +180,10 @@ def test_primitive_to_shell(self): self.assertEqual(self.with_inputs6.primitive_to_shell(0), 0) def test_primitive(self): - self.assertEqual(self.with_inputs6.primitive(0), - self.prim_type(0.0, 1.0, 6.0, 6.1, 6.2)) + self.assertEqual( + self.with_inputs6.primitive(0), + self.prim_type(0.0, 1.0, 6.0, 6.1, 6.2), + ) def test_empty(self): self.assertTrue(self.defaulted.empty()) @@ -175,7 +192,8 @@ def test_empty(self): def test_at(self): self.assertEqual( self.with_inputs6.at(0), - self.shell_type(self.pure, 0, [0.0], [1.0], 6.0, 6.1, 6.2)) + self.shell_type(self.pure, 0, [0.0], [1.0], 6.0, 6.1, 6.2), + ) def test_size(self): self.assertEqual(self.defaulted.size(), 0) @@ -192,27 +210,30 @@ def test_comparisons(self): self.assertFalse(self.defaulted != other_default) # Non-default - other_with_inputs = abs_type("name", 6, - self.center_type(6.0, 6.1, 6.2), - [self.shell]) + other_with_inputs = abs_type( + "name", 6, self.center_type(6.0, 6.1, 6.2), [self.shell] + ) self.assertEqual(self.with_inputs6, other_with_inputs) self.assertFalse(self.with_inputs6 != other_with_inputs) # Different name - abs1 = abs_type("other name", 6, self.center_type(6.0, 6.1, 6.2), - [self.shell]) + abs1 = abs_type( + "other name", 6, self.center_type(6.0, 6.1, 6.2), [self.shell] + ) self.assertNotEqual(self.with_inputs6, abs1) self.assertTrue(self.with_inputs6 != abs1) # Different atomic number - abs2 = abs_type("name", 7, self.center_type(6.0, 6.1, 6.2), - [self.shell]) + abs2 = abs_type( + "name", 7, self.center_type(6.0, 6.1, 6.2), [self.shell] + ) self.assertNotEqual(self.with_inputs6, abs2) self.assertTrue(self.with_inputs6 != abs2) # Different center - abs3 = abs_type("name", 6, self.center_type(9.0, 6.1, 6.2), - [self.shell]) + abs3 = abs_type( + "name", 6, self.center_type(9.0, 6.1, 6.2), [self.shell] + ) self.assertNotEqual(self.with_inputs6, abs3) self.assertTrue(self.with_inputs6 != abs3) @@ -237,22 +258,25 @@ def setUp(self): # Some inputs self.pure = ShellType.pure - self.shell = self.shell_type(self.pure, 0, [0.0], [1.0], 0.0, 0.0, - 0.0) + self.shell = self.shell_type( + self.pure, 0, [0.0], [1.0], 0.0, 0.0, 0.0 + ) # The instances being tested self.defaulted = abs_type() self.with_inputs0 = abs_type("name", 0, 0.0, 0.1, 0.2) - self.with_inputs1 = abs_type("name", 1, - self.center_type(1.0, 1.1, 1.2)) + self.with_inputs1 = abs_type( + "name", 1, self.center_type(1.0, 1.1, 1.2) + ) self.with_inputs2 = abs_type(2.0, 2.1, 2.2) self.with_inputs3 = abs_type(self.center_type(3.0, 3.1, 3.2)) self.with_inputs4 = abs_type("name", 4) - self.with_inputs5 = abs_type(self.center_type(5.0, 5.1, 5.2), - [self.shell]) - self.with_inputs6 = abs_type("name", 6, - self.center_type(6.0, 6.1, 6.2), - [self.shell]) + self.with_inputs5 = abs_type( + self.center_type(5.0, 5.1, 5.2), [self.shell] + ) + self.with_inputs6 = abs_type( + "name", 6, self.center_type(6.0, 6.1, 6.2), [self.shell] + ) return TestAtomicBasisSet diff --git a/tests/python/unit_tests/basis_set/test_atomic_basis_set_view.py b/tests/python/unit_tests/basis_set/test_atomic_basis_set_view.py index f64425552..e3b729a30 100644 --- a/tests/python/unit_tests/basis_set/test_atomic_basis_set_view.py +++ b/tests/python/unit_tests/basis_set/test_atomic_basis_set_view.py @@ -12,27 +12,33 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import AtomicBasisSetViewF, AtomicBasisSetViewD -from chemist.basis_set import AtomicBasisSetF, AtomicBasisSetD -from chemist.basis_set import ShellF, ShellD -from chemist.basis_set import ContractedGaussianF, ContractedGaussianD -from chemist.basis_set import PrimitiveF, PrimitiveD -from chemist import PointF, PointD -from chemist import ShellType import unittest +from chemist import PointD, PointF, ShellType +from chemist.basis_set import ( + AtomicBasisSetD, + AtomicBasisSetF, + AtomicBasisSetViewD, + AtomicBasisSetViewF, + ContractedGaussianD, + ContractedGaussianF, + PrimitiveD, + PrimitiveF, + ShellD, + ShellF, +) + def make_abs_view_test_case(abs_view_type): """ The test cases for AtomicBasisSetViewF and AtomicBasisSetViewD are basically - the same aside from the types of the class. This function essentially + the same aside from the types of the class. This function essentially templates the test case on the type of the point. :param point_type: Either ``AtomicBasisSetViewF`` or ``AtomicBasisSetViewD`` """ class TestAtomicBasisSetView(unittest.TestCase): - def test_ctor(self): self.assertEqual(self.defaulted.n_aos(), 0) self.assertEqual(self.defaulted.n_primitives(), 0) @@ -42,8 +48,9 @@ def test_ctor(self): self.assertEqual(self.from_abs.basis_set_name, "name") self.assertEqual(self.from_abs.atomic_number, 0) - self.assertEqual(self.from_abs.center, - self.center_type(0.0, 0.1, 0.2)) + self.assertEqual( + self.from_abs.center, self.center_type(0.0, 0.1, 0.2) + ) self.assertEqual(self.from_abs.n_aos(), 1) self.assertEqual(self.from_abs.n_primitives(), 1) self.assertFalse(self.from_abs.empty()) @@ -63,11 +70,13 @@ def test_atomic_number(self): self.assertEqual(self.abs.atomic_number, 1) def test_center(self): - self.assertEqual(self.from_abs.center, - self.center_type(0.0, 0.1, 0.2)) + self.assertEqual( + self.from_abs.center, self.center_type(0.0, 0.1, 0.2) + ) self.from_abs.center = self.center_type(1.0, 0.1, 0.2) - self.assertEqual(self.from_abs.center, - self.center_type(1.0, 0.1, 0.2)) + self.assertEqual( + self.from_abs.center, self.center_type(1.0, 0.1, 0.2) + ) self.assertEqual(self.abs.center, self.center_type(1.0, 0.1, 0.2)) def test_n_aos(self): @@ -85,8 +94,10 @@ def test_primitive_to_shell(self): self.assertEqual(self.from_abs.primitive_to_shell(0), 0) def test_primitive(self): - self.assertEqual(self.from_abs.primitive(0), - self.prim_type(0.0, 1.0, 0.0, 0.1, 0.2)) + self.assertEqual( + self.from_abs.primitive(0), + self.prim_type(0.0, 1.0, 0.0, 0.1, 0.2), + ) def test_empty(self): self.assertTrue(self.defaulted.empty()) @@ -95,7 +106,8 @@ def test_empty(self): def test_at(self): self.assertEqual( self.from_abs.at(0), - self.shell_type(self.pure, 0, [0.0], [1.0], 0.0, 0.1, 0.2)) + self.shell_type(self.pure, 0, [0.0], [1.0], 0.0, 0.1, 0.2), + ) def test_size(self): self.assertEqual(self.defaulted.size(), 0) @@ -116,9 +128,9 @@ def test_comparisons(self): # Compare with viewed type default_viewed = self.abs_type() - other_viewed = self.abs_type("name", 0, - self.center_type(0.0, 0.1, 0.2), - [self.shell]) + other_viewed = self.abs_type( + "name", 0, self.center_type(0.0, 0.1, 0.2), [self.shell] + ) self.assertEqual(self.defaulted, default_viewed) self.assertFalse(self.defaulted != default_viewed) @@ -131,22 +143,28 @@ def test_comparisons(self): self.assertFalse(self.from_abs == default_viewed) # Different name - abs1 = self.abs_type("different name", 0, - self.center_type(0.0, 0.1, 0.2), [self.shell]) + abs1 = self.abs_type( + "different name", + 0, + self.center_type(0.0, 0.1, 0.2), + [self.shell], + ) absv1 = abs_view_type(abs1) self.assertNotEqual(self.from_abs, absv1) self.assertTrue(self.from_abs != absv1) # Different atomic number - abs2 = self.abs_type("name", 1, self.center_type(0.0, 0.1, 0.2), - [self.shell]) + abs2 = self.abs_type( + "name", 1, self.center_type(0.0, 0.1, 0.2), [self.shell] + ) absv2 = abs_view_type(abs2) self.assertNotEqual(self.from_abs, absv2) self.assertTrue(self.from_abs != absv2) # Different center - abs3 = self.abs_type("name", 0, self.center_type(1.0, 0.1, 0.2), - [self.shell]) + abs3 = self.abs_type( + "name", 0, self.center_type(1.0, 0.1, 0.2), [self.shell] + ) absv3 = abs_view_type(abs3) self.assertNotEqual(self.from_abs, absv3) self.assertTrue(self.from_abs != absv3) @@ -175,11 +193,12 @@ def setUp(self): # Some inputs self.pure = ShellType.pure - self.shell = self.shell_type(self.pure, 0, [0.0], [1.0], 0.0, 0.0, - 0.0) - self.abs = self.abs_type("name", 0, - self.center_type(0.0, 0.1, - 0.2), [self.shell]) + self.shell = self.shell_type( + self.pure, 0, [0.0], [1.0], 0.0, 0.0, 0.0 + ) + self.abs = self.abs_type( + "name", 0, self.center_type(0.0, 0.1, 0.2), [self.shell] + ) # The instances being tested self.defaulted = abs_view_type() diff --git a/tests/python/unit_tests/basis_set/test_contracted_gaussian.py b/tests/python/unit_tests/basis_set/test_contracted_gaussian.py index 5eb7d8fa4..3752a5233 100644 --- a/tests/python/unit_tests/basis_set/test_contracted_gaussian.py +++ b/tests/python/unit_tests/basis_set/test_contracted_gaussian.py @@ -12,23 +12,27 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import ContractedGaussianF, ContractedGaussianD -from chemist.basis_set import PrimitiveF, PrimitiveD -from chemist import PointF, PointD import unittest +from chemist import PointD, PointF +from chemist.basis_set import ( + ContractedGaussianD, + ContractedGaussianF, + PrimitiveD, + PrimitiveF, +) + def make_cg_test_case(cg_type): """ The test cases for ContractedGaussianF and ContractedGaussianD are basically - the same aside from the types of the class. This function essentially + the same aside from the types of the class. This function essentially templates the test case on the type of the point. :param point_type: Either ``ContractedGaussianF`` or ``ContractedGaussianD`` """ class TestContractedGaussian(unittest.TestCase): - def test_ctor(self): self.assertTrue(self.defaulted.is_null()) self.assertTrue(self.defaulted.empty()) @@ -36,47 +40,56 @@ def test_ctor(self): self.assertFalse(self.with_inputs1.is_null()) self.assertFalse(self.with_inputs1.empty()) self.assertEqual(self.with_inputs1.size(), 1) - self.assertEqual(self.with_inputs1.center, - self.center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.with_inputs1.center, self.center_type(2.0, 3.0, 4.0) + ) self.assertFalse(self.with_inputs2.is_null()) self.assertFalse(self.with_inputs2.empty()) self.assertEqual(self.with_inputs2.size(), 2) - self.assertEqual(self.with_inputs2.center, - self.center_type(7.0, 8.0, 9.0)) + self.assertEqual( + self.with_inputs2.center, self.center_type(7.0, 8.0, 9.0) + ) def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.with_inputs1.empty()) def test_at(self): - self.assertEqual(self.with_inputs1.at(0), - self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0)) + self.assertEqual( + self.with_inputs1.at(0), + self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0), + ) # Returning views? self.with_inputs1.at(0).coefficient = 5.0 self.with_inputs1.at(0).exponent = 6.0 - self.assertEqual(self.with_inputs1.at(0), - self.prim_type(5.0, 6.0, 2.0, 3.0, 4.0)) + self.assertEqual( + self.with_inputs1.at(0), + self.prim_type(5.0, 6.0, 2.0, 3.0, 4.0), + ) def test_size(self): self.assertEqual(self.defaulted.size(), 0) self.assertEqual(self.with_inputs1.size(), 1) def test_center(self): - self.assertEqual(self.with_inputs1.center, - self.center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.with_inputs1.center, self.center_type(2.0, 3.0, 4.0) + ) # Null CG returns origin and is no longer null self.assertTrue(self.defaulted.is_null()) - self.assertEqual(self.defaulted.center, - self.center_type(0.0, 0.0, 0.0)) + self.assertEqual( + self.defaulted.center, self.center_type(0.0, 0.0, 0.0) + ) self.assertFalse(self.defaulted.is_null()) # Writable? self.with_inputs1.center = self.center_type(7.0, 8.0, 9.0) - self.assertEqual(self.with_inputs1.center, - self.center_type(7.0, 8.0, 9.0)) + self.assertEqual( + self.with_inputs1.center, self.center_type(7.0, 8.0, 9.0) + ) def test_is_null(self): self.assertTrue(self.defaulted.is_null()) @@ -119,8 +132,9 @@ def setUp(self): self.defaulted = cg_type() self.with_inputs1 = cg_type([0.0], [1.0], 2.0, 3.0, 4.0) - self.with_inputs2 = cg_type([5.0, 5.1], [6.0, 6.1], - self.center_type(7.0, 8.0, 9.0)) + self.with_inputs2 = cg_type( + [5.0, 5.1], [6.0, 6.1], self.center_type(7.0, 8.0, 9.0) + ) return TestContractedGaussian diff --git a/tests/python/unit_tests/basis_set/test_contracted_gaussian_view.py b/tests/python/unit_tests/basis_set/test_contracted_gaussian_view.py index 91aa823e9..681af08ab 100644 --- a/tests/python/unit_tests/basis_set/test_contracted_gaussian_view.py +++ b/tests/python/unit_tests/basis_set/test_contracted_gaussian_view.py @@ -12,25 +12,30 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import ContractedGaussianViewF, ContractedGaussianViewD -from chemist.basis_set import ContractedGaussianF, ContractedGaussianD -from chemist.basis_set import PrimitiveF, PrimitiveD -from chemist import PointF, PointD import unittest +from chemist import PointD, PointF +from chemist.basis_set import ( + ContractedGaussianD, + ContractedGaussianF, + ContractedGaussianViewD, + ContractedGaussianViewF, + PrimitiveD, + PrimitiveF, +) + def make_cg_view_test_case(cg_view_type): """ - The test cases for ContractedGaussianViewF and ContractedGaussianViewD are - basically the same aside from the types of the class. This function + The test cases for ContractedGaussianViewF and ContractedGaussianViewD are + basically the same aside from the types of the class. This function essentially templates the test case on the type of the point. - :param point_type: Either ``ContractedGaussianViewF`` or + :param point_type: Either ``ContractedGaussianViewF`` or ``ContractedGaussianViewD`` """ class TestContractedGaussianView(unittest.TestCase): - def test_ctor(self): self.assertTrue(self.defaulted.is_null()) self.assertTrue(self.defaulted.empty()) @@ -38,37 +43,43 @@ def test_ctor(self): self.assertFalse(self.from_cg.is_null()) self.assertFalse(self.from_cg.empty()) self.assertEqual(self.from_cg.size(), 1) - self.assertEqual(self.from_cg.center, - self.center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.from_cg.center, self.center_type(2.0, 3.0, 4.0) + ) def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.from_cg.empty()) def test_at(self): - self.assertEqual(self.from_cg.at(0), - self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0)) + self.assertEqual( + self.from_cg.at(0), self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0) + ) # Returning views? self.from_cg.at(0).coefficient = 5.0 self.from_cg.at(0).exponent = 6.0 - self.assertEqual(self.from_cg.at(0), - self.prim_type(5.0, 6.0, 2.0, 3.0, 4.0)) - self.assertEqual(self.cg.at(0), - self.prim_type(5.0, 6.0, 2.0, 3.0, 4.0)) + self.assertEqual( + self.from_cg.at(0), self.prim_type(5.0, 6.0, 2.0, 3.0, 4.0) + ) + self.assertEqual( + self.cg.at(0), self.prim_type(5.0, 6.0, 2.0, 3.0, 4.0) + ) def test_size(self): self.assertEqual(self.defaulted.size(), 0) self.assertEqual(self.from_cg.size(), 1) def test_center(self): - self.assertEqual(self.from_cg.center, - self.center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.from_cg.center, self.center_type(2.0, 3.0, 4.0) + ) # Writable? self.from_cg.center = self.center_type(7.0, 8.0, 9.0) - self.assertEqual(self.from_cg.center, - self.center_type(7.0, 8.0, 9.0)) + self.assertEqual( + self.from_cg.center, self.center_type(7.0, 8.0, 9.0) + ) self.assertEqual(self.cg.center, self.center_type(7.0, 8.0, 9.0)) def test_is_null(self): @@ -140,10 +151,12 @@ def setUp(self): class TestContractedGaussianViewF( - make_cg_view_test_case(ContractedGaussianViewF)): + make_cg_view_test_case(ContractedGaussianViewF) +): pass class TestContractedGaussianViewD( - make_cg_view_test_case(ContractedGaussianViewD)): + make_cg_view_test_case(ContractedGaussianViewD) +): pass diff --git a/tests/python/unit_tests/basis_set/test_primitive.py b/tests/python/unit_tests/basis_set/test_primitive.py index a82d9e921..eb6c85732 100644 --- a/tests/python/unit_tests/basis_set/test_primitive.py +++ b/tests/python/unit_tests/basis_set/test_primitive.py @@ -12,22 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import PrimitiveF, PrimitiveD -from chemist import PointF, PointD import unittest +from chemist import PointD, PointF +from chemist.basis_set import PrimitiveD, PrimitiveF + def make_primitive_test_case(prim_type, center_type): """ - The test cases for PrimitiveF and PrimitiveD are basically the same aside - from the types of the class. This function essentially templates the test + The test cases for PrimitiveF and PrimitiveD are basically the same aside + from the types of the class. This function essentially templates the test case on the type of the point. :param point_type: Either ``PrimitiveF`` or ``PrimitiveD`` """ class TestPrimitive(unittest.TestCase): - def test_ctor(self): self.assertTrue(self.defaulted.is_null()) self.assertEqual(self.defaulted.coefficient, 0.0) @@ -37,24 +37,28 @@ def test_ctor(self): self.assertEqual(self.from_coords.coefficient, 0.0) self.assertEqual(self.from_coords.exponent, 1.0) - self.assertEqual(self.from_coords.center, - center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.from_coords.center, center_type(2.0, 3.0, 4.0) + ) self.assertFalse(self.from_coords.is_null()) self.assertEqual(self.from_center.coefficient, 5.0) self.assertEqual(self.from_center.exponent, 6.0) - self.assertEqual(self.from_center.center, - center_type(7.0, 8.0, 9.0)) + self.assertEqual( + self.from_center.center, center_type(7.0, 8.0, 9.0) + ) self.assertFalse(self.from_center.is_null()) def test_center(self): - self.assertEqual(self.from_coords.center, - center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.from_coords.center, center_type(2.0, 3.0, 4.0) + ) self.from_coords.center = center_type(7.0, 8.0, 9.0) - self.assertEqual(self.from_coords.center, - center_type(7.0, 8.0, 9.0)) + self.assertEqual( + self.from_coords.center, center_type(7.0, 8.0, 9.0) + ) def test_coefficient(self): self.assertEqual(self.from_coords.coefficient, 0.0) diff --git a/tests/python/unit_tests/basis_set/test_primitive_view.py b/tests/python/unit_tests/basis_set/test_primitive_view.py index ac2ab9cd3..bce935007 100644 --- a/tests/python/unit_tests/basis_set/test_primitive_view.py +++ b/tests/python/unit_tests/basis_set/test_primitive_view.py @@ -12,40 +12,47 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import PrimitiveViewF, PrimitiveViewD -from chemist.basis_set import PrimitiveF, PrimitiveD -from chemist import PointF, PointD import unittest +from chemist import PointD, PointF +from chemist.basis_set import ( + PrimitiveD, + PrimitiveF, + PrimitiveViewD, + PrimitiveViewF, +) + def make_primitive_view_test_case(view_type): """ - The test cases for PrimitiveViewF and PrimitiveViewD are basically the same - aside from the types of the class. This function essentially templates the + The test cases for PrimitiveViewF and PrimitiveViewD are basically the same + aside from the types of the class. This function essentially templates the test case on the type of the point. :param point_type: Either ``PrimitiveViewF`` or ``PrimitiveViewD`` """ class TestPrimitive(unittest.TestCase): - def test_ctor(self): self.assertTrue(self.defaulted.is_null()) self.assertEqual(self.from_prim.coefficient, 0.0) self.assertEqual(self.from_prim.exponent, 1.0) - self.assertEqual(self.from_prim.center, - self.center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.from_prim.center, self.center_type(2.0, 3.0, 4.0) + ) self.assertFalse(self.from_prim.is_null()) def test_center(self): - self.assertEqual(self.from_prim.center, - self.center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.from_prim.center, self.center_type(2.0, 3.0, 4.0) + ) self.from_prim.center = self.center_type(7.0, 8.0, 9.0) - self.assertEqual(self.from_prim.center, - self.center_type(7.0, 8.0, 9.0)) + self.assertEqual( + self.from_prim.center, self.center_type(7.0, 8.0, 9.0) + ) def test_coefficient(self): self.assertEqual(self.from_prim.coefficient, 0.0) diff --git a/tests/python/unit_tests/basis_set/test_shell.py b/tests/python/unit_tests/basis_set/test_shell.py index 626efecb6..5cb929cd2 100644 --- a/tests/python/unit_tests/basis_set/test_shell.py +++ b/tests/python/unit_tests/basis_set/test_shell.py @@ -12,17 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import ShellF, ShellD -from chemist.basis_set import ContractedGaussianF, ContractedGaussianD -from chemist.basis_set import PrimitiveF, PrimitiveD -from chemist import PointF, PointD -from chemist import ShellType import unittest +from chemist import PointD, PointF, ShellType +from chemist.basis_set import ( + ContractedGaussianD, + ContractedGaussianF, + PrimitiveD, + PrimitiveF, + ShellD, + ShellF, +) + def make_shell_test_case(shell_type): """ - The test cases for ShellF and ShellD are basically the same aside from the + The test cases for ShellF and ShellD are basically the same aside from the types of the class. This function essentially templates the test case on the type of the point. @@ -30,7 +35,6 @@ def make_shell_test_case(shell_type): """ class TestShell(unittest.TestCase): - def test_ctor(self): self.assertTrue(self.defaulted.is_null()) self.assertEqual(self.defaulted.size(), 0) @@ -41,30 +45,42 @@ def test_ctor(self): self.assertEqual(self.with_inputs1.n_primitives(), 1) self.assertEqual(self.with_inputs1.pure, ShellType.pure) self.assertEqual(self.with_inputs1.l, 0) - self.assertEqual(self.with_inputs1.contracted_gaussian, - self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0)) - self.assertEqual(self.with_inputs1.primitive(0), - self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0)) + self.assertEqual( + self.with_inputs1.contracted_gaussian, + self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0), + ) + self.assertEqual( + self.with_inputs1.primitive(0), + self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0), + ) self.assertFalse(self.with_inputs2.is_null()) self.assertEqual(self.with_inputs2.size(), 3) self.assertEqual(self.with_inputs2.n_primitives(), 1) self.assertEqual(self.with_inputs2.pure, ShellType.cartesian) self.assertEqual(self.with_inputs2.l, 1) - self.assertEqual(self.with_inputs2.contracted_gaussian, - self.cg_type([5.0], [6.0], 7.0, 8.0, 9.0)) - self.assertEqual(self.with_inputs2.primitive(0), - self.prim_type(5.0, 6.0, 7.0, 8.0, 9.0)) + self.assertEqual( + self.with_inputs2.contracted_gaussian, + self.cg_type([5.0], [6.0], 7.0, 8.0, 9.0), + ) + self.assertEqual( + self.with_inputs2.primitive(0), + self.prim_type(5.0, 6.0, 7.0, 8.0, 9.0), + ) self.assertFalse(self.with_inputs3.is_null()) self.assertEqual(self.with_inputs3.size(), 6) self.assertEqual(self.with_inputs3.n_primitives(), 1) self.assertEqual(self.with_inputs3.pure, ShellType.cartesian) self.assertEqual(self.with_inputs3.l, 2) - self.assertEqual(self.with_inputs3.contracted_gaussian, - self.cg_type([10.0], [11.0], 7.0, 8.0, 9.0)) - self.assertEqual(self.with_inputs3.primitive(0), - self.prim_type(10.0, 11.0, 7.0, 8.0, 9.0)) + self.assertEqual( + self.with_inputs3.contracted_gaussian, + self.cg_type([10.0], [11.0], 7.0, 8.0, 9.0), + ) + self.assertEqual( + self.with_inputs3.primitive(0), + self.prim_type(10.0, 11.0, 7.0, 8.0, 9.0), + ) def test_pure(self): self.assertTrue(self.defaulted.is_null()) @@ -82,28 +98,34 @@ def test_l(self): def test_contracted_gaussian(self): self.assertTrue(self.defaulted.is_null()) - self.assertEqual(self.defaulted.contracted_gaussian, - self.cg_type()) + self.assertEqual( + self.defaulted.contracted_gaussian, self.cg_type() + ) self.assertFalse(self.defaulted.is_null()) - self.assertEqual(self.with_inputs1.contracted_gaussian, - self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0)) + self.assertEqual( + self.with_inputs1.contracted_gaussian, + self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0), + ) def test_center(self): self.assertTrue(self.defaulted.is_null()) self.assertEqual(self.defaulted.center, self.center_type()) self.assertFalse(self.defaulted.is_null()) - self.assertEqual(self.with_inputs1.center, - self.center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.with_inputs1.center, self.center_type(2.0, 3.0, 4.0) + ) def test_n_primitives(self): self.assertEqual(self.defaulted.n_primitives(), 0) self.assertEqual(self.with_inputs1.n_primitives(), 1) def test_primitive(self): - self.assertEqual(self.with_inputs1.primitive(0), - self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0)) + self.assertEqual( + self.with_inputs1.primitive(0), + self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0), + ) def test_size(self): self.assertEqual(self.defaulted.size(), 0) @@ -120,8 +142,9 @@ def test_comparisons(self): self.assertFalse(self.defaulted != other_default) # Non-default - other_with_inputs = shell_type(self.pure, 0, [0.0], [1.0], 2.0, - 3.0, 4.0) + other_with_inputs = shell_type( + self.pure, 0, [0.0], [1.0], 2.0, 3.0, 4.0 + ) self.assertEqual(self.with_inputs1, other_with_inputs) self.assertFalse(self.with_inputs1 != other_with_inputs) @@ -159,10 +182,12 @@ def setUp(self): # The instances being tested self.defaulted = shell_type() - self.with_inputs1 = shell_type(self.pure, 0, [0.0], [1.0], 2.0, - 3.0, 4.0) - self.with_inputs2 = shell_type(self.cart, 1, [5.0], [6.0], - self.center) + self.with_inputs1 = shell_type( + self.pure, 0, [0.0], [1.0], 2.0, 3.0, 4.0 + ) + self.with_inputs2 = shell_type( + self.cart, 1, [5.0], [6.0], self.center + ) self.with_inputs3 = shell_type(self.cart, 2, self.cg) return TestShell diff --git a/tests/python/unit_tests/basis_set/test_shell_view.py b/tests/python/unit_tests/basis_set/test_shell_view.py index 2f54aff4a..ac9a40900 100644 --- a/tests/python/unit_tests/basis_set/test_shell_view.py +++ b/tests/python/unit_tests/basis_set/test_shell_view.py @@ -12,26 +12,31 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import ShellViewF, ShellViewD -from chemist.basis_set import ShellF, ShellD -from chemist.basis_set import ContractedGaussianF, ContractedGaussianD -from chemist.basis_set import PrimitiveF, PrimitiveD -from chemist import PointF, PointD -from chemist import ShellType import unittest +from chemist import PointD, PointF, ShellType +from chemist.basis_set import ( + ContractedGaussianD, + ContractedGaussianF, + PrimitiveD, + PrimitiveF, + ShellD, + ShellF, + ShellViewD, + ShellViewF, +) + def make_shell_view_test_case(shell_view_type): """ - The test cases for ShellViewF and ShellViewD are basically the same aside - from the types of the class. This function essentially templates the test + The test cases for ShellViewF and ShellViewD are basically the same aside + from the types of the class. This function essentially templates the test case on the type of the point. :param point_type: Either ``ShellViewF`` or ``ShellViewD`` """ class TestShellView(unittest.TestCase): - def test_ctor(self): self.assertTrue(self.defaulted.is_null()) self.assertEqual(self.defaulted.size(), 0) @@ -42,10 +47,14 @@ def test_ctor(self): self.assertEqual(self.from_shell.n_primitives(), 1) self.assertEqual(self.from_shell.pure, ShellType.pure) self.assertEqual(self.from_shell.l, 0) - self.assertEqual(self.from_shell.contracted_gaussian, - self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0)) - self.assertEqual(self.from_shell.primitive(0), - self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0)) + self.assertEqual( + self.from_shell.contracted_gaussian, + self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0), + ) + self.assertEqual( + self.from_shell.primitive(0), + self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0), + ) def test_pure(self): self.assertEqual(self.from_shell.pure, self.pure) @@ -60,18 +69,26 @@ def test_l(self): self.assertEqual(self.shell.l, 1) def test_contracted_gaussian(self): - self.assertEqual(self.from_shell.contracted_gaussian, - self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0)) - self.from_shell.contracted_gaussian = self.cg_type([1.0], [1.0], - 2.0, 3.0, 4.0) - self.assertEqual(self.from_shell.contracted_gaussian, - self.cg_type([1.0], [1.0], 2.0, 3.0, 4.0)) - self.assertEqual(self.shell.contracted_gaussian, - self.cg_type([1.0], [1.0], 2.0, 3.0, 4.0)) + self.assertEqual( + self.from_shell.contracted_gaussian, + self.cg_type([0.0], [1.0], 2.0, 3.0, 4.0), + ) + self.from_shell.contracted_gaussian = self.cg_type( + [1.0], [1.0], 2.0, 3.0, 4.0 + ) + self.assertEqual( + self.from_shell.contracted_gaussian, + self.cg_type([1.0], [1.0], 2.0, 3.0, 4.0), + ) + self.assertEqual( + self.shell.contracted_gaussian, + self.cg_type([1.0], [1.0], 2.0, 3.0, 4.0), + ) def test_center(self): - self.assertEqual(self.from_shell.center, - self.center_type(2.0, 3.0, 4.0)) + self.assertEqual( + self.from_shell.center, self.center_type(2.0, 3.0, 4.0) + ) self.from_shell.center = self.center_type(7.0, 8.0, 9.0) self.assertEqual(self.from_shell.center, self.center) self.assertEqual(self.shell.center, self.center) @@ -81,8 +98,10 @@ def test_n_primitives(self): self.assertEqual(self.from_shell.n_primitives(), 1) def test_primitive(self): - self.assertEqual(self.from_shell.primitive(0), - self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0)) + self.assertEqual( + self.from_shell.primitive(0), + self.prim_type(0.0, 1.0, 2.0, 3.0, 4.0), + ) def test_size(self): self.assertEqual(self.defaulted.size(), 0) @@ -105,8 +124,9 @@ def test_comparisons(self): # Compare with viewed type default_viewed = self.shell_type() - other_viewed = self.shell_type(self.pure, 0, [0.0], [1.0], 2.0, - 3.0, 4.0) + other_viewed = self.shell_type( + self.pure, 0, [0.0], [1.0], 2.0, 3.0, 4.0 + ) self.assertEqual(self.defaulted, default_viewed) self.assertFalse(self.defaulted != default_viewed) @@ -154,8 +174,9 @@ def setUp(self): self.cart = ShellType.cartesian self.center = self.center_type(7.0, 8.0, 9.0) self.cg = self.cg_type([10.0], [11.0], self.center) - self.shell = self.shell_type(self.pure, 0, [0.0], [1.0], 2.0, 3.0, - 4.0) + self.shell = self.shell_type( + self.pure, 0, [0.0], [1.0], 2.0, 3.0, 4.0 + ) # The instances being tested self.defaulted = shell_view_type() diff --git a/tests/python/unit_tests/chemical_system/chemical_system/test_chemical_system.py b/tests/python/unit_tests/chemical_system/chemical_system/test_chemical_system.py index 17b712134..356531790 100644 --- a/tests/python/unit_tests/chemical_system/chemical_system/test_chemical_system.py +++ b/tests/python/unit_tests/chemical_system/chemical_system/test_chemical_system.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestChemicalSystem(unittest.TestCase): - def test_molecule(self): self.assertEqual(self.defaulted.molecule, self.default_mol) self.assertEqual(self.has_default_mol.molecule, self.default_mol) diff --git a/tests/python/unit_tests/chemical_system/chemical_system/test_chemical_system_view.py b/tests/python/unit_tests/chemical_system/chemical_system/test_chemical_system_view.py index dcf6f7990..9bc44e2a5 100644 --- a/tests/python/unit_tests/chemical_system/chemical_system/test_chemical_system_view.py +++ b/tests/python/unit_tests/chemical_system/chemical_system/test_chemical_system_view.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestChemicalSystemView(unittest.TestCase): - def test_molecule(self): self.assertEqual(self.defaulted.molecule, self.default_mol) self.assertEqual(self.has_default_mol.molecule, self.default_mol) diff --git a/tests/python/unit_tests/chemical_system/electron/test_electron_class.py b/tests/python/unit_tests/chemical_system/electron/test_electron_class.py index ade383514..4f34852e1 100644 --- a/tests/python/unit_tests/chemical_system/electron/test_electron_class.py +++ b/tests/python/unit_tests/chemical_system/electron/test_electron_class.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestElectronClass(unittest.TestCase): - def test_value_equal(self): self.assertEqual(self.e, chemist.Electron()) diff --git a/tests/python/unit_tests/chemical_system/electron/test_many_electrons.py b/tests/python/unit_tests/chemical_system/electron/test_many_electrons.py index 6d2843f5e..5b0dd2834 100644 --- a/tests/python/unit_tests/chemical_system/electron/test_many_electrons.py +++ b/tests/python/unit_tests/chemical_system/electron/test_many_electrons.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestManyElectrons(unittest.TestCase): - def test_default_ctor(self): self.assertEqual(self.defaulted.size(), 0) diff --git a/tests/python/unit_tests/chemical_system/molecule/test_atom.py b/tests/python/unit_tests/chemical_system/molecule/test_atom.py index b78477fb0..59f46c501 100644 --- a/tests/python/unit_tests/chemical_system/molecule/test_atom.py +++ b/tests/python/unit_tests/chemical_system/molecule/test_atom.py @@ -12,26 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist -class TestAtom(unittest.TestCase): +class TestAtom(unittest.TestCase): def test_name(self): # Check initial values - self.assertEqual(self.defaulted.name, '') - self.assertEqual(self.h.name, 'H') - self.assertEqual(self.he.name, 'He') + self.assertEqual(self.defaulted.name, "") + self.assertEqual(self.h.name, "H") + self.assertEqual(self.he.name, "He") # Can write to it - self.defaulted.name = 'foo' - self.assertEqual(self.defaulted.name, 'foo') + self.defaulted.name = "foo" + self.assertEqual(self.defaulted.name, "foo") def test_nucleus(self): - corr_h_nuke = chemist.Nucleus('H', 1, 1.0, 2.0, 3.0, 4.0) - corr_he_nuke = chemist.Nucleus('He', 2, 4.0, 3.0, 4.0, 5.0, 1.0) - corr_c_nuke = chemist.Nucleus('C', 6, 12.0, 3.0, 4.0, 5.0, 6.0) + corr_h_nuke = chemist.Nucleus("H", 1, 1.0, 2.0, 3.0, 4.0) + corr_he_nuke = chemist.Nucleus("He", 2, 4.0, 3.0, 4.0, 5.0, 1.0) + corr_c_nuke = chemist.Nucleus("C", 6, 12.0, 3.0, 4.0, 5.0, 6.0) # Check initial values self.assertEqual(self.defaulted.nucleus, chemist.Nucleus()) @@ -154,60 +154,62 @@ def test_comparisons(self): self.assertFalse(self.defaulted == self.h) # Same non-default - other_h = chemist.Atom('H', 1, 1.0, 2.0, 3.0, 4.0, 1.0) + other_h = chemist.Atom("H", 1, 1.0, 2.0, 3.0, 4.0, 1.0) self.assertEqual(self.h, other_h) self.assertFalse(self.h != other_h) # Different symbol - other_h = chemist.Atom('He', 1, 1.0, 2.0, 3.0, 4.0, 1.0) + other_h = chemist.Atom("He", 1, 1.0, 2.0, 3.0, 4.0, 1.0) self.assertNotEqual(self.h, other_h) self.assertFalse(self.h == other_h) # Different atomic number - other_h = chemist.Atom('H', 2, 1.0, 2.0, 3.0, 4.0, 1.0) + other_h = chemist.Atom("H", 2, 1.0, 2.0, 3.0, 4.0, 1.0) self.assertNotEqual(self.h, other_h) self.assertFalse(self.h == other_h) # Different mass - other_h = chemist.Atom('H', 1, 2.0, 2.0, 3.0, 4.0, 1.0) + other_h = chemist.Atom("H", 1, 2.0, 2.0, 3.0, 4.0, 1.0) self.assertNotEqual(self.h, other_h) self.assertFalse(self.h == other_h) # Different x-coordinate - other_h = chemist.Atom('H', 1, 1.0, 3.0, 3.0, 4.0, 1.0) + other_h = chemist.Atom("H", 1, 1.0, 3.0, 3.0, 4.0, 1.0) self.assertNotEqual(self.h, other_h) self.assertFalse(self.h == other_h) # Different y-coordinate - other_h = chemist.Atom('H', 1, 1.0, 2.0, 4.0, 4.0, 1.0) + other_h = chemist.Atom("H", 1, 1.0, 2.0, 4.0, 4.0, 1.0) self.assertNotEqual(self.h, other_h) self.assertFalse(self.h == other_h) # Different z-coordinate - other_h = chemist.Atom('H', 1, 1.0, 2.0, 3.0, 5.0, 1.0) + other_h = chemist.Atom("H", 1, 1.0, 2.0, 3.0, 5.0, 1.0) self.assertNotEqual(self.h, other_h) self.assertFalse(self.h == other_h) # Different nuclear charge - other_h = chemist.Atom('H', 1, 1.0, 2.0, 3.0, 4.0, 2.0) + other_h = chemist.Atom("H", 1, 1.0, 2.0, 3.0, 4.0, 2.0) self.assertNotEqual(self.h, other_h) self.assertFalse(self.h == other_h) def test_str(self): # Default - self.assertEqual( - str(self.defaulted), - 'nelectrons : 0,\nname : ,\natomic number : 0,\nmass : 0,\n' + - 'charge : 0,\nx : 0,\ny : 0,\nz : 0') + corr_string = ( + "nelectrons : 0,\nname : ,\natomic number : 0,\nmass : 0,\n" + + "charge : 0,\nx : 0,\ny : 0,\nz : 0" + ) + self.assertEqual(str(self.defaulted), corr_string) # Has value self.assertEqual( str(self.h), - 'nelectrons : 1,\nname : H,\natomic number : 1,\nmass : 1,\n' + - 'charge : 1,\nx : 2,\ny : 3,\nz : 4') + "nelectrons : 1,\nname : H,\natomic number : 1,\nmass : 1,\n" + + "charge : 1,\nx : 2,\ny : 3,\nz : 4", + ) def setUp(self): self.defaulted = chemist.Atom() - self.h = chemist.Atom('H', 1, 1.0, 2.0, 3.0, 4.0) - self.he = chemist.Atom('He', 2, 4.0, 3.0, 4.0, 5.0, 1.0) - self.c = chemist.Atom('C', 6, 12.0, 3.0, 4.0, 5.0, 6.0, 7) + self.h = chemist.Atom("H", 1, 1.0, 2.0, 3.0, 4.0) + self.he = chemist.Atom("He", 2, 4.0, 3.0, 4.0, 5.0, 1.0) + self.c = chemist.Atom("C", 6, 12.0, 3.0, 4.0, 5.0, 6.0, 7) diff --git a/tests/python/unit_tests/chemical_system/molecule/test_molecule.py b/tests/python/unit_tests/chemical_system/molecule/test_molecule.py index 9cae2e9fc..d5db287ec 100644 --- a/tests/python/unit_tests/chemical_system/molecule/test_molecule.py +++ b/tests/python/unit_tests/chemical_system/molecule/test_molecule.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestMolecule(unittest.TestCase): - def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.has_value.empty()) @@ -92,7 +92,7 @@ def test_comparisons(self): def test_iter(self): # Default for atom in self.defaulted: - self.fail('Should not iterate over empty molecule') + self.fail("Should not iterate over empty molecule") # Has value for i, atom in enumerate(self.has_value): @@ -100,20 +100,21 @@ def test_iter(self): def test_str(self): # Default - self.assertEqual(str(self.defaulted), '') + self.assertEqual(str(self.defaulted), "") # Has value self.assertEqual( str(self.has_value), - 'nelectrons : 0,\nname : ,\natomic number : 0,\nmass : 0,\n' + - 'charge : 0,\nx : 0,\ny : 0,\nz : 0\n' + - 'nelectrons : 1,\nname : H,\natomic number : 1,\nmass : 1,\n' + - 'charge : 5,\nx : 2,\ny : 3,\nz : 4\n') + "nelectrons : 0,\nname : ,\natomic number : 0,\nmass : 0,\n" + + "charge : 0,\nx : 0,\ny : 0,\nz : 0\n" + + "nelectrons : 1,\nname : H,\natomic number : 1,\nmass : 1,\n" + + "charge : 5,\nx : 2,\ny : 3,\nz : 4\n", + ) def setUp(self): self.defaulted = chemist.Molecule() self.a0 = chemist.Atom() - self.a1 = chemist.Atom('H', 1, 1.0, 2.0, 3.0, 4.0, 5.0) + self.a1 = chemist.Atom("H", 1, 1.0, 2.0, 3.0, 4.0, 5.0) self.has_value = chemist.Molecule() self.has_value.push_back(self.a0) self.has_value.push_back(self.a1) diff --git a/tests/python/unit_tests/chemical_system/molecule/test_molecule_view.py b/tests/python/unit_tests/chemical_system/molecule/test_molecule_view.py index 3fbaa87bf..7ecc81dfe 100644 --- a/tests/python/unit_tests/chemical_system/molecule/test_molecule_view.py +++ b/tests/python/unit_tests/chemical_system/molecule/test_molecule_view.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestMoleculeView(unittest.TestCase): - def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.has_value.empty()) @@ -75,7 +75,7 @@ def test_comparisons(self): def test_iter(self): # Default for atom in self.defaulted: - self.fail('Should not iterate over empty molecule') + self.fail("Should not iterate over empty molecule") # Has value for i, atom in enumerate(self.has_value): @@ -85,7 +85,7 @@ def setUp(self): self.defaulted_mol = chemist.Molecule() self.defaulted = chemist.MoleculeView(self.defaulted_mol) self.a0 = chemist.Atom() - self.a1 = chemist.Atom('H', 1, 1.0, 2.0, 3.0, 4.0, 5.0) + self.a1 = chemist.Atom("H", 1, 1.0, 2.0, 3.0, 4.0, 5.0) self.has_value_mol = chemist.Molecule() self.has_value_mol.push_back(self.a0) self.has_value_mol.push_back(self.a1) diff --git a/tests/python/unit_tests/chemical_system/nucleus/test_nuclei.py b/tests/python/unit_tests/chemical_system/nucleus/test_nuclei.py index 00fe9b536..b50039122 100644 --- a/tests/python/unit_tests/chemical_system/nucleus/test_nuclei.py +++ b/tests/python/unit_tests/chemical_system/nucleus/test_nuclei.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist -class TestNuclei(unittest.TestCase): +class TestNuclei(unittest.TestCase): def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.has_value.empty()) @@ -94,23 +94,27 @@ def test_comparisons(self): def test_iter(self): # Empty for n in self.defaulted: - self.fail('Empty Nuclei should not iterate') + self.fail("Empty Nuclei should not iterate") # Non-empty for n in self.has_value: self.assertTrue(n == self.n0 or n == self.n1) def test_str(self): - self.assertEqual(str(self.defaulted), '') - self.assertEqual( - str(self.has_value), - ' 0.000000000000000 0.000000000000000 0.000000000000000\nH 2.000000000000000 3.000000000000000 4.000000000000000\n' + self.assertEqual(str(self.defaulted), "") + + corr_string = " 0.000000000000000 0.000000000000000 0.000000000000000" + corr_string += "\n" + corr_string += ( + "H 2.000000000000000 3.000000000000000 4.000000000000000" ) + corr_string += "\n" + self.assertEqual(str(self.has_value), corr_string) def setUp(self): self.defaulted = chemist.Nuclei() self.n0 = chemist.Nucleus() - self.n1 = chemist.Nucleus('H', 1, 1.0, 2.0, 3.0, 4.0, 5.0) + self.n1 = chemist.Nucleus("H", 1, 1.0, 2.0, 3.0, 4.0, 5.0) self.has_value = chemist.Nuclei() self.has_value.push_back(self.n0) self.has_value.push_back(self.n1) diff --git a/tests/python/unit_tests/chemical_system/nucleus/test_nuclei_view.py b/tests/python/unit_tests/chemical_system/nucleus/test_nuclei_view.py index 17b88c2e2..24076a49e 100644 --- a/tests/python/unit_tests/chemical_system/nucleus/test_nuclei_view.py +++ b/tests/python/unit_tests/chemical_system/nucleus/test_nuclei_view.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist -class TestNucleiView(unittest.TestCase): +class TestNucleiView(unittest.TestCase): def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.has_value.empty()) @@ -67,23 +67,27 @@ def test_comparisons(self): def test_iter(self): # Empty for n in self.defaulted: - self.fail('Empty Nuclei should not iterate') + self.fail("Empty Nuclei should not iterate") # Non-empty for n in self.has_value: self.assertTrue(n == self.n0 or n == self.n1) def test_str(self): - self.assertEqual(str(self.defaulted), '') - self.assertEqual( - str(self.has_value), - ' 0.000000000000000 0.000000000000000 0.000000000000000\nH 2.000000000000000 3.000000000000000 4.000000000000000\n' + self.assertEqual(str(self.defaulted), "") + + corr_string = " 0.000000000000000 0.000000000000000 0.000000000000000" + corr_string += "\n" + corr_string += ( + "H 2.000000000000000 3.000000000000000 4.000000000000000" ) + corr_string += "\n" + self.assertEqual(str(self.has_value), corr_string) def setUp(self): self.defaulted = chemist.NucleiView() self.n0 = chemist.Nucleus() - self.n1 = chemist.Nucleus('H', 1, 1.0, 2.0, 3.0, 4.0, 5.0) + self.n1 = chemist.Nucleus("H", 1, 1.0, 2.0, 3.0, 4.0, 5.0) self.value_set = chemist.Nuclei() self.value_set.push_back(self.n0) self.value_set.push_back(self.n1) diff --git a/tests/python/unit_tests/chemical_system/nucleus/test_nucleus.py b/tests/python/unit_tests/chemical_system/nucleus/test_nucleus.py index bda176b49..a862e08e2 100644 --- a/tests/python/unit_tests/chemical_system/nucleus/test_nucleus.py +++ b/tests/python/unit_tests/chemical_system/nucleus/test_nucleus.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestNucleus(unittest.TestCase): - def test_base(self): """ This test makes sure we can access the base class's member @@ -80,14 +80,14 @@ def test_base(self): def test_name(self): # Test original values - self.assertEqual(self.defaulted.name, '') - self.assertEqual(self.h.name, 'H') - self.assertEqual(self.he.name, 'He') - self.assertEqual(self.u.name, 'U') + self.assertEqual(self.defaulted.name, "") + self.assertEqual(self.h.name, "H") + self.assertEqual(self.he.name, "He") + self.assertEqual(self.u.name, "U") # Can change it - self.defaulted.name = 'Ez' - self.assertEqual(self.defaulted.name, 'Ez') + self.defaulted.name = "Ez" + self.assertEqual(self.defaulted.name, "Ez") def test_Z(self): # Test original values @@ -122,17 +122,17 @@ def test_comparisons(self): self.assertFalse(self.defaulted == self.h) # Different name - h2 = chemist.Nucleus('D', 1, 1.0) + h2 = chemist.Nucleus("D", 1, 1.0) self.assertNotEqual(self.h, h2) self.assertFalse(self.h == h2) # Different atomic number - h2 = chemist.Nucleus('H', 2, 1.0) + h2 = chemist.Nucleus("H", 2, 1.0) self.assertNotEqual(self.h, h2) self.assertFalse(self.h == h2) # Different mass - h2 = chemist.Nucleus('H', 1, 2.0) + h2 = chemist.Nucleus("H", 1, 2.0) self.assertNotEqual(self.h, h2) self.assertFalse(self.h == h2) @@ -168,22 +168,26 @@ def test_str(self): # Default self.assertEqual( str(self.defaulted), - 'name : ,\natomic number : 0,\nmass : 0,\ncharge : 0,\n' - 'x : 0,\ny : 0,\nz : 0') + "name : ,\natomic number : 0,\nmass : 0,\ncharge : 0,\n" + "x : 0,\ny : 0,\nz : 0", + ) # Has value self.assertEqual( str(self.h), - 'name : H,\natomic number : 1,\nmass : 1,\ncharge : 1,\n' - 'x : 0,\ny : 0,\nz : 0') + "name : H,\natomic number : 1,\nmass : 1,\ncharge : 1,\n" + "x : 0,\ny : 0,\nz : 0", + ) self.assertEqual( str(self.he), - 'name : He,\natomic number : 2,\nmass : 4,\ncharge : 2,\n' - 'x : 1,\ny : 2,\nz : 3') + "name : He,\natomic number : 2,\nmass : 4,\ncharge : 2,\n" + "x : 1,\ny : 2,\nz : 3", + ) self.assertEqual( str(self.u), - 'name : U,\natomic number : 92,\nmass : 238,\ncharge : 91,\n' - 'x : 2,\ny : 3,\nz : 4') + "name : U,\natomic number : 92,\nmass : 238,\ncharge : 91,\n" + "x : 2,\ny : 3,\nz : 4", + ) def setUp(self): self.defaulted = chemist.Nucleus() diff --git a/tests/python/unit_tests/chemical_system/nucleus/test_nucleus_view.py b/tests/python/unit_tests/chemical_system/nucleus/test_nucleus_view.py index a5eb6c300..d9b30dbd7 100644 --- a/tests/python/unit_tests/chemical_system/nucleus/test_nucleus_view.py +++ b/tests/python/unit_tests/chemical_system/nucleus/test_nucleus_view.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist + class TestNucleus(unittest.TestCase): - def test_base(self): """ This test makes sure we can access the base class's member @@ -53,15 +53,15 @@ def test_base(self): def test_name(self): # Test original values - self.assertEqual(self.defaulted_view.name, '') - self.assertEqual(self.u_view.name, 'U') + self.assertEqual(self.defaulted_view.name, "") + self.assertEqual(self.u_view.name, "U") # Can change it - self.defaulted_view.name = 'Ez' - self.assertEqual(self.defaulted_view.name, 'Ez') + self.defaulted_view.name = "Ez" + self.assertEqual(self.defaulted_view.name, "Ez") # Changes object it's a view of - self.assertEqual(self.defaulted.name, 'Ez') + self.assertEqual(self.defaulted.name, "Ez") def test_Z(self): # Test original values @@ -190,12 +190,14 @@ def test_str(self): # Default self.assertEqual( str(self.defaulted_view), - ' 0.000000000000000 0.000000000000000 0.000000000000000') + " 0.000000000000000 0.000000000000000 0.000000000000000", + ) # Has value self.assertEqual( str(self.u_view), - 'U 2.000000000000000 3.000000000000000 4.000000000000000') + "U 2.000000000000000 3.000000000000000 4.000000000000000", + ) def setUp(self): self.defaulted = chemist.Nucleus() diff --git a/tests/python/unit_tests/chemical_system/point_charge/test_charge_view.py b/tests/python/unit_tests/chemical_system/point_charge/test_charge_view.py index 99376e959..7aafc2b18 100644 --- a/tests/python/unit_tests/chemical_system/point_charge/test_charge_view.py +++ b/tests/python/unit_tests/chemical_system/point_charge/test_charge_view.py @@ -12,14 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist -def make_charge_view_test(charge_type): +def make_charge_view_test(charge_type): class TestChargeView(unittest.TestCase): - def test_base(self): """ This test makes sure we can access the base class's member @@ -50,7 +49,9 @@ def test_base(self): # N.B. For charge_type == PointChargeF the underlying data type # only has about six decimal places of precision. p = 6 if charge_type == chemist.PointChargeF else 10 - self.assertAlmostEqual(self.q1_view.magnitude(), 29**0.5, places=p) + self.assertAlmostEqual( + self.q1_view.magnitude(), 29**0.5, places=p + ) def test_charge(self): # Test original values diff --git a/tests/python/unit_tests/chemical_system/point_charge/test_charges.py b/tests/python/unit_tests/chemical_system/point_charge/test_charges.py index 1c972ef6e..fd262e510 100644 --- a/tests/python/unit_tests/chemical_system/point_charge/test_charges.py +++ b/tests/python/unit_tests/chemical_system/point_charge/test_charges.py @@ -12,14 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist -def make_test_charges(charges_type): +def make_test_charges(charges_type): class TestCharges(unittest.TestCase): - def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.has_value.empty()) diff --git a/tests/python/unit_tests/chemical_system/point_charge/test_charges_view.py b/tests/python/unit_tests/chemical_system/point_charge/test_charges_view.py index 460671407..782ec7fea 100644 --- a/tests/python/unit_tests/chemical_system/point_charge/test_charges_view.py +++ b/tests/python/unit_tests/chemical_system/point_charge/test_charges_view.py @@ -12,14 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import chemist import unittest +import chemist -def make_test_charges_view(charges_view_type): +def make_test_charges_view(charges_view_type): class TestCharges(unittest.TestCase): - def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.has_value.empty()) diff --git a/tests/python/unit_tests/chemical_system/point_charge/test_point_charge.py b/tests/python/unit_tests/chemical_system/point_charge/test_point_charge.py index 20554ab61..e4645296b 100644 --- a/tests/python/unit_tests/chemical_system/point_charge/test_point_charge.py +++ b/tests/python/unit_tests/chemical_system/point_charge/test_point_charge.py @@ -12,14 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist import PointF, PointD, PointChargeF, PointChargeD import unittest +from chemist import PointChargeD, PointChargeF, PointD, PointF -def make_point_charge_test(charge_type, point_type): +def make_point_charge_test(charge_type, point_type): class TestPointCharge(unittest.TestCase): - def test_base(self): """ This test makes sure we can access the base class's member diff --git a/tests/python/unit_tests/fragmenting/capping/test_cap.py b/tests/python/unit_tests/fragmenting/capping/test_cap.py index 63a502e41..b2052d8eb 100644 --- a/tests/python/unit_tests/fragmenting/capping/test_cap.py +++ b/tests/python/unit_tests/fragmenting/capping/test_cap.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.fragmenting import Cap -from chemist import Nucleus import unittest +from chemist import Nucleus +from chemist.fragmenting import Cap + class TestCap(unittest.TestCase): - def test_default_ctor(self): self.assertEqual(len(self.defaulted), 0) diff --git a/tests/python/unit_tests/fragmenting/capping/test_cap_set.py b/tests/python/unit_tests/fragmenting/capping/test_cap_set.py index a3331b087..3b8a7ea0a 100644 --- a/tests/python/unit_tests/fragmenting/capping/test_cap_set.py +++ b/tests/python/unit_tests/fragmenting/capping/test_cap_set.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.fragmenting import Cap, CapSet -from chemist import Nucleus import unittest +from chemist import Nucleus +from chemist.fragmenting import Cap, CapSet + class TestCapSet(unittest.TestCase): - def test_default_ctor(self): self.assertEqual(len(self.defaulted), 0) diff --git a/tests/python/unit_tests/fragmenting/test_fragmented_chemical_system.py b/tests/python/unit_tests/fragmenting/test_fragmented_chemical_system.py index adb96ca91..64d5d912b 100644 --- a/tests/python/unit_tests/fragmenting/test_fragmented_chemical_system.py +++ b/tests/python/unit_tests/fragmenting/test_fragmented_chemical_system.py @@ -12,14 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist import Atom, Molecule, ChemicalSystem -from chemist.fragmenting import FragmentedNuclei, FragmentedMolecule, \ - FragmentedChemicalSystem import unittest +from chemist import Atom, ChemicalSystem, Molecule +from chemist.fragmenting import ( + FragmentedChemicalSystem, + FragmentedMolecule, + FragmentedNuclei, +) -class TestFragmentedChemicalSystem(unittest.TestCase): +class TestFragmentedChemicalSystem(unittest.TestCase): def test_ctors(self): self.assertEqual(self.defaulted.supersystem(), self.empty_ss) self.assertEqual(self.defaulted.size(), 0) @@ -81,8 +84,8 @@ def test_comparisons(self): def setUp(self): # Supersystems - self.h = Atom('H', 1, 1.0, 2.0, 3.0, 4.0) - self.he = Atom('He', 2, 4.0, 5.0, 6.0, 7.0) + self.h = Atom("H", 1, 1.0, 2.0, 3.0, 4.0) + self.he = Atom("He", 2, 4.0, 5.0, 6.0, 7.0) self.ss = ChemicalSystem(Molecule(0, 2, [self.h, self.he])) self.empty_ss = ChemicalSystem() diff --git a/tests/python/unit_tests/fragmenting/test_fragmented_molecule.py b/tests/python/unit_tests/fragmenting/test_fragmented_molecule.py index 2d64dad4b..ca71b445b 100644 --- a/tests/python/unit_tests/fragmenting/test_fragmented_molecule.py +++ b/tests/python/unit_tests/fragmenting/test_fragmented_molecule.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist import Atom, Molecule, Nuclei -from chemist.fragmenting import FragmentedNuclei, FragmentedMolecule import unittest +from chemist import Atom, Molecule +from chemist.fragmenting import FragmentedMolecule, FragmentedNuclei -class TestFragmentedMolecule(unittest.TestCase): +class TestFragmentedMolecule(unittest.TestCase): def test_ctors(self): self.assertEqual(self.defaulted.supersystem(), self.empty_ss) self.assertEqual(self.defaulted.size(), 0) @@ -89,15 +89,16 @@ def test_comparisons(self): def setUp(self): # Supersystems - self.h = Atom('H', 1, 1.0, 2.0, 3.0, 4.0) - self.he = Atom('He', 2, 4.0, 5.0, 6.0, 7.0) + self.h = Atom("H", 1, 1.0, 2.0, 3.0, 4.0) + self.he = Atom("He", 2, 4.0, 5.0, 6.0, 7.0) self.ss = Molecule(0, 2, [self.h, self.he]) self.empty_ss = Molecule() # Fragmented nuclei temp_nuclei = self.ss.nuclei - self.frag_nuclei = FragmentedNuclei(temp_nuclei.as_nuclei(), - [[0], [1]]) + self.frag_nuclei = FragmentedNuclei( + temp_nuclei.as_nuclei(), [[0], [1]] + ) # Corr fragments self.frag0 = Molecule(0, 2, [self.h]) diff --git a/tests/python/unit_tests/fragmenting/test_fragmented_nuclei.py b/tests/python/unit_tests/fragmenting/test_fragmented_nuclei.py index 4869e2c71..c68f870ef 100644 --- a/tests/python/unit_tests/fragmenting/test_fragmented_nuclei.py +++ b/tests/python/unit_tests/fragmenting/test_fragmented_nuclei.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist import Nucleus, Nuclei -from chemist.fragmenting import Cap, CapSet, FragmentedNuclei import unittest +from chemist import Nuclei, Nucleus +from chemist.fragmenting import Cap, CapSet, FragmentedNuclei + class TestFragmentedNuclei(unittest.TestCase): - def test_ctors(self): self.assertEqual(self.defaulted.supersystem(), self.empty_ss) self.assertEqual(self.defaulted.size(), 0) @@ -152,9 +152,9 @@ def test_comparisons(self): self.assertNotEqual(self.disjoint, self.disjoint_caps) def setUp(self): - self.h0 = Nucleus('H', 1, 1.0, 2.0, 3.0, 4.0) - self.h1 = Nucleus('H', 1, 1.0, 5.0, 6.0, 7.0) - self.h2 = Nucleus('H', 1, 1.0, 8.0, 9.0, 0.0) + self.h0 = Nucleus("H", 1, 1.0, 2.0, 3.0, 4.0) + self.h1 = Nucleus("H", 1, 1.0, 5.0, 6.0, 7.0) + self.h2 = Nucleus("H", 1, 1.0, 8.0, 9.0, 0.0) self.ss = Nuclei([self.h0, self.h1, self.h2]) self.empty_ss = Nuclei() diff --git a/tests/python/unit_tests/point/test_point.py b/tests/python/unit_tests/point/test_point.py index d5b761d15..feffad595 100644 --- a/tests/python/unit_tests/point/test_point.py +++ b/tests/python/unit_tests/point/test_point.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist import PointF, PointD import unittest +from chemist import PointD, PointF + def make_point_test_case(point_type): """ @@ -26,7 +27,6 @@ def make_point_test_case(point_type): """ class TestPoint(unittest.TestCase): - def test_ctor(self): self.assertEqual(self.defaulted.x, 0.0) self.assertEqual(self.defaulted.y, 0.0) diff --git a/tests/python/unit_tests/point/test_point_set.py b/tests/python/unit_tests/point/test_point_set.py index c54ac4474..eb2749e25 100644 --- a/tests/python/unit_tests/point/test_point_set.py +++ b/tests/python/unit_tests/point/test_point_set.py @@ -12,14 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist import PointF, PointD, PointSetF, PointSetD import unittest +from chemist import PointD, PointF, PointSetD, PointSetF -def make_test_point_set(point_type, point_set_type): +def make_test_point_set(point_type, point_set_type): class TestPointSet(unittest.TestCase): - def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.has_value.empty()) diff --git a/tests/python/unit_tests/point/test_point_set_view.py b/tests/python/unit_tests/point/test_point_set_view.py index 315d7ca4e..b9d71723d 100644 --- a/tests/python/unit_tests/point/test_point_set_view.py +++ b/tests/python/unit_tests/point/test_point_set_view.py @@ -12,15 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist import PointF, PointD, PointSetF, PointSetD, PointSetViewF, \ - PointSetViewD import unittest +from chemist import ( + PointD, + PointF, + PointSetD, + PointSetF, + PointSetViewD, + PointSetViewF, +) -def make_test_point_set_view(point_type, point_set_type, point_set_view_type): +def make_test_point_set_view(point_type, point_set_type, point_set_view_type): class TestPointSetView(unittest.TestCase): - def test_empty(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.has_value.empty()) @@ -84,10 +89,12 @@ def setUp(self): class TestPointSetViewF( - make_test_point_set_view(PointF, PointSetF, PointSetViewF)): + make_test_point_set_view(PointF, PointSetF, PointSetViewF) +): pass class TestPointSetViewD( - make_test_point_set_view(PointD, PointSetD, PointSetViewD)): + make_test_point_set_view(PointD, PointSetD, PointSetViewD) +): pass diff --git a/tests/python/unit_tests/point/test_point_view.py b/tests/python/unit_tests/point/test_point_view.py index 997f1e04a..4681d5775 100644 --- a/tests/python/unit_tests/point/test_point_view.py +++ b/tests/python/unit_tests/point/test_point_view.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist import PointF, PointD, PointViewF, PointViewD import unittest +from chemist import PointD, PointF, PointViewD, PointViewF + def make_point_view_test_case(point_type, point_view_type): """ @@ -29,7 +30,6 @@ def make_point_view_test_case(point_type, point_view_type): """ class TestPointView(unittest.TestCase): - def test_ctor(self): self.assertEqual(self.defaulted_view.x, 0.0) self.assertEqual(self.defaulted_view.y, 0.0) diff --git a/tests/python/unit_tests/quantum_mechanics/test_qm.py b/tests/python/unit_tests/quantum_mechanics/test_qm.py index 80cbeba4e..0c6712c32 100644 --- a/tests/python/unit_tests/quantum_mechanics/test_qm.py +++ b/tests/python/unit_tests/quantum_mechanics/test_qm.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chemist.basis_set import AOBasisSetD, AtomicBasisSetD, ShellD, ContractedGaussianD from chemist import PointD, ShellType +from chemist.basis_set import AOBasisSetD, AtomicBasisSetD, ContractedGaussianD def h2_coords(): @@ -31,9 +31,9 @@ def h2_basis(): h1_cg = ContractedGaussianD(coefs, exps, h1_coords) cartesian = ShellType.cartesian - h0 = AtomicBasisSetD('STO-3G', 1, h0_coords) + h0 = AtomicBasisSetD("STO-3G", 1, h0_coords) h0.add_shell(cartesian, 0, h0_cg) - h1 = AtomicBasisSetD('STO-3G', 1, h1_coords) + h1 = AtomicBasisSetD("STO-3G", 1, h1_coords) h1.add_shell(cartesian, 0, h1_cg) rv = AOBasisSetD() diff --git a/tests/python/unit_tests/quantum_mechanics/wavefunction/test_aos.py b/tests/python/unit_tests/quantum_mechanics/wavefunction/test_aos.py index 76600f6ad..c54b3d1e8 100644 --- a/tests/python/unit_tests/quantum_mechanics/wavefunction/test_aos.py +++ b/tests/python/unit_tests/quantum_mechanics/wavefunction/test_aos.py @@ -12,14 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +import unittest + from chemist.wavefunction import AOs + from chemist.basis_set import AOBasisSetD -import unittest + from ..test_qm import h2_basis class TestAOs(unittest.TestCase): - def test_default_ctor(self): self.assertEqual(self.defaulted.size(), 0) self.assertEqual(self.defaulted.ao_basis_set, AOBasisSetD()) diff --git a/tests/python/unit_tests/test_chemist.py b/tests/python/unit_tests/test_chemist.py index 42b1103fa..5aa3d0dc7 100644 --- a/tests/python/unit_tests/test_chemist.py +++ b/tests/python/unit_tests/test_chemist.py @@ -15,11 +15,12 @@ # import os -import parallelzone as pz import sys import unittest -if __name__ == '__main__': +import parallelzone as pz + +if __name__ == "__main__": rv = pz.runtime.RuntimeView() my_dir = os.path.dirname(os.path.realpath(__file__)) From 2286d8ddf46be4741fbb5603ff84d63a9fc5b216 Mon Sep 17 00:00:00 2001 From: "Jonathan M. Waldrop" Date: Fri, 8 Aug 2025 15:34:52 -0500 Subject: [PATCH 2/4] .flake8 update --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index d6ddc11ac..c141aa751 100644 --- a/.flake8 +++ b/.flake8 @@ -1,2 +1,2 @@ [flake8] -ignore = E741, W503 +extend-ignore = E203, E701, E741, W503 From 53e4b2fcd66d62dac7fd3b1f185dd8f64fb70e51 Mon Sep 17 00:00:00 2001 From: "Jonathan M. Waldrop" Date: Mon, 11 Aug 2025 15:00:10 -0500 Subject: [PATCH 3/4] clang-format update --- include/chemist/nucleus/nucleus.ipp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/chemist/nucleus/nucleus.ipp b/include/chemist/nucleus/nucleus.ipp index 4c9deba2d..9d0a3b06a 100644 --- a/include/chemist/nucleus/nucleus.ipp +++ b/include/chemist/nucleus/nucleus.ipp @@ -66,17 +66,17 @@ inline std::ostream& operator<<(std::ostream& os, const Nucleus& ni) { template void Nucleus::save(Archive& ar) const { point_charge_type::save(ar); - ar& m_name_; - ar& m_Z_; - ar& m_mass_; + ar & m_name_; + ar & m_Z_; + ar & m_mass_; } template void Nucleus::load(Archive& ar) { point_charge_type::load(ar); - ar& m_name_; - ar& m_Z_; - ar& m_mass_; + ar & m_name_; + ar & m_Z_; + ar & m_mass_; } } // namespace chemist From dcbb5f30aacde09b161b6e2bf5f7e32d482f1beb Mon Sep 17 00:00:00 2001 From: "Jonathan M. Waldrop" Date: Tue, 12 Aug 2025 11:42:42 -0500 Subject: [PATCH 4/4] GHA workflow update --- .github/workflows/pull_request.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 0bd3deb46..fc4ae0334 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -23,8 +23,6 @@ on: jobs: check_formatting: uses: NWChemEx/.github/.github/workflows/check_formatting.yaml@master - with: - license_config: ".licenserc.yaml" test_nwx_docs: uses: NWChemEx/.github/.github/workflows/test_nwx_docs.yaml@master