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 119 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
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)
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
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
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
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
141 changes: 141 additions & 0 deletions qcengine/programs/madness/germinate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
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",
"acm",
"b3lyp",
"beckehandh",
"pbe0",
"becke97",
"becke97-1",
"becke97-2",
"becke97-3",
"becke97-d",
"becke98",
"hcth",
"hcth120",
"hcth147",
"hcth407",
"becke97gga1",
"hcth407p",
"mpw91",
"mpw1k",
"xft97",
"cft97",
"ft97",
"op",
"bop",
"pbeop",
"xpkzb99",
"cpkzb99",
"xtpss03",
"ctpss03",
"xctpssh",
"b1b95",
"bb1k",
"mpw1b95",
"mpwb1k",
"pw6b95",
"pwb6k",
"m05",
"m05-2x",
"vs98",
"m06",
"m06-hf",
"m06-L",
"m06-2x",
"HFexch",
"becke88",
"xperdew91",
"xpbe96",
"gill96",
"lyp",
"perdew81",
"perdew86",
"perdew91",
"cpbe96",
"pw91lda",
"slater",
"vwn_1",
"vwn_2",
"vwn_3",
"vwn_4",
"vwn_5",
"vwn_1_rpa",
"xtpss03",
"ctpss03",
"bc95",
"xpw6b95",
"xpwb6k",
"xm05",
"xm05-2x",
"cpw6b95",
"cpwb6k",
"cm05",
"cm05-2x",
"xvs98",
"cvs98",
"xm06-L",
"xm06-hf",
"xm06",
"xm06-2x",
"cm06-L",
"cm06-hf",
"cm06",
"cm06-2x",
]


# def muster_modelchem(method: str, derint: int, use_tce: bool) -> Tuple[str, Dict[str, Any]]:
def muster_modelchem(
method: str,
derint: int,
) -> Tuple[str, Dict[str, Any]]:
"""Converts the QC method into MADNESS keywords
Options include energy calculation with moldft
Geometry optimiazation 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:
(str): Task command for MADNESS
(dict): Any options for MADNESS
"""

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

opts = {}

# Map the run type to
# runtyp = {"energy": "energy", "gradient": "gradient", "hessian": "hessian", "properties": "property"}[derint]
runtyp = {"energy": "energy", "optimization": "gopt", "hessian": "hessian", "properties": "molresponse"}[derint]

# Write out the theory directive
if runtyp == "energy":
if method == "optimization":
opts["dft__gopt"] = True
elif method.split()[0] in _xc_functionals:
opts["dft__xc"] = method
else:
raise InputError(f"Method not recognized: {method}")
mdccmd = f""
elif runtyp == "molresponse":
if method.split()[0] in _xc_functionals:
opts["dft__xc"] = method
opts["response__xc"] = method
opts["response__archive"] = "restartdata"
else:
raise InputError(f"Method not recognized: {method}")
mdccmd = f"response" ## we will split the options with the word response later

## all we have to do is add options to the dft block in order to change the run type
## default in energy
# do nothing
return mdccmd, opts
Fixed Show fixed Hide fixed
Loading
Loading