rs-station / reciprocalspaceship

Tools for exploring reciprocal space
https://rs-station.github.io/reciprocalspaceship/
MIT License
28 stars 11 forks source link

Add `DataSet.reindexing_ops` and `DataSet.find_twin_laws()` #183

Closed JBGreisman closed 1 year ago

JBGreisman commented 1 year ago

As discussed in #173, it is useful to have ways to get merohedral twin laws, which are possible reindexing operations for resolving ambiguities. In other analysis tasks, it might be useful to get the full set of possible pseudo-merohedral twin laws for a DataSet with its spacegroup/cell.

This PR adds an attribute (DataSet.reindexing_ops) to access merohedral twin laws and a method (DataSet.find_twin_laws()) which can be used to access the full list of possible twin laws. These are implemented using calls to gemmi.find_twin_laws() and are tested against gemmi and expected properties of the functions/twin laws.

codecov-commenter commented 1 year ago

Codecov Report

Merging #183 (a95175f) into main (d70c5a3) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #183   +/-   ##
=======================================
  Coverage   98.37%   98.37%           
=======================================
  Files          45       45           
  Lines        1783     1788    +5     
=======================================
+ Hits         1754     1759    +5     
  Misses         29       29           
Flag Coverage Δ
unittests 98.37% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
reciprocalspaceship/dataset.py 98.22% <100.00%> (+0.01%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.