feat: 外部引擎实时进度条 + C引擎read_bonds rewind修复

1. 引擎端:C/C++/Fortran 主循环每 1% 输出 progress 到 stdout
2. compute.py:读取 "[xxx] progress: N/total" 行更新 tqdm
3. 移除不准的时间估算逻辑,改用真实引擎进度
4. C引擎 read_bonds:rewind 后补 fgets 跳表头
5. gitignore 添加 output_test/
This commit is contained in:
2026-06-11 21:36:30 +08:00
parent 42c6776eff
commit db50ac6d4d
5 changed files with 27 additions and 5 deletions
+6 -1
View File
@@ -34,7 +34,7 @@ program dynamics_f90
double precision, allocatable :: bond_stiffness(:), bond_rest_lengths(:)
! 驱动力数据
integer :: n_drivers
integer :: n_drivers, prog_step
integer, allocatable :: drv_atom_idx(:)
double precision, allocatable :: drv_amp_x(:), drv_amp_y(:), drv_amp_z(:)
double precision, allocatable :: drv_freq_x(:), drv_freq_y(:), drv_freq_z(:)
@@ -139,7 +139,12 @@ program dynamics_f90
end do
! 记录
prog_step = record_steps / 100
if (prog_step < 1) prog_step = 1
do s = 1, record_steps
if (mod(s, prog_step) == 0 .and. s > 0) then
write(*, '("[Fortran-engine] progress: ", i0, "/", i0)') s, record_steps
end if
if (driving_force /= 0 .and. n_drivers > 0) then
tw = ((s-1 + warmup_steps) * 1.0d0) * DT
call apply_driving(n, x, y, z, vx, vy, vz, tw, s-1, DT, &