fix(c): read_bonds 中 rewind 后未跳过表头行导致成键数据全为空

rewind(f) 将文件指针拉回开头(含表头 'n1 n2 bond_name'),
后续 fscanf 试图将 'n1' 解析为 %d 全部失败,导致:
- bond_pairs 直接用未初始化的栈垃圾 → 随机索引
- bond_stiffness/rest_lengths 保持默认值 1.0/2.0
- 弹簧力无法正确传播 → 第一个原子动后后面全不动

修复:rewind 后加 fgets(line, ...) 再次跳过表头。
This commit is contained in:
2026-06-11 19:38:10 +08:00
parent e353e04133
commit 9d5997afec
3 changed files with 60009 additions and 60008 deletions
+60007 -60007
View File
File diff suppressed because it is too large Load Diff