-
Notifications
You must be signed in to change notification settings - Fork 27
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
Ticket 1156: rename dnn to lattice spacing for paracrystalline models #97
Conversation
from nearest neighbour to lattice spacing
Correct BCC doc for lattice volume fraction and update all paracrystal models docs reference and authorship sections.
… nearest-neighbour distance
Why is this against the beta branch instead of master? Not sure I am comfortable with changing the name with all that entails in the support infrastructure for backwards compatibility till we actually are convinced we FULLY understand the model. I realize there is strong evidence that this is correct BUT I also know form painful experience that sometimes it is the unknown unknowns that bite us and in fact we may be completely misunderstanding everything. |
I rebased this branch on PR #382, and fixed some errors in the lattice calculations. Running the following: python explore/realspace.py --qmax=1 --mesh=400 --type=sc --shuffle=0.03 \
--lattice=40,40,40 --spacing=2,2,2 --samples=150000 sphere radius=25 eventually gives: so at least for simple cubic the peak positions and heights are consistent with the corresponding lattice_spacing variable in the revised model. Similarly bcc and fcc give the main peaks, though they don't match the fine structure very well: Some of this may be explained by finite lattice size (equivalent to low pass filtering) but it could also be due to errors in the simulation code or the analytic function. I don't simulate paracrystals, only crystals with thermal distortion, so I'm not able to check that the lattice_distortion parameter is consistent. |
Check results against other software, such as scatter.[1] [1] Förster, S., Apostol, L., Bras, W., 2010. Scatter: software for the analysis of nano- and mesoscale small-angle scattering. Journal of Applied Crystallography 43, 639–646. https://doi.org/10.1107/S0021889810008289 |
From this link, a bcc crystal with lattice spacing 100 should have peaks at 0.088, 0.125, 0.154, 0.178. Checking with sascomp, the spurious detail in the sasmodels function (the orange line in the previous plots) vanishes when I increase the number of gauss steps: ./sascomp -linear -midq -ngauss=512 -nq=4000 bcc_paracrystal lattice_spacing=100 lattice_distortion=0.03 radius=0.05 background=0 the peaks are in the right place, but the intensities (48, 96, 24, 48) don't seem to agree: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in #284 (was trac#1156), this is not the correct fix. Once the maths from the paper are implemented correctly it would be interesting to run these tests again but given the age of this PR (particularly are far behind main it is at this point) and the fact that the needed corrections are much simpler as thy only require changing a few lines of code in 2 files, I recommend we close this PR without merging
Paul to check with @pkienzle before closing and deleting branch |
This PR is primarily about renaming the The only math change I see is a √1/2} scaling on fcc and √3/4} on bcc when computing radius for volume fraction. |
As discussed at the fortnightly call, this PR makes (incorrect) changes to the modes as well as changes to the simulation code only used for testing purposes so far. Thus I am only closing the PR but not the branch as @pkienzle wants to ensure that the simulation gets updated appropriately. Note: the #284 discussion (dated Feb 25, 2022) points out the code in fact does need changing. simply replacing |
Simulation code is in #507 so I'm deleting the branch. |
See Ticket #1156.
This code updates the name of the dnn parameter for lattice spacing. There are lots of questions about whether the paracrystal parameters are correct. The real space modeller has been extended to allow some experiments with monte carlo sampling, but this code may not be correct (see #1156:10).
I'm putting it as a PR so it doesn't get forgotten. It needs to be checked whether it performs as promised (renaming the parameter) irrespective of when the model itself is correct. If so, then it should be merged, because there are other tickets on paracrystal correctness (#805, #975, #1036).