This repository offers a collection of scripts designed to facilitate the analysis of Molecular Dynamics (MD) simulations using Visual Molecular Dynamics (VMD) and R. These tools assist in calculating various properties such as Root Mean Square Deviation (RMSD), Root Mean Square Fluctuation (RMSF), salt bridges, hydrogen bonds, and solvent accessible surface area (SASA).
vmd_analysis.tcl
: A Tcl script for VMD to compute multiple characteristics of MD simulations, including RMSD, RMSF, salt bridges, etc.center_of_mass.tcl
: Calculates the center of mass for specified groups of atoms.gyr_radius.tcl
: Computes the radius of gyration for selected atom groups.hpc_submission_script
: A sample job submission script tailored for High Performance Computing (HPC) environments using Sun Grid Engine.PCA_script.r
: An R script to perform principal component analysis (PCA) on a trajectory and output the results to a CSV file.
- VMD: Ensure that VMD is installed on your system.
- R: For scripts utilizing R, install R and the necessary packages.
- Prepare Your Files: Place your Protein Structure File (PSF) and DCD trajectory files in a designated directory, along with the
center_of_mass.tcl
,gyr_radius.tcl
, andvmd_analysis.tcl
files. - Edit the Script: Open
vmd_analysis.tcl
and modify the fifth and sixth lines to specify the names of your PSF and DCD files. - Run VMD:
- Launch VMD.
- Open the Tk Console within VMD.
- Navigate to the directory with all the required files using the command:
cd /path/to/your/directory
- Source the analysis script:
source vmd_analysis.tcl
- Output: The script will execute the analyses and generate
.dat
files containing the results for each calculated property. These can be opened in Excel or OriginPro for plotting.
- Transfer Files: Upload your PSF, DCD,
vmd_analysis.tcl
,center_of_mass.tcl
,gyr_radius.tcl
, andhpc_submission_script
to a directory on the HPC system. - Edit the Analysis Script: Modify the fifth and sixth lines of
vmd_analysis.tcl
to match your PSF and DCD filenames. - Edit the Submission Script: Adjust
hpc_submission_script
to set the job name, number of cores, and other parameters as required. - Load VMD Module: Follow your HPC's documentation to load the VMD module. This typically involves a command such as:
module load vmd
- Submit the job: Use the following command to submit the job:
qsub hpc_submission_script
- Output: Upon completion, the analysis results will be available in the specified output directory.
Follow the same steps as above, but use the PCA_Script.r
and R_hpc_submission_script.sh
files instead. PCA will be performed on the trajectory and a CSV file will contain the results of the analysis which can then be plotted in Excel or OriginPro.
- Ensure that all file paths and filenames are correctly specified in the scripts.
- Review and modify the scripts as needed to align with your specific simulation parameters and analysis requirements.
- For detailed information on VMD scripting and capabilities, refer to the VMD User's Guide.
These scripts were developed using information and tutorials available online. Contributions and improvements are welcome.
For any questions or suggestions, please feel free to open an issue or submit a pull request.