Advertisement
Guest User

Untitled

a guest
Aug 7th, 2024
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Generated by CHARMM-GUI (http://www.charmm-gui.org) v3.7
  4.  
  5. # This folder contains GROMACS formatted force fields, a pre-optimized PDB structure, and GROMACS inputs.
  6. # All input files were optimized for GROMACS 2019.2 or above, so lower version of GROMACS can cause some errors.
  7. # We adopted the Verlet cut-off scheme for all minimization, equilibration, and production steps because it is
  8. # faster and more accurate than the group scheme. If you have a trouble with a performance of Verlet scheme while
  9. # running parallelized simulation, you should check if you are using appropriate command line.
  10. # For MPI parallelizing, we recommend following command:
  11. # mpirun -np $NUM_CPU gmx mdrun -ntomp 1
  12.  
  13. init="step5_input"
  14. rest_prefix="step5_input"
  15. mini_prefix="step6.0_minimization"
  16. equi_prefix="step6.%d_equilibration"
  17. prod_prefix="step7_production"
  18. prod_step="step7"
  19. awh_prefix="step8_awh"
  20.  
  21. # Minimization
  22. # In the case that there is a problem during minimization using a single precision of GROMACS, please try to use
  23. # a double precision of GROMACS only for the minimization step.
  24. gmx grompp -f "${mini_prefix}.mdp" -o "${mini_prefix}.tpr" -c "${init}.gro" -r "${rest_prefix}.gro" -p topol.top -n index.ndx -maxwarn 5
  25. gmx mdrun -v -deffnm "${mini_prefix}"
  26.  
  27. if [ -f "${mini_prefix}.tpr" ]; then
  28. echo "${mini_prefix}.tpr already exists, skipping grompp for minimization"
  29. else
  30. /usr/local/gromacs/avx_512/bin/gmx grompp -f "${mini_prefix}.mdp" -o "${mini_prefix}.tpr" -c "${init}.gro" -r "${rest_prefix}.gro" -p "${topol}" -n "${index}" -maxwarn 5
  31. fi
  32.  
  33. if [ -f "${mini_prefix}.gro" ]; then
  34. echo "${mini_prefix}.gro already exists, skipping mdrun for minimization"
  35. else
  36. gmx mdrun -v -deffnm "${mini_prefix}"
  37. fi
  38.  
  39. # Equilibration
  40. cnt=1
  41. cntmax=6
  42.  
  43. while [ "$cnt" -le "$cntmax" ]; do
  44. pcnt=$((cnt - 1))
  45. istep=$(printf "${equi_prefix}" "$cnt")
  46. pstep=$(printf "${equi_prefix}" "$pcnt")
  47.  
  48. if [ "$cnt" -eq 1 ]; then
  49. pstep="${mini_prefix}"
  50. fi
  51.  
  52. # Prüfen, ob die TPR-Datei schon existiert
  53. if [ -f "${istep}.tpr" ]; then
  54. echo "${istep}.tpr exists, skipping to the next step."
  55. cnt=$((cnt + 1))
  56. continue
  57. fi
  58.  
  59. gmx grompp -f "${istep}.mdp" -o "${istep}.tpr" -c "${pstep}.gro" -r "${rest_prefix}.gro" -p topol.top -n index.ndx -maxwarn 5
  60.  
  61. # Prüfen, ob die Simulationsergebnis-Datei schon existiert
  62. if [ -f "${istep}.gro" ]; then
  63. echo "${istep}.gro exists, skipping mdrun."
  64. else
  65. gmx mdrun -v -deffnm "${istep}"
  66. fi
  67.  
  68. cnt=$((cnt + 1))
  69. done
  70.  
  71. # Production (step 7)
  72. #cnt=1
  73. #cntmax=2
  74.  
  75. #while [ "$cnt" -le "$cntmax" ]; do
  76. # pcnt=$((cnt - 1))
  77. # istep="${prod_step}_${cnt}"
  78. # pstep="${prod_step}_${pcnt}"
  79.  
  80. # Prüfen, ob die TPR-Datei schon existiert
  81. # if [ -f "${istep}.tpr" ]; then
  82. # echo "${istep}.tpr exists, skipping to the next step."
  83. # cnt=$((cnt + 1))
  84. # continue
  85. # fi
  86.  
  87. # if [ "$cnt" -eq 1 ]; then
  88. # pstep=$(printf "${equi_prefix}" 6)
  89. # gmx grompp -f "${prod_prefix}.mdp" -o "${istep}.tpr" -c "${pstep}.gro" -p topol.top -n index.ndx -maxwarn 5
  90. # else
  91. # gmx_mpi grompp -f "${prod_prefix}.mdp" -o "${istep}.tpr" -c "${pstep}.gro" -t "${pstep}.cpt" -p topol.top -n index.ndx -maxwarn 5
  92. # fi
  93.  
  94. # Prüfen, ob die Simulationsergebnis-Datei schon existiert
  95. # if [ -f "${istep}.gro" ]; then
  96. # echo "${istep}.gro exists, skipping mdrun."
  97. # else
  98. # gmx mdrun -v -deffnm "${istep}"
  99. # fi
  100.  
  101. # cnt=$((cnt + 1))
  102. #done
  103.  
  104. # AWH Production (step 8)
  105.  
  106. gmx grompp -f step8_awh.mdp -o step8_awh.tpr -c step6.6_equilibration.gro -p topol.top -n index.ndx -maxwarn 5
  107.  
  108. gmx mdrun -deffnm step8_awh
  109.  
  110. gmx awh -more -f step6.6_equilibration.edr -s step6.6_equilibration.tpr
  111. #done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement