@@ -541,15 +541,16 @@ def main_generate_POSCAR_and_output(self):
541
541
542
542
class CollectOtherRunFiles (object ):
543
543
544
- def __init__ (self , other_run_file_dir , base_POTCAR_dir , output_info ):
544
+ def __init__ (self , other_run_file_dir , base_POTCAR_dir , output_info , POTCAR_suffix ):
545
545
546
546
self .other_file_dir = other_run_file_dir
547
547
self .base_POTCAR_dir = base_POTCAR_dir
548
548
self .output_info = output_info
549
-
549
+ self . POTCAR_suffix = POTCAR_suffix
550
550
self .copy_all_other_run_files_aim_path ()
551
551
self .get_POTCAR ()
552
552
553
+
553
554
def copy_all_other_run_files_aim_path (self ):
554
555
all_base_files = []
555
556
for i in os .listdir (self .other_file_dir ):
@@ -569,7 +570,7 @@ def get_POTCAR(self):
569
570
element_info = self .output_info [i ]["atom_info" ]
570
571
POTCAR_paths = []
571
572
for element in element_info :
572
- POTCAR_paths .append (self .base_POTCAR_dir + "/%s/POTCAR" % element )
573
+ POTCAR_paths .append (self .base_POTCAR_dir + "/%s/POTCAR" % ( element + self . POTCAR_suffix ) )
573
574
aim_paths = " " .join (POTCAR_paths )
574
575
575
576
cmd_print_and_run ("cat %s > %s" % (aim_paths , self .output_info [i ]["aim_file_dir" ] + "/POTCAR" ))
@@ -618,7 +619,7 @@ def job_submit(self, path):
618
619
619
620
620
621
def server_submit (xsd_files , base_xsd_dir , base_run_files ,job_submit_command , base_POTCAR_dir , info_dir , TF_condition_func ,project_type ,
621
- base_fort188_path = None ,debug_mode = True ):
622
+ base_fort188_path = None ,debug_mode = True , POTCAR_suffix = "" ):
622
623
a = XSD_Extract (xsd_files = xsd_files ,
623
624
base_xsd_dir = base_xsd_dir ,
624
625
base_POSCAR_dir = base_run_files ,
@@ -633,7 +634,7 @@ def server_submit(xsd_files, base_xsd_dir, base_run_files,job_submit_command, ba
633
634
output_info = a .main_generate_POSCAR_and_output ()
634
635
635
636
a = CollectOtherRunFiles (other_run_file_dir = base_run_files , base_POTCAR_dir = base_POTCAR_dir ,
636
- output_info = output_info )
637
+ output_info = output_info , POTCAR_suffix = POTCAR_suffix )
637
638
638
639
b = JobSubmit (output_info = output_info , info_dir = info_dir ,
639
640
job_submit_command = job_submit_command ,
@@ -661,7 +662,14 @@ def server_submit(xsd_files, base_xsd_dir, base_run_files,job_submit_command, ba
661
662
base_run_files = info ["remote_base_file_dir" ]
662
663
info_dir = base_xsd_dir
663
664
job_submit_command = info ["job_submit_command" ]
664
- # 这里fort.188就在这个base file目录之下,只是判断是否需要transition state
665
+
666
+ try :
667
+ POTCAR_suffix = info ["POTCAR_suffix" ]
668
+ except KeyError :
669
+ POTCAR_suffix = ""
670
+
671
+
672
+ # 这里fort.188就在这个base file目录之下,只是判断是否需要transition state
665
673
project_type = info ["project_type" ]
666
674
print (info ["project_type" ])
667
675
if info ["project_type" ] == "TS_fort_188" :
@@ -685,6 +693,7 @@ def server_submit(xsd_files, base_xsd_dir, base_run_files,job_submit_command, ba
685
693
base_fort188_path = base_fort188_path ,
686
694
debug_mode = debug_mode ,
687
695
project_type = project_type ,
688
- job_submit_command = job_submit_command
696
+ job_submit_command = job_submit_command ,
697
+ POTCAR_suffix = POTCAR_suffix
689
698
690
699
)
0 commit comments