Skip to content

Commit

Permalink
Ran black....was this a mistake?
Browse files Browse the repository at this point in the history
  • Loading branch information
ahurta92 committed Mar 6, 2024
1 parent 48bffb7 commit d14841b
Show file tree
Hide file tree
Showing 25 changed files with 80 additions and 63 deletions.
96 changes: 48 additions & 48 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import os
import sys

sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath("../.."))
import qcengine

# -- Path setup --------------------------------------------------------------
Expand All @@ -26,9 +26,9 @@

# -- Project information -----------------------------------------------------

project = 'QCEngine'
copyright = f'2018-{datetime.datetime.today().year}, The Molecular Sciences Software Institute'
author = 'The QCArchive Development Team'
project = "QCEngine"
copyright = f"2018-{datetime.datetime.today().year}, The Molecular Sciences Software Institute"
author = "The QCArchive Development Team"

# The short X.Y version
version = qcengine.__version__
Expand All @@ -46,26 +46,26 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.extlinks',
'sphinx.ext.graphviz',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'sphinx_automodapi.automodapi',
'sphinx_automodapi.automodsumm',
'sphinx_automodapi.smart_resolver',
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.doctest",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.extlinks",
"sphinx.ext.graphviz",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx_automodapi.automodapi",
"sphinx_automodapi.automodsumm",
"sphinx_automodapi.smart_resolver",
"sphinx_autodoc_typehints",
"sphinxcontrib.autodoc_pydantic",
]

autosummary_generate = True
automodapi_toctreedirnm = 'api'
automodapi_toctreedirnm = "api"
autodoc_typehints = "description"
napoleon_use_param = True
napoleon_use_rtype = True
Expand All @@ -74,16 +74,16 @@
autodoc_pydantic_field_swap_name_and_alias = True

# 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.
Expand All @@ -98,15 +98,15 @@
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'default'
pygments_style = "default"


# -- Options for HTML output -------------------------------------------------

# 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
Expand All @@ -117,7 +117,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.
Expand All @@ -133,7 +133,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'QCEnginedoc'
htmlhelp_basename = "QCEnginedoc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -142,15 +142,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',
Expand All @@ -160,19 +157,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'QCEngine.tex', 'QCEngine Documentation',
'The QCArchive Development Team', 'manual'),
(master_doc, "QCEngine.tex", "QCEngine Documentation", "The QCArchive Development Team", "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, 'qcengine', 'QCEngine Documentation',
[author], 1)
]
man_pages = [(master_doc, "qcengine", "QCEngine Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -181,30 +174,37 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'QCEngine', 'QCEngine Documentation',
author, 'QCEngine', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"QCEngine",
"QCEngine Documentation",
author,
"QCEngine",
"One line description of project.",
"Miscellaneous",
),
]


# -- Extension configuration -------------------------------------------------

