Skip to content

Commit a136b0f

Browse files
committed
Bug fix for traj frequency in gromacs enegine
1 parent f1a815c commit a136b0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpgen/generator/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ def run_model_devi (iter_index,
12561256
command += "&& echo -e \"%s\n%s\n\" | %s trjconv -s %s -f %s.trr -o %s -pbc mol -ur compact -center" % (grp_name, grp_name, lmp_exec, ref_filename, deffnm, traj_filename)
12571257
command += "&& if [ ! -d traj ]; then \n mkdir traj; fi\n"
12581258
command += f"python -c \"import dpdata;system = dpdata.System('{traj_filename}', fmt='gromacs/gro'); [system.to_gromacs_gro('traj/%d.gromacstrj' % (i * {trj_freq}), frame_idx=i) for i in range(system.get_nframes())]; system.to_deepmd_npy('traj_deepmd')\""
1259-
command += "&& dp model-devi -m ../graph.000.pb ../graph.001.pb ../graph.002.pb ../graph.003.pb -s traj_deepmd -o model_devi.out"
1259+
command += f"&& dp model-devi -m ../graph.000.pb ../graph.001.pb ../graph.002.pb ../graph.003.pb -s traj_deepmd -o model_devi.out -f {trj_freq}"
12601260
commands = [command]
12611261

12621262
forward_files = [mdp_filename, topol_filename, conf_filename, index_filename, ref_filename, "input.json", "job.json" ]

0 commit comments

Comments
 (0)