-
Notifications
You must be signed in to change notification settings - Fork 50
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
Diffraction pattern depends on shape of simulation box #750
Comments
Thanks for filing this issue — @tcmoore3 I know you’ve been working on this, have you been able to make any progress on fixing the problem? |
@bdice I've figured out the origin of this bug in the code, which comes from how the k-vectors are generated, relevant lines here and here. I need help figuring out how to proceed from here, since fixing this requires decisions about what kinds of assumptions/approximations you have to make to do this calculation. |
When I last looked at it with @tcmoore3 I was looking at the coordinate transforms used to map the system from the box to a unit cube on which the FFT is performed. The k-vectors should be spaced at 1/width (or 2pi/width) in this space. There should be an inverse transformation to map the k-vectors back to simulation units that is a function of the shear and scale matrices. |
Describe the bug
When calculating a diffraction pattern, I expect the symmetry of the diffraction to reflect that of the particle positions. However, if the box has edges of different lengths, then this is not the case. E.g., if I make a square lattice with different numbers of unit cells in each direction, then I get a diffraction pattern that does not have a 4-fold symmetric rotation axis. See this notebook for an example.
System configuration (please complete the following information):
The text was updated successfully, but these errors were encountered: