计算化学公社

 找回密码 Forget password
 注册 Register
Views: 848|回复 Reply: 0
打印 Print 上一主题 Last thread 下一主题 Next thread

[GROMACS] 求助 使用bash文件批量生成ndx文件时无法识别gro文件

[复制链接 Copy URL]

12

帖子

0

威望

171

eV
积分
183

Level 3 能力者

根据教程来计算特定范围内的溶剂分子形成的氢键数目 GROMACS分析教程:氢键分析|Jerkwin
使用该命令对每一帧轨迹进行分析
gmxtrjconv -s prod.tpr -f prod-200Frames-mol-UC.xtc -b198000 -o traj.gro -sep -exec "bash hb.bsh"
文件夹下生成[size=14.6667px]traj0.gro [size=14.6667px]traj1.gro等文件
[size=14.6667px]hb.bsh文件内容如下
[size=14.6667px]

[size=14.6667px]

i=$1
file=traj$i




gmx select -f $file.gro -s prod.tpr  -select  ' Wat = resname SOL and same residue as within 1 of residue 6; "Wat" Wat '  -os $file.xvg -on $file.ndx




gmx执行hb.bsh文件时出现下面的错误




Error in user input:
Invalid command-line options
  In command-line option -f
.gro' does not exist or is not accessible.
    The file could not be opened.
      Reason: No such file or directory
      (call to fopen() returned error code 2)


显示找不到traj0.gro traj1.gro等文件,文件夹中明明存在traj0.gro traj1.gro文件
如果直接在命令窗口输入

gmx select -f traj0.gro -s prod.tpr  -select  ' Wat = resname SOL and same residue as within 1 of residue 6; "Wat" Wat '  -os traj0.xvg -on traj0.ndx

是可以成功运行的。


修改hb.bsh文件内容为

gmx select -f traj0.gro -s prod.tpr  -select  ' Wat = resname SOL and same residue as within 1 of residue 6; "Wat" Wat '  -os traj0.xvg -on traj0.ndx
可以生成traj0.xvg,但是生成了traj0.ndx.ndx错误文件含有两个.ndx,并且无法下载和打开该文件,修改后缀为1个.ndx也不可以。
想请教一下大家是什么原因




本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-2-23 05:09 , Processed in 0.176427 second(s), 20 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list