grimme-lab / mctc-lib

Modular computation tool chain library
https://grimme-lab.github.io/mctc-lib
Apache License 2.0
15 stars 17 forks source link

Allows writing of Turbomole format with angstrom. #62

Closed MtoLStoN closed 10 months ago

MtoLStoN commented 10 months ago

At the moment, mctc-lib allows reading of coord files in angstrom format ($coord angs), but can not write these files. With this PR, mctc-lib will write $coord angs files if specified in the input.

codecov[bot] commented 10 months ago

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (305eb7a) 69.81% compared to head (c8fafbb) 69.79%.

Files Patch % Lines
test/test_write_turbomole.f90 56.09% 0 Missing and 18 partials :warning:
src/mctc/io/write/turbomole.f90 78.57% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #62 +/- ## ========================================== - Coverage 69.81% 69.79% -0.03% ========================================== Files 64 64 Lines 8568 8618 +50 Branches 2552 2579 +27 ========================================== + Hits 5982 6015 +33 + Misses 784 782 -2 - Partials 1802 1821 +19 ```

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

MtoLStoN commented 10 months ago

You are right, I thought about that too. However, there are a few additional things that differ between writing a normal coord and a coord file in angstrom form, other than just the conversion ($coord angs, and $lattice angs). This could be of course easily done with if clauses, but this would make the code a little bit harder to read. I therefore opted to do it this way in favor of code clarity.

But we can also do it with fewer lines, if you prefer that.