On Fri, Apr 20, 2012 at 4:05 PM, David A Case <case.biomaps.rutgers.edu>wrote:
> On Fri, Apr 20, 2012, Jan-Philip Gehrcke wrote:
> >
> > after having created your data file using cpptraj, it contains a 'frame
> > number' column and a 'value' colum, right? You now need an automatic
> > conversion between 'frame number' and 'time'.
> >
> > I.e., for instance from
> >
> > frame value
> > 1 3.1415
> > 2 1.3337
> >
> > to
> >
> > time/ns value
> > 0.005 3.1415
> > 0.010 1.3337
> >
> > You can use the data file created by cpptraj and use your favourite
> > programming language to do this conversion.
>
> Although there are many ways to skin a cat, awk is what I would use:
>
> awk '{print 0.005*$1, $2}'
>
> will convert from the first format above to the second. [Now we can have a
> language war right here on the amber mailing list!]
>
Sweet!
Another alternative (if you use gnuplot), is to just do it directly in
gnuplot:
plot 'my_data_file' using ($1*0.005):2
This involves no conversion (and therefore programming language) at all, so
I'm not sure it was fair... Most graphing programs will enable simple axis
scaling like this fairly easily...
An alternative, of course, is to use ptraj with the 'time' functionality
built-in if it's that important to avoid all of this.
HTH,
Jason
--
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sat Apr 21 2012 - 07:30:05 PDT