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

dont write kpoints file #558

Merged
merged 4 commits into from Mar 11, 2022
Merged

dont write kpoints file #558

merged 4 commits into from Mar 11, 2022

Conversation

Leimeroth
Copy link
Member

Bcause it is possible to use KSPACING in INCAR and I have to calculate some data in a consistent manner with that setting so I need an option to not write the KPOINTS file.

This is an ugly workaround so I am open to other suggestions. Also it does not get stored in hdf, but the hdf storage of GenericParameters looks mysterious to me and I didn't want to put too much effort into the ugly workaround.

@Leimeroth Leimeroth added enhancement New feature or request help wanted Extra attention is needed format_black reformat the code using the black standard labels Mar 8, 2022
@pmrv
Copy link
Contributor

pmrv commented Mar 8, 2022

Vasp.set_kpoints() allows for k_mesh_spacing, but we calculate the k-points on our own in this case. Is it possible for you to use this or do you want to use strict consistency with calculations performed outside pyiron? If so does it make sense to drop our calculation and just use KSPACING from set_kpoints, @sudarsan-surendralal ?

@coveralls
Copy link

coveralls commented Mar 8, 2022

Pull Request Test Coverage Report for Build 1966145612

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.002%) to 70.462%

Files with Coverage Reduction New Missed Lines %
pyiron_atomistics/lammps/structure.py 1 75.08%
Totals Coverage Status
Change from base Build 1949215033: -0.002%
Covered Lines: 11851
Relevant Lines: 16819

💛 - Coveralls

@Leimeroth
Copy link
Member Author

Is it possible for you to use this or do you want to use strict consistency with calculations performed outside pyiron?
I need to keep calculations strictly consistent.

I think vasp calculates it differently from pyiron, so I think keeping the k-point calculation on the pyiron side is the better option to compare between different codes.

@sudarsan-surendralal
Copy link
Member

Is it possible for you to use this or do you want to use strict consistency with calculations performed outside pyiron?
I need to keep calculations strictly consistent.

I think vasp calculates it differently from pyiron, so I think keeping the k-point calculation on the pyiron side is the better option to compare between different codes.

Yes, you are right (see here) they are not 100% equivalent. Although the "pyironic" way is to do what @pmrv suggested, this won't be consistent with your other calculations. So I guess we have to use a workaround like you implemented.

Copy link
Member

@sudarsan-surendralal sudarsan-surendralal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to write a simple unittest for jobs like this to check it it works (some examples here). Additionally, we should warn users when 'KSPACING' is there in the INCAR file but a KPOINTS file is also present

pyiron_atomistics/vasp/base.py Outdated Show resolved Hide resolved
Copy link
Contributor

@pmrv pmrv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

EDIT: I defer to @sudarsan-surendralal on the unit tests issue, not sure how and where to do that best, but I guess making a job with run_mode='manual' and then checking input files written should be possible.

Copy link
Member

@sudarsan-surendralal sudarsan-surendralal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I added a unit test for this and it works.

@sudarsan-surendralal sudarsan-surendralal added format_black reformat the code using the black standard and removed format_black reformat the code using the black standard labels Mar 11, 2022
@Leimeroth
Copy link
Member Author

LGTM! I added a unit test for this and it works.

Thanks

@Leimeroth Leimeroth merged commit 50fc702 into master Mar 11, 2022
@delete-merged-branch delete-merged-branch bot deleted the option-to-not-write-kpoints branch March 11, 2022 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request format_black reformat the code using the black standard help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants