fix: color_xrange 范围限定 d_max + color_driver + color 范围改为 [0,1] + bug 修复

This commit is contained in:
2026-06-24 16:09:39 +08:00
parent b50c55d0a3
commit e415bf5ba5
87 changed files with 360440 additions and 76 deletions
+2
View File
@@ -0,0 +1,2 @@
bond_name k rest_length
h 100.0 1.0
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2
View File
@@ -0,0 +1,2 @@
n amp_x amp_y amp_z freq_x freq_y freq_z phi_x phi_y phi_z period
5101 0 0 2.0 0 0 0.05 90 90 90 all
+89
View File
@@ -0,0 +1,89 @@
# 物理模拟参数配置
# 格式:YAML
# 用法:python run_dynamics.py
# ── 流程控制 ──────────────────────────────────
step_simulate: 1 # 运行物理模拟
step_sample: 0 # 重新抽帧,默认0=不执行
step_plot: 0 # 绘制轨迹/能量图
step_animation: 1 # 自动播放 VisPy 3D 动画窗口
step_plot_wave: 0 # 绘制波形能量动画
force_calc: 1 # 强制重新计算
# ── 文件保存 ──────────────────────────────────
save_trajectory: 0 # 0=不保留完整轨迹文件
# ── 计算引擎 ──────────────────────────────────
engine: c
# ── 盒子 ──────────────────────────────────────
box_a: 120.0
# ── 初始构型 ──────────────────────────────────
coord_file: input/coord.txt
connection_file: input/connection.txt
bond_file: input/bond.txt
driver_file: input/driver.txt
# 绘图/动画展示的原子序号
plot_atom: 5101 # 中心原子 (0,0)
# ── 物理参数 ──────────────────────────────────
G: [0.000, 0.000, 0.000]
B: [0.000, 0.000, 0.000]
# ── 力开关 ────────────────────────────────────
gravity_field: 0
gravity_interaction: 0
elastic_force: 1
damping_force: 0
driving_force: 1
gravity_strength: 1.0
# ── 数值算法 ──────────────────────────────────
method: leapfrog
# ── 步骤控制 ──────────────────────────────────
warmup_steps: 0 # 受迫波动,无需预热
T_total: 100.0
NSTEP: 10
DT: 0.01
sample_start: null
sample_end: null
# ── 渲染方式 ──────────────────────────────────
use_marker: 1
# ── 位移着色 ──────────────────────────────────
display_color: {
x : [0, [255, 0, 0]],
y : [0, [ 0, 255, 0]],
z : [1, [ 0, 0, 255]],
xy : [0, [255, 255, 0]],
yz : [0, [ 0, 255, 255]],
zx : [0, [255, 0, 255]],
xyz : [0, [ 0, 0, 0]],
}
# ── 显示参数 ──────────────────────────────────
alpha: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
ball_color_r: 0.20
ball_color_g: 0.60
ball_color_b: 0.90
box_color_r: 0.80
box_color_g: 0.80
box_color_b: 0.85
# ── 摄像机 ────────────────────────────────────
camera_distance: 120.0
camera_elevation: 60.0
camera_azimuth: -45.0
camera_center_x: 0.0
camera_center_y: 0.0
camera_center_z: 0.0
move_camera: 0
display_amp: [1.0, 1.0, 1.0]
+2
View File
@@ -0,0 +1,2 @@
0 0 50
0 0 80