-
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
Modify post_fp_cp2k
, adapt to SCF not converged situation.
#1562
base: devel
Are you sure you want to change the base?
Changes from all commits
169183e
c06a35f
0663bd3
4214d77
01581e9
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 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -4497,14 +4497,22 @@ | |||||||||||||||||||||||
sys_output = glob.glob(os.path.join(work_path, f"task.{ss}.*/output")) | ||||||||||||||||||||||||
sys_output.sort() | ||||||||||||||||||||||||
tcount += len(sys_output) | ||||||||||||||||||||||||
log_file_path = os.path.join(work_path, f"{ss}.fp-fail.log") | ||||||||||||||||||||||||
all_sys = dpdata.MultiSystems(type_map=jdata["type_map"]) | ||||||||||||||||||||||||
for oo in sys_output: | ||||||||||||||||||||||||
with open(oo) as file: | ||||||||||||||||||||||||
content = file.read() | ||||||||||||||||||||||||
if "SCF run NOT converged" in content: | ||||||||||||||||||||||||
with open(log_file_path, "a") as log_file: | ||||||||||||||||||||||||
log_file.write(f"Skipping file {oo} due to SCF run NOT converged\n") | ||||||||||||||||||||||||
continue | ||||||||||||||||||||||||
Comment on lines
+4505
to
+4508
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. Move SCF check and logging after To ensure - if "SCF run NOT converged" in content:
- with open(log_file_path, "a") as log_file:
- log_file.write(f"Skipping file {oo} due to SCF run NOT converged\n")
- continue
_sys = dpdata.LabeledSystem(
oo, fmt="cp2kdata/e_f", type_map=jdata["type_map"]
)
+ if "SCF run NOT converged" in content:
+ with open(log_file_path, "a") as log_file:
+ log_file.write(f"Skipping file {oo} due to SCF run NOT converged\n")
+ continue Committable suggestion
Suggested change
|
||||||||||||||||||||||||
_sys = dpdata.LabeledSystem( | ||||||||||||||||||||||||
oo, fmt="cp2kdata/e_f", type_map=jdata["type_map"] | ||||||||||||||||||||||||
) | ||||||||||||||||||||||||
all_sys.append(_sys) | ||||||||||||||||||||||||
icount += 1 | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
icount += len(all_sys) | ||||||||||||||||||||||||
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. Duplicate
- icount += len(all_sys)
|
||||||||||||||||||||||||
if (all_sys is not None) and (len(all_sys) > 0): | ||||||||||||||||||||||||
sys_data_path = os.path.join(work_path, f"data.{ss}") | ||||||||||||||||||||||||
all_sys.to_deepmd_raw(sys_data_path) | ||||||||||||||||||||||||
|
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.
move these lines after
_sys=dpdata.LabeledSystem