Files
gromacs_docker/script/S112D/plot_hbond.sh
2024-10-05 19:27:47 +08:00

24 lines
609 B
Bash
Executable File

#!/bin/bash
# 执行氢键分析
gmx_mpi hbond -s ${MDRUN_NAME}.tpr -n index.ndx -f ${MDRUN_NAME}_center.xtc -num hbond_protein_ligand.xvg << EOF
1 # 选择 Protein
13 # 选择 Ligand (配体)
EOF
# 使用 Gnuplot 生成氢键分析图像
gnuplot << EOF
set terminal svg size 800,600
set output 'hbond_protein_ligand.svg'
# 设置标题和轴标签
set title 'Hydrogen Bond Analysis'
set xlabel 'Time (ns)'
set ylabel 'Number of H-bonds'
# 读取数据文件并绘制
plot 'hbond_protein_ligand.xvg' using 1:2 with lines title 'H-bonds'
EOF
echo "Hydrogen bond plot generated: hbond_protein_ligand.svg"