User Tools

Site Tools


analysis_of_multiple_trajectories_and_generation_of_a_csv_file_with_r

cMM-ISMSA analysis

As a great advantage of cMM-ISMSA, the water molecules of the trajectories do not have to be removed for the energy analysis.

Thus, to analyze several trajectories at once, you can create a simple a script with a loop in the bash, like the following example ISMSAanalysis.sh:

#!/bin/bash
MOL=$1

export ISMSA=/source/MM
for i in `seq 300 1 500`;do
bzip2 -d $MOL.md$i.trj.bz2
done
for i in `seq 300 1 500`;do
$ISMSA –topology $MOL.top –mdcrd $MOL.md$i.trj –out $MOL.$i –mask 2621 –sframe 2 –eframe 10 –iframe 2
done

In this example, trajectories 300 to 500 have been decompressed and five frames of each trajectory have been read with cMM-ISMSA. As mask has been defined the ligand.

Merging data with R

The line-command version of cMM-ISMSA generates two output file types: name_res_averages and name_energy_averages. The former files contain the interaction of the ligand decomposed per residue.

In order to summarize all these file in an Excel spreadsheet, the powerful R program (https://www.r-project.org) can be used. As an example, here is a simple script to generate the file new.csv (presentR.sh).

rm -f merging.r
for i in `seq 300 1 500`;do
echo “d$i ← read.table('name.site1.”$i“_res_averages')” » merging.r
done

echo “new ← merge(d300,d301, by=\”V1\“)” » merging.r
for i in `seq 302 1 500`;do
echo “new ← merge(new,d”$i“, by=\”V1\“)” » merging.r
done
echo “write.csv(new,\”new.csv\“)” » merging.r
R –slave –vanilla < merging.r\\

analysis_of_multiple_trajectories_and_generation_of_a_csv_file_with_r.txt · Last modified: 2016/12/09 07:37 by root