On Wed, Apr 20, 2011 at 1:06 PM, Kamali Sripathi <ksripath.umich.edu> wrote:
> Dear fellow AMBER usersl,
>
> I had a somewhat unrelated question about the artifacts that I sometimes
> see
> when using ptraj to calculate dihedral angles (this may occur for other
> calculations, but I've only experienced them for the dihedral
> calculations).
> I've used simple transformations in ptraj (Y = Y < -100 ? Y + 360 : Y, as
> Dr. Walker mentioned in one of his tutorials) to clean up my data in
> Xmgrace. I was wondering, though, if anyone can tell me a way to know, if
> you have a "wall" from -200º to 200, whether you should add or subtract 360
> from your Y values.
>
I don't know what you mean by "wall". Any range in dihedral angles should
only span an interval of 360 degrees (or 2*pi), or you no longer have a
function (i.e., -181 degrees and 179 degrees are the same angle, yet both
are within your range!)
What you have to do is define a range in which each angle is represented
only once, and then either add or subtract multiples of 360 until the value
lands somewhere inside your range.
The line "Y = Y < -100 ? Y + 360 : Y" literally means "if Y is less than
-100, then add 360 to it, otherwise leave it alone". This, therefore
defines a range [-100, 260) for the angles. Adjust this as necessary for
your use case.
HTH,
Jason
> Thank you all, and have a great day,
> --
> Kamali Sripathi
> Graduate Student, Medicinal Chemistry
> Walter Laboratory
> 930 North University
> Ann Arbor, MI, 48109
> ksripath.umich.edu
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
--
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 Sun Apr 24 2011 - 10:30:03 PDT