-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatch in Angles After Z-matrix to XYZ Conversion in zmat_to_xyz #779
Comments
Hey Leen, >>> zmat = {
'symbols': ('C', 'O', 'C', 'O', 'H', 'H', 'H', 'H', 'O', 'H', 'H'),
'coords': (
(None, None, None),
('R_1_0', None, None),
('R_2_1', 'A_2_1_0', None),
('R_3_2', 'A_3_2_1', 'D_3_2_1_0'),
('R_4_0', 'A_4_0_1', 'D_4_0_1_3'),
('R_5|6_0|0', 'A_5|6_0|0_1|1', 'D_5_0_1_4'),
('R_5|6_0|0', 'A_5|6_0|0_1|1', 'D_6_0_1_5'),
('R_7_2', 'A_7_2_3', 'D_7_2_3_6'),
('R_8_2', 'A_8_2_1', 'D_8_2_7_3'),
('R_9_8', 'A_9_8_2', 'D_9_8_2_1'),
('R_10_8', 'A_10_8_9', 'D_10_8_9_2')
),
'vars': {
'R_1_0': 1.4279748215793069, 'R_2_1': 1.7627308829567612, 'A_2_1_0': 113.78880933352458,
'R_3_2': 1.220223245519294, 'A_3_2_1': 126.68953118378808, 'D_3_2_1_0': 6.273929367455621e-06,
'R_4_0': 1.093536138062114, 'A_4_0_1': 108.0618680369275, 'D_4_0_1_3': 61.484528505772055,
'R_7_2': 1.1010626883230803, 'A_7_2_3': 124.35232167955662, 'D_7_2_3_6': 199.80067229824692,
'R_8_2': 1.85, 'A_8_2_1': 77.4, 'D_8_2_7_3': 140,
'R_9_8': 1.21, 'A_9_8_2': 70, 'D_9_8_2_1': 1.64,
'R_10_8': 0.97, 'A_10_8_9': 111, 'D_10_8_9_2': 103
},
'map': {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10}
}
>>> xyz = zmat_to_xyz(zmat)
Traceback (most recent call last): (...)
arc.exceptions.ZMatError: The parameter R_5|6_0|0 was not found in the "vars" section of the zmat And indeed, the parameters in the |
Hi Kfir,
However, the issue I originally raised still occurs even after this fix. |
Describe the bug
When converting a Z-matrix to XYZ coordinates using the
zmat_to_xyz
function, the angleA_8_2_1
is incorrectly calculated. It is defined as 77.4° in the Z-matrix, but after conversion and visualization in GaussView, it is shown as 51.93824°. All other parameters appear to be converted correctly.This is just one example, but I’m encountering the same issue with other molecules as well, consistently with the angle
A_8_2_1.
How to reproduce
To reproduce the issue, convert the Z-matrix using the
zmat_to_xyz
function. Next, visualize the resulting XYZ coordinates in GaussView and examine the geometric structure. Compare the angle A_8_2_1 in the XYZ output to its defined value in the Z-matrix (77.4°) and note the discrepancy.Expected behavior
The angle
A_8_2_1
should match its defined value in the Z-matrix (77.4°).Additional context
Gaussian successfully computes the correct angle using the same Z-matrix, so the discrepancy appears to be specific to ARC’s zmat_to_xyz function.
- Observed XYZ from
zmat_to_xyz
:- Observed XYZ from Gaussian:
The text was updated successfully, but these errors were encountered: