[SUGGESTION] berny procedure engine specification change
Is your feature request related to a problem? Please describe.
The BernyProcedure currently gets the compute engine to use from the keywords dictionary used to define keywords for the optimization procedure. I think it would be cleaner to get the engine value from the specification of the compute model instead. This would keep all keywords related to the compute engine in one dictionary, and all keywords related to the optimization in the other keywords dictionary.
The way it currently is
water = Molecule.from_data("pubchem:water")
input_spec = QCInputSpecification(
driver="gradient",
model={"method": "b3lyp", "basis": "6-31g"},
# Keywords for compute engine
keywords={"psi4keyword": "psi4value"},
)
opt_input = OptimizationInput(
initial_molecule=water,
input_specification=input_spec,
protocols={"trajectory": "all"},
# Define compute engine and keywords for pyberny
# This seems an odd combination of keywords
keywords={"program": "psi4", "bernykeyword": "bernyvalue"},
)
qcng.compute_procedure(opt_input, 'berny')
Then this line gets the "program" keyword to get a compute engine.
Describe the solution you'd like
water = Molecule.from_data("pubchem:water")
input_spec = QCInputSpecification(
driver="gradient",
model={"method": "b3lyp", "basis": "6-31g"},
# QC program and its associated keywords kept together
keywords={"program": "psi4", "psi4keyword": "psi4value"},
)
opt_input = OptimizationInput(
initial_molecule=water,
input_specification=input_spec,
protocols={"trajectory": "all"},
# Don't mix the program definition with keywords specific to the optimizer
keywords={"bernykeyword1": "bernyvalue1"},
)
qcng.compute_procedure(opt_input, 'berny')
Change this line as follows:
Current:
program = input_data["keywords"].pop("program")
Desired:
program = comput["keywords"].pop("program")
Since geometric uses a different (internal) mechanism for accessing compute engines, this change would only affect the BernyProcedure
Actually, perhaps the confusion (for me) around where the "program" is defined would be better addressed by this proposal instead, which seeks to improve a few of the issues I came across while implementing various procedures. https://github.com/MolSSI/QCElemental/issues/264