cmelab / cmeutils

Useful functions by and for the CME lab
GNU General Public License v3.0
3 stars 11 forks source link

Add method to `Geometry` which finds best fit vetctor through a set of coordinates. #72

Closed chrisjonesBSU closed 10 months ago

chrisjonesBSU commented 10 months ago

This PR adds a method to cmeutils.geometry which finds the best fit vector through a set of 3D coordinates. The idea here (for initially straight polymer chains at least), this vector represents the "backbone" of the chain. This is useful for performing translations on polymers built using the polymer builder in mbuild or loaded from SMILES. Usually, these compounds don't have a simple initial alignment. If we know the backbone vector, then we can use the mbuild coordinate transformation methods on the whole chain.

codecov[bot] commented 10 months ago

Codecov Report

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

Comparison is base (49287fa) 96.11% compared to head (9cff1f1) 96.01%. Report is 3 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cmelab/cmeutils/pull/72/graphs/tree.svg?width=650&height=150&src=pr&token=WPJGJX23I7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmelab)](https://app.codecov.io/gh/cmelab/cmeutils/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmelab) ```diff @@ Coverage Diff @@ ## master #72 +/- ## ========================================== - Coverage 96.11% 96.01% -0.11% ========================================== Files 8 8 Lines 670 677 +7 ========================================== + Hits 644 650 +6 - Misses 26 27 +1 ``` | [Files](https://app.codecov.io/gh/cmelab/cmeutils/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmelab) | Coverage Δ | | |---|---|---| | [cmeutils/geometry.py](https://app.codecov.io/gh/cmelab/cmeutils/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmelab#diff-Y21ldXRpbHMvZ2VvbWV0cnkucHk=) | `96.92% <85.71%> (-1.36%)` | :arrow_down: |