Closed hmcezar closed 1 year ago
Patch coverage: 79.88%
and project coverage change: -0.02%
:warning:
Comparison is base (
ed80ed1
) 85.11% compared to head (8bb3b14
) 85.09%.:exclamation: Current head 8bb3b14 differs from pull request most recent head f717167. Consider uploading reports for the commit f717167 to get more accurate results
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@hmcezar thanks! I will look into the pull request and the i0 intensity issue possibly next week.
No problem! Let me know if you need anything from my side.
merging! @hmcezar could you send me a working example with the Iq0 normalisation issue? something that can be run with plumed driver would be great
Description
This PR contains the implementation of a resolution function for the SAS spectra and enables using user-provided
PARAMETERS
for computing SANS. I also implemented an option calledPARAMETERSFILE
, that can be used to provide a text file containing all thePARAMETERS
instead of including them in the main input (when you have to specify thePARAMETERS
for thousands of beads, this makes the input more readable). To avoid increasing the computational cost too much when using the resolution function, splines are used to get the intensities and derivatives forq
not provided by the user. A description of the resolution function implementation and on how one can use thePARAMETERS
in case of CG simulations can be seen in this paper.A bit of context in the paper and implementation: Last summer (before you pushed the SANS implementation in
SAXS.cpp
and reworked the code for theONEBEAD
implementation) I needed to perform metainference simulations biasing the SANS spectrum for a collaboration. I implemented it in my sans branch and have been using it ever since. The difference between what is implemented inSANS.cpp
in that branch and this PR is basically the normalization, which used to setI(q_0) = 1
, withq_0
being the lowestq
, and now uses the same normalization you are using.About the normalization, I performed a couple of tests, and it seems that in some cases, even when the spectra is flat for low q, the calculated curve is not set to 1 at
q=0
. Instead, one has to use a reasonably largeSCALE
with metainference (around 25 for one of my systems) to get a good match between the experimental curve withI(q=0)=1
and the computed curve. This is true for both SAXS and SANS, so this is not something that comes from my implementation. However, if you use a reasonable value for theSCALE
, the curves match and everything works as it should.Anyways, let me know if you need anything else regarding this PR.
Target release
I would like my code to appear in release 2.9
Type of contribution
Copyright
Tests