extlinks = {
'issue': ('https://github.com/MolSSI/QCEngine/issues/%s', 'GH#%s'),
'pr': ('https://github.com/MolSSI/QCEngine/pull/%s', 'GH#%s')
"issue": ("https://github.com/MolSSI/QCEngine/issues/%s", "GH#%s"),
"pr": ("https://github.com/MolSSI/QCEngine/pull/%s", "GH#%s"),
}

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('https://docs.python.org/3.10', None),
"numpy": ("https://numpy.org/doc/stable/", None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
"qcelemental": ("http://docs.qcarchive.molssi.org/projects/QCElemental/en/latest/", None),
"qcportal": ("http://docs.qcarchive.molssi.org/projects/QCPortal/en/latest/", None),
"qcfractal": ("http://docs.qcarchive.molssi.org/projects/QCFractal/en/latest/", None),
}
intersphinx_mapping = {
"python": ("https://docs.python.org/3.10", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
"qcelemental": ("http://docs.qcarchive.molssi.org/projects/QCElemental/en/latest/", None),
"qcportal": ("http://docs.qcarchive.molssi.org/projects/QCPortal/en/latest/", None),
"qcfractal": ("http://docs.qcarchive.molssi.org/projects/QCFractal/en/latest/", None),
}

# -- Options for todo extension ----------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions qcengine/compute.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Integrates the computes together
"""

import warnings
from typing import TYPE_CHECKING, Any, Dict, Optional, Union

Expand Down
2 changes: 1 addition & 1 deletion qcengine/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_global(key: Optional[str] = None) -> Union[str, Dict[str, Any]]:
if _global_values is None:
_global_values = {}
_global_values["hostname"] = socket.gethostname()
_global_values["memory"] = round(psutil.virtual_memory().available / (1024 ** 3), 3)
_global_values["memory"] = round(psutil.virtual_memory().available / (1024**3), 3)
_global_values["username"] = getpass.getuser()

# Work through VMs and logical cores.
Expand Down
1 change: 1 addition & 0 deletions qcengine/mdi_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
For details regarding MDI, see https://molssi.github.io/MDI_Library/html/index.html.
"""

from typing import Any, Dict, List, Optional

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/adcc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Calls adcc
"""

from typing import TYPE_CHECKING, Dict

from qcelemental.models import AtomicResult, BasisSet, Provenance
Expand Down
6 changes: 3 additions & 3 deletions qcengine/programs/empirical_dispersion_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,9 +1159,9 @@ def from_arrays(
"d3mbj2b",
]
for d in ["d3zero", "d3bj", "d3mzero", "d3mbj"]:
psi4.procrouting.empirical_dispersion._capable_engines_for_disp[
d + "2b"
] = psi4.procrouting.empirical_dispersion._capable_engines_for_disp.pop(d)
psi4.procrouting.empirical_dispersion._capable_engines_for_disp[d + "2b"] = (
psi4.procrouting.empirical_dispersion._capable_engines_for_disp.pop(d)
)
except ImportError:
pass

Expand Down
2 changes: 1 addition & 1 deletion qcengine/programs/gamess/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def build_input(
# * docs on mwords: "This is given in units of 1,000,000 words (as opposed to 1024*1024 words)"
# * docs: "the memory required on each processor core for a run using p cores is therefore MEMDDI/p + MWORDS."
# * int() rounds down
mwords_total = int(config.memory * (1024 ** 3) / 8e6)
mwords_total = int(config.memory * (1024**3) / 8e6)

for mem_frac_replicated in (1, 0.5, 0.1, 0.75):
mwords, memddi = self._partition(mwords_total, mem_frac_replicated, config.ncores)
Expand Down
4 changes: 2 additions & 2 deletions qcengine/programs/molpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def build_input(
unrestricted = True

# Memory is in megawords per core for Molpro
memory_mw_core = int(config.memory * (1024 ** 3) / 8e6 / config.ncores)
memory_mw_core = int(config.memory * (1024**3) / 8e6 / config.ncores)
input_file.append("memory,{},M".format(memory_mw_core))
input_file.append("")

Expand Down Expand Up @@ -338,7 +338,7 @@ def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") ->
molpro_variable_map = {
"_ENUC": "nuclear_repulsion_energy",
"_DFTFUN": "scf_xc_energy",
"_NELEC": ["calcinfo_nalpha", "calcinfo_nbeta"]
"_NELEC": ["calcinfo_nalpha", "calcinfo_nbeta"],
# "_EMP2_SCS": "scs_mp2_total_energy"
}

Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/mopac.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Calls the Psi4 executable.
"""

import os
from typing import Any, Dict, List, Optional, Tuple

Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/mrchem.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Calls the MRChem executable.
"""

import copy
import json
import logging
Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/nwchem/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Known errors for NWChem"""

import logging
from typing import Any, Dict

Expand Down
6 changes: 3 additions & 3 deletions qcengine/programs/nwchem/harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ def harvest_outfile_pass(outtext):
if ext_energy_list[nroot] in e_val:
symm = k
# in hartree
psivar[
f"EOM-{cc_name} ROOT 0 -> ROOT {nroot + 1} EXCITATION ENERGY - {symm} SYMMETRY"
] = ext_energy_list[nroot]
psivar[f"EOM-{cc_name} ROOT 0 -> ROOT {nroot + 1} EXCITATION ENERGY - {symm} SYMMETRY"] = (
ext_energy_list[nroot]
)
psivar[f"EOM-{cc_name} ROOT 0 -> ROOT {nroot + 1} TOTAL ENERGY - {symm} SYMMETRY"] = psivar[
f"{cc_name} TOTAL ENERGY"
] + Decimal(ext_energy_list[nroot])
Expand Down
3 changes: 2 additions & 1 deletion qcengine/programs/nwchem/runner.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Calls the NWChem executable.
"""

import copy
import hashlib
import logging
Expand Down Expand Up @@ -168,7 +169,7 @@ def build_input(
# * int() rounds down
# * was [GiB] --> [B] c. v6.6 but fails in v7.0 probably b/c https://github.com/nwchemgit/nwchem/commit/fca382eab477c3e85548457bfceb1fc9be31b47c#diff-7baaf4807cc9b853af14d9127f63db47d706e12f697a98560bc98bb647ef8326
# * memory_size = int(config.memory * (1024 ** 3))
memory_size = int(config.memory * (1024 ** 3) / 8)
memory_size = int(config.memory * (1024**3) / 8)
if config.use_mpiexec: # It is the memory per MPI rank
memory_size //= config.nnodes * config.ncores // config.cores_per_rank
opts["memory"] = memory_size
Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/openmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Requires RDKit
"""

import datetime
import hashlib
import os
Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/psi4.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Calls the Psi4 executable.
"""

import json
import os
import sys
Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/terachem_frontend.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Harness for TeraChem Frontend"""

import logging
from os import getenv
from typing import Any, Dict
Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/terachem_pbs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Calls TeraChem in its "server mode" via a protobuf interface.
"""

import logging
from importlib import import_module
from os import getenv
Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/tests/test_adcc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for adcc functionality"""

import numpy as np
import pytest
import qcelemental as qcel
Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/tests/test_canonical_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests the DQM compute dispatch module
"""

import pprint
import re
import sys
Expand Down
1 change: 1 addition & 0 deletions qcengine/programs/tests/test_mrchem.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for MRChem functionality"""

import numpy as np
import pytest
import qcelemental as qcel
Expand Down
Loading

0 comments on commit d14841b

Please sign in to comment.