fix(abacus): do not collect the unconverged structure for AIMD#368
fix(abacus): do not collect the unconverged structure for AIMD#368wanghan-iapcm merged 9 commits intodeepmodeling:develfrom
Conversation
dpdata/abacus/md.py
Outdated
| nenergy+=1 | ||
| elif "!! convergence has not been achieved" in line: | ||
| if nenergy%dump_freq == 0: | ||
| energy.append(0) |
There was a problem hiding this comment.
If 0 is used to indicate systems that do not coverage, how can we collect 0-energy systems?
There was a problem hiding this comment.
0 is really not a good choice. May "None" is better. I will change it.
There was a problem hiding this comment.
Can ABACUS calculate a hydrogen ion?
There was a problem hiding this comment.
Note that None will make the NumPy array become an object array:
>>> import numpy as np
>>> np.array([1., None]).dtype
dtype('O')Maybe you can use np.nan or np.inf instead.
>>> np.array([1., np.nan, np.inf]).dtype
float64>>> x = np.array([1., np.nan, np.inf])
>>> np.isnan(x)
array([False, True, False])There was a problem hiding this comment.
Can ABACUS calculate a hydrogen ion?
Yes. I see. The previous statement is indeed incorrect.
There was a problem hiding this comment.
Note that
Nonewill make the NumPy array become an object array:>>> import numpy as np >>> np.array([1., None]).dtype dtype('O')Maybe you can use
np.nanornp.infinstead.>>> np.array([1., np.nan, np.inf]).dtype float64>>> x = np.array([1., np.nan, np.inf]) >>> np.isnan(x) array([False, True, False])
Thanks for your suggestion, I don't know about the object array before.
I will change to "np.nan"
Codecov ReportBase: 82.33% // Head: 82.21% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## devel #368 +/- ##
==========================================
- Coverage 82.33% 82.21% -0.12%
==========================================
Files 67 67
Lines 5892 5909 +17
==========================================
+ Hits 4851 4858 +7
- Misses 1041 1051 +10
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Can you add an extra test? |
Ok, I will add one. |
No description provided.