Advertisement
ProzacR

ligand protein gromacs acpype

Oct 12th, 2015
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.59 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. #gromacs with acpype
  4.  
  5. #Assuming stanting file is istarting with pdb ID
  6. file=$(file *_fix.pdb | head -c 4)
  7. lig=$(grep "^HETATM" ${file}_fix.pdb | tail -n 1 | awk '{print $4}')
  8.  
  9. # Assuming Complex.pdb (= 1BVG.pdb), split it in Protein.pdb and ${lig}.pdb
  10. # wget -c "http://www.pdb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=1BVG" -O 1BVG.pdb
  11. grep 'ATOM  ' ${file}_fix.pdb>| Protein.pdb
  12. #jau yra:
  13. grep 'HETATM' ${file}_fix.pdb>| ${lig}.pdb
  14.  
  15. \cp Protein.pdb ProteinAmber.pdb
  16.  
  17. # Process with pdb2gmx and define water
  18. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/kernel/pdb2gmx_mpi -ff amber99sb -f ProteinAmber.pdb -o Protein2.pdb -p Protein.top -water tip3p -ignh || exit 1
  19.  
  20. # Generate ${lig} topology file with acpype (GAFF)
  21. #acpype -i ${lig}.pdb
  22.  
  23. # Merge Protein2.pdb + updated ${lig}_NEW.pdb -> Complex.pdb
  24. grep -h ATOM Protein2.pdb ${lig}.acpype/${lig}_NEW.pdb >| Complex.pdb
  25.  
  26. # Edit Protein.top -> Complex.top
  27. \cp ${lig}.acpype/${lig}_GMX.itp ${lig}.itp
  28. \cp Protein.top Complex.top
  29.  
  30. # #include "${lig}.itp" has to be inserted right after ffamber**.itp line and before Protein_*.itp line in Complex.top.
  31.  
  32. cat Complex.top | sed "/forcefield\.itp\"/a\
  33. #include \"${lig}.itp\"
  34. " >| Complex2.top
  35.  
  36. echo "${lig}   1" >> Complex2.top
  37. \mv Complex2.top Complex.top
  38.  
  39. # Setup the box and add water
  40. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/tools/editconf_mpi -bt triclinic -f Complex.pdb -o Complex.pdb -d 1.0 || exit 1
  41. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/tools/genbox_mpi -cp Complex.pdb -cs spc216.gro -o Complex_b4ion.pdb -p Complex.top || exit 1
  42.  
  43. # Create em.mdp file
  44. cat << EOF >| em.mdp
  45. define                   = -DFLEXIBLE
  46. integrator               = steep
  47. nsteps                   = 200
  48. constraints              = none
  49. emtol                    = 1000.0
  50. nstcgsteep               = 10 ; do a steep every 10 steps of cg
  51. emstep                   = 0.01 ; used with steep
  52. nstcomm                  = 1
  53. coulombtype              = PME
  54. ns_type                  = grid
  55. rlist                    = 1.0
  56. rcoulomb                 = 1.0
  57. rvdw                     = 1.4
  58. Tcoupl                   = no
  59. Pcoupl                   = no
  60. gen_vel                  = no
  61. nstxout                  = 0 ; write coords every # step
  62. optimize_fft             = yes
  63. EOF
  64.  
  65. # Create em2.mdp file
  66. cat << EOF >| em2.mdp
  67. define                   = -DFLEXIBLE
  68. integrator               = cg ; steep
  69. nsteps                   = 200
  70. constraints              = none
  71. emtol                    = 1000.0
  72. nstcgsteep               = 10 ; do a steep every 10 steps of cg
  73. emstep                   = 0.01 ; used with steep
  74. nstcomm                  = 1
  75. coulombtype              = PME
  76. ns_type                  = grid
  77. rlist                    = 1.0
  78. rcoulomb                 = 1.0
  79. rvdw                     = 1.4
  80. Tcoupl                   = no
  81. Pcoupl                   = no
  82. gen_vel                  = no
  83. nstxout                  = 0 ; write coords every # step
  84. optimize_fft             = yes
  85. EOF
  86.  
  87. # Create md.mdp file
  88. cat << EOF >| md.mdp
  89. integrator               = md
  90. nsteps                   = 5000000 ; 10 ns
  91. dt                       = 0.002
  92. constraints              = all-bonds
  93. ns_type                  = grid
  94. rlist                    = 1.2
  95. rcoulomb                 = 1.1
  96. rvdw                     = 1.0
  97. vdwtype                  = shift
  98. rvdw-switch              = 0.9
  99. coulombtype              = PME-Switch
  100. Tcoupl                   = v-rescale
  101. tau_t                    = 0.1 0.1
  102. tc-grps                  = protein non-protein
  103. ref_t                    = 300 300
  104. Pcoupl                   = parrinello-rahman
  105. Pcoupltype               = isotropic
  106. tau_p                    = 0.5
  107. compressibility          = 4.5e-5
  108. ref_p                    = 1.0
  109. gen_vel                  = yes
  110. #nauji israsymo parametrai, kad butu maziau Mb:
  111. nstcomm             =  10
  112. nstxout             =  0
  113. nstvout             =  0
  114. nstfout             =  0
  115. nstxtcout           =  10000
  116. nstenergy           =  10000
  117. lincs-iter               = 2
  118. DispCorr                 = EnerPres
  119. optimize_fft             = yes
  120. EOF
  121.  
  122. # Setup ions
  123. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/kernel/grompp_mpi -f em.mdp -c Complex_b4ion.pdb -p Complex.top -o Complex_b4ion.tpr || exit 1
  124. \cp Complex.top Complex_ion.top
  125.  
  126. # neber -norandom tokios tai istrinta
  127. echo 15| /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/tools/genion_mpi -s Complex_b4ion.tpr -o Complex_b4em.pdb -neutral -conc 0.15 -p Complex_ion.top || exit 1
  128.  
  129. \mv Complex_ion.top Complex.top
  130.  
  131. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/kernel/grompp_mpi -f em.mdp -c Complex_b4em.pdb -p Complex.top -o em.tpr || exit 1
  132.  
  133. # Create min.job file
  134. cat << EOF >| min.job
  135. #!/bin/tcsh
  136. #SBATCH -p long
  137. #SBATCH -n12
  138. #SBATCH -t 02-00:00
  139. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/kernel/mdrun_mpi -deffnm em
  140. EOF
  141.  
  142. # Create min2.job file
  143. cat << EOF >| min2.job
  144. #!/bin/tcsh
  145. #SBATCH -p long
  146. #SBATCH -n12
  147. #SBATCH -t 02-00:00
  148. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/kernel/grompp_mpi -f em2.mdp -c em.gro -p Complex.top -o em2.tpr || exit 1
  149. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/kernel/mdrun_mpi -deffnm em2
  150. EOF
  151.  
  152. # Create sim.job file
  153. cat << EOF >| sim.job
  154. #!/bin/tcsh
  155. #SBATCH -p verylong
  156. #SBATCH -n12
  157. #SBATCH -t 04-00:00
  158. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/kernel/grompp_mpi -f md.mdp -c em2.gro -p Complex.top -o md.tpr -maxwarn 2 || exit 1
  159. /scratch/lustre/home/vyra6599/bin/gromacs-4.6.7/build/src/kernel/mdrun_mpi -deffnm md
  160. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement