-
Notifications
You must be signed in to change notification settings - Fork 81
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
base: master
Are you sure you want to change the base?
Conversation
Adrian dipole
qcengine/programs/madness/runner.py
Outdated
_defaults = { | ||
"name": "Madness", | ||
"scratch": True, | ||
"thread_safe": True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure about this? I can believe it of madness, but thread safety is uncommon among non-trivial programs.
qcengine/programs/base.py
Outdated
@@ -101,6 +102,7 @@ def list_available_programs() -> Set[str]: | |||
register_program(GAMESSHarness()) | |||
register_program(MolproHarness()) | |||
register_program(NWChemHarness()) | |||
register_program(MadnessHarness()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alphabetize
qcengine/programs/madness/runner.py
Outdated
|
||
""" | ||
qc = which( | ||
"nwchem", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
madness?
qcengine/programs/madness/runner.py
Outdated
|
||
# Log the job settings (LORI) Not sure if i need this | ||
logger.debug("JOB_OPTS") | ||
logger.debug(pp.pformat(opts)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging is wild west at this point
qcengine/programs/madness/runner.py
Outdated
def execute( | ||
self, inputs: Dict[str, Any], *, extra_outfiles=None, extra_commands=None, scratch_name=None, timeout=None | ||
) -> Tuple[bool, Dict]: | ||
success, dexe = execute(inputs["command"], inputs["infiles"],) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll want scratch_directory=inputs["scratch_directory"],
in the execute cmd so that it's user configurable.
+ r".*\s+.*\s+" | ||
+ r"ZZ\s+([+-]?\d+[.]\d+)\s+" | ||
+ r".*\s+.*\s+" | ||
+ r"XY\s+([+-]?\d+[.]\d+)\s+" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if these are floats, the NUMBER
regex def can simplify. also, we're going with the full (redundant) 3x3 quadrupole, rather than 6-element.
assert "provenance" in res | ||
assert res["success"] is True | ||
|
||
# k=7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the k=7
be in keywords somewhere? does madness always use k cutoff rather than basis set or just certain methods?
# 2)Calculation converged | ||
else: | ||
OPTIONS=[r'kinetic',r'nonlocal psp',r'nuclear attraction',r'coulomb',r'PCM',r'exchange-correlation',r'nuclear-repulsion',r'total'] | ||
PSIVAR=['KINETIC ENERGY','NONLOCAL PSP','NUCLEAR ATTRACTION ENERGY','COULOMB','PCM','EXCHANGE-CORRELATION','NUCLEAR REPULSION ENERGY','TOTAL SCF ENERGY'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe collect into AtomicResultProperties directly, since those names will get validated. these aren't "official" psivars/qcvars (but the code that checks names isn't in qcengine).
Update the MADNESS branch
This pull request introduces 14 alerts when merging 5e5c8c5 into 113d1e8 - view on LGTM.com new alerts:
|
This pull request introduces 14 alerts when merging 68a9193 into dd5eec6 - view on LGTM.com new alerts:
|
This pull request introduces 14 alerts when merging 4c74677 into dd5eec6 - view on LGTM.com new alerts:
|
This pull request introduces 14 alerts when merging 3feaf7e into dd5eec6 - view on LGTM.com new alerts:
|
This pull request introduces 14 alerts when merging 839fb03 into dd5eec6 - view on LGTM.com new alerts:
|
This pull request introduces 14 alerts when merging cc192ef into dd5eec6 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
# if keyword.upper() == "MEMORY": | ||
# return keyword.lower(), f"{val} byte" |
Check notice
Code scanning / CodeQL
Commented-out code Note
""" | ||
|
||
# Loop over all steps | ||
pass_psivar = [] |
Check notice
Code scanning / CodeQL
Unused local variable Note
|
||
# Loop over all steps | ||
pass_psivar = [] | ||
pass_coord = [] |
Check notice
Code scanning / CodeQL
Unused local variable Note
# Loop over all steps | ||
pass_psivar = [] | ||
pass_coord = [] | ||
pass_grad = [] |
Check notice
Code scanning / CodeQL
Unused local variable Note
pass_coord = [] | ||
pass_grad = [] | ||
# Write now we split at Converge | ||
counter = 1 |
Check notice
Code scanning / CodeQL
Unused local variable Note
if config.use_mpiexec: | ||
which_prog = create_mpi_invocation(which_prog, config) | ||
else: | ||
command = [which_prog] |
Check notice
Code scanning / CodeQL
Unused local variable Note
|
||
# Location resolution order config.scratch_dir, /tmp | ||
parent = config.scratch_directory | ||
scratch_messy = config.scratch_messy |
Check notice
Code scanning / CodeQL
Unused local variable Note
parent = config.scratch_directory | ||
scratch_messy = config.scratch_messy | ||
|
||
error_message = None |
Check notice
Code scanning / CodeQL
Unused local variable Note
scratch_messy = config.scratch_messy | ||
|
||
error_message = None | ||
compute_success = False |
Check notice
Code scanning / CodeQL
Unused local variable Note
|
||
output_data = {} | ||
|
||
driver = input_model.driver |
Check notice
Code scanning / CodeQL
Unused local variable Note
|
||
import numpy as np | ||
|
||
import qcelemental as qcel |
Check notice
Code scanning / CodeQL
Unused import Note
import numpy as np | ||
|
||
import qcelemental as qcel | ||
from qcelemental.models import AtomicResult, Provenance, AtomicInput |
Check notice
Code scanning / CodeQL
Unused import Note
from qcelemental.util import safe_version, which | ||
from qcengine.config import TaskConfig, get_config | ||
from qcengine.exceptions import UnknownError | ||
from qcengine.programs.mrchem import extract_properties |
Check notice
Code scanning / CodeQL
Unused import Note
from qcengine.config import TaskConfig, get_config | ||
from qcengine.exceptions import UnknownError | ||
from qcengine.programs.mrchem import extract_properties | ||
from .harvester import extract_formatted_properties, tensor_to_numpy |
Check notice
Code scanning / CodeQL
Unused import Note
if run_type == "gradient": | ||
opts["dft__derivatives"] = True | ||
elif run_type == "hessian": | ||
Pass |
Check notice
Code scanning / CodeQL
Statement has no effect Note
Description
This PR creates a new madness directory under programs. The files are the first iterations to setting up madness in qcng. It follows a very similar structure to that of nwchem.
Changelog description
This is the first iteration of setting up qcng to run madness calculations.
Status