fix: display.txt 的 number of frames 改为实际抽帧数而非总步数
之前 number of frames 错误地填入了 record_steps(=NT), 实际应该填入 n_frames_actual(=NT/NSTEP)。如 NT=20000, NSTEP=100 时抽得 200 帧,现在正确显示为 200。 总步数仍在 dynamic_steps 中记录。
This commit is contained in:
+3
-2
@@ -245,13 +245,14 @@ def run_case(config_path, runtime_base, input_dir="input", output_dir="output",
|
||||
"gravity_strength": str(data.get("gravity_strength", 1.0)),
|
||||
"driving_force": str(data.get("driving_force", 0))}
|
||||
|
||||
n_frames = len(indices)
|
||||
compute.save_display_txt(
|
||||
disp_path_new,
|
||||
traj_x[indices], traj_y[indices], traj_z[indices],
|
||||
traj_vx[indices], traj_vy[indices], traj_vz[indices],
|
||||
np.array(data["atom_ids"]), record_steps, n_atoms,
|
||||
np.array(data["atom_ids"]), n_frames, n_atoms,
|
||||
header_fields=hf)
|
||||
print(f"[run] 从 trajectory.txt 抽帧生成 display.txt ({len(indices)} 帧)")
|
||||
print(f"[run] 从 trajectory.txt 抽帧生成 display.txt ({n_frames} 帧)")
|
||||
|
||||
# 4. 绘图(可选)
|
||||
if not no_plot and config.get("step_plot", 1):
|
||||
|
||||
Reference in New Issue
Block a user