-
Notifications
You must be signed in to change notification settings - Fork 15
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
Sphinx log parser fix #1556
base: main
Are you sure you want to change the base?
Sphinx log parser fix #1556
Changes from all commits
0bd4a2c
7aff3a3
36ed1bf
49d20fd
d9f532b
9468b3f
845ae4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ apidoc/ | |
.ipynb_checkpoints/ | ||
test_times.dat | ||
core.* | ||
.vscode/settings.json | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1235,7 +1235,7 @@ def load_default_groups(self): | |
if self._spin_enabled: | ||
self.input["EmptyStates"] = int(1.5 * len(self.structure) + 3) | ||
else: | ||
self.input["EmptyStates"] = int(len(self.structure) + 3) | ||
self.input["EmptyStates"] = int(0.5 * len(self.structure) + 3) | ||
|
||
if not self.input.sphinx.basis.read_only: | ||
self.load_basis_group() | ||
|
@@ -1486,7 +1486,22 @@ def convergence_check(self): | |
""" | ||
# Checks if sufficient empty states are present | ||
if not self.nbands_convergence_check(): | ||
print( | ||
""" | ||
The highest orbital is not empty (has a finite occupation). | ||
Number of empty states might be too few. | ||
skatnagallu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Try changing to a higher number of empty states or use default values. | ||
""" | ||
) | ||
return False | ||
if not self.output.generic.dft.scf_convergence[-1]: | ||
print( | ||
""" | ||
scf convergence not reached. Check residue and number of steps. | ||
If residue goes down systematically, but slowly, try increasing number of steps. | ||
If residue is high, decreasing rho mixing might help. | ||
""" | ||
) | ||
return self.output.generic.dft.scf_convergence[-1] | ||
|
||
def collect_logfiles(self): | ||
|
@@ -1592,7 +1607,12 @@ def check_setup(self): | |
else: | ||
warnings.warn( | ||
"Number of empty states was not specified. Default: " | ||
+ "3+NIONS for non-magnetic systems" | ||
+ "3+NIONS*0.5 for non-magnetic systems" | ||
) | ||
else: | ||
if self.input["EmptyStates"] < 0.5 * int(len(self.structure) + 3): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this normal for semi conductors? @skatnagallu @freyso There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For semiconductors this doesnt matter right? You shouldn't set it for semiconductors. And then SPHInX defaults to 0. |
||
warnings.warn( | ||
"Number of empty states seem to be too low. Hopefully you know what you are doing." | ||
) | ||
|
||
return len(w) == 0 | ||
|
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.
Or does this have a particular reason?
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.
I use vscode and it usually pushes changes in my settings to git sometimes
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.
I think it is very helpful for all vscode users, just like including the
.idea/
folder in the.gitignore
is helpful for Pycharm users. So we could debate if this should be a separate pull request, but in general I think it is a helpful addition.