- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]

From: Pablo Palomino <paofem35.gmail.com>

Date: Tue, 5 Feb 2019 13:23:22 +0200

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 Tue Feb 05 2019 - 03:30:03 PST

Date: Tue, 5 Feb 2019 13:23:22 +0200

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 Tue Feb 05 2019 - 03:30:03 PST

Custom Search