Skip to content

Commit

Permalink
Support keywords of pair_style for LmpTemplateTaskGroup
Browse files Browse the repository at this point in the history
Signed-off-by: zjgemi <liuxin_zijian@163.com>
  • Loading branch information
zjgemi committed Aug 22, 2024
1 parent 4967951 commit 925108b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dpgen2/exploration/task/lmp_template_task_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,14 @@ def find_only_one_key(lmp_lines, key):

def revise_lmp_input_model(lmp_lines, task_model_list, trj_freq, deepmd_version="1"):
idx = find_only_one_key(lmp_lines, ["pair_style", "deepmd"])
keywords = ""
for arg in lmp_lines[idx].split()[2:]:
keywords += " " + arg
graph_list = " ".join(task_model_list)
lmp_lines[idx] = "pair_style deepmd %s out_freq %d out_file model_devi.out" % (
lmp_lines[idx] = "pair_style deepmd %s out_freq %d out_file model_devi.out%s" % (
graph_list,
trj_freq,
keywords,
)
return lmp_lines

Expand Down

0 comments on commit 925108b

Please sign in to comment.