Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Generated by CHARMM-GUI (http://www.charmm-gui.org) v3.7
- # This folder contains GROMACS formatted force fields, a pre-optimized PDB structure, and GROMACS inputs.
- # All input files were optimized for GROMACS 2019.2 or above, so lower version of GROMACS can cause some errors.
- # We adopted the Verlet cut-off scheme for all minimization, equilibration, and production steps because it is
- # faster and more accurate than the group scheme. If you have a trouble with a performance of Verlet scheme while
- # running parallelized simulation, you should check if you are using appropriate command line.
- # For MPI parallelizing, we recommend following command:
- # mpirun -np $NUM_CPU gmx mdrun -ntomp 1
- init="step5_input"
- rest_prefix="step5_input"
- mini_prefix="step6.0_minimization"
- equi_prefix="step6.%d_equilibration"
- prod_prefix="step7_production"
- prod_step="step7"
- awh_prefix="step8_awh"
- # Minimization
- # In the case that there is a problem during minimization using a single precision of GROMACS, please try to use
- # a double precision of GROMACS only for the minimization step.
- 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
- gmx mdrun -v -deffnm "${mini_prefix}"
- if [ -f "${mini_prefix}.tpr" ]; then
- echo "${mini_prefix}.tpr already exists, skipping grompp for minimization"
- else
- /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
- fi
- if [ -f "${mini_prefix}.gro" ]; then
- echo "${mini_prefix}.gro already exists, skipping mdrun for minimization"
- else
- gmx mdrun -v -deffnm "${mini_prefix}"
- fi
- # Equilibration
- cnt=1
- cntmax=6
- while [ "$cnt" -le "$cntmax" ]; do
- pcnt=$((cnt - 1))
- istep=$(printf "${equi_prefix}" "$cnt")
- pstep=$(printf "${equi_prefix}" "$pcnt")
- if [ "$cnt" -eq 1 ]; then
- pstep="${mini_prefix}"
- fi
- # Prüfen, ob die TPR-Datei schon existiert
- if [ -f "${istep}.tpr" ]; then
- echo "${istep}.tpr exists, skipping to the next step."
- cnt=$((cnt + 1))
- continue
- fi
- gmx grompp -f "${istep}.mdp" -o "${istep}.tpr" -c "${pstep}.gro" -r "${rest_prefix}.gro" -p topol.top -n index.ndx -maxwarn 5
- # Prüfen, ob die Simulationsergebnis-Datei schon existiert
- if [ -f "${istep}.gro" ]; then
- echo "${istep}.gro exists, skipping mdrun."
- else
- gmx mdrun -v -deffnm "${istep}"
- fi
- cnt=$((cnt + 1))
- done
- # Production (step 7)
- #cnt=1
- #cntmax=2
- #while [ "$cnt" -le "$cntmax" ]; do
- # pcnt=$((cnt - 1))
- # istep="${prod_step}_${cnt}"
- # pstep="${prod_step}_${pcnt}"
- # Prüfen, ob die TPR-Datei schon existiert
- # if [ -f "${istep}.tpr" ]; then
- # echo "${istep}.tpr exists, skipping to the next step."
- # cnt=$((cnt + 1))
- # continue
- # fi
- # if [ "$cnt" -eq 1 ]; then
- # pstep=$(printf "${equi_prefix}" 6)
- # gmx grompp -f "${prod_prefix}.mdp" -o "${istep}.tpr" -c "${pstep}.gro" -p topol.top -n index.ndx -maxwarn 5
- # else
- # gmx_mpi grompp -f "${prod_prefix}.mdp" -o "${istep}.tpr" -c "${pstep}.gro" -t "${pstep}.cpt" -p topol.top -n index.ndx -maxwarn 5
- # fi
- # Prüfen, ob die Simulationsergebnis-Datei schon existiert
- # if [ -f "${istep}.gro" ]; then
- # echo "${istep}.gro exists, skipping mdrun."
- # else
- # gmx mdrun -v -deffnm "${istep}"
- # fi
- # cnt=$((cnt + 1))
- #done
- # AWH Production (step 8)
- gmx grompp -f step8_awh.mdp -o step8_awh.tpr -c step6.6_equilibration.gro -p topol.top -n index.ndx -maxwarn 5
- gmx mdrun -deffnm step8_awh
- gmx awh -more -f step6.6_equilibration.edr -s step6.6_equilibration.tpr
- #done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement