-
Notifications
You must be signed in to change notification settings - Fork 175
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
Update gromacs model devi engine #493
Conversation
…an and bug fix in training_resue_stop_batch keyword
Codecov Report
@@ Coverage Diff @@
## devel #493 +/- ##
==========================================
+ Coverage 32.97% 33.06% +0.08%
==========================================
Files 86 86
Lines 14560 14717 +157
==========================================
+ Hits 4801 4866 +65
- Misses 9759 9851 +92
Continue to review full report at Codecov.
|
dpgen/generator/run.py
Outdated
if idx == 0: | ||
if jdata.get('use_clusters', False): | ||
all_sys = dpdata.MultiSystems(sys, type_map = jdata['type_map']) | ||
# TODO : UnboundLocalError sometimes occurs and I cannot figure it out. |
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 don't think UnboundLocalError is an expected error that should be caught. If it happened, it is a bug that needs to be fixed.
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.
Sure. I met this problem this week but I don't have time to fix it :(
I will remove this part and try to fix it afterwards.
dpgen/generator/run.py
Outdated
system = dpdata.System(dump, fmt = fmt, type_map = type_map) | ||
system.to_deepmd_raw(deepmd_raw) | ||
if charge is not None: | ||
with open(os.path.join(deepmd_raw, "charge"), 'w+') as f: |
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.
Why using w+
instead of w
?
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.
It's my own habits. It seems there are not so many differences between them ?
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.
w+
will create both reading and writing buffers instead of only writing buffer.
dpgen/generator/run.py
Outdated
lambdas = cur_job.get("lambdas", []) | ||
temps = cur_job.get("temps", []) |
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.
You can put the default value here... like
lambdas = cur_job.get("lambdas", []) | |
temps = cur_job.get("temps", []) | |
lambdas = cur_job.get("lambdas", [1.]) | |
temps = cur_job.get("temps", [298.]) |
and remove lines 1106-1107, 1112-1113
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.
Got it.
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.
Examples including sys_charges should be updated
UnboundLocalError
when parsing gaussian log