A0 MD

pmemd 跑MD流程

  1. 使用N卡(NVIDA)可以在GPU上跑,并行加速
  2. 此前准备阶段已经生成了top和crd文件,需要进行能量最小化,升温两步达到平衡,然后MD模拟
    注:溶剂盒子似乎影响电荷以及最小化过程
  • 创建三个文件 01_min.in 02_heat.in 03_MD.in




  • 能量最小化
    命令
    $AMBERHOME/bin/sander -O -i 01_min.in -o 01_min.out -p name.top -c name.crd -r 01_min.rst -inf 01_min.mdinfo
    pmemd似乎做不了
    拓扑文件(势能函数)不变,crd文件转为输出的rst文件里,包括坐标和速度

  • 升温
    命令

利用min的rst和势能,输出升温后的轨迹文件,以及info。速度0.2s一百步,一万步20s

  • MD
    用sander可以实现

pmemd更好,额外需要一个jobfile.sh跑显卡

使用命令后台运行md并检查情况
nohup ./Jobfile_production.sh &
nvidia-smi

  • 报错:

    1
    2
    nohup: ignoring input and appending output to 'nohup.out'
    nohup: failed to run command './jobfile_md.sh': Permission denied

    原因是nohup会把错误信息输出出来,但还没输出前就发现out文件输出位置没有权限建立文件
    使用Linux重定向,2代表错误输出,1代表标准输出,0代表标准输入。 只要让二者都不输出或者重新定向位置就好了。(这里似乎是都不输出)
    使用
    chmod +x jobfile_md.sh
    nohup ./jobfile_md.sh 2>log
    把文本变得可执行,然后把问题输出到log里,报错不平衡,原子解散了,说明还不够平衡;当然也有可能是升温时间太短了??
    ERROR: Calculation halted. Periodic box dimensions have changed too much from their initial values.
    Your system density has likely changed by a large amount, probably from
    starting the simulation from a structure a long way from equilibrium.

    [Although this error can also occur if the simulation has blown up for some reason]

    The GPU code does not automatically reorganize grid cells and thus you
    will need to restart the calculation from the previous restart file.
    This will generate new grid cells and allow the calculation to continue.
    It may be necessary to repeat this restarting multiple times if your system
    is a long way from an equilibrated density.

    Alternatively you can run with the CPU code until the density has converged
    and then switch back to the GPU code.