Skip to content

Refine I(Q,t) data - #1695

Open
MBartkowiakSTFC wants to merge 17 commits into
masterfrom
refine-iqt-data
Open

MBartkowiakSTFC wants to merge 17 commits into
masterfrom
refine-iqt-data

Conversation

@MBartkowiakSTFC

Copy link
Copy Markdown
Collaborator

Description of work
This PR uses the MDANSE S(Q,w) calculator, but takes the F(Q,t) as the calculated observable.

The example script pgme-openmm.py shows that the calculation is possible, but does not construct the correct simulation that would match the experiment results. It still uses argon as the model system, so the refinement is not going to converge.

Fixes

  1. Add a keyword argument to pick a different dataset from the MDANSE output file.
  2. Add an arbitrary postprocessing function to normalise the calculated data to the first value for each Q.
  3. Add a data loader that can read multiple text files and combine them into a single 2D dataset.

To test
Run the pgme-openmm.py script in the examples directory.

Question
At the moment the code takes F(Q,t) and compares it to the experiment results. The experiment result is most likely I(Q,t). Should we be taking F(Q,t)^2 to get I(Q,t)?

Comment thread examples/pgme-openmm.py
return input_2D_array / input_2D_array[:1, :]


if __name__ == "__main__":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this to be in a main guard?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MDANSEObservable could be set to run in multiprocessing mode. We want to prevent the subprocesses from starting their own simulations.

@ChiCheng45

Copy link
Copy Markdown
Collaborator

Question At the moment the code takes F(Q,t) and compares it to the experiment results. The experiment result is most likely I(Q,t). Should we be taking F(Q,t)^2 to get I(Q,t)?

I had a look at https://pubs.aip.org/aip/jcp/article/133/23/234506/950138/Reduced-mobility-of-di-propylene-glycol and it says that they obtain $I(Q,t)$ from a fourier tranform of $I_{m}(Q,\omega) = S(Q,\omega) \otimes R(Q,\omega)$ so that $I(Q,t) = I_{m}(Q,\omega) / R(Q,t)$. So in this case, the expt data is not squared?

@MBartkowiakSTFC

Copy link
Copy Markdown
Collaborator Author

I had a look at https://pubs.aip.org/aip/jcp/article/133/23/234506/950138/Reduced-mobility-of-di-propylene-glycol and it says that they obtain I ( Q , t ) from a fourier tranform of I m ( Q , ω ) = S ( Q , ω ) ⊗ R ( Q , ω ) so that I ( Q , t ) = I m ( Q , ω ) / R ( Q , t ) . So in this case, the expt data is not squared?

Our own scientists also published a document https://doi.org/10.1016/j.physb.2019.02.041 where I(Q,t) is defined as intermediate scattering function, which can be Fourier transformed to give S(Q,w).

So, unlike in some other scattering techniques (e.g. diffraction), it seems that F(...) and I(...) are the same thing.

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.

3 participants