Running AMBER MD Simulations on DiPhyx

Overview

This guide provides step-by-step instructions to run AMBER MD simulations on DiPhyx, using a predefined shell script run_script.sh. Ensure that you have prepared all necessary input files and the script as described below.

Prerequisites

  • Prepared input files (e.g., topology and coordinate files)
  • run_script.sh file containing necessary shell commands

Step 1: Prepare Your Simulation Files

  1. Topology File (prmtop): This file contains the molecular topology and is required to define the system.
  2. Input Coordinates (inpcrd): Provides the initial coordinates for the system.
  3. Control File (mdin): Controls the simulation parameters.

Ensure these files are correctly configured as per your simulation requirements.

Step 2: Write the run_script.sh

Below is an example of what run_script.sh might look like for running a minimization and equilibration protocol:

#!/bin/bash

# Run Minimization
mpirun -np 20 pmemd.MPI -O -i min.in -o min.out -p system.prmtop -c system.inpcrd -r min.rst -ref system.inpcrd

# Run Equilibration
mpirun -np 20 pmemd.MPI -O -i eq.in -o eq.out -p system.prmtop -c min.rst -r eq.rst

# More steps can be added as needed

Replace paths and filenames as necessary for your specific setup.

Step 3: Upload Files to DiPhyx

Upload your prmtop, inpcrd, mdin files, and run_script.sh to your designated workspace on DiPhyx.

Step 5: Monitor and Analyze

Once the simulation is complete, output files will be generated, such as min.out and eq.out, which can be used to analyze the results. DiPhyx allows monitoring of the job's progress through its job management tools.

Example

Here is an example we developed based on the Free Energy Calculation Toturial by AmberMD

You don't need to unzip the input files and the unzip instruction is already included in the run_script.sh:

#!/bin/bash

# Define the working directory and the tutorial directory
PROJECT_DIR="/data"
TUTORIAL_DIR="tutorial3"
ZIP_FILE="toturial3.zip"

# Navigate to the working directory
cd "$PROJECT_DIR" || { echo "Failed to change directory to $PROJECT_DIR. Exiting."; exit 1; }
ech $ZIP_FILE
# Unzip the inputs
if [ -f "$ZIP_FILE" ]; then
    echo "Unzipping input files..."
    unzip -o "$ZIP_FILE" -d "$TUTORIAL_DIR"
else
    echo "$ZIP_FILE does not exist in the current directory. Exiting."
    exit 1
fi

# Navigate to the tutorial directory
cd "$TUTORIAL_DIR" || { echo "Failed to change directory to $TUTORIAL_DIR. Exiting."; exit 1; }

# Equilibrate the solvated complex
echo "Step 1: Energy Minimization"
sander -O -i min.in -o min.out -p ras-raf_solvated.prmtop -c ras-raf_solvated.inpcrd -r min.rst -ref ras-raf_solvated.inpcrd

echo "Step 2: Heating the System"
sander -O -i heat.in -o heat.out -p ras-raf_solvated.prmtop -c min.rst -r heat.rst -x heat.mdcrd -ref min.rst
gzip -9 heat.mdcrd

echo "Step 3: Density Equilibration"
sander -O -i density.in -o density.out -p ras-raf_solvated.prmtop -c heat.rst -r density.rst -x density.mdcrd -ref heat.rst
gzip -9 density.mdcrd

echo "Step 4: Production Equilibration"
sander -O -i equil.in -o equil.out -p ras-raf_solvated.prmtop -c density.rst -r equil.rst -x equil.mdcrd
gzip -9 equil.mdcrd

echo "Processing MD output files"
./process_mdout.pl heat.out density.out equil.out

echo "AMBER MD Simulation steps completed successfully."
Contact us
info@diphyx.com
+1 (619) 693-6161
Follow us on
@2023-2024 DiPhyx, Inc.