#!/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"