Skip to content
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

Model-free alignment of isomorphous maps (alternative origins problem) #174

Closed
wants to merge 3 commits into from

Conversation

JBGreisman
Copy link
Member

@JBGreisman JBGreisman commented Aug 23, 2022

This PR is still in progress, but I wanted to upload my initial classes to support this. The problem is broken down into two cases:

  1. Non-Polar spacegroups: easier case because they have a finite number of cases to evaluate
  2. Polar spacegroups: more challenging because of the continuous alternative origins.

These classes use the sum of the squared phase residual between two sets of phases as a loss function to minimize, which has been pretty effective in my hands.

The NonPolarTranslator does a brute-force search of the 64 possible cases to evaluate the optimal translation vector. The PolarTranslator does a global optimization to determine the optimal translation vector. This is a bit non-trivial -- its a bumpy loss landscape -- but I've found the scipy dual_annealing optimizer to work very well. Another trick has been to start at low-resolution and gradually increase to full resolution. After discussion with @kmdalton, we can also use a FFT-based method to come up with a sensible initial value for optimization.

My todo items:

  • Add user-facing method that takes two datasets, and uses the proper class based on the spacegroup to determine the translation vector that gives a common phase origin.
  • Add a suite of tests for common spacegroups that cover the polar/non-polar cases
  • (optional improvement) Add initialization code based on FFT-method to speed things up

@JBGreisman JBGreisman linked an issue Aug 23, 2022 that may be closed by this pull request
@JBGreisman JBGreisman changed the title Add method for model-free alignment of isomorphous maps (alternative origins problem) Model-free alignment of isomorphous maps (alternative origins problem) Aug 23, 2022
@JBGreisman
Copy link
Member Author

As per the comment in #31, this PR seems better suited for the rs-booster project because this is an application that uses rs, rather than a new core feature of the library. I am closing this PR here, and will add this via a PR in rs-booster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Align Phases of Isomorphous Structures
1 participant