-
Notifications
You must be signed in to change notification settings - Fork 82
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
GAMESS EFP Support #256
base: master
Are you sure you want to change the base?
GAMESS EFP Support #256
Conversation
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.
looking good
efpcmd = input_model.molecule.extras["efp"] | ||
gamessrec["infiles"]["gamess.inp"] = optcmd + efpcmd + molcmd | ||
else: | ||
gamessrec["infiles"]["gamess.inp"] = optcmd + molcmd |
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.
what's in molecule.extras["efp"]
again? I don't recall it from MolSSI/QCElemental#124 (comment) (though that needn't be a strict blueprint).
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.
I suppose I should rename that variable from molecule.extras["efp"]
to molecule.extras["efp_molecule"]
in order to be more consistent with the blueprint. In the blueprint, molecule.extras["efp_molecule"]
is a schema-like dictionary defining all of the fragment locations and potentials. In this PR, molecule.extras["efp_molecule"]
is instead expected to be an equivalent GAMESS-ready string, which is directly inserted into the input file.
This is a short-tem solution. Eventually, we need an input-parsing function that takes in your efp_molecule
and converts it to the GAMESS-ready string. I held off on doing this right away because I wasn't sure how final the blueprint was.
I added an example script to the PR description that demonstrates how you'd run MAKEFP and then get an EFP interaction energy. This will give you a better idea of what the efp_molecule
string looks like in this PR.
@@ -445,6 +537,10 @@ def harvest_outfile_pass(outtext): | |||
qcvar["CURRENT REFERENCE ENERGY"] = qcvar["DFT TOTAL ENERGY"] | |||
qcvar["CURRENT ENERGY"] = qcvar["DFT TOTAL ENERGY"] | |||
|
|||
if "EFP TOTAL ENERGY" in qcvar: | |||
qcvar["CURRENT REFERENCE ENERGY"] = qcvar["EFP TOTAL 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.
unless something needs it, maybe drop the current ref line. it's questionable.
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.
I had to add that line since CURRENT REFERENCE ENERGY
is expected here:
QCEngine/qcengine/programs/gamess/runner.py
Line 155 in 4525eb3
retres = qcvars[f"CURRENT {input_model.driver.upper()}"] |
What exactly is questionable about it? Would setting CURRENT ENERGY
make more sense? Does CURRENT REFERENCE ENERGY
imply a full QM calculation?
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 you could get away with CURRENT ENERGY
only that'd be better, but if CURRENT REFERENCE ENERGY
needed, fine. It's questionable b/c it's an interaction energy like SAPT rather than a total energy.
print("matched efp") | ||
qcvar["EFP ELECTROSTATIC ENERGY"] = mobj.group(1) | ||
qcvar["EFP REPULSION ENERGY"] = mobj.group(2) | ||
qcvar["EFP POLARIZATION ENERGY"] = mobj.group(3) |
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.
nice for now, may have to revisit in future. i'm against a 3rd labels set. https://github.com/loriab/pylibefp/blob/master/pylibefp/wrapper.py#L961-L966
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.
Noted, that's going to be a headache later on
Description
Adds support for GAMESS's MAKEFP method, which performs a single-point energy calculation on a monomer, then generates an effective fragment potential (EFP) from the wavefunction of that monomer. A MAKEFP calculation is specified with QCEngine by appending
-makefp
to the name of the method (i.e.hf-makefp
runs MAKEFP at the Hartree-Fock level). The EFP file generated by GAMESS is stored inextras
->outfiles
->gamess.efp
.Also adds support for GAMESS calculations that make use of EFPs. To run an EFP calculation, the user must provide the entire GAMESS
$EFRAG
block as a string (this block contains fragment positions as well as the fragment potential(s) generated with MAKEFP). This string is expected inMolecule
->extras
->efp
.Some things that would help with this (relevant to MolSSI/QCElemental#124):
Molecule
. (Since EFP fragments are are input throughMolecule.extras
, aMolecule
used in EFP calculations will have no actual QM-treated atoms.)$EFRAG
block.An example script demonstrating how both of these new features can be used together:
GAMESS EFP Demo
Changelog description
Support for generating GAMESS EFP and calculations using EFPs
Status