📄 demo
字号:
#!/bin/csh# this is the demo moleculesetenv MOL cpeptide####################### INTRODUCTION #######################clear cat << _EOF_----------------------------------------------------------------------------------------------------------------------------------Welcome to the GROMACS demo.This is a script that takes about 10 min to run.In this demo we will demonstrate how to simulate MolecularDynamics (MD) using the GROMACS software package.The demo will perform a complete molecular dynamics (MD) simulationof a small peptide in water. The only input file we need to do thisis a pdb file of a small peptide.If you have any problems or remarks with respect to this demonstration,please mail to: gromacs@gromacs.org , or check the resources onour website http://www.gromacs.org .----------------------------------------------------------------------------------------------------------------------------------_EOF_echo -n "Press <enter>"set ans = $<############################ CHECK ENVIRONMENT ############################clear cat << _EOF_----------------------------------------------------------------------------------------------------------------------------------Before we you can actually start the GROMACS demo, the programsmust be present in your PATH. This might already be the case ifthey are linked to /usr/local/bin. If not, follow the instructionsin the getting started section. If GROMACS is not installed properly on your computer, contact your system manager.----------------------------------------------------------------------------------------------------------------------------------_EOF_echo -n "Press <enter>"set ans = $<################## PDB2GMX ##################clearcat << _EOF_----------------------------------------------------------------------------------------------------------------------------------Before we can start any simulation we need a molecular toplogyfile. This topology file ( .top extension ) is generated by theprogram pdb2gmx. The only input file of the pdb2gmx program is the pdbfile of our peptide ( .pdb extension ). Because most pdb files do not contain all hydrogen atoms, the pdb2gmxprogram will also add them to our peptide. The output file whichcontains the structure of the peptide when hydrogen atoms are added is agromos structure file ( .gro extension ) ----------------------------------------------------------------------------------------------------------------------------------_EOF_if ( $?DISPLAY ) then echo "You seem to have the DISPLAY variable is set, so we will" echo "pop up a window with the output of the pdb2gmx program" endifecho -n "Press <enter>"set ans = $<echo "Starting pdb2gmx"if ( $?DISPLAY ) then xterm -title pdb2gmx -sb -e tail +0f output.pdb2gmx &endifecho 0 | pdb2gmx -f ${MOL}.pdb -o ${MOL}.gro -p ${MOL}.top >& ! output.pdb2gmxecho "pdb2gmx finished"echo -n "Press <enter>"set ans = $<################# GENBOX #################clearcat << _EOF_----------------------------------------------------------------------------------------------------------------------------------Because a simulation of a peptide in vacua is a bit unrealistic, wehave to solvate our peptide in a box of water. genbox is the programwe use to do this.The genbox program reads the peptide structure file and an input filecontaining the sizes of the desired water box. The output of genbox isa gromos structure file of a peptide solvated in a box of water. Thegenbox program also changes the topology file ( .top extension ) toinclude water. First we will use the program editconf to define theright boxsize for our system.----------------------------------------------------------------------------------------------------------------------------------_EOF_if ( $?DISPLAY ) then echo "The output of the genbox program should appear" echo "in a separate xterm window" endifecho -n "Press <enter>"set ans = $<echo "Starting editconf and genbox..."if ( $?DISPLAY ) then xterm -title genbox -sb -e tail +0f output.genbox &endifeditconf -f ${MOL}.gro -o ${MOL}.gro -d 0.5 >& ! output.genbox genbox -cp ${MOL}.gro -cs -o ${MOL}_b4em.gro -p ${MOL}.top >>& ! output.genbox echo "editconf and genbox finished"echo -n "Press <enter>"set ans = $<################# GROMPP #################clearcat << _EOF_----------------------------------------------------------------------------------------------------------------------------------In principle we can start a Molecular Dynamics simulation now. Howeverit is not very wise to do so, because our system is full of closecontacts. These close contacts are mainly a result of the genboxprogram. The added solvent might have some close contacts with thepeptide resulting in very high repulsive energies. If we would start aMolecular Dynamics (MD) simulation without energy minimisation thesystem would not be stable because of these high energies.The standard procedure to remove these close contacts isEnergy Minimisation (EM). Energy minimisation slightly changes thecoordinates of our system to remove high energies from our system. Before we can start the Energy Minimisation we have to preprocess allthe input files with the GROMACS preprocessor named grompp. grompppreprocesses the topology file (.top), the structure file (.gro) and aparameter file (.mdp) resulting in a binary topology file (.tprextension). This binary topology file contains all information for a simulation (in this case an energy minimisation).----------------------------------------------------------------------------------------------------------------------------------_EOF_if ( $?DISPLAY ) then echo "The output of the grompp program should appear" echo "in a separate xterm window"endifecho -n "Press <enter>"set ans = $<echo generating energy minimisation parameter file...cat > em.mdp << _EOF_title = ${MOL}cpp = /usr/bin/cppdefine = -DFLEX_SPCconstraints = noneintegrator = steepdt = 0.002 ; ps !nsteps = 100nstlist = 10ns_type = gridrlist = 1.0rcoulomb = 1.0rvdw = 1.0;; Energy minimizing stuff;emtol = 1000.0emstep = 0.01_EOF_echo "Starting grompp..."if ( $?DISPLAY ) then xterm -title grompp -sb -e tail +0f output.grompp_em &endifgrompp -f em -c ${MOL}_b4em -p ${MOL} -o ${MOL}_em >& ! output.grompp_emecho "grompp finished"echo -n "Press <enter>"set ans = $<################### MDRUN EM ###################clearcat << _EOF_----------------------------------------------------------------------------------------------------------------------------------Now the binary topology file is generated, we can start the energyminimisation (EM). The program which performs the EM is calledmdrun. In fact all simulations are performed by the same program:mdrun. As the Energy Minimisation is running, watch the output of theprogram. The first number ( from left to right ) is the number of theiteration step. The second number is the step size, which gives anindication of the change in the system. The third number is thepotential energy of the system. This number starts at a high value andrapidly drops down, and converges, to a large negative value. ----------------------------------------------------------------------------------------------------------------------------------_EOF_if ( $?DISPLAY ) then echo "The output of the mdrun program should appear" echo "in a separate xterm window"endifecho -n "Press <enter>"set ans = $<echo "starting energy minimisation mdrun..."if ( $?DISPLAY ) then xterm -title mdrun -sb -e tail +0f output.mdrun_em &endifmdrun -nice 4 -s ${MOL}_em -o ${MOL}_em -c ${MOL}_b4pr -v >& ! output.mdrun_em echo "mdrun finished"echo -n "Press <enter>"set ans = $<#################### GROMPP PR ####################clearcat << _EOF_----------------------------------------------------------------------------------------------------------------------------------Once all close contacts are removed from the system, we want to domolecular dynamics of the water molecules, and keep the peptidefixed. This is called position restrained (PR) MD.Position Restrained MD keeps the peptide fixed and lets all watermolecules equilibrate around the peptide in order to fill holesetc. which were not filled by the genbox program.We are first going to preprocess the input files to generate thebinary topology. The input files are the topology file, the structurefile ( output of the EM ) a paremeter file, and an index file.By default our system is split into several groups. In this case we
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -