Re: [AMBER] Cpptraj hist command

From: Pablo Palomino <paofem35.gmail.com>
Date: Mon, 11 Feb 2019 15:08:50 +0200

Thanks a lot for your reply Dan, I have tried xprec and it works nicely.

Following my previous email, I would like to ask if there is any way to add
a fixed quantity to all the x values of the histogram which is being output
to the file d21.hist.

Thanks again,
Best,
Pablo.

On Tue, 5 Feb 2019 at 13:23, Pablo Palomino <paofem35.gmail.com> wrote:

> Dear Amber users,
>
> I am using the cpptraj command "hist" to create a histogram of the angles
> of a dihedral. I would like to have a step of 1ยบ and the histogram to be
> centered, i.e. for the bin with x value 15 to contain all values between
> 14.5 and 15.5. So far, I use the script:
>
>
> *parm ../../prep.prmtoptrajin ../out.dcd*
>
> *dihedral d21 .37 .33 .25 .22 out dihe-disthist d21 min -180.5 max
> 180.5 step 1 out d21.hist*
>
> *precision d21.hist 12 7*
>
> then I could add 0.5 to the x column when I plot in order to get a
> centered histogram. The problem is that in the output file, the column of x
> values does not have decimal points. The command "precision" does not help
> since it only affects the y values. The output I get is:
>
>
> #d21 Hist_00005
> -180 0.0000000
> -180 0.0000000
> -178 0.0000000
> -178 0.0000000
> -176 0.0000000
> -176 0.0000000
> ............... etc
>
> Using that same script but a fractional step (for instance 0.5) give me
> decimals on the x columm:
>
> #d21 Hist_00005
> -180.5000000 0.0000000
> -180.0000000 0.0000000
> -179.5000000 0.0000000
> -179.0000000 0.0000000
> -178.5000000 0.0000000
> -178.0000000 0.0000000
> ...................... etc
>
> So I would like to ask if there is any way of increasing the number of
> decimal points of the x column using an integer step (with fractional min
> and max) or alternatively a way of centering the value of the bins. The
> desired output is like this:
>
> #d21 Hist_00005
> -180.5000000 0.0000000
> -179.5000000 0.0000000
> -178.5000000 0.0000000
> ...................... etc
>
> where the bin with x=-179.5 contain all values between -179.5 and -178.5.
> Alternatively, an output like this one:
>
> #d21 Hist_00005
> -180 0.0000000
> -179 0.0000000
> -178 0.0000000
> -177 0.0000000
> ............... etc
>
> Would also work, provided that the bin with x=-178 contains all values
> between -179.5 and -178.5.
>
> Could somebody help me?
> Thanks a lot,
> Best,
> Pablo.
>
> PS: I am aware that this could be done with a bit of post processing, but
> I would like to avoid that if possible.
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Feb 11 2019 - 05:30:03 PST
Custom Search