@@ -284,8 +284,8 @@ def make_run_scf_abacus(systems_train, systems_test=None,
284284 for f in range (nframes ):
285285 singletask ["command" ]= str (f"cd { sys_name [i ]} /ABACUS/{ f } / && \
286286 { run_cmd } -n { task_per_node } { abacus_path } > { outlog } 2>{ errlog } && \
287- echo { f } `grep convergence ./OUT.ABACUS/running_scf.log` > conv && \
288- echo { f } `grep convergence ./OUT.ABACUS/running_scf.log`" )
287+ echo { f } `grep -i converge ./OUT.ABACUS/running_scf.log` > conv && \
288+ echo { f } `grep -i converge ./OUT.ABACUS/running_scf.log`" )
289289 singletask ["task_work_path" ]= "."
290290 singletask ["forward_files" ]= [str (f"./{ sys_name [i ]} /ABACUS/{ f } /" )]
291291 singletask ["backward_files" ]= [str (f"./{ sys_name [i ]} /ABACUS/{ f } /" )]
@@ -315,8 +315,8 @@ def make_run_scf_abacus(systems_train, systems_test=None,
315315 batch_tasks .append (BatchTask (
316316 cmds = str (f"cd { sys_name [i ]} /ABACUS/{ f } / && \
317317 { run_cmd } -n { task_per_node } { abacus_path } > { outlog } 2>{ errlog } && \
318- echo { f } `grep convergence ./OUT.ABACUS/running_scf.log` > conv && \
319- echo { f } `grep convergence ./OUT.ABACUS/running_scf.log`" ),
318+ echo { f } `grep -i converge ./OUT.ABACUS/running_scf.log` > conv && \
319+ echo { f } `grep -i converge ./OUT.ABACUS/running_scf.log`" ),
320320 workdir = "systems" ,
321321 forward_files = [str (f"./{ sys_name [i ]} /ABACUS/{ f } /" )],
322322 backward_files = [str (f"./{ sys_name [i ]} /ABACUS/{ f } /" )]
@@ -405,7 +405,8 @@ def gather_stats_abacus(systems_train, systems_test,
405405 # Check convergence of each frame
406406 with open (f"{ sys_train_paths [i ]} /ABACUS/{ f } /conv" ,"r" ) as conv_file :
407407 ic = conv_file .read ().split ()
408- if "achieved" in ic and "not" not in ic :
408+ ic = [item .strip ('#' ) for item in ic ]
409+ if "CONVERGED" in ic and "NOT" not in ic :
409410 conv [(int )(ic [0 ])]= True
410411
411412 # Energy and eigenvalues of density matrix
@@ -668,7 +669,8 @@ def gather_stats_abacus(systems_train, systems_test,
668669 # Check convergence of each frame
669670 with open (f"{ sys_test_paths [i ]} /ABACUS/{ f } /conv" ,"r" ) as conv_file :
670671 ic = conv_file .read ().split ()
671- if "achieved" in ic and "not" not in ic :
672+ ic = [item .strip ('#' ) for item in ic ]
673+ if "CONVERGED" in ic and "NOT" not in ic :
672674 conv [(int )(ic [0 ])]= True
673675
674676 # Energy and eigenvalues of density matrix
0 commit comments