Re: [AMBER] 3D Histogram in cpptraj

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Fri, 31 Oct 2014 10:53:42 -0600

Hi,

What you want to do is not straightforward (as you have seen), but
with a little creative scripting I think it could be done. The way
that I would do it is as follows:

1) Generate data for the 3 dihedrals in each molecule, writing each to
a separate file. Use the 'noheader' keyword so the data file header is
not written.

2) Concatenate all of those files.

3) Read the concatenated data into cpptraj and histogram.

So the final scripts could be something like this:

Step 1 (cpptraj input):
parm myparm.parm7
trajin mytraj.nc
dihedral m1-phi1 :20.C8 :20.C14 :20.C15 :20.C16 out m1.dat noheader
dihedral m1-phi2 :20.C8 :20.C14 :20.C15 :20.C16 out m1.dat noheader
dihedral m1-phi3 :20.C14 :20.C15 :20.C16 :20.C17 out m1.dat noheader
...
dihedral m300-phi1 <mask1> <mask2> <mask3> <mask4> out m300.dat noheader
dihedral m300-phi2 <mask1> <mask2> <mask3> <mask4> out m300.dat noheader
dihedral m300-phi3 <mask1> <mask2> <mask3> <mask4> out m300.dat noheader

Step 2:
cat m1.dat m2.dat m3.dat ... m300.dat > AllMols.dat

Step 3 (cpptraj input):
# 'index 1' tells cpptraj that X values are in column 1
readdata AllMols.dat index 1
hist AllMols.dat:2 AllMols.dat:3 AllMols.dat:4 min -180 max 180 bins
72 out histnew.dx

Hope this helps,

-Dan

On Thu, Oct 30, 2014 at 11:18 AM, CHAMI F. <fatima.chami.durham.ac.uk> wrote:
> Dear all,
>
> I would like to do a 3D histogram of three consecutive dihedrals of a molecule in a box containing 300 molecules all identical
>
> dihedral phi1 :20.C8 :20.C14 :20.C15 :20.C16 out dihenew.dat
> dihedral phi2 :20.C8 :20.C14 :20.C15 :20.C16 out dihenew.dat
> dihedral phi3 :20.C14 :20.C15 :20.C16 :20.C17 out dihenew.dat
> hist phi3 phi4 phi5 min -180 max 180 bins 72 out histnew.gnu
>
> I would like to keep the same DataSet in order to accumulate data from all 300 molecules ..but
> cpptraj does not allow it
> Warning: DataSet 'phi3' already present.
> Error: Could not initialize action [dihedral]
>
> any help
> thanks
> Fatima
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber



-- 
-------------------------
Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 307
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-6208 (Fax)
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Oct 31 2014 - 10:00:02 PDT
Custom Search