Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running Madness with QCengine #242

Open
wants to merge 126 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 124 commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
8e34efc
Merge pull request #6 from ahurta92/adrian-Dipole
ahurta92 Jan 30, 2020
00de251
Formating and added preceding 0
ahurta92 Jan 30, 2020
e5f3c63
Merge branch 'master' of https://github.com/ahurta92/QCEngine
ahurta92 Mar 19, 2020
ab8ec4c
Merge remote-tracking branch 'upstream/master'
ahurta92 Apr 21, 2020
f59dbc9
add madness dir
ahurta92 Apr 23, 2020
f368814
init madness dir
ahurta92 Apr 23, 2020
8d7ac78
changin base and test to add madness
ahurta92 Apr 23, 2020
eb0bc38
Add madnessHarness to qca
ahurta92 Apr 23, 2020
e695d7d
first attempt at get_version
ahurta92 Apr 23, 2020
fb3570a
Got a version of get_version that may work
ahurta92 Apr 24, 2020
7d6a24a
simple build_input
ahurta92 Apr 24, 2020
b83169e
simple execuate function
ahurta92 Apr 25, 2020
3a00543
add madness pytest dft w/ xc hf
ahurta92 Apr 25, 2020
61cfa4a
updating
ahurta92 Apr 26, 2020
4a05965
got variables for scf calculation
ahurta92 Apr 27, 2020
82352ff
add gopts method to germinate
ahurta92 Apr 27, 2020
18b721a
added h20MAD for debuggin I think I can get rid of this
ahurta92 Apr 27, 2020
43ec24a
pytest passed madness with h20()
ahurta92 Apr 27, 2020
0e7668c
split output by Converged! STILL Need to read format stuff
ahurta92 Apr 27, 2020
98e0f4c
wrote compute, fix mol.keywords, wrote parse_output
ahurta92 Apr 27, 2020
70b0c15
make format
ahurta92 Apr 28, 2020
61bbf8e
alphabetize
ahurta92 May 4, 2020
2c28fb6
which madness and use helium for command
ahurta92 May 4, 2020
b9d24a2
add scratch_directory to input for execute
ahurta92 May 4, 2020
b1b05fc
the quadrupole work should have been in a different branch
ahurta92 May 4, 2020
2e6c2fc
added k=7 to keywords of test. k=7 is a default but its okay to define
ahurta92 May 4, 2020
7c4f2d8
limit to collecting qc vars in results.py
ahurta92 May 4, 2020
0312265
return scf_exchange_correlation
ahurta92 May 4, 2020
4eb4a75
Add none
ahurta92 May 4, 2020
8e73a4f
make format
ahurta92 May 4, 2020
379c96f
move madness test into separate file
ahurta92 May 5, 2020
dfe6afd
got rid of stuff from nwchem
ahurta92 May 6, 2020
5829ad4
format
ahurta92 May 6, 2020
d6a83d6
add madness dir
ahurta92 Apr 23, 2020
f16796d
init madness dir
ahurta92 Apr 23, 2020
bfa4c55
changin base and test to add madness
ahurta92 Apr 23, 2020
4c306e8
Add madnessHarness to qca
ahurta92 Apr 23, 2020
739c5b5
first attempt at get_version
ahurta92 Apr 23, 2020
e2d83be
Got a version of get_version that may work
ahurta92 Apr 24, 2020
9d4c5f0
simple build_input
ahurta92 Apr 24, 2020
103c031
simple execuate function
ahurta92 Apr 25, 2020
e9d8f3c
add madness pytest dft w/ xc hf
ahurta92 Apr 25, 2020
1373f71
updating
ahurta92 Apr 26, 2020
0cba478
got variables for scf calculation
ahurta92 Apr 27, 2020
8b20a74
add gopts method to germinate
ahurta92 Apr 27, 2020
41e0149
added h20MAD for debuggin I think I can get rid of this
ahurta92 Apr 27, 2020
0574ffe
pytest passed madness with h20()
ahurta92 Apr 27, 2020
56ffcf5
split output by Converged! STILL Need to read format stuff
ahurta92 Apr 27, 2020
b6c21cb
wrote compute, fix mol.keywords, wrote parse_output
ahurta92 Apr 27, 2020
8b93e47
make format
ahurta92 Apr 28, 2020
9d8c950
alphabetize
ahurta92 May 4, 2020
f5bb2d8
which madness and use helium for command
ahurta92 May 4, 2020
acc9bda
add scratch_directory to input for execute
ahurta92 May 4, 2020
98f59be
the quadrupole work should have been in a different branch
ahurta92 May 4, 2020
38aa762
added k=7 to keywords of test. k=7 is a default but its okay to define
ahurta92 May 4, 2020
19f002e
limit to collecting qc vars in results.py
ahurta92 May 4, 2020
eb21253
return scf_exchange_correlation
ahurta92 May 4, 2020
32fce65
Add none
ahurta92 May 4, 2020
eabe89d
make format
ahurta92 May 4, 2020
f18a0de
move madness test into separate file
ahurta92 May 5, 2020
f4f89f9
got rid of stuff from nwchem
ahurta92 May 6, 2020
a30be69
format
ahurta92 May 6, 2020
19baac9
Merge branch 'MADNESS' of https://github.com/ahurta92/QCEngine into M…
ahurta92 May 11, 2020
1d33d2b
get rid of extra arguments
ahurta92 May 11, 2020
4a316f2
Merge branch 'master' into MADNESS
ahurta92 May 12, 2020
20be271
make format
ahurta92 May 12, 2020
0357d40
remove some imports and format
ahurta92 May 18, 2020
5df4552
Merge branch 'master' of https://github.com/MolSSI/QCEngine into MADNESS
ahurta92 Jun 24, 2020
82d110b
add @using("madness") to madness test
ahurta92 Jun 25, 2020
100656e
qca looks for moldft executable for scf calculations
ahurta92 Jun 28, 2020
a7d86eb
debugging madness harvester...split by "Converged!"
ahurta92 Jun 28, 2020
5a10bf5
trying to debug harvester...Converged!
ahurta92 Jun 28, 2020
e937e62
using moldft executable...it's easier for now
ahurta92 Jun 28, 2020
c632313
change test values to reflect changes in master madness
ahurta92 Jun 28, 2020
6eb6491
Merge branch 'MADNESS' of https://github.com/ahurta92/QCEngine into M…
ahurta92 Jun 28, 2020
afd940b
Getting rid of debugging print statemtments
ahurta92 Jun 28, 2020
b87a7a8
Merge branch 'master' of https://github.com/MolSSI/QCEngine into MADNESS
ahurta92 Aug 17, 2020
72e3ec5
Merge pull request #7 from MolSSI/master
ahurta92 Aug 17, 2020
af74ce2
Merge branch 'MADNESS' into master
ahurta92 Aug 17, 2020
f8b64bf
Merge pull request #8 from ahurta92/master
ahurta92 Aug 17, 2020
00a4974
Merge branch 'MADNESS' of https://github.com/ahurta92/QCEngine into M…
ahurta92 Aug 17, 2020
f8e70ca
formatting
ahurta92 Aug 17, 2020
f250cff
comments- don't use mpi command as default
ahurta92 Aug 18, 2020
53fc940
add lda to list of functionals
ahurta92 Aug 18, 2020
cc9c9b4
Merge branch 'master' of https://github.com/MolSSI/QCEngine into MADNESS
ahurta92 Jun 9, 2021
09f55e3
Merge branch 'master' of github.com:MolSSI/QCEngine
ahurta92 Sep 29, 2021
5243a46
Merge branch 'master' of https://github.com/MolSSI/QCEngine
ahurta92 Nov 17, 2021
69c3cd0
black formatting
ahurta92 Nov 17, 2021
c073146
Merge branch 'master' of https://github.com/MolSSI/QCEngine
ahurta92 Jan 4, 2022
8479cf8
Get runner.py to read moldft using new format
ahurta92 Jan 5, 2022
4699aa1
read new moldft output
ahurta92 Jan 5, 2022
1ebe945
Set up initial molresponse runner.
ahurta92 Jan 8, 2022
9085d52
Run black
ahurta92 Jan 8, 2022
835920b
Add initial molresponse test
ahurta92 Jan 8, 2022
e85db37
Add initial molresponse runner and test
ahurta92 Jan 11, 2022
7e74828
black formatting
ahurta92 Jan 11, 2022
240f48f
harvest using the new scf_info and calcinfo json files
ahurta92 Jan 18, 2022
3a35cc9
build input can now deal with geomtry related keywords like "eprec"
ahurta92 Jan 18, 2022
924ffb1
Update germinate.py
ahurta92 Feb 11, 2022
16b0182
We now use json files to read output
ahurta92 Feb 11, 2022
921ad3d
Merge master into MADNESS branch
ahurta92 Feb 11, 2022
a980001
formatting
ahurta92 Feb 11, 2022
59acb7e
Merge remote-tracking branch 'upstream/master' into MADNESS
ahurta92 Feb 11, 2022
508cabe
Merge remote-tracking branch 'upstream/master' into MADNESS
ahurta92 Jun 15, 2022
f89847c
some additions
ahurta92 Jun 15, 2022
4e6e977
Merge branch 'MolSSI:master' into master
ahurta92 Jun 24, 2022
ea814e5
formatting
ahurta92 Jun 24, 2022
5e5c8c5
Merge pull request #9 from ahurta92/master
ahurta92 Jun 24, 2022
68a9193
fix the geometry input for get_version function
ahurta92 Jun 27, 2022
4c74677
remove reading scf_info.json
ahurta92 Jun 28, 2022
3feaf7e
first attempt at saving calc_info.json into "native_files"
ahurta92 Jun 28, 2022
2a70856
save calc_info.json in results.extras[outfiles][calcinfo.json]
ahurta92 Jun 28, 2022
839fb03
remove native_files line
ahurta92 Jun 28, 2022
cc192ef
Merge remote-tracking branch 'upstream/master' into MADNESS
ahurta92 Jun 29, 2022
54b09b4
save calc_info json as dictionary into extras
ahurta92 Jul 13, 2022
3db2391
black
ahurta92 Jul 13, 2022
c04a005
save calc json and input in native files
ahurta92 Jul 14, 2022
b1b23b0
Merge remote-tracking branch 'upstream/master'
ahurta92 Jul 14, 2022
170d422
Merge
ahurta92 Feb 29, 2024
cc86262
typo
ahurta92 Mar 6, 2024
48bffb7
MADNESS runs
ahurta92 Mar 6, 2024
d14841b
Ran black....was this a mistake?
ahurta92 Mar 6, 2024
a1c1b96
Starting new implementation for multiple executables
ahurta92 Mar 27, 2024
fd9fb82
A running implementation that can run both moldft and molresponse
ahurta92 Apr 8, 2024
3de261b
format
ahurta92 Apr 8, 2024
cbe29d9
Add some test lines
ahurta92 Apr 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions devtools/scripts/conda_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import subprocess as sp

