Friday, May 14, 2010
Installing Debian LAMMPS
Installing Debian LAMMPS
System Preparation
1.Retrieve the latest version on the website of Sandia:
wget -m -nd http://lammps.sandia.gov/tars/lammps.tar.gz
2.Opening the archive:
tar xvf lammps.tar.gz
3.Go through the archive:
cd-lammps * /
4.Setting a variable root Lammps:
export LAMMPSROOT=$(pwd)
5.Setting the local MPI:
cd $LAMMPSROOT/src/STUBS
make clean
make
6.Edit the file $LAMMPSROOT/src/change_box.cpp by adding #include
7.Compiling an indispensable yes-aspheric:
cd $LAMMPSROOT/src
make yes-asphere
Compilation basic
cd $LAMMPSROOT/src
make serial
If compilation is successful, the command ldd lmp_serial you must provide information like:
linux-gate.so.1 => (0xb7f92000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e8d000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7e67000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e59000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7cfe000)
/lib/ld-linux.so.2 (0xb7f93000)
The executable is LAMMPS lmp_serial
Compiling with FFTW
Preliminary Installation
sudo apt-get install fftw2 fftw-dev
Importing the Makefile Makefile.fftw in the $ LAMMPSROOT / src MAKE:
cd $LAMMPSROOT/src/MAKE
wget http://perso.ens-lyon.fr/emmanuel.quemener/software/LAMMPS/Makefile.fftw
Compilation
cd $LAMMPSROOT/src
make fftw
If compilation is successful, the command ldd lmp_fftw you must provide information like:
linux-gate.so.1 => (0xb7f22000)
libfftw.so.2 => /usr/lib/libfftw.so.2 (0xb7edf000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7df1000)
libm.so.6 => /lib/i686/cmov/libm.so.6
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7dbd000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7c62000)
/lib/ld-linux.so.2 (0xb7f23000)
The executable is LAMMPS lmp_fftw
Compiling with FFTW and OpenMPI
Preliminary Installation
sudo apt-get install libopenmpi-dev openmpi-bin libopenmpi1 openmpi-common
sudo apt-get install fftw2 fftw-dev
Compilation basic
cd $LAMMPSROOT/src
make serial
If compilation is successful, the command ldd lmp_serial you must provide information like:
linux-gate.so.1 => (0xb7f92000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e8d000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7e67000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e59000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7cfe000)
/lib/ld-linux.so.2 (0xb7f93000)
The executable is LAMMPS lmp_serial
Compiling with FFTW
Preliminary Installation
sudo apt-get install fftw2 fftw-dev
Importing the Makefile Makefile.fftw in the $ LAMMPSROOT / src MAKE:
cd $LAMMPSROOT/src/MAKE
wget http://perso.ens-lyon.fr/emmanuel.quemener/software/LAMMPS/Makefile.fftw
Compilation Compilation
cd $LAMMPSROOT/src
make fftw
If compilation is successful, the command ldd lmp_fftw you must provide information like:
linux-gate.so.1 => (0xb7f22000)
libfftw.so.2 => /usr/lib/libfftw.so.2 (0xb7edf000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7df1000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7dca000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7dbd000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7c62000)
/lib/ld-linux.so.2 (0xb7f23000)
The executable is LAMMPS lmp_fftw
Compiling with FFTW and OpenMPI
Preliminary Installation
sudo apt-get install libopenmpi-dev openmpi-bin libopenmpi1 openmpi-common
sudo apt-get install fftw2 fftw-dev
Importing the Makefile Makefile.openmpi in the $ LAMMPSROOT / src / MAKE:
cd $LAMMPSROOT/src/MAKE
wget http://perso.ens-lyon.fr/emmanuel.quemener/software/LAMMPS/Makefile.openmpi
Compilation
cd $LAMMPSROOT/src
make openmpi
If compilation is successful, the command ldd lmp_openmpi you must provide information like:
linux-gate.so.1 => (0xb7f77000)
libfftw.so.2 => /usr/lib/libfftw.so.2 (0xb7f34000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e46000)
libmpi_cxx.so.0 => /usr/lib/libmpi_cxx.so.0 (0xb7e27000)
libmpi.so.0 => /usr/lib/libmpi.so.0 (0xb7da3000)
libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0xb7d4f000)
libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0xb7cf8000)
libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7cf4000)
libnsl.so.1 => /lib/i686/cmov/libnsl.so.1 (0xb7cdb000)
libutil.so.1 => /lib/i686/cmov/libutil.so.1 (0xb7cd6000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7cb0000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ca3000)
libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7c8a000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7b2f000)
/lib/ld-linux.so.2 (0xb7f78000)
Compiling with MPICH and FFTW
Preliminary Installation
sudo apt-get install libmpich1.0-dev libmpich1.0gf mpich-bin
sudo apt-get install fftw2 fftw-dev
Importing the Makefile Makefile.mpich in the $ LAMMPSROOT / src / MAKE:
cd $LAMMPSROOT/src/MAKE cd $ LAMMPSROOT / src / MAKE
wget http://perso.ens-lyon.fr/emmanuel.quemener/software/LAMMPS/Makefile.mpich
Compilation Compilation
cd $LAMMPSROOT/src c
make mpich
Importing the Makefile Makefile.openmpi in the $ LAMMPSROOT / src / MAKE:
cd $LAMMPSROOT/src/MAKE
wget http://perso.ens-lyon.fr/emmanuel.quemener/software/LAMMPS/Makefile.openmpi
Compilation
cd $LAMMPSROOT/src
make openmpi
If compilation is successful, the command ldd lmp_openmpi you must provide information like:
linux-gate.so.1 => (0xb7f77000)
libfftw.so.2 => /usr/lib/libfftw.so.2 (0xb7f34000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e46000)
libmpi_cxx.so.0 => /usr/lib/libmpi_cxx.so.0 (0xb7e27000)
libmpi.so.0 => /usr/lib/libmpi.so.0 (0xb7da3000)
libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0xb7d4f000)
libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0xb7cf8000)
libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7cf4000)
libnsl.so.1 => /lib/i686/cmov/libnsl.so.1 (0xb7cdb000)
libutil.so.1 => /lib/i686/cmov/libutil.so.1 (0xb7cd6000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7cb0000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ca3000)
libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7c8a000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7b2f000)
/lib/ld-linux.so.2 (0xb7f78000)
Compiling with MPICH and FFTW
Preliminary Installation
sudo apt-get install libmpich1.0-dev libmpich1.0gf mpich-bin
sudo apt-get install fftw2 fftw-dev
Importing the Makefile Makefile.mpich in the $ LAMMPSROOT / src / MAKE:
cd $LAMMPSROOT/src/MAKE
wget http://perso.ens-lyon.fr/emmanuel.quemener/software/LAMMPS/Makefile.mpich
Compilation
cd $LAMMPSROOT/src
make mpich
Tuesday, May 4, 2010
Install GROMACS
- For single CPU
Download FFTW 3.2.2 from http://www.fftw.org/download.html
$sudo ./configure --enable-float --enable-threads --enable-sse
$sudo make
$sudo make install
(note: --enable-float is important for install GROMACS correctly)
2. Set environment values to .bashrc file
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
3. Install GROMACS
Download GROMACS 4.0.7 from http://www.gromacs.org/index.php?title=Download_%26_Installation
$sudo ./configure --enable-float
$sudo make
$sudo make install
4. Set environment value for GROMACS
# GROMACS
GROMACS=/usr/local/gromacs
export PATH=$GROMACS/bin:$PATH
export MANPATH=$GROMACS/share/man:$MANPATH
export LD_LIBRARY_PATH=$GROMACS/lib:$LD_LIBRARY_PATH
source $GROMACS/bin/GMXRC
- For parallel computation with multi-processor
2. Set environment valuables
export PATH=/usr/lib/lam/bin:$PATH
2. Install FFTW3
$ sudo ./configure --enable-float --enable-mpi --enable-sse
$sudo make
$sudo make install
3. Set environment valuables of FFTW3 for GROMACS
export CPPFLAGS="-I/usr/local/include -I/home/liuxi/apps/openmpi/include -I/home/liuxi/apps/openmpi/lib -I/usr/lib/lam/lib -I/usr/lib/lam/include"
export LDFLAGS=-L/usr/local/lib
4. Install GROMACS
$sudo ./configure --prefix=/home/xxxx/apps/gromacs --enable-mpi --enable-float --program-suffix="_mpi"
$sudo make
$sudo make install
5. Set environment valuable
# GROMACS
GROMACS=/usr/local/gromacs
export PATH=$GROMACS/bin:$PATH
export MANPATH=$GROMACS/share/man:$MANPATH
export LD_LIBRARY_PATH=$GROMACS/lib:$LD_LIBRARY_PATH
source $GROMACS/bin/GMXRC
------------------------------------
Some useful links:
http://lists.gromacs.org/pipermail/gmx-users/2008-April/033406.html
http://www.mail-archive.com/gmx-users@gromacs.org/msg27951.html
http://youyong.zz23.com/html/keyangongju/2010/0128/38529.html
http://www.mdbbs.org/thread-18939-1-2.html
Monday, May 3, 2010
Install LAMMPS on UBUNTU
From: http://ubuntuforums.org/showthread.php?t=1038282&highlight=LAMMPS&page=2
Download it from lammps.sandia.gov
In the terminal write the following:
gunzip lammps*.tar.gz
tar xvf lammps*.tar
This will create a file named: ''lammps-21Nov09'' (The date may change depending of the updates in the website).
It will contain the following files: bench, doc, examples, lib, potentials, src, tools.
christian@christian-laptop:~/lammps/lammps-21Nov09$ cd src
christian@christian-laptop:~/lammps/lammps-21Nov09$ cd MAKE
Before keep going it is necessary to solve some dependencies: build-essential (to compile in C), MPIch (to work in parallel) , FFTW ( to compute long-range interactions), libxaw7 (to compute the movies). In one line code you choose
sudo apt-get install build-essential mpich-bin libmpich1.0-dev fftw2 fftw-dev libxaw7-dev
If you are working in your personal computer you just need
sudo apt-get install build-essential
sudo apt-get install libxaw7-dev
To avoid future problems it will be better installing with the first line code
Now in the MAKE file you will see a lot of makefiles.xxx. Most users think Makefile.linux is the one they should use because they use ''linux.'' If you open the Makefile.linux you will see that it requires MPICH and FFTW. Things that we actually don't need (especially if we are starting the use of lammps). What a Beginner needs to install is Makefile.serial. If you open this file you will see in the first line that it says: no MPICH, no FFTW.
If you read carefully the Makefile.serial, in one line it says:
# MPI library, can be src/STUBS dummy lib.
If you go to STUBS you will find a Makefile, this will create a dummy lib for MPI in accordance to the Makefile.serial. So in the STUBS file you type:
christian@christian-laptop:~/lammps/lammps-21Nov09/src/STUBS$ make clean
christian@christian-laptop:~/lammps/lammps-21Nov09/src/STUBS$ make
Then you go back to src and compile lammps
christian@christian-laptop:~/lammps/lammps-21Nov09/src$ make clean-all
christian@christian-laptop:~/lammps/lammps-21Nov09/src$ make serial
It will work correctly, to verify your installation we will run some examples. First type
christian@christian-laptop:~/lammps/lammps-21Nov09/src$ ./lmp_serial
You should get:
LAMMPS (7 Jul 2009)
This means you are ok in the installation process, ctrl-C to get out and let's go to the examples file (cd ../examples), Choose any, and get deep in learning the meaning of the codes. Each example has one or more lammps input files.
For instance I will choose ''flow'' (cd flow). It has two in.flow.xxx files. (input files). I will run one of them by typing:
christian@christian-laptop:~/lammps/lammps-21Nov09/examples/flow$ ../../src/lmp_serial < in.flow.couette
Where is the data stored? Check the in.flow.couette file to see where it is. Almost at the end it says:
dump 1 all atom 50 dump.flow
So the data is stored in dump.flow
To finish this test let's visualize the data in a movie. First let's install xmovie
For this
christian@christian-laptop:~/lammps/lammps-21Nov09/examples/flow$ cd ../../tools/
christian@christian-laptop:~/lammps/lammps-21Nov09/tools$ cd xmovie
christian@christian-laptop:~/lammps/lammps-21Nov09/tools/xmovie$ make
christian@christian-laptop:~/lammps/lammps-21Nov09/tools/xmovie$ ./xmovie
Now you will be able to visualize your data using xmovie just by typing in the flow directory
christian@christian-laptop:~/lammps/lammps-21Nov09/examples/flow$ ../../tools/xmovie/xmovie -scale dump.flow
This will open the program, maybe your screen will appear black, change the color of your particles and click in Start to watch it.
http://ubuntuforums.org/attachment.php?attachmentid=140676&d=1261350130
2. 1. lammps install with makefile for parallel
From : http://ubuntuforums.org/showthread.php?t=1390490
I will tell you how to compile a serial and parallel version of LAMMPS (24Jan10) on Ubuntu 9.10. I don't expect to be making many return trips to this post, since as far as I can tell, everything works smoothly.
A couple disclaimers:
- Nearly everything can be figured out by thoroughly reading the LAMMPS documentation (link). That includes this entire guide!
- Don't forget the mailing list (link). Someone may have already asked your question so be sure to search it (link).
- I am going to assume you are comfortable issuing commands in the terminal.
- I will not deal with the instructions for older versions of LAMMPS or Ubuntu, since they are outdated and correspondingly more complicated.
- I am not responsible if you cannot get LAMMPS to compile.
- These instructions have been only tested to work on 25 January 2010 on a fresh Ubuntu 9.10 (Karmic) installation.
- It is your job to manage multiple MPI implementations if that is an issue on your machine. I assume there is no MPI infrastructure installed and install mpich2.
- The version of LAMMPS changes very rapidly, so just replace lammps-24Jan10 with lammps-(whatever your package release date is) and everything should still work.
- Finally, LAMMPS will probably never be available through apt-get because of very quick release of patches and updates as well as the inability to modify/extend LAMMPS if it were installed by apt-get. That means LAMMPS never gets "installed", and when you call it, the path to the binary must be explicitly given or be found within the $PATH.
Let's start making LAMMPS!
- Enable Universe Repository, if not enabled (link)
- Install required packages to build LAMMPS
You will need superuser privileges to successfully issue:Code:sudo apt-get install build-essential fftw-dev tcsh mpich2 gfortran
- build-essential is non-negotiable, and you may already have it installed.
- fftw-dev installs developer files for FFTW2 (not FFTW3, which won't work!) at standard locations that ubuntu knows about. It's possible to configure a LAMMPS compilation without any FFT tables, but I won't cover that here.
- tcsh is required so the LAMMPS Makefile system works. Substituting this with the "csh" package probably won't make any difference. (EDIT: As of the 30 Jan 2010 patch, this package is no longer needed).
- mpich2 will install MPICH-2, which can perform compilation of MPI programs linking to native MPI libraries. If only want a serial binary, you may safely leave this package off the list. While there are many other MPI implementations, I am not going to cover them here, though the idea is still the same. MPICH is kind of odd in that it requires a little bit more configuration to make it work, see below for the additional instructions.
- gfortran is required to compile and link against the Fortran libraries MEAM and REAX. If you use a different Fortran compiler, or will not be linking these libraries, it is safe to leave this item off the package list.
- Get LAMMPS
You can do this by going to the LAMMPS WWW site (link) or by issuing the following command in terminalCode:wget -m -nd http://lammps.sandia.gov/tars/lammps.tar.gz
- Unpack LAMMPS
Code:
tar xvzf lammps.tar.gz
- Copy Makefile to lammps-24Jan10/src/MAKE/Makefile.ubuntu
I have attached two files, one for serial and parallel builds. Due to the restrictions of the ubuntuforums.org, I had to give these with a ".txt" extension. When copying the makefile, I highly recommend removing everything from the underscore to the end off the filename (especially including the .txt!). - Compile LAMMPS
Make sure you are sitting in lammps-24Jan10/src (not the MAKE directory!). You'll need the STUBS library if you're making a serial binaryCode:# for parallel binaries
make ubuntu
# for serial, make STUBS, then LAMMPS
cd STUBS ; make ; cd ..
make ubuntu - Try an example to verify it works
While sitting in the src directory, the first command should run the "crack" example in serial mode. If your computer supports it, the second command should utilize 2 cores and run faster. Remember, even if you compile using the parallel makefile, the first invocation will still work, and is the reason you don't need a separate binary for serial runs.Code:# change to the examples/crack directory
cd ../examples/crack
# for serial or parallel builds
../../lmp_ubuntu < in.crack
# for parallel builds only
mpiexec -np 2 ../../lmp_ubuntu <>
Finally, I note that if you want to build lammps again after a new release or when patches of merged with the trunk, You can simply begin at step 3 and follow to the end. That "wget" command should always give you the latest package as long as the LAMMPS people keep their website they way they have it now.
--------
Finishing the configuration of MPICH2
To finish your MPICH2 installation, you need to make a file at ~/.mpd.conf. The MPICH2 documentation tells you:
A file named .mpd.conf file must be present in the user's home
directory (/etc/mpd.conf if root) with read and write access
only for the user, and must contain at least a line with:
MPD_SECRETWORD=
One way to safely create this file is to do the following:
cd $HOME
touch .mpd.conf
chmod 600 .mpd.conf
and then use an editor to insert a line like
MPD_SECRETWORD=mr45-j9z
into the file. (Of course use some other secret word than mr45-j9z.)
Last edited by Yoshis88; February 1st, 2010 at 02:02 PM..
Thursday, April 22, 2010
Amber in practice (in Chinese)
http://www.zhuaxia.com/item/211097608:
第一步:生成小分子模板
蛋白质中各氨基酸残基的力参数是预先存在的,但是很多模拟过程会涉及配体分子,这些有机小分子有很高的多样性,他们的力参数和静电信息不可能预存在库文件中,需要根据需要自己计算生成模板。amber中的antechamber 程序就是生成小分子模板的。
生成模板要进行量子化学计算,这一步可以由antechamber中附带的mopac完成,也可以由gaussian完成,这里介绍用gaussian计算的过程。
建议在计算前用sybyl软件将小分子预先优化,不要用gaussian优化,大基组从头计算进行几何优化花费的计算时间太长。gaussian计算的输入文件可以用antechamber程序直接生成,生成后去掉其中关于几何优化的参数即可
将小分子优化后的结构存储为mol2各式,上传到工作目录,用antechamber程序生成gaussian输入文件,命令如下:
antechamber -i 49.mol2 -fi mol2 -o 49.in -fo gzmat
这样可以生成49.in文件,下载到windows环境,运行gaussian计算这个文件,如果发现计算时间过长或者内存不足计算中断,可以修改文件选择小一些的基组。
获得输出文件49.out之后将它上传到工作目录,再用antechamber生成模板,命令如下:
antechamber -i 49.out -fi gout -o 49mod.mol2 -fo mol2 -c resp
运行之后就会生成一个新的mol2文件,如果用看图软件打开这个文件会发现,原子的颜色很怪异,这是因为mol2的原子名称不是标准的原子名称,看图软件无法识别。下面一步是检查参数,因为可能会有一些特殊的参数在gaff中不存在需要程序注入,命令如下:
parmchk -i 49mod.mol2 -f mol2 -o 49mod
这样那些特殊的参数就存在49mod这个文件中了
第二步:处理蛋白质文件
amber自带的leap程序是处理蛋白质文件的,他可以读入PDB各式的蛋白质文件,根据已有的力场模板为蛋白质赋予键参数和静电参数。
PDB格式的文件有时会带有氢原子和孤对电子的信息,但是在这种格式下氢原子和孤对电子的命名不是标准命名,力场模板无法识别这种不标准的命名,因此需要将两者的信息删除
ATOM 12 1H ARG A 82 12.412 8.891 34.128 1.00 0.00 H
在PDB各式里面,氢原子的信息会在第13或者14列出现H字符,可以应用grep命令删除在13或者14列出现H的行
命令如下:
grep -v '^.............H' 1t4j.pdb > x
grep -v '^............H' x > 1t4j_noh.pdb
除了删除氢和孤对电子,还应该把文件中的结晶水、乙酸等分子删除,这些分子的信息常常集中在文件的尾部,可以直接删除。
处理过之后的蛋白质文件,只包括各氨基酸残基和小分子配体的重原子信息,模拟需要的氢原子和水分子将在leap中添加
接下来需要进一步整理蛋白质文件,主要关注氨基酸的不同存在形态和小分子的原子名称。
半胱氨酸有两种存在形态,有的是两个半胱氨酸通过二硫键相连,有的则是自由的,两种半胱氨酸在力场文件中是用不同的unit来表示的,这相当于是两个完全不同的氨基酸,需要手动更改蛋白质文件中半胱氨酸的名字,桥连的要用CYX,自由的用CYS
组氨酸有若干种质子态,和半胱氨酸一样,也需要查阅文献确定这些质子态,并更改残基名称
最后需要修改的是配体分子的原子名,这是工作量最大的事情,仔细观察可以发现,一般PDB文件中配体的各个原子名称,和我们上面通过antechamber 生成的49mod.mol2中原子名称并不一致,这会造成leap无法识别这些原子,无法为这些原子赋予力参数和静电参数,因此需要手动更改蛋白质文件中配体分子的原子名称。
进行这一步可以同时用看图软件打开49mod.mol2和蛋白质文件,隐藏蛋白质文件中除配体分子以外的所有结构,旋转两个文件,让他们姿态相近,以方便观察,并且在各自均标识原子名称,然后用文字编辑软件打开蛋白质文件,核对看图软件中两个分子对应的原子名称,手动逐一修改。
修改原子名称需要极大的耐心和细心,如果发生错误下一步的操作会无法继续。我现在想到的也只有这个笨办法,如果谁还有别的好法子,欢迎告诉我。
现在文件的准备工作都已经完成,该开始正式的模拟了
第三步:生成拓扑文件和坐标文件
用amber进行分子动力学模拟需要坐标和拓扑文件,坐标文件记录了各个质点所座落的坐标,拓扑文件记录了整个体系各质点之间的链接状况、力参数电荷等信息。这两个文件是由leap 程序生成的
amber中有两个leap程序,一个是纯文字界面的tleap,一个是带有图形界面的Xleap。但是amber的图形界面做得很差,用远程登录使用图形界面不仅麻烦而且慢,所以我比较偏爱使用tleap,两个leap的命令是完全一样的,其实用哪一个都无所谓。
启动tleap,在shell里输入命令tleap,leap就启动了,shell里会显示
-I: Adding /usr/local/amber8/antechamber-1.23/dat/leap/prep to search path.
-I: Adding /usr/local/amber8/antechamber-1.23/dat/leap/lib to search path.
-I: Adding /usr/local/amber8/antechamber-1.23/dat/leap/parm to search path.
-I: Adding /usr/local/amber8/antechamber-1.23/dat/leap/cmd to search path.
Welcome to LEaP!
(no leaprc in search path)
>
这个>是leap的提示符
下面要调入库文件。amber是模拟生物分子的好手,主要就是依靠专门为蛋白质多糖核酸量身订做的amber力场,力场的所有参数都存储在库文件里,所以打开leap第一件事便是调入库文件。
amber提供了很多种库,这里我们只用到两个库,gaff和02库,输入命令:
>source leaprc.gaff
>source leaprc.ff02
之后两个库就调入进来了
这时可以用list命令看看库里都有什么:
> list
ACE ALA ARG ASH ASN ASP CALA CARG
CASN CASP CCYS CCYX CGLN CGLU CGLY CHCL3BOX
CHID CHIE CHIP CHIS CILE CIO CLEU CLYS
CMET CPHE CPRO CSER CTHR CTRP CTYR CVAL
CYM CYS CYX Cl- Cs+ DA DA3 DA5
DAN DC DC3 DC4 DC5 DCN DG DG3
DG5 DGN DT DT3 DT5 DTN GLH GLN
GLU GLY HID HIE HIP HIS HOH IB
ILE K+ LEU LYN LYS Li+ MEOHBOX MET
MG2 NALA NARG NASN NASP NCYS NCYX NGLN
NGLU NGLY NHID NHIE NHIP NHIS NILE NLEU
NLYS NMABOX NME NMET NPHE NPRO NSER NTHR
NTRP NTYR NVAL Na+ PHE PL3 POL3BOX PRO
RA RA3 RA5 RAN RC RC3 RC5 RCN
RG RG3 RG5 RGN RU RU3 RU5 RUN
Rb+ SER SPC SPCBOX T4E THR TIP3PBOX TIP4PBOX
TIP4PEWBOXTP3 TP4 TP5 TRP TYR VAL WAT
gaff parm99
>
这里面罗列的就是库里面的unit,包括20种氨基酸、糖以及核酸还有一些常见离子的参数
下面一步是调入配体分子的模板,首先补全参数,输入命令:
>loadamberparams 49mod
然后读入模板文件,输入命令:
>MOL = loadmol2 49mod.mol2
其中MOL是unit的名字,要保证这个名字和pdb文件中配体的残基名完全一致,否则系统仍然无法识别pdb文件中的小分子
现在再输入list命令会发现库里面多了一个unit:
>list
ACE ALA ARG ASH ASN ASP CALA CARG
CASN CASP CCYS CCYX CGLN CGLU CGLY CHCL3BOX
CHID CHIE CHIP CHIS CILE CIO CLEU CLYS
CMET CPHE CPRO CSER CTHR CTRP CTYR CVAL
CYM CYS CYX Cl- Cs+ DA DA3 DA5
DAN DC DC3 DC4 DC5 DCN DG DG3
DG5 DGN DT DT3 DT5 DTN GLH GLN
GLU GLY HID HIE HIP HIS HOH IB
ILE K+ LEU LYN LYS Li+ MEOHBOX MET
MG2 MOL NALA NARG NASN NASP NCYS NCYX
NGLN NGLU NGLY NHID NHIE NHIP NHIS NILE
NLEU NLYS NMABOX NME NMET NPHE NPRO NSER
NTHR NTRP NTYR NVAL Na+ PHE PL3 POL3BOX
PRO RA RA3 RA5 RAN RC RC3 RC5
RCN RG RG3 RG5 RGN RU RU3 RU5
RUN Rb+ SER SPC SPCBOX T4E THR TIP3PBOX
TIP4PBOX TIP4PEWBOXTP3 TP4 TP5 TRP TYR VAL
WAT gaff parm99
>
那个就是配体分子的模板
下面读入pdb文件,输入命令:
>comp = loadpdb 1t4j_noh.pdb
如果输入这个命令之后,屏幕上出现了大量的创建unit或者atom的信息,如下所示,则说明上面一步的pdb文件处理没有做好,还需要重新处理,通常这种情况都发生在配体分子上面,有时则是因为蛋白质中存在特殊残基。
Creating new UNIT for residue: FRJ sequence: 1
Created a new atom named: O36 within residue: .R
Created a new atom named: S33 within residue: .R
Created a new atom named: O35 within residue: .R
Created a new atom named: N34 within residue: .R
如果屏幕仅仅显示添加原子,这说明输入的PDB文件中缺失了部分重原子,leap根据模板自动补全了这些缺失的原子,这种情况不会影响进一步的计算
Added missing heavy atom: .R.A
Added missing heavy atom: .R.A
Added missing heavy atom: .R.A
Added missing heavy atom: .R.A
根据体系的具体情况,还可能要将成对的CYX残基中的二硫键相连,有时候还会链接其他原子,比如将糖基链接在氨基酸残基上,用bond命令可以完成,命令用法如下:
>bond comp.35.SG comp.179.SG
其中comp是刚才读入的分子名称,35和179是残基序号,SG是CYX残基模板中硫原子的名称,用comp.35.SG这样的语法就可以定位一个原子
如果希望进行考虑溶剂效应的动力学模拟,可能还需要为体系加上水,加水有很多种命令,这里只列举一个:
>solvatebox comp TIP3PBOX 10.0
solvatebox命令是说要加上一个方形的周期水箱,comp指要加水的分子,TIP3PBOX是选择的水模板名称,10.0是水箱子的半径
有的体系总电荷不为0,为了模拟稳定,需要加入抗衡离子,系统会自动计算体系的静电场分布,在合适的位置加上离子,命令如下:
>addions comp Na+ 0
意思是用钠离子把体系总电荷补平,还可以选择其他库里面有的离子。
完成这一步之后就可以输出拓扑文件和坐标文件了,但是为了方便起见,在运行最后一步之前要先把leap里加工好的分子单独存成一个库文件,以后可以直接调用这个库文件,免得重复上面的操作:
>saveoff comp 1taj.off
这样就生成了一个off文件在那里,下面输出拓扑文件和坐标文件
>saveamberparm comp 1t4j.prmtop 1t4j.inpcrd
Checking Unit.
Building topology.
Building atom parameters.
Building bond parameters.
Building angle parameters.
Building proper torsion parameters.
Building improper torsion parameters.
total 1 improper torsion applied
Building H-Bond parameters.
Not Marking per-residue atom chain types.
Marking per-residue atom chain types.
(Residues lacking connect0/connect1 -
these don't have chain types marked:
res total affected
CMET 1
)
(no restraints)
>quit
现在准备好拓扑文件和坐标文件,接下来就可以开始能量优化和动力学模拟了。如果愿意的话还可以用ambpdb这个命令生成一个pdb文件,直观地看一看生成了什么东西,命令如下:
[snowyowls@localhost actualamber]$ ambpdb -p 1t4j.prmtop <1t4j.inpcrd> kankan.pdb
| New format PARM file being parsed.
| Version = 1.000 Date = 09/08/06 Time = 16:36:09
[snowyowls@localhost actualamber]$
可以下载之后用看图软件欣赏,如果加了溶剂盒子的话,看的时候可要小心,会恨吓人的样子。
下面就要开始真正的模拟了
转好文章(amber 动力学)
amber 动力学过程:
1、选择力场 tleap -s -f $AMBERHOME/dat/leap/cmd/leaprc.ff99
2、导入晶体结构
保存crd和top文件 saveamberparm model polyAT_vac.top polyAT_vac.crd
如果缺正电荷 addions model Na+ 0
3、保存crd和top文件 saveamberparm model model_wat.top model_wat.crd
4、退出tleap
5、保存新的pdb
6、溶剂环境能量最优化。这一步保持溶质(蛋白)不变,去除溶剂中能量不正常的范德华相互作用。
该步骤的配置文件min1.in如下:
---------------------------------------------------------------------
oxytocin: initial minimisation solvent + ions ##说明信息######
&cntrl
imin = 1,
cut = 10
/
Hold the protein fixed
500.0
RES 1 9
END
END
------------------------------------------------------------------------------
任务命令:如果
7、对蛋白进行优化,min2.in文件将min1.in中的限制原子修改,限制水的位置。
sander -O -i min2.in -p model_wat.top -c min1.rst -o min2.out -r min2.rst&
8、整体的优化,去掉限制条件
sander -O -i min3.in -p model_wat.top -c min2.rst -o min3.out -r min3.rst &
9、有限制的分子动力学
RES 1 284
END
END
-----------------------------
nstlim = #:#表示计算的步数。dt = 0.002:表示步长,单位为ps,0.002表示2fs。ntx=1 irest=0 默认
imin = 0:表示模拟过程为分子动力学,不是能量最优化。
temp0 = 300:表示最后系统到达并保持的温度,单位为K。
tempi = 100:系统开始时的温度。
gamma_ln = 1:表示当ntt=3时的碰撞频率,单位为ps-1(请参考AMBER手册)
ntt = 3:温度转变控制,3表示使用兰格氏动力学。
11整系统分子动力学模拟: eq2
-------------------------------------------------
----------------------------------------------------------
ntb=2:表示分子动力学过程的压力常数。Pres0=1:引用1个单位的压强。
ntp=1:表示系统动力学过程各向同性。taup = 2.0:压力缓解时间,单位为ps。
使用以下命令进行MD:
sander -O -i eq2.in -p model_wat.top -c eq1.rst -o eq2.out -r eq2.rst -x eq2.mdcrd -ref eq1.rst &
结果处理:
在动力学过程中,将会产生 .rst 和.mdrcd 文件(需要的),由于crd文件很多,可以将其压缩成.gz 文件:gzip filename,将产生一个filename.gz 文件
做出已跑动力学的rmd图,判断是否平衡:
ptraj xxx.in 内容: trajin eq2.mdcrd.gz trajin eq3.mdcrd.gz trajin eq4.mdcrd.gz trajin eq5.mdcrd.gz rms first mass out xin.rms.dat1 :1-284@CA,C,N time 0.1 rms first mass out xin.rms.dat2 :88-91,172,201-204,230@CA,C,N time 0.1 ---------------------------------------------------------------------------- 利用xmgrace 作图: xmgrace xin.rms.dat1 xin.rms.dat2 如果需要取随即的点的构型: ptraj xxx.in内容: trajin eq7.mdcrd.gz 117 117 strip :WAT strip :Na+ trajout eq7.pdb pdb nobox ------------------------------------------- traj AR.top <<> > trajin AR.md7.crd 300 500 > center :1-250 > image center familiar > rms first mass out rms.dat :1-250 > average average.rst restrt > average average.pdb pdb > EOF 对于有些小分子利用sybyl构建的一般缺少原子参数,首先将小分子单独存成mol2,用amber的antechamber 做出参数。 1、利用gaussian * 这样可以生成49.in文件,下载到windows环境,运行gaussian计算这个文件,如果发现计算时间过长或者内存不足计算中断,可以修改文件选择小一些的基组。 you have Gassian output file.out (don’t forget to put some keyword in the Gassian input for the special format used by amber) * * 2、 直接用mol2 转 也可以直接把sybyl 的mol2 做参数 * * now you have 2 files: 注意修改file.prep 中文件名。要与pdb中的配体一致。(vi prep。假设是abc) 对应pdb与prep文件中的原子名称,,原子顺序要一致。 prep 在xleap中打开 using tleap for the protein or drug or/and complex -xleap –s –f leaprc.ff99 -mod = loadamberparams file.frcmod -loadamberprep file.prep edit abc pdb 可以用sybyl打开。用vi 修改pdb -source leaprc.gaff -RL = loadpdb file.pdb -Solvateoct RL TIP3PBOX 10 -Addions RL Cl- 0 (0:zero for neutral charge,Cl- can be replaced by Na+) -Saveamberparm RL fileWT.top fileWT.crd (save topology and coord. With water)
Amber网上教程地址[zz]
|
http://www.rosswalker.co.uk/tutorials/amber_workshop/ http://amber.scripps.edu/tutorials/ amber8/9 http://amber.scripps.edu/dbase.html amber ff in gmx http://folding.stanford.edu/ffamber/ other http://www.chpc.utah.edu/%7Echeatham/software.html AMBER 上好用低SMD计算 各位好以文字附上AMBER低输入档( umbrella.RST # Change distance between atoms 1771 and 3787 from 63 A to 253 A &rst iat=1771,3787,r1=10., r2=63.,r3=63.,r4=210.,rk2=10.,rk3=10., / smd.in Sample pulling input &cntrl nstlim=1000000, cut=99.0, igb=1, saltcon=0.1, ntpr=10, ntwr=10, ntt=3, gamma_ln=5.0, ntx=5, irest=1, ntwx=10, ig = 256251, ntc=2, ntf=2, tol=0.000001, dt=0.002, ntb=0, tempi=310., temp0=310., jar=1, / &wt type='DUMPFREQ', istep1=1, / &wt type='END', / DISANG=dist.RST DUMPAVE=dist_vs_t LISTIN=POUT LISTOUT=POUT 第一步:生成小分子模板 蛋白质中各氨基酸残基的力参数是预先存在的,但是很多模拟过程会涉及配体分子,这些有机小分子有很高的多样性,他们的力参数和静电信息不可能预存在库文件中,需要根据需要自己计算生成模板。amber中的antechamber 程序就是生成小分子模板的。生成模板要进行量子化学计算,这一步可以由antechamber中附带的mopac完成,也可以由gaussian完成,这里介绍用gaussian计算的过程。 建议在计算前用sybyl软件将小分子预先优化,不要用gaussian优化,大基组从头计算进行几何优化花费的计算时间太长。gaussian计算的输入文件可以用antechamber程序直接生成,生成后去掉其中关于几何优化的参数即可 将小分子优化后的结构存储为mol2各式,上传到工作目录,用antechamber程序生成gaussian输入文件,命令如下: antechamber -i 49.mol2 -fi mol2 -o 49.in -fo gzmat 这样可以生成49.in文件,下载到windows环境,运行gaussian计算这个文件,如果发现计算时间过长或者内存不足计算中断, 可以修改文件选择小一些的基组。 获得输出文件49.out之后将它上传到工作目录,再用antechamber生成模板,命令如下: antechamber -i 49.out -fi gout -o 49mod.mol2 -fo mol2 -c resp 运行之后就会生成一个新的mol2文件,如果用看图软件打开这个文件会发现,原子的颜色很怪异,这是因为mol2的原子名称 不是标准的原子名称,看图软件无法识别。下面一步是检查参数,因为可能会有一些特殊的参数在gaff中不存在需要程序注入, 命令如下: parmchk -i 49mod.mol2 -f mol2 -o 49mod 这样那些特殊的参数就存在49mod这个文件中了 第二步:处理蛋白质文件 amber自带的leap程序是处理蛋白质文件的,他可以读入PDB各式的蛋白质文件,根据已有的力场模板为蛋白质赋予键参数和静电参数。 PDB格式的文件有时会带有氢原子和孤对电子的信息,但是在这种格式下氢原子和孤对电子的命名不是标准命名,力场模板无法识别这 种不标准的命名,因此需要将两者的信息删除 ATOM 12 1H ARG A 82 12.412 8.891 34.128 1.00 0.00 H 在PDB各式里面,氢原子的信息会在第13或者14列出现H字符,可以应用grep命令删除在13或者14列出现H的行 命令如下: grep -v '^.............H' 1t4j.pdb > x grep -v '^............H' x > 1t4j_noh.pdb 除了删除氢和孤对电子,还应该把文件中的结晶水、乙酸等分子删除,这些分子的信息常常集中在文件的尾部,可以直接删除。 处理过之后的蛋白质文件,只包括各氨基酸残基和小分子配体的重原子信息,模拟需要的氢原子和水分子将在leap中添加 接下来需要进一步整理蛋白质文件,主要关注氨基酸的不同存在形态和小分子的原子名称。 半胱氨酸有两种存在形态,有的是两个半胱氨酸通过二硫键相连,有的则是自由的,两种半胱氨酸在力场文件中是用不同的unit来表示的, 这相当于是两个完全不同的氨基酸,需要手动更改蛋白质文件中半胱氨酸的名字,桥连的要用CYX,自由的用CYS 组氨酸有若干种质子态,和半胱氨酸一样,也需要查阅文献确定这些质子态,并更改残基名称 最后需要修改的是配体分子的原子名,这是工作量最大的事情,仔细观察可以发现,一般PDB文件中配体的各个原子名称,和我们上面通过 antechamber 生成的49mod.mol2中原子名称并不一致,这会造成leap无法识别这些原子,无法为这些原子赋予力参数和静电参数, 因此需要手动更改蛋白质文件中配体分子的原子名称。 进行这一步可以同时用看图软件打开49mod.mol2和蛋白质文件,隐藏蛋白质文件中除配体分子以外的所有结构,旋转两个文件, 让他们姿态相近,以方便观察,并且在各自均标识原子名称,然后用文字编辑软件打开蛋白质文件,核对看图软件中两个分子对 应的原子名称,手动逐一修改。 修改原子名称需要极大的耐心和细心,如果发生错误下一步的操作会无法继续。我现在想到的也只有这个笨办法,如果谁还有别的好法子 ,欢迎告诉我。 现在文件的准备工作都已经完成,该开始正式的模拟了 第三步:生成拓扑文件和坐标文件 用amber进行分子动力学模拟需要坐标和拓扑文件,坐标文件记录了各个质点所座落的坐标,拓扑文件记录了整个体系各质点之间的 链接状况、力参数电荷等信息。这两个文件是由leap 程序生成的 amber中有两个leap程序,一个是纯文字界面的tleap,一个是带有图形界面的Xleap。但是amber的图形界面做得很差,用远程登录使用 图形界面不仅麻烦而且慢,所以我比较偏爱使用tleap,两个leap的命令是完全一样的,其实用哪一个都无所谓。 启动tleap,在shell里输入命令tleap,leap就启动了,shell里会显示 -I: Adding /usr/local/amber8/antechamber-1.23/dat/leap/prep to search path. -I: Adding /usr/local/amber8/antechamber-1.23/dat/leap/lib to search path. -I: Adding /usr/local/amber8/antechamber-1.23/dat/leap/parm to search path. -I: Adding /usr/local/amber8/antechamber-1.23/dat/leap/cmd to search path. Welcome to LEaP! (no leaprc in search path) > 这个>是leap的提示符 下面要调入库文件。amber是模拟生物分子的好手,主要就是依靠专门为蛋白质多糖核酸量身订做的amber力场,力场的所有参数都存 储在库文件里,所以打开leap第一件事便是调入库文件。 amber提供了很多种库,这里我们只用到两个库,gaff和02库,输入命令: >source leaprc.gaff >source leaprc.ff02 之后两个库就调入进来了 这时可以用list命令看看库里都有什么: 这里面罗列的就是库里面的unit,包括20种氨基酸、糖以及核酸还有一些常见离子的参数 下面一步是调入配体分子的模板,首先补全参数,输入命令: >loadamberparams 49mod 然后读入模板文件,输入命令: >MOL = loadmol2 49mod.mol2 其中MOL是unit的名字,要保证这个名字和pdb文件中配体的残基名完全一致,否则系统仍然无法识别pdb文件中的小分子 现在再输入list命令会发现库里面多了一个unit: 那个就是配体分子的模板 下面读入pdb文件,输入命令: >comp = loadpdb 1t4j_noh.pdb 如果输入这个命令之后,屏幕上出现了大量的创建unit或者atom的信息,如下所示,则说明上面一步的pdb文件处理没有做好, 还需要重新处理,通常这种情况都发生在配体分子上面,有时则是因为蛋白质中存在特殊残基。 Creating new UNIT for residue: FRJ sequence: 1 Created a new atom named: O36 within residue: .R Created a new atom named: S33 within residue: .R Created a new atom named: O35 within residue: .R Created a new atom named: N34 within residue: .R 如果屏幕仅仅显示添加原子,这说明输入的PDB文件中缺失了部分重原子,leap根据模板自动补全了这些缺失的原子,这种情况 不会影响进一步的计算 Added missing heavy atom: .R.A Added missing heavy atom: .R.A Added missing heavy atom: .R.A Added missing heavy atom: .R.A 根据体系的具体情况,还可能要将成对的CYX残基中的二硫键相连,有时候还会链接其他原子,比如将糖基链接在氨基酸残基上 ,用bond命令可以完成,命令用法如下: >bond comp.35.SG comp.179.SG 其中comp是刚才读入的分子名称,35和179是残基序号,SG是CYX残基模板中硫原子的名称,用comp.35.SG这样的语法就可以定 位一个原子 如果希望进行考虑溶剂效应的动力学模拟,可能还需要为体系加上水,加水有很多种命令,这里只列举一个: >solvatebox comp TIP3PBOX 10.0 solvatebox命令是说要加上一个方形的周期水箱,comp指要加水的分子,TIP3PBOX是选择的水模板名称,10.0是水箱子的半径 有的体系总电荷不为0,为了模拟稳定,需要加入抗衡离子,系统会自动计算体系的静电场分布,在合适的位置加上离子,命令如下: >addions comp Na+ 0 意思是用钠离子把体系总电荷补平,还可以选择其他库里面有的离子。 完成这一步之后就可以输出拓扑文件和坐标文件了,但是为了方便起见,在运行最后一步之前要先把leap里加工好的分子单独存 成一个库文件,以后可以直接调用这个库文件,免得重复上面的操作: >saveoff comp 1taj.off 这样就生成了一个off文件在那里,下面输出拓扑文件和坐标文件 >saveamberparm comp 1t4j.prmtop 1t4j.inpcrd Checking Unit. Building topology. Building atom parameters. Building bond parameters. Building angle parameters. Building proper torsion parameters. Building improper torsion parameters. total 1 improper torsion applied Building H-Bond parameters. Not Marking per-residue atom chain types. Marking per-residue atom chain types. (Residues lacking connect0/connect1 - these don't have chain types marked: res total affected CMET 1 ) (no restraints) >quit 现在准备好拓扑文件和坐标文件,接下来就可以开始能量优化和动力学模拟了。如果愿意的话还可以用ambpdb这个命令生成一 个pdb文件,直观地看一看生成了什么东西,命令如下: [snowyowls@localhost actualamber]$ ambpdb -p 1t4j.prmtop <1t4j.inpcrd> kankan.pdb | New format PARM file being parsed. | Version = 1.000 Date = 09/08/06 Time = 16:36:09 [snowyowls@localhost actualamber]$ 可以下载之后用看图软件欣赏,如果加了溶剂盒子的话,看的时候可要小心,会恨吓人的样子。 第四步:能量优化 用amber进行分子动力学模拟需要坐标和拓扑文件,这在上一步已经完成了,分别生成了1t4j.prmtop 和1t4j.inpcrd两个文件 ,下面一步就是动力学模拟之前的能量优化了。 由于我们进行的起始结构来自晶体结构或者同源模建,所以在分子内部存在着一定的张力,能量优化就是在真正的动力学之前, 释放这些张力,如果没有这个步骤,在动力学模拟开始之后,整个分子可能会因此散架。 能量优化由sander模块完成,运行sander至少需要三个输入文件,分别是分子的拓扑文件,坐标文件以及sander的控制文件。 现在分子的拓扑文件和坐标文件已经完成,需要建立输入文件,min_1.in Initial minimisation of our structures &cntrl imin=1, maxcyc=4000, ncyc=2000, cut=10, ntb=1,ntr=1, restraint_wt=0.5 restraintmask=':1-283' / 文件首行是说明,说明这项任务的基本情况; &cntrl与/之间的部分是模拟的参数 其中imin=1表示任务是能量优化,maxcyc=4000表示能量优化共进行4000步,ncyc=2000表示在整个能量优化的4000步中, 前 2000步采用最陡下降法,在2000步之后转换为共轭梯度法,如果模拟的时候不希望进行方法的转换,可以再加入另一 个关键词NTMIN,如果NTMIN =0则全程使用共轭梯度法,NTMIN=2则全程使用最陡下降法,此外还有=3和=4的选项,分别是xmin法和lmod法 ,具体情况可以看手册。 第二行的cut=10表示非键相互作用的截断值,单位是埃, ntb=1表示使用周期边界条件,这个选项要和前面生成的拓扑文件坐标文件相匹配, 如果前面加溶剂时候用的是盒子水,就设置ntb=1,如果加的是层水,那就应该选择ntb=0;ntr=1表示在能量优化的过程中要约束一些原子, 约束的是哪些原子呢?后面有。 第三行和第四行都是关于约束原子的信息,restraint_wt=0.5限定了约束的力常数,在这里约束原子就是把原子用一根弹簧拉在固定的 位置上,一旦原子偏离固定的位置,系统就会给他施加一个回复力,偏离的越远,回复力越大,回复力就是由这个力常数决定的,单位是 Kcal/(mol*A)。 restraintmask=':1-283'表示约束的是从1到283号残基,在这个分子中,1-283号残基是蛋白质上的氨基酸残基,从284 号开始,就都是水了,所以这个命令的意思就是,约束整个蛋白质,自由地优化溶剂分子。因为溶剂分子是前面的tleap自动给加上的, 所以一定要额外多关注一些。 下面运行sander来执行这个优化: [snowyowls@localhost actualamber]$ sander -O -i min_1.in -p 1t4j.prmtop -c 1t4j.i npcrd -ref 1t4j.inpcrd -r 1t4j_min1.rst -o 1t4j_min1.out 命令中,-O表示覆盖所有同名文件,-i min_1.in表示sander的控制文件是min_1.in,-p 1t4j.prmtop表示分子的拓扑文件 ,-c 1t4j.inpcrd表示坐标文件,-ref 1t4j.inpcrd是参考坐标文件,只有在控制文件中出现关键词ntr=1的时候才需要给 sander指定-ref文件,这是约束原子的参考坐标,- ref 1t4j.inpcrd就是说以1t4j.inpcrd中的坐标为准进行约束原子的优化。 以上这四个是输入文件。-r 1t4j_min1.rst表示经过模拟之后新的原子坐标会输出到1t4j_min1.rst文件中,-o 1t4j_min1.out 则表示优化过程中的相关信息都会写入到1t4j_min1.out文件中。 运行起这个命令之后,等拿到 1t4j_min1.rst文件就意味着对溶剂的优化已经差不多了,显然下面还需要对蛋白质本身进行优化, 这个优化还要分两步进行,控制文件分别是min_2.in 和min_3.in min_2.in Initial minimisation of our structures &cntrl imin=1, maxcyc=5000, ncyc=2500, cut=10, ntb=1,ntr=1, restraint_wt=0.5 restraintmask=':1-283@CA,N,C' / 在这里发生变化的是约束原子的范围, ':1-283@CA,N,C'表示1-283号残基中名叫CA,N和C的原子,这些原子实际上是蛋白质主链上 的原子,也就是说这一次的优化是约束了蛋白质主链上的原子之后,对溶剂和侧链原子进行自由优化。 min_3.in Initial minimisation of our structures &cntrl imin=1, maxcyc=10000, ncyc=5000, cut=10, ntb=1, / 在这里不再进行约束原子的优化了,对整个分子进行全原子优化。 三步优化的命令如下: [snowyowls@localhost actualamber]$ sander -O -i min_1.in -p 1t4j.prmtop -c 1t4j.inpcrd -ref 1t4j.inpcrd -r 1t4j_min1.rst -o 1t4j_min1.out [snowyowls@localhost actualamber]$ sander -O -i min_2.in -p 1t4j.prmtop -c 1t4j_min1.rst -ref 1t4j_min1.rst -r 1t4j_min2.rst -o 1t4j_min2.out [snowyowls@localhost actualamber]$ sander -O -i min_3.in -p 1t4j.prmtop -c 1t4j_min2.rst -r 1t4j_heat0.rst -o 1t4j_min3.out 接下来就是真正的分子动力学模拟了…… |
本文引用地址: http://www.sciencenet.cn/m/user_content.aspx?id=289031 |