diff --git a/.clang-format b/.clang-format index 1c27bb27..a9b82591 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/.github/enable_sigma.cmake b/.github/enable_sigma.cmake index 2fbe8f6a..d6120ba5 100644 --- a/.github/enable_sigma.cmake +++ b/.github/enable_sigma.cmake @@ -1 +1 @@ -set(ENABLE_SIGMA ON) \ No newline at end of file +set(ENABLE_SIGMA ON) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index f64fe208..916ff9bd 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 e053a226..87c2fcca 100644 --- a/.github/.licenserc.yaml +++ b/.licenserc.yaml @@ -22,6 +22,7 @@ header: - docs/Makefile - LICENSE - docs/requirements.txt - - version.txt + - version.txt + - build/ comment: never diff --git a/CMakeLists.txt b/CMakeLists.txt index 426a1772..5e72fd80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,7 +92,7 @@ if("${BUILD_TESTING}") INCLUDE_DIRS "${INTEGRALS_SOURCE_DIR}/${PROJECT_NAME}" DEPENDS Catch2 ${PROJECT_NAME} ) - + nwx_pybind11_tests( py_integrals "${PYTHON_TEST_DIR}/unit_tests/test_integrals.py" SUBMODULES pluginplay chemist parallelzone simde diff --git a/LICENSE b/LICENSE index 4947287f..f433b1a5 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/README.md b/README.md index 1d253a99..e0d3307b 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ Repository for the generic integral API and implementations for specific integra Building Integrals ------------------ -Integrals is built using +Integrals is built using [CPP](https://github.com/CMakePackagingProject/CMakePackagingProject.git). -Assuming you have already installed CPP, that you are on a sane Unix-like -computer, and you are willing to let Integrals build all dependencies, then +Assuming you have already installed CPP, that you are on a sane Unix-like +computer, and you are willing to let Integrals build all dependencies, then the following will suffice to build Integrals: ``` @@ -37,21 +37,21 @@ git clone https://github.com/NWChemEx/Integrals.git cd SDE cmake -H. -Bbuild -DCPP_GITHUB_TOKEN= \ -DMPI_ROOT= \ - -DCMAKE_PREFIX_PATH= \ + -DCMAKE_PREFIX_PATH= \ -DCMAKE_INSTALL_PREFIX= cd build cmake --build . #May need to run as an admin depending on where you are installing -cmake --build . --target install +cmake --build . --target install ``` The build process is not capable of building MPI so you will have to provide a path to a known installation via the `MPI_ROOT` variable. The GitHub token is -necessary because, at the moment, Chemist, TAMM, SDE, and Utilities are -private repositories (instructions for generating a token are +necessary because, at the moment, Chemist, TAMM, SDE, and Utilities are +private repositories (instructions for generating a token are [here](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)). -For finer-grained control over the build we direct the reader to the more -thorough CPP build instructions located +For finer-grained control over the build we direct the reader to the more +thorough CPP build instructions located [here](https://cmakepackagingproject.readthedocs.io/en/latest/end_user/quick_start.html) and note that Integrals depends on several other projects: @@ -62,7 +62,7 @@ and note that Integrals depends on several other projects: - [pybind11](https://github.com/pybind/pybind11) - Requires a development version of Python - [cereal](https://github.com/USCiLab/cereal) -- [Chemist](https://github.com/NWChemEx/Chemist) +- [Chemist](https://github.com/NWChemEx/Chemist) - [TAMM](https://github.com/NWChemEx/TAMM) - [HPTT](https://github.com/ajaypanyala/hptt) - [MSGSL](https://github.com/Microsoft/GSL) @@ -70,9 +70,9 @@ and note that Integrals depends on several other projects: - [Eigen3](https://github.com/eigenteam/eigen-git-mirror) - [GlobalArrays](https://github.com/GlobalArrays/ga) - MPI -- [LibInt](https://github.com/evaleev/libint) +- [LibInt](https://github.com/evaleev/libint) - (For testing only)[Catch2](https://github.com/catchorg/Catch2) -We recommend building Libint separately for the moment because a proper -autotools build (the only autotools variant supported by CPP) builds the +We recommend building Libint separately for the moment because a proper +autotools build (the only autotools variant supported by CPP) builds the generator and many more integrals than are necessary. diff --git a/docs/source/conf.py b/docs/source/conf.py index 6f9a6594..28005c82 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'Integrals' -copyright = u'2020, NWChemEx Team' -author = u'NWChemEx Team' +project = "Integrals" +copyright = "2020, NWChemEx Team" +author = "NWChemEx Team" ############################################################################## # Shouldn't need to change anything below this point # @@ -61,34 +62,38 @@ # If your documentation needs a minimal Sphinx version, state it here. # -needs_sphinx = '7.2.6' +needs_sphinx = "7.2.6" # 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', 'sphinx.ext.intersphinx' + "sphinx.ext.autodoc", + "sphinx.ext.mathjax", + "sphinx.ext.githubpages", + "sphinx.ext.autosummary", + "sphinx_rtd_theme", + "sphinx.ext.intersphinx", ] # 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. @@ -96,7 +101,7 @@ exclude_patterns = [] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" numfig = True numfig_secnum_depth = 0 @@ -106,7 +111,7 @@ # 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" # 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 @@ -117,7 +122,7 @@ # 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. @@ -132,7 +137,7 @@ # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = project + 'doc' +htmlhelp_basename = project + "doc" # -- Options for LaTeX output ------------------------------------------------ @@ -140,15 +145,12 @@ # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # # 'preamble': '', - # Latex figure (float) alignment # # 'figure_align': 'htbp', @@ -158,16 +160,22 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, project + '.tex', project + ' Documentation', author, - 'manual'), + ( + master_doc, + project + ".tex", + project + " Documentation", + author, + "manual", + ), ] # -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, project.lower(), project + ' Documentation', - [author], 1)] +man_pages = [ + (master_doc, project.lower(), project + " Documentation", [author], 1) +] # -- Options for Texinfo output ---------------------------------------------- @@ -175,8 +183,15 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, project, project + ' Documentation', author, project, - 'One line description of project.', 'Miscellaneous'), + ( + master_doc, + project, + project + " Documentation", + author, + project, + "One line description of project.", + "Miscellaneous", + ), ] # -- Extension configuration ------------------------------------------------- @@ -184,4 +199,4 @@ # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} +intersphinx_mapping = {"python": ("https://docs.python.org/3", None)} diff --git a/docs/source/index.rst b/docs/source/index.rst index d173f16b..417c1238 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -21,5 +21,3 @@ Welcome to Integral's documentation! module_api/index C++ API - - diff --git a/docs/source/module_api/index.rst b/docs/source/module_api/index.rst index adafd75d..a98a8d92 100644 --- a/docs/source/module_api/index.rst +++ b/docs/source/module_api/index.rst @@ -18,4 +18,4 @@ Module API .. toctree:: :maxdepth: 1 - :caption: Packages \ No newline at end of file + :caption: Packages diff --git a/src/integrals/ao_integrals/ao_integrals.hpp b/src/integrals/ao_integrals/ao_integrals.hpp index e853ad6f..de519eed 100644 --- a/src/integrals/ao_integrals/ao_integrals.hpp +++ b/src/integrals/ao_integrals/ao_integrals.hpp @@ -53,4 +53,4 @@ inline void load_modules(pluginplay::ModuleManager& mm) { mm.add_module("UQ Driver"); } -} // namespace integrals::ao_integrals \ No newline at end of file +} // namespace integrals::ao_integrals diff --git a/src/integrals/ao_integrals/ao_integrals_driver.cpp b/src/integrals/ao_integrals/ao_integrals_driver.cpp index 16879a65..88a921b6 100644 --- a/src/integrals/ao_integrals/ao_integrals_driver.cpp +++ b/src/integrals/ao_integrals/ao_integrals_driver.cpp @@ -103,4 +103,4 @@ MODULE_RUN(AOIntegralsDriver) { return pt::wrap_results(rv, std::move(t)); } -} // namespace integrals::ao_integrals \ No newline at end of file +} // namespace integrals::ao_integrals diff --git a/src/integrals/ao_integrals/coulomb_metric.cpp b/src/integrals/ao_integrals/coulomb_metric.cpp index 163e9e79..36dac412 100644 --- a/src/integrals/ao_integrals/coulomb_metric.cpp +++ b/src/integrals/ao_integrals/coulomb_metric.cpp @@ -89,4 +89,4 @@ MODULE_RUN(CoulombMetric) { return pt::wrap_results(rv, M); } -} // namespace integrals::ao_integrals \ No newline at end of file +} // namespace integrals::ao_integrals diff --git a/src/integrals/ao_integrals/df_integral.cpp b/src/integrals/ao_integrals/df_integral.cpp index 27315596..677fd4f8 100644 --- a/src/integrals/ao_integrals/df_integral.cpp +++ b/src/integrals/ao_integrals/df_integral.cpp @@ -56,4 +56,4 @@ MODULE_RUN(DFIntegral) { return pt::wrap_results(rv, std::move(L)); } -} // namespace integrals::ao_integrals \ No newline at end of file +} // namespace integrals::ao_integrals diff --git a/src/integrals/ao_integrals/j_density_fitted.cpp b/src/integrals/ao_integrals/j_density_fitted.cpp index 9d4fe6a8..8637973f 100644 --- a/src/integrals/ao_integrals/j_density_fitted.cpp +++ b/src/integrals/ao_integrals/j_density_fitted.cpp @@ -65,4 +65,4 @@ MODULE_RUN(JDensityFitted) { return pt::wrap_results(rv, std::move(j)); } -} // namespace integrals::ao_integrals \ No newline at end of file +} // namespace integrals::ao_integrals diff --git a/src/integrals/ao_integrals/j_four_center.cpp b/src/integrals/ao_integrals/j_four_center.cpp index f262f44a..1095c40a 100644 --- a/src/integrals/ao_integrals/j_four_center.cpp +++ b/src/integrals/ao_integrals/j_four_center.cpp @@ -58,4 +58,4 @@ MODULE_RUN(JFourCenter) { return pt::wrap_results(rv, std::move(j)); } -} // namespace integrals::ao_integrals \ No newline at end of file +} // namespace integrals::ao_integrals diff --git a/src/integrals/ao_integrals/k_density_fitted.cpp b/src/integrals/ao_integrals/k_density_fitted.cpp index f401b28c..8de9034f 100644 --- a/src/integrals/ao_integrals/k_density_fitted.cpp +++ b/src/integrals/ao_integrals/k_density_fitted.cpp @@ -66,4 +66,4 @@ MODULE_RUN(KDensityFitted) { return pt::wrap_results(rv, std::move(k)); } -} // namespace integrals::ao_integrals \ No newline at end of file +} // namespace integrals::ao_integrals diff --git a/src/integrals/ao_integrals/k_four_center.cpp b/src/integrals/ao_integrals/k_four_center.cpp index 96fcea05..3073d421 100644 --- a/src/integrals/ao_integrals/k_four_center.cpp +++ b/src/integrals/ao_integrals/k_four_center.cpp @@ -59,4 +59,4 @@ MODULE_RUN(KFourCenter) { return pt::wrap_results(rv, std::move(k)); } -} // namespace integrals::ao_integrals \ No newline at end of file +} // namespace integrals::ao_integrals diff --git a/src/integrals/ao_integrals/uq_driver.cpp b/src/integrals/ao_integrals/uq_driver.cpp index 96df9906..afd7213a 100644 --- a/src/integrals/ao_integrals/uq_driver.cpp +++ b/src/integrals/ao_integrals/uq_driver.cpp @@ -93,4 +93,4 @@ MODULE_RUN(UQDriver) { auto rv = results(); return eri_pt::wrap_results(rv, t_w_error); } -} // namespace integrals::ao_integrals \ No newline at end of file +} // namespace integrals::ao_integrals diff --git a/src/integrals/libint/libint.cpp b/src/integrals/libint/libint.cpp index 6bf6bb0f..f488577f 100644 --- a/src/integrals/libint/libint.cpp +++ b/src/integrals/libint/libint.cpp @@ -182,4 +182,4 @@ void load_modules(pluginplay::ModuleManager& mm) { #undef LOAD_LIBINT #undef LIBINT -} // namespace integrals::libint \ No newline at end of file +} // namespace integrals::libint diff --git a/src/integrals/libint/libint_visitor.hpp b/src/integrals/libint/libint_visitor.hpp index c2c1a43f..b6d55f4d 100644 --- a/src/integrals/libint/libint_visitor.hpp +++ b/src/integrals/libint/libint_visitor.hpp @@ -27,7 +27,7 @@ class LibintVisitor : public chemist::qm_operator::OperatorVisitor { LibintVisitor(const std::vector& bases, double thresh, std::size_t deriv = 0) : - m_bases(bases), m_thresh(thresh), m_deriv(deriv){}; + m_bases(bases), m_thresh(thresh), m_deriv(deriv) {}; void run(const s_e_type& S_e) { m_engine = detail_::make_engine(m_bases, S_e, m_thresh, m_deriv); @@ -54,4 +54,4 @@ class LibintVisitor : public chemist::qm_operator::OperatorVisitor { libint2::Engine m_engine; }; -} // namespace integrals::libint \ No newline at end of file +} // namespace integrals::libint diff --git a/src/integrals/uncertain_types.hpp b/src/integrals/uncertain_types.hpp index f7160372..466e817f 100644 --- a/src/integrals/uncertain_types.hpp +++ b/src/integrals/uncertain_types.hpp @@ -35,4 +35,4 @@ using uncertain_float = float; using uncertain_double = double; #endif -} // namespace integrals::type \ No newline at end of file +} // namespace integrals::type diff --git a/tests/cxx/unit/integrals/ao_integrals/ao_integrals_driver.cpp b/tests/cxx/unit/integrals/ao_integrals/ao_integrals_driver.cpp index d4f17f48..ae0f5473 100644 --- a/tests/cxx/unit/integrals/ao_integrals/ao_integrals_driver.cpp +++ b/tests/cxx/unit/integrals/ao_integrals/ao_integrals_driver.cpp @@ -100,4 +100,4 @@ TEST_CASE("AOIntegralsDriver") { const auto& K_corr = kmod.run_as(braket); compare_matrices(K, K_corr); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit/integrals/ao_integrals/df_integral.cpp b/tests/cxx/unit/integrals/ao_integrals/df_integral.cpp index 9123e0c2..e3045bf4 100644 --- a/tests/cxx/unit/integrals/ao_integrals/df_integral.cpp +++ b/tests/cxx/unit/integrals/ao_integrals/df_integral.cpp @@ -49,4 +49,4 @@ TEST_CASE("Density Fitting Integral") { REQUIRE(t(1, 0, 1) == Catch::Approx(0.09683503).margin(1E-6)); REQUIRE(t(1, 1, 0) == Catch::Approx(0.09683503).margin(1E-6)); REQUIRE(t(1, 1, 1) == Catch::Approx(0.56364026).margin(1E-6)); -} \ No newline at end of file +} diff --git a/tests/cxx/unit/integrals/ao_integrals/j_density_fitted.cpp b/tests/cxx/unit/integrals/ao_integrals/j_density_fitted.cpp index ecd43771..95777064 100644 --- a/tests/cxx/unit/integrals/ao_integrals/j_density_fitted.cpp +++ b/tests/cxx/unit/integrals/ao_integrals/j_density_fitted.cpp @@ -45,4 +45,4 @@ TEST_CASE("Density Fitted J builder") { REQUIRE(t(0, 1) == Catch::Approx(0.22344536).margin(1E-6)); REQUIRE(t(1, 0) == Catch::Approx(0.22344536).margin(1E-6)); REQUIRE(t(1, 1) == Catch::Approx(0.50515668).margin(1E-6)); -} \ No newline at end of file +} diff --git a/tests/cxx/unit/integrals/ao_integrals/j_four_center.cpp b/tests/cxx/unit/integrals/ao_integrals/j_four_center.cpp index 011b4452..c455391b 100644 --- a/tests/cxx/unit/integrals/ao_integrals/j_four_center.cpp +++ b/tests/cxx/unit/integrals/ao_integrals/j_four_center.cpp @@ -44,4 +44,4 @@ TEST_CASE("Four center J builder") { REQUIRE(t(0, 1) == Catch::Approx(0.24704427).margin(1E-6)); REQUIRE(t(1, 0) == Catch::Approx(0.24704427).margin(1E-6)); REQUIRE(t(1, 1) == Catch::Approx(0.56044143).margin(1E-6)); -} \ No newline at end of file +} diff --git a/tests/cxx/unit/integrals/ao_integrals/k_density_fitted.cpp b/tests/cxx/unit/integrals/ao_integrals/k_density_fitted.cpp index 04e64e9d..f2341506 100644 --- a/tests/cxx/unit/integrals/ao_integrals/k_density_fitted.cpp +++ b/tests/cxx/unit/integrals/ao_integrals/k_density_fitted.cpp @@ -45,4 +45,4 @@ TEST_CASE("Density Fitted K builder") { REQUIRE(t(0, 1) == Catch::Approx(0.32265250).margin(1E-6)); REQUIRE(t(1, 0) == Catch::Approx(0.32265250).margin(1E-6)); REQUIRE(t(1, 1) == Catch::Approx(0.40594955).margin(1E-6)); -} \ No newline at end of file +} diff --git a/tests/cxx/unit/integrals/ao_integrals/k_four_center.cpp b/tests/cxx/unit/integrals/ao_integrals/k_four_center.cpp index 2f0c80da..97da531e 100644 --- a/tests/cxx/unit/integrals/ao_integrals/k_four_center.cpp +++ b/tests/cxx/unit/integrals/ao_integrals/k_four_center.cpp @@ -44,4 +44,4 @@ TEST_CASE("Four center K builder") { REQUIRE(t(0, 1) == Catch::Approx(0.35130947).margin(1E-6)); REQUIRE(t(1, 0) == Catch::Approx(0.35130947).margin(1E-6)); REQUIRE(t(1, 1) == Catch::Approx(0.45617623).margin(1E-6)); -} \ No newline at end of file +} diff --git a/tests/cxx/unit/integrals/libint/detail_/libint_basis_set_water.hpp b/tests/cxx/unit/integrals/libint/detail_/libint_basis_set_water.hpp index e51cab1c..b6f754f5 100644 --- a/tests/cxx/unit/integrals/libint/detail_/libint_basis_set_water.hpp +++ b/tests/cxx/unit/integrals/libint/detail_/libint_basis_set_water.hpp @@ -68,4 +68,4 @@ inline libint2::BasisSet water_basis_set() { return basis_t(atoms, shells); } -} // namespace test \ No newline at end of file +} // namespace test diff --git a/tests/python/unit_tests/test_integrals.py b/tests/python/unit_tests/test_integrals.py index 59c4987d..5aa3d0dc 100644 --- a/tests/python/unit_tests/test_integrals.py +++ b/tests/python/unit_tests/test_integrals.py @@ -15,12 +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__))