请先下载Desmond 的安装包,上传到google drive 里面,然后点击分享链接,替换下面的wget,注意Desmond 对商业用户为付费软件,学术用户请先通过D E Shaw 公司的审核后才可使用
下载安装包到colab
from google.colab import drive
drive.mount('/content/drive')
! cp /content/drive/MyDrive/Desmond_Maestro_2021.1.tar /content/
! tar -xvf Desmond_Maestro_2021.1.tar
%cd Desmond_Maestro_2021.1/
!ls
创建安装路径,你也可以定义其他路径,但最好是作为guest 也有权写入的路径,以避免后面可能的因管理员权限不够无法安装问题
%cd /opt
创建Desmond 工作的临时文件夹,你也可以定义在其他路径
! mkdir scratch
!ls
开始安装,注意需要手动确认一些路径,记得点击Enter
%cd /content/Desmond_Maestro_2021.1
! ./INSTALL
%env SCHRODINGER /opt/schrodinger2021-1/
如果是简单模拟,从charmm gui 下载输入文件,如果是要做FEP,需要用maestro 做蛋白准备后,将小分子配体在2018-4maestro 中按照 flexbile alignment, maxmium substrutures, fuzzy style, 然后上传到Katana的2019-3 版本的maestro 中调用ligand FEP 然后使用write,写出模拟指令sh 文件,然后到这里来运行
%cd /content/
%cd /drive/MyDrive
!tar -xvf temple_uni_ligand_fep_2.tgz
%cd /content/ligand_fep_2/
!ls
%cd desmond/
!ls
在开始模拟之前, 必须要先修复一个bug, 链接见https://stackoverflow.com/questions/67419615/could-not-get-username-from-env
!printenv
接下来,我们将通过环境变量调用Desmond 开始动力学模拟
%env HOME /root
%env USER root
!nvidia-smi
!lscpu
需要正确设置schrodinger.hosts 文件
%cd /opt/schrodinger2021-1/
返回工作文件夹开始模拟,该文件夹,如果是由charmm gui 返回的结果,则为名为desmond的文件夹,如果是相对自由能计算,则应该为有Academic 版本的maestro 写下的ligand_fep_1文件夹,其中应该有三个msj 文件,一个sh 文件,一个mae 文件,最好也要把当时的相关1.prj 文件放到该工作文件夹得外面,pdb蛋白液最好放在外侧。
%cd /content/fep
经过粘贴复制,或者压缩解压缩后,sh 文件得权限被改变,如果无法运行,需要手动再添加一次 +x flag, 以允许其可以被运行
!chmod +x ligand_fep_2.sh
!./ligand_fep_2.sh
任务开始后,注意监测log 文件即可,如果是fep计算,即使使用Tesla V100 32GB 也需要五小时左右,因谷歌平台得GPU一般是K80, 因此模拟任务不一定可以在10小时内完成。 如果是简单的模拟任务,应该可以胜任。
基于colab 得模拟应当作为百度AI studio 平台得补充,因为谷歌平台所提供的显卡能力弱于百度,且无法免费使用命令终端,速度和效率都比百度底。