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

Write POSCAR in direct coordinate when selective dynamics is on #448

Merged
merged 2 commits into from
Dec 13, 2021

Conversation

usaikia
Copy link
Contributor

@usaikia usaikia commented Nov 28, 2021

When I run a vasp job with POSCAR written in cartesian coordinates vasp returns the following warning message:

"using selective dynamics as specified on POSCAR
WARNING: If single coordinates had been selected the selection of coordinates
is made according to the corresponding d i r e c t coordinates!
Don't support selection of single cartesian coordinates -- sorry ..."

Hence, I would like to write POSCAR in direct coordinates when selective dynamics is on.

@usaikia usaikia added the enhancement New feature or request label Nov 28, 2021
@usaikia usaikia requested a review from pmrv November 28, 2021 15:17
@liamhuber
Copy link
Member

Indentation of the added line is wrong. Try aligning it with the others in the if clause and then it should be fine. Otherwise lgtm, but I'm not a vasp user so wait for Marvin too 😉

@usaikia
Copy link
Contributor Author

usaikia commented Nov 29, 2021

@liamhuber Thanks for pointing out the wrong indentation. I will correct it.

@pmrv
Copy link
Contributor

pmrv commented Nov 29, 2021

Have you checked that this actually causes an issue? From reading the warning again and the wiki I currently understand that VASP only supports fixing the fractional/direct coordinates of an atom, i.e. even when writing as Cartesian it will internally convert to fractional/direct and then fix this position. The distinction therefore only plays a role when the volume changes.

Just as a heads-up, I'm still happy to put this in to silence the warning.

@usaikia
Copy link
Contributor Author

usaikia commented Nov 29, 2021

@pmrv I did some test calculations from my side. For my calculations with cartesian poscar, apart from giving the warning message, vasp did the fixing correctly. I also checked the vasp wiki page, but not sure this warning message is not relevant anymore for these newer version of vasp or there is something else (maybe some special case where this is relevant). Hence, I thought it's a good idea to avoid this warning message by just writing the poscar in direct coordinate.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1518285353

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 39 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.08%) to 69.866%

Files with Coverage Reduction New Missed Lines %
pyiron_atomistics/atomistics/structure/atoms.py 1 74.67%
pyiron_atomistics/lammps/base.py 38 79.7%
Totals Coverage Status
Change from base Build 1509233391: 0.08%
Covered Lines: 11451
Relevant Lines: 16390

💛 - Coveralls

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.

@pmrv I did some test calculations from my side. For my calculations with cartesian poscar, apart from giving the warning message, vasp did the fixing correctly. I also checked the vasp wiki page, but not sure this warning message is not relevant anymore for these newer version of vasp or there is something else (maybe some special case where this is relevant). Hence, I thought it's a good idea to avoid this warning message by just writing the poscar in direct coordinate.

Sure, looks good to me now!

@pmrv
Copy link
Contributor

pmrv commented Dec 13, 2021

@usaikia Do you want to add more things here or can I merge this?

@usaikia
Copy link
Contributor Author

usaikia commented Dec 13, 2021

@pmrv I don't have anything else to add here. You can merge it.

@pmrv pmrv merged commit 8f97bb8 into master Dec 13, 2021
@delete-merged-branch delete-merged-branch bot deleted the write_poscar_direct branch December 13, 2021 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants