Skip to content

Commit

Permalink
nequip| fix job part
Browse files Browse the repository at this point in the history
  • Loading branch information
Kisung Kang committed Jun 20, 2024
1 parent d0cc616 commit a9df30d
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions libs/lib_dft.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,18 @@ def run_DFT(inputs):
os.chdir(calcpath_cwd)

# Create job scripts and submit them
for index_calc in range(inputs.num_calc):
job_script = f'{inputs.job_dft_name.split(".")[0]}_{index_calc}.{inputs.job_dft_name.split(".")[1]}'
with open(job_script, 'w') as writing_input:
writing_input.write(job_script_DFT_default)
for index_execute_cwd, value_execute_cwd in enumerate(execute_cwd):
if index_execute_cwd % inputs.num_calc == index_calc:
writing_input.write('cd '+value_execute_cwd+'\n')
writing_input.write(inputs.vibes_command+'\n')
# If the previous calculation is not finished, rerun it
# subprocess.run([inputs.job_command, job_script])
# os.system(f'{inputs.job_command} {job_script}')
if inputs.output_format != 'nequip':
for index_calc in range(inputs.num_calc):
job_script = f'{inputs.job_dft_name.split(".")[0]}_{index_calc}.{inputs.job_dft_name.split(".")[1]}'
with open(job_script, 'w') as writing_input:
writing_input.write(job_script_DFT_default)
for index_execute_cwd, value_execute_cwd in enumerate(execute_cwd):
if index_execute_cwd % inputs.num_calc == index_calc:
writing_input.write('cd '+value_execute_cwd+'\n')
writing_input.write(inputs.vibes_command+'\n')
# If the previous calculation is not finished, rerun it
# subprocess.run([inputs.job_command, job_script])
# os.system(f'{inputs.job_command} {job_script}')

# Move back to the original position
os.chdir(mainpath_cwd)
Expand Down

0 comments on commit a9df30d

Please sign in to comment.