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

How to specifiy response properties in qcschema jobs #3129

Open
jthorton opened this issue Jan 31, 2024 · 0 comments
Open

How to specifiy response properties in qcschema jobs #3129

jthorton opened this issue Jan 31, 2024 · 0 comments

Comments

@jthorton
Copy link

jthorton commented Jan 31, 2024

Describe the bug
I wish to calculate the dipole polarizabilities using psi4 but the way to specify this is not clear. In an energy calculation, I can supply a list of scf properties in the keywords like so

from qcelemental.models.common_models import Model
from qcelemental.models import AtomicInput, Molecule
import qcengine

mol = Molecule.from_data("""
     O  0.0  0.000  -0.129
     H  0.0 -1.494  1.027
     H  0.0  1.494  1.027
     """)
# create the psi4 job
spec = Model(method="HF", basis="3-21g")
task = AtomicInput(
    molecule=mol,
    driver="energy",
    keywords={"scf_properties": ["MBIS_CHARGES"]},
    model=spec
)
result = qcengine.compute(input_data=task, raise_error=True, task_config={"ncores":1}, program="psi4")
print(result.dict())

but the properties driver requires a more complicated definition of keywords

from qcelemental.models.common_models import Model
from qcelemental.models import AtomicInput, Molecule
import qcengine

mol = Molecule.from_data("""
     O  0.0  0.000  -0.129
     H  0.0 -1.494  1.027
     H  0.0  1.494  1.027
     """)
# create the psi4 job
spec = Model(method="HF", basis="3-21g")
task = AtomicInput(
    molecule=mol,
    driver="properties",
    keywords={"function_kwargs": {"properties": ["dipole_polarizabilities"]}},
    model=spec
)
result = qcengine.compute(input_data=task, raise_error=True, task_config={"ncores":1}, program="psi4")
print(result.dict())

would it be possible to make this simpler and remove the need to have function_kwargs or even allow the inputs to be the same as all scf properties seem to also be valid inputs for the property calculation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant