ReactionMechanismGenerator / ARC

ARC - Automatic Rate Calculator
https://reactionmechanismgenerator.github.io/ARC/index.html
MIT License
43 stars 22 forks source link

Optimize conformer comparison algorithm #765

Closed JintaoWu98 closed 3 months ago

JintaoWu98 commented 3 months ago

The previous conformer comparison algorithm required a distance matrix (d-matrix) for operations. In this update, we introduce a new variable, fl_distance, which represents the distance between the first and last elements. This method provides a less costly preliminary comparison before invoking the d-matrix comparison. Now, the d-matrix comparison will only be executed when necessary, optimizing the overall efficiency of the algorithm.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.98%. Comparing base (8ba45be) to head (693b2f3). Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
arc/species/conformers.py 92.85% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #765 +/- ## ========================================== + Coverage 73.95% 73.98% +0.02% ========================================== Files 101 101 Lines 27777 27804 +27 Branches 5817 5825 +8 ========================================== + Hits 20542 20570 +28 + Misses 5774 5773 -1 Partials 1461 1461 ``` | [Flag](https://app.codecov.io/gh/ReactionMechanismGenerator/ARC/pull/765/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ReactionMechanismGenerator) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ReactionMechanismGenerator/ARC/pull/765/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ReactionMechanismGenerator) | `73.98% <96.96%> (+0.02%)` | :arrow_up: | 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=ReactionMechanismGenerator#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.