-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolving indexing ambiguities when comparing datasets #173
Comments
I think this is a great feature to add. I'm not crazy about the function names. I think we could workshop them a little. Here are alternative signatures off the top of my head. Not saying these are perfect either.
|
I like the plan for 1 -- I think For two, I don't love |
|
|
I'm glad that you think about using My understanding is that if two crystals have the same space group and unit cell parameters, the possible twinning operations and reindexing operations are simply the same. But if the cell parameters differ, then I'm not sure what to do. |
Thanks for adding some more info, @wojdyr. In this case, I will include a call to |
Regarding I'm inclined to make this an attribute, using something like: @property
def reindexing_ops(self):
"""Possible reindexing operations (twin laws) for DataSet"""
return gemmi.find_twin_laws(self.cell, self.spacegroup, max_obliq=1.0, all_ops=False) Please comment if anyone thinks a method will be better suited to this task. |
I don't have strong feelings about this. If you choose to make it a method, I'd prefer a name like |
Sounds good -- I agree that a method name should get an action verb. My intent for this function/attribute is to support only merohedral twinning laws (source of indexing ambiguity). If we care about pseudo-merohedral twinning here, we would want to be able to accept a If we only support the merohedral case (I think |
i wouldn't be opposed to having both @property
def reindexing_ops(self): and def find_twin_laws(self, max_obliq=1.0): |
fair enough -- at the end of the day these are just convenience methods that call to |
my thoughts exactly. i don't think it is a problem if we have slightly redundant ways to do the same thing. |
One of the goals of
reciprocalspaceship
is to make it easier to compare datasets in reciprocal space. For some spacegroups, indexing ambiguities can confound such comparisons. We should add some functions tors
to make it easier to deal with these spacegroups.In particular, we can use
gemmi.find_twin_laws()
to identify possible reindexing operations, and we can use correlation coefficients to determine what the best operation is. The gemmi function seems to produce output consistent with the CCP4 table (poor formatting), but I've only tested a handful of cases:I think this should involve two additions to
rs
:rs.DataSet
that returns possible reindexing operations (perhapsrs.utils.possible_reindexing_ops(dataset)
). This function could then be used elsewhere, wherever such a functionality would be desired.rs.algorithms.resolve_indexing_ambiguity(dataset1, dataset2, column_key="IMEAN")
, which applies the reindexing operation to dataset2 that gives the best correlation in IMEAN.Please let me know if anyone has any thoughts on this -- together with #31, this should handle some of the gotchas when making comparisons across isomorphous structures/datasets
The text was updated successfully, but these errors were encountered: