xiaoruiDong / RDMC

Reaction Data and Molecular Conformers (RDMC) is a package dealing with reactions, molecules, conformers, majorly in 3D.
https://xiaoruidong.github.io/RDMC/
MIT License
21 stars 0 forks source link

More molecule fixes and helper reactions for checking molecules / reactions #75

Closed xiaoruiDong closed 8 months ago

xiaoruiDong commented 8 months ago

This again is inspired by the data cleaning work of reaction datasets. This PR covers:

  1. fixing more nitrogenated (or more complicated) molecules by providing a feasible recipe and adding more unit tests
  2. adding "saturate radicals": RDKitMol.GetClosedShellMol
  3. adding HasSameConnectivity to check the connectivities of molecules with the same atom mapping
  4. making RenumberAtoms to allow dict as a "shorter" input.
  5. adding a way to check if two reactions are equivalent regardless of the atom mapping.
codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (cc64388) 36.15% compared to head (aebc2ae) 38.24%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #75 +/- ## ========================================== + Coverage 36.15% 38.24% +2.09% ========================================== Files 34 34 Lines 3684 3812 +128 Branches 942 975 +33 ========================================== + Hits 1332 1458 +126 + Misses 2278 2275 -3 - Partials 74 79 +5 ``` | [Files](https://app.codecov.io/gh/xiaoruiDong/RDMC/pull/75?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Xiaorui+Dong) | Coverage Δ | | |---|---|---| | [rdmc/external/logparser/base.py](https://app.codecov.io/gh/xiaoruiDong/RDMC/pull/75?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Xiaorui+Dong#diff-cmRtYy9leHRlcm5hbC9sb2dwYXJzZXIvYmFzZS5weQ==) | `22.75% <0.00%> (ø)` | | | [rdmc/resonance/resonance.py](https://app.codecov.io/gh/xiaoruiDong/RDMC/pull/75?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Xiaorui+Dong#diff-cmRtYy9yZXNvbmFuY2UvcmVzb25hbmNlLnB5) | `82.53% <33.33%> (-2.47%)` | :arrow_down: | | [rdmc/mol\_compare.py](https://app.codecov.io/gh/xiaoruiDong/RDMC/pull/75?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Xiaorui+Dong#diff-cmRtYy9tb2xfY29tcGFyZS5weQ==) | `47.50% <66.66%> (+6.82%)` | :arrow_up: | | [rdmc/reaction.py](https://app.codecov.io/gh/xiaoruiDong/RDMC/pull/75?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Xiaorui+Dong#diff-cmRtYy9yZWFjdGlvbi5weQ==) | `66.81% <52.94%> (+8.40%)` | :arrow_up: | | [rdmc/fix.py](https://app.codecov.io/gh/xiaoruiDong/RDMC/pull/75?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Xiaorui+Dong#diff-cmRtYy9maXgucHk=) | `82.97% <77.50%> (+2.27%)` | :arrow_up: | | [rdmc/utils.py](https://app.codecov.io/gh/xiaoruiDong/RDMC/pull/75?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Xiaorui+Dong#diff-cmRtYy91dGlscy5weQ==) | `49.51% <74.39%> (+5.54%)` | :arrow_up: | | [rdmc/mol.py](https://app.codecov.io/gh/xiaoruiDong/RDMC/pull/75?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Xiaorui+Dong#diff-cmRtYy9tb2wucHk=) | `66.33% <72.67%> (+0.92%)` | :arrow_up: |

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