Re: AMBER: mesure dihedral angle during MD

From: Guanglei Cui <>
Date: Sun, 13 Mar 2005 13:10:46 -0500

Hi, Julien

You can do it with a simple UNIX command awk. Assuming column 2 has the
torsion angle in your ptraj output file,

awk '{if($2 < 0){print $2 + 360}else{print $2}}' _your_ptraj_output_


awk '{$2>0?a=$2:a=$2+360;print a}' _your_ptraj_output_

You can replace _your_ptraj_output_ with your ptraj output filename.


julien wrote:
> Dear all,
> I tried to measure a dihedral observed during MD simulation using ptraj. The
> value oscillate between +180 and -180. Is it possible to get in the ouput only
> positive values ? Do I have to chnage the source code for that ? If yes how
> since I am not a programmer and I have no knowledge in C...
The AMBER Mail Reflector
To post, send mail to
To unsubscribe, send "unsubscribe amber" to
Received on Sun Mar 13 2005 - 18:53:01 PST
Custom Search