-
Notifications
You must be signed in to change notification settings - Fork 865
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 estimate_nbands
function
#3149
fix estimate_nbands
function
#3149
Conversation
@matthewkuner Thanks for spotting this! Would be great if @aaron-kaplan or someone else more qualified than me could sign off on this. Also, @matthewkuner we need a unit test in pymatgen/pymatgen/io/vasp/tests/test_sets.py Line 233 in 71864db
|
You tagged the wrong person. I'm not involved with this project. |
@aaron-kaplan Apologies. I meant @esoteric-ephemera. |
@matthewkuner, lines 694-695 seem wrong to me per our discussion:
The lines of code in VASP's main.F are:
which to me looks like VASP is simply summing the initial magnetic moments (ATOMOM), not counting the number of atoms with nonzero magnetic moments The weird thing is that NMAG is an integer but ATOMOM is declared to be a float in poscar_struc.F. Fortran seems to do int + float = int + floor(float) when assigning to a variable. You probably want to double check your code against a few sets of INCAR's and OUTCAR's. Also, @matthewkuner, if the user specifies NPAR (if 'NPAR' is in self.incar), you probably want to add a line as in main.F:
@janosh, my name is unfortunately too common to get it as a username 😂 |
@matthewkuner: Copying over our brief convo from Slack, it would perhaps be nice (if you're willing to do so) to move the |
@janosh @arosen93 @esoteric-ephemera Please see comments in #3148 by @mkhorton |
The license concerns? Perhaps we can loop in someone from VASP and get their ok. Haven't looked into this myself, but taking @matthewkuner's word for it, I doubt VASP minds us fixing downstream repercussions arising from disparities between their docs and their actual implementation. Given it's a paid product, this should not have happened in the 1st place. |
Perhaps @MichaelWolloch could help clarify or get us in touch with folks who can. I also see this as being a likely non-issue. |
Yes, agreed--just asking the VASP devs is the best course of action here. I also agree hopefully it's a non-issue, but good to check. |
@janosh I've updated the tests and verified them to quick VASP calcs that I ran. |
Thanks @matthewkuner! Did you address this comment raised by @esoteric-ephemera? |
@janosh I addressed everything from Aaron’s comment except for the NPAR stuff. I’ll do that tomorrow |
I’m assuming since work is proceeding that VASP devs ok’d using |
No response yet from VASP. Not sure who to ping. @sudarshanv01 Do you have any suggestions? |
@janosh @mkhorton I asked a similar question about NGX/Y/Z, and they basically just said that as long as it isn't a direct copy-paste, it should be fine. See: https://www.vasp.at/forum/viewtopic.php?p=24351#p24351 Considering it is being transcribed from one language to another, I think we are fine here. Let me know if you think my interpretation is too biased/generous to our efforts. |
I think that’s reasonable. I just wanted to make sure there was a record. Perhaps this thread can be linked on that forum post as well just to be completely above board and leave it there if there are no objections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @matthewkuner! Great catch. 👍
Hi, and apologies for the late reply. I am on holidays this week and did not check my emails for a while. I have never dealt with this type of code base related issue, and am hesitant to comment either way. Maybe @henriquemiranda is in-office and knows more about VASPs policy here? Or can quickly ask someone more senior? |
This code has no tests whatsoever. Can someone pls add a unittest for it? @janosh Pls make sure that this is always done for any new code before merging. |
@shyuep there are indeed new tests for this PR, check the second file changed |
@matthewkuner Ah yes. However, it says skip if no PSP directory. That basically means it is not running at all on Github Actions. Can the test be modified to at change check a few POTCAR files? Since the code is not running on the CI, we can't detect any bugs until someone runs it on their computer. |
Fixes the
estimate_nbands
function. See #3148 for more context.