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

[Bug]: VASP GAMMA version not used when KSPACING is set in INCAR #348

Open
1 of 3 tasks
naik-aakash opened this issue Sep 2, 2024 · 6 comments · May be fixed by #356
Open
1 of 3 tasks

[Bug]: VASP GAMMA version not used when KSPACING is set in INCAR #348

naik-aakash opened this issue Sep 2, 2024 · 6 comments · May be fixed by #356
Labels

Comments

@naik-aakash
Copy link
Contributor

naik-aakash commented Sep 2, 2024

Code snippet

No response

What happened?

  1. Am trying to run some VASP calculations using atomate2 , where I explicitly set KSPACING in the INCAR
  2. Custodian is able to run the VASP job successfully but always uses vasp_std even when KPOINTS resulting from KSPACING is 1x1x1

Expected behaviour

vasp_gam version should be used instead of VASP std.

Potetial fix

Adapt the checks on the following line

if kpts is not None and kpts.style == Kpoints.supported_modes.Gamma and tuple(kpts.kpts[0]) == (1, 1, 1):

Version

2024.6.24

Which OS?

  • MacOS
  • Windows
  • Linux

Log output

No response

@naik-aakash naik-aakash added the bug label Sep 2, 2024
@janosh
Copy link
Member

janosh commented Sep 2, 2024

did you specify gamma_vasp_cmd? it only auto-switches if it finds the vasp gamma executable and the default name it looks for isn't great since afaik it's more commonly named vasp_gam, not self.vasp_cmd + ".gamma"

gamma_vasp_cmd (str): Command for gamma vasp version when
auto_gamma is True. Should follow the list style of
subprocess. Defaults to None, which means ".gamma" is added
to the last argument of the standard vasp_cmd.

@JaGeo
Copy link
Member

JaGeo commented Sep 2, 2024

KSPACING is the important point. We currently don't see how the code is accounting for this.

@rkingsbury
Copy link
Contributor

KSPACING is the important point. We currently don't see how the code is accounting for this.

Right, IIRC when KSPACING is set, then kpts is None and so the check quoted above would fail.

@naik-aakash
Copy link
Contributor Author

did you specify gamma_vasp_cmd? it only auto-switches if it finds the vasp gamma executable and the default name it looks for isn't great since afaik it's more commonly named vasp_gam, not self.vasp_cmd + ".gamma"

gamma_vasp_cmd (str): Command for gamma vasp version when
auto_gamma is True. Should follow the list style of
subprocess. Defaults to None, which means ".gamma" is added
to the last argument of the standard vasp_cmd.

Hi @janosh , yes, I did set the gamma_vasp_cmd in the atomate2 config file, and atomate2 is able to use the gamma version automatically when I do not set KSPACING in the INCAR (this results in the KPOINTS file being explicitly generated). Issue occurs only when KSPACING is set.

@esoteric-ephemera
Copy link
Contributor

@naik-aakash @janosh: we'd need to add either a handler to check for when the KSPACING-generated k-points is 1x1x1 and centered at $\Gamma$, or use this formula from the VASP manual to estimate the k-point grid before running VASP

@shyuep
Copy link
Member

shyuep commented Nov 12, 2024

The VASP gamma code was written in the age before KSPACING was introduced. I am fine with adding logic to check for KSPACING and choosing the gamma version if it results in a 1x1x1 KPOINT. Someone would have to implement it though.

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

Successfully merging a pull request may close this issue.

6 participants