# Args
parser = argparse.ArgumentParser(description='Creates a conda environment from file for a given Python version.')
parser.add_argument('-n', '--name', type=str, nargs=1, help='The name of the created Python environment')
parser.add_argument('-p', '--python', type=str, nargs=1, help='The version of the created Python environment')
parser.add_argument('conda_file', nargs='*', help='The file for the created Python environment')
parser = argparse.ArgumentParser(description="Creates a conda environment from file for a given Python version.")
parser.add_argument("-n", "--name", type=str, nargs=1, help="The name of the created Python environment")
parser.add_argument("-p", "--python", type=str, nargs=1, help="The version of the created Python environment")
parser.add_argument("conda_file", nargs="*", help="The file for the created Python environment")

args = parser.parse_args()

Expand Down
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
2 changes: 1 addition & 1 deletion examples/terachem_pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
model={"method": "pbe0", "basis": "6-31g"},
)
ret = prog.compute(inp)
print(ret)
print(ret)
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
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
2 changes: 2 additions & 0 deletions qcengine/programs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .mp2d import MP2DHarness
from .mrchem import MRChemHarness
from .nwchem import NWChemHarness
from .madness import MadnessHarness
from .openmm import OpenMMHarness
from .psi4 import Psi4Harness
from .qchem import QChemHarness
Expand Down Expand Up @@ -108,6 +109,7 @@ def list_available_programs() -> Set[str]:
register_program(CFOURHarness())
register_program(EntosHarness()) # Duplicate of Qcore harness to transition the namespace, to be deprecated
register_program(GAMESSHarness())
register_program(MadnessHarness())
register_program(MRChemHarness())
register_program(MolproHarness())
register_program(NWChemHarness())
Expand Down
2 changes: 1 addition & 1 deletion qcengine/programs/cfour/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def build_input(

# Handle memory
# for cfour, [GiB] --> [QW]
opts["memory_size"] = int(config.memory * (1024**3) / 8)
opts["memory_size"] = int(config.memory * (1024 ** 3) / 8)
opts["mem_unit"] = "integerwords"

# Handle molecule
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
1 change: 1 addition & 0 deletions qcengine/programs/madness/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .runner import MadnessHarness
59 changes: 59 additions & 0 deletions qcengine/programs/madness/germinate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
from typing import Any, Dict, Tuple

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Tuple' is not used.

from qcengine.exceptions import InputError

# List of XC functionals known to NWChem
_xc_functionals = [
"hf",
"lda",
"b3lyp",
]


def muster_modelchem(
method: str,
derint: int,
) -> Dict[str, Any]:
"""Converts the QC method into MADNESS keywords
Options include energy calculation with moldft
Geometry optimization with moldft
propreties calculation with molresponse...runs moldft then molresponse

Args:
method (str): Name of the QC method to use
derint (str): Index of the run type
Returns:
(dict): Any options for MADNESS
"""

# Standardize the method name
method = method.lower()

# Initialize the options
opts = {}
moldft_opts = opts["moldft"] = {}
molresponse_opts = opts["molresponse"] = {}

runtyp = {"energy": "energy", "optimization": "gopt", "hessian": "hessian", "properties": "response"}[derint]

# Write out the theory directive
if runtyp == "energy":
if method == "optimization":
moldft_opts["dft__gopt"] = True

elif method.split()[0] in _xc_functionals:
moldft_opts["dft__xc"] = method

else:
raise InputError(f"Method not recognized: {method}")
elif runtyp == "response":
if method.split()[0] in _xc_functionals:

moldft_opts["dft__xc"] = method
molresponse_opts["response__xc"] = method
molresponse_opts["response__archive"] = "restartdata"

else:
raise InputError(f"Method not recognized: {method}")

return opts
Loading
Loading