diff --git a/.clang-format b/.clang-format index 1c27bb2..a9b8259 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/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index a3a9295..1effdd3 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 @@ -35,4 +35,3 @@ jobs: uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master with: compilers: '["gcc-11", "clang-14"]' - diff --git a/.github/.licenserc.yaml b/.licenserc.yaml similarity index 98% rename from .github/.licenserc.yaml rename to .licenserc.yaml index 15b42a8..b9d79e5 100644 --- a/.github/.licenserc.yaml +++ b/.licenserc.yaml @@ -24,5 +24,6 @@ header: - src/scf/common/ - src/scf/scf/ - LICENSE + - build/ comment: never diff --git a/CMakeLists.txt b/CMakeLists.txt index 1058e4d..0980ea7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,7 @@ nwx_add_pybind11_module( DEPENDS "${PROJECT_NAME}" ) -if("${BUILD_TESTING}") +if("${BUILD_TESTING}") include(CTest) set(PYTHON_TEST_DIR "${NUX_TESTS_DIR}/python") set(CXX_TEST_DIR "${NUX_TESTS_DIR}/cxx") @@ -81,7 +81,7 @@ if("${BUILD_TESTING}") nwx_pybind11_tests( py_integration_test_${PROJECT_NAME} "${PYTHON_TEST_DIR}/integration_tests/run_integration_tests.py" - SUBMODULES nwchemex nux chemcache simde chemist pluginplay + SUBMODULES nwchemex nux chemcache simde chemist pluginplay parallelzone scf friendzone ) endif() diff --git a/cmake/get_nwx_cmake.cmake b/cmake/get_nwx_cmake.cmake index 2aec0e7..c99674d 100644 --- a/cmake/get_nwx_cmake.cmake +++ b/cmake/get_nwx_cmake.cmake @@ -28,4 +28,4 @@ macro(get_nwx_cmake) ) endmacro() -get_nwx_cmake() \ No newline at end of file +get_nwx_cmake() diff --git a/docs/source/conf.py b/docs/source/conf.py index 08e84e1..7988496 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'SCF' -copyright = u'2024, NWChemEx Team' -author = u'NWChemEx Team' +project = "SCF" +copyright = "2024, NWChemEx Team" +author = "NWChemEx Team" ############################################################################## # Shouldn't need to change anything below this point # @@ -61,40 +62,40 @@ # 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.autodoc", + "sphinx.ext.mathjax", + "sphinx.ext.githubpages", + "sphinx.ext.autosummary", + "sphinx_rtd_theme", # 'sphinxcontrib.bibtex', - 'sphinx_tabs.tabs', - 'sphinx.ext.intersphinx', + "sphinx_tabs.tabs", + "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. @@ -102,7 +103,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 @@ -112,7 +113,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" # html_logo = "assets/logo.png" @@ -120,12 +121,12 @@ # 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. @@ -140,7 +141,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 ------------------------------------------------ @@ -148,15 +149,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', @@ -166,16 +164,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 ---------------------------------------------- @@ -183,8 +187,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 ------------------------------------------------- @@ -192,4 +203,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/module_api/index.rst b/docs/source/module_api/index.rst index 3f03cdb..4f3b49a 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/cxx/nux/bo_approximation.cpp b/src/cxx/nux/bo_approximation.cpp index 7f17a1d..22c4a37 100644 --- a/src/cxx/nux/bo_approximation.cpp +++ b/src/cxx/nux/bo_approximation.cpp @@ -27,7 +27,7 @@ const auto desc = R"( Born-Oppenheimer Hamiltonian Driver ----------------------------------- -This module defines the algorithm used throughout NWChemEx to convert a +This module defines the algorithm used throughout NWChemEx to convert a ChemicalSystem object into a Hamiltonian object using the Born-Oppenheimer approximation. @@ -87,4 +87,4 @@ MODULE_RUN(BOApproximation) { return pt::wrap_results(rv, H); } -} // namespace nux \ No newline at end of file +} // namespace nux diff --git a/src/python/nux/export_nux.cpp b/src/python/nux/export_nux.cpp index b4930c3..0ad06e4 100644 --- a/src/python/nux/export_nux.cpp +++ b/src/python/nux/export_nux.cpp @@ -22,4 +22,4 @@ namespace nux { EXPORT_PLUGIN(nux, m) {} -} // namespace nux \ No newline at end of file +} // namespace nux diff --git a/tests/cxx/test_nux.hpp b/tests/cxx/test_nux.hpp index 7095eec..d13841e 100644 --- a/tests/cxx/test_nux.hpp +++ b/tests/cxx/test_nux.hpp @@ -44,4 +44,4 @@ ResultType make_h2() { static_assert(std::is_same_v); } } -} // namespace test_nux \ No newline at end of file +} // namespace test_nux diff --git a/tests/cxx/unit_tests/bo_approximation.cpp b/tests/cxx/unit_tests/bo_approximation.cpp index 9560dd3..277ac80 100644 --- a/tests/cxx/unit_tests/bo_approximation.cpp +++ b/tests/cxx/unit_tests/bo_approximation.cpp @@ -100,4 +100,4 @@ TEST_CASE("BOApproximation") { H_corr.emplace_back(1.0, std::make_unique(nuclei, nuclei)); REQUIRE(H == H_corr); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/main.cpp b/tests/cxx/unit_tests/main.cpp index bdfff19..dc2df52 100644 --- a/tests/cxx/unit_tests/main.cpp +++ b/tests/cxx/unit_tests/main.cpp @@ -24,4 +24,4 @@ int main(int argc, char* argv[]) { int res = Catch::Session().run(argc, argv); return res; -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/nux.cpp b/tests/cxx/unit_tests/nux.cpp index 974ab99..c2949fe 100644 --- a/tests/cxx/unit_tests/nux.cpp +++ b/tests/cxx/unit_tests/nux.cpp @@ -21,4 +21,4 @@ TEST_CASE("load_plugin") { pluginplay::ModuleManager mm; nux::load_modules(mm); REQUIRE(mm.size() > 0); -} \ No newline at end of file +} diff --git a/tests/python/integration_tests/run_integration_tests.py b/tests/python/integration_tests/run_integration_tests.py index 869bae2..c30ed50 100644 --- a/tests/python/integration_tests/run_integration_tests.py +++ b/tests/python/integration_tests/run_integration_tests.py @@ -11,13 +11,13 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -import nux -import parallelzone as pz -import sys import os +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__)) diff --git a/tests/python/integration_tests/test_nux/test_plugin.py b/tests/python/integration_tests/test_nux/test_plugin.py index c5a2d23..7f5172f 100644 --- a/tests/python/integration_tests/test_nux/test_plugin.py +++ b/tests/python/integration_tests/test_nux/test_plugin.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from pluginplay import ModuleManager -import nux import unittest +import nux +from pluginplay import ModuleManager + class TestLoadModules(unittest.TestCase): - def test_load_modules(self): self.assertGreater(self.mm.size(), 0) diff --git a/tests/python/test_nux.py b/tests/python/test_nux.py index e17015e..e42c41d 100644 --- a/tests/python/test_nux.py +++ b/tests/python/test_nux.py @@ -16,7 +16,7 @@ def h_nucleus(x, y, z): - return chemist.Nucleus('H', 1, 1836.15, x, y, z) + return chemist.Nucleus("H", 1, 1836.15, x, y, z) def h2_nuclei(): diff --git a/tests/python/unit_tests/run_unit_tests.py b/tests/python/unit_tests/run_unit_tests.py index 869bae2..c30ed50 100644 --- a/tests/python/unit_tests/run_unit_tests.py +++ b/tests/python/unit_tests/run_unit_tests.py @@ -11,13 +11,13 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -import nux -import parallelzone as pz -import sys import os +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__)) diff --git a/tests/python/unit_tests/test_nux/test_bo_approximation.py b/tests/python/unit_tests/test_nux/test_bo_approximation.py deleted file mode 100644 index cd3c616..0000000 --- a/tests/python/unit_tests/test_nux/test_bo_approximation.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2024 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from pluginplay import ModuleManager -import nux -import simde -import chemist -import unittest - - -class TestBOApproximation(unittest.TestCase): - - def test_empty_chemical_system(self): - sys = chemist.ChemicalSystem() - # Hamiltonian isn't exposed to Python yet... - #H = self.mm.run_as(self.pt, 'Born-Oppenheimer Approximation', sys) - #H_corr = chemist.qm_operator.Hamiltonian() - #self.assertEqual(H, H_corr) - - def setUp(self): - self.mm = ModuleManager() - nux.load_modules(self.mm) - self.pt = simde.HamiltonianFromChemicalSystem() diff --git a/tests/python/unit_tests/test_nux/test_plugin.py b/tests/python/unit_tests/test_nux/test_plugin.py index c5a2d23..7f5172f 100644 --- a/tests/python/unit_tests/test_nux/test_plugin.py +++ b/tests/python/unit_tests/test_nux/test_plugin.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from pluginplay import ModuleManager -import nux import unittest +import nux +from pluginplay import ModuleManager + class TestLoadModules(unittest.TestCase): - def test_load_modules(self): self.assertGreater(self.mm.size(), 0)