Re: [AMBER] WHAM Analysis Histograms

From: Hamed S. Hayatshahi <biophysicist1981.yahoo.com>
Date: Wed, 2 Apr 2014 21:28:41 -0700 (PDT)

Hi
I recently made the following tcsh script which makes the histograms for my own problem with a distance reaction coordinate. Following the comments, you can change it according to your filing system and reaction coordinates and you can make it smarter...

#!/bin/tcsh
# Pay attention to the file name formats and addresses
# Better to set min and max one less and one more than the min/max windows

set min = 2    # Minimum reaction coordinate value 
set max = 26 # Maximum reaction coordinate value
set w = ( ) # Put here an array of directories in which your umbrellas are running.  

mkdir tmp
rm all-windows.dat

echo "\nCopying data files..."

foreach W ($w)
echo "#Frame #dist" > ./tmp/dist.$W.dat
cat ../md/w$W/dist.$W-prod*.dat | awk '{printf "%.0f %.3f\n",NR,$2}' >> ./tmp/dist.$W.dat# Change the dist.$W-prod*.dat to match your data file name 

end

echo "\nWriting all the  sampled points to all-windows.dat ..."
foreach f ( ./tmp/*.dat )
                cat $f >> all-windows.dat# This is just the raw data for a quick check
end

echo "\nMaking cpptraj input file..."
echo "#Generating Histograms with cpptraj. Input file made by check-overlaps.tcsh.\n" > pt-hist.in

set i = 1
foreach W ($w)

cat << EOF >> pt-hist.in
readdata ./tmp/dist.$W.dat name overlap$i# Change file name according to your system
EOF

. i = $i + 1
end 

set i = 1
foreach W ($w)

cat << EOF >> pt-hist.in
hist overlap$i min $min max $max step 0.1 out histograms.agr
EOF

. i = $i + 1
end
echo "\nMaking xmgrace histogram file with cpptraj..."
cpptraj -i pt-hist.in > pt-hist.log
echo "\nDeleting tmp files..."
rm -r tmp
echo "\nHistograms are made. Load hisograms.agr & all-windows.dat in xmgrace.\n"
 

Hope it works for you.

Hamed S. Hayatshahi
PhD candidate in Medicinal Chemistry
University of Utah
+1 801-867-4501

 
On Tuesday, April 1, 2014 10:37 PM, amr hamed <schrodinger8383.gmail.com> wrote:
 
Dear Amber users
Can anyone share with me a script to plot the histograms of umbrella
sampling to check their overlap (similar to the histogram plot generated by
g_wham in gromacs)? Typically, the script will generate histogram for each
dist_vs_t file in different color. I am so much thankful for your time.
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Apr 02 2014 - 22:00:02 PDT
Custom Search