-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Wrong coordinates when using OpenBabel exporter #483
Comments
Thanks for opening your first issue here! Please try to include example files and screenshots if possible. If you're looking for support, please post on our forum: https://discuss.avogadro.cc/ |
I would like add that using a native Avogadro exporter works, even for a format that OpenBabel does not, eg: mol, xyz. |
I will take a look |
I was working on a PR for this bug. The problem was caused by pugixml using a "," as decimal separator when generating the cml file. It was happening because I was using LC_NUMERIC=en_DK.UTF-8. I was looking for a fix forcing pugixml to use a dot as de decimal sep. |
Ah, that explains how I could have missed something so obvious. I would be happy to look at a PR, if you get stuck I can try taking a closer look too - decimal separators cause far too many subtle bugs! |
Here are the build results |
Should fix OpenChemistry#483 - verified with testing on my Mac. Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
Here are the build results |
Fix #483 through stream-specific locale
Avogadro version: (please complete the following information from the About box):
Desktop version: (please complete the following information):
Describe the bug
When exporting a molecule using File->Export->Molecule..., the coordinates are completely messed up.
In order to export the molecule, I had to first click on Save in the file selector, then click Cancel, because the file selector was shown again (but I was a bug report for it).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The coordinates should match the ones which were drawn. But they are totally wrong.
Screenshots
Molecule as drawn
Molecule loaded from exported file
Additional context
The content of the mol2 file
The text was updated successfully, but these errors were encountered: