rs-station / matchmaps

https://rs-station.github.io/matchmaps/
Other
2 stars 0 forks source link

running with phenix 1.21 creates unstacked anomalous MTZs #61

Closed dennisbrookner closed 1 week ago

dennisbrookner commented 1 week ago

This is a bug, to be fixed urgently.

When revising the phenix 1.20 eff template to be applicable for phenix 1.21, I did not include any equivalent of the force_anomalous_to_be_equal_to flag found here: https://github.com/rs-station/matchmaps/blob/e7753cf7e0688bba59283c29172344f21bc2a004/src/matchmaps/_phenix_utils.py#L27

For some MTZ inputs (e.g. those grabbed from the PDB), this is fine. However, MTZ that come from phenix and contain anomalous information seem to revert back to unstacked format, even when you feed phenix non-anomalous structure factors. This causes an error here: https://github.com/rs-station/matchmaps/blob/e7753cf7e0688bba59283c29172344f21bc2a004/src/matchmaps/_utils.py#L166 because the user-supplied column no longer exists, having been replaced by the (+) and (-) versions of itself.

Potential solutions

  1. Update the phenix 1.21 eff template to include the 1.21 syntax version of the force_anomalous_to_be_equal_to flag.
  2. Detect that the MTZ is unstacked, and stack it. I recall having difficulties implementing this in the past, but it may be possible.
  3. If this issue cannot be easily resolved, drop support (either permanently or temporarily) for phenix 1.21.