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

fix pw setting for molecule in XPS calculation #625

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Changes from all commits
Commits
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
14 changes: 8 additions & 6 deletions src/aiidalab_qe/plugins/xps/workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# supercell min parameter for different protocols
supercell_min_parameter_map = {
"fast": 4.0,
"moderate": 6.0,
"precise": 8.0,
"moderate": 8.0,
"precise": 12.0,
}


Expand Down Expand Up @@ -60,12 +60,15 @@ def get_builder(codes, structure, parameters, **kwargs):
"is_molecule_input": Bool(is_molecule_input),
}
pw_code = codes.get("pw", None)
overrides_ch_scf = deepcopy(parameters["advanced"])
if is_molecule_input:
overrides_ch_scf["pw"]["parameters"]["SYSTEM"]["assume_isolated"] = "mt"
overrides = {
"relax": {
"base": deepcopy(parameters["advanced"]),
"base_final_scf": deepcopy(parameters["advanced"]),
},
"ch_scf": deepcopy(parameters["advanced"]),
"ch_scf": overrides_ch_scf,
}
builder = XpsWorkChain.get_builder_from_protocol(
code=pw_code,
Expand All @@ -85,11 +88,10 @@ def get_builder(codes, structure, parameters, **kwargs):
)
builder.pop("relax")
builder.pop("clean_workdir", None)
# there is a bug in aiida-quantumespresso xps, that one can not set the kpoints
# this is fxied in a PR, but we need to wait for the next release.
# we set a large kpoints_distance value to set the kpoints to 1x1x1
if is_molecule_input:
# set a large kpoints_distance value to set the kpoints to 1x1x1
builder.ch_scf.kpoints_distance = Float(5)
builder.ch_scf.pw.settings = Dict(dict={"gamma_only": True})
return builder


Expand Down
Loading