From 4956f3defb1b60df13857d202efc03e89ec0eb5f Mon Sep 17 00:00:00 2001 From: Rohitthakan <110251143+Rohitthakan@users.noreply.github.com> Date: Wed, 29 May 2024 12:20:58 +0530 Subject: [PATCH] Update nuclinfo.py --- package/MDAnalysis/analysis/nuclinfo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/MDAnalysis/analysis/nuclinfo.py b/package/MDAnalysis/analysis/nuclinfo.py index 7c765590bf6..b6bea2f74c3 100644 --- a/package/MDAnalysis/analysis/nuclinfo.py +++ b/package/MDAnalysis/analysis/nuclinfo.py @@ -262,7 +262,10 @@ def phase_as(universe, seg, i): q2_norm = sqrt(pow(q2[0], 2) + pow(q2[1], 2) + pow(q2[2], 2)) q3_norm = sqrt(pow(q3[0], 2) + pow(q3[1], 2) + pow(q3[2], 2)) - phase_ang = (atan2(q3_norm.item(), q2_norm.item())) * 180. / pi + B = q3_norm.item() + A = q2_norm.item() + + phase_ang = (atan2(B, A)) * 180. / pi return phase_ang % 360