duartegroup / autodE

automated reaction profile generation
https://duartegroup.github.io/autodE/
MIT License
161 stars 49 forks source link

Fix error in "atoms_to_xyz_file()" in "input_output.py" #332

Closed SijieFu closed 2 months ago

SijieFu commented 3 months ago

Added explicit space to print xyz coordinates to account for occasional cases where there is no space printed between two numbers, for example, H 13.56100 -35.93700-100.99000, and thus the printed xyz file becomes invalid.

########################################################################

[ERROR] Program stopped due to fatal error
-2- reading geometry input 'test2_sp_xtb.xyz' failed
-1- Error: Could not parse coordinates from xyz file
  --> test2_sp_xtb.xyz:24:15-33
   |
24 | H    13.56100 -35.93700-100.99000
   |               ^^^^^^^^^^^^^^^^^^^ expected real value
   |
########################################################################

Checklist

t-young31 commented 3 months ago

Looks like a great fix – thanks @SijieFu Would you mind (a) updating the branch, (b) adding yourself to the contributors list, (c) updating the changelog and if you have time (d) writing a test for this change

SijieFu commented 2 months ago

I think I was able to check all of the items on the list. I imported an extra sys module in the test script to get information about float bounds to account for extreme cases, since the coordinates are stored as floats internally. I hope this is okay. Thanks!

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.73%. Comparing base (d0c05f0) to head (3143e2b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## v1.4.3 #332 +/- ## ========================================== - Coverage 97.42% 88.73% -8.69% ========================================== Files 209 209 Lines 23769 23774 +5 ========================================== - Hits 23156 21097 -2059 - Misses 613 2677 +2064 ``` | [Flag](https://app.codecov.io/gh/duartegroup/autodE/pull/332/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=duartegroup) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/duartegroup/autodE/pull/332/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=duartegroup) | `88.73% <100.00%> (-8.69%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=duartegroup#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.