.. include:: substitutions.txt .. currentmodule:: jscatter Dynamic models -------------- This shows dynamic models and how to fit inelastic neutron scattering data from backscattering or time of flight experiments. The classical models are in the module :ref:`dynamic` and can be combined similar to the first example. The actual way how data are combined depends on the idea which atoms contribute to which process. This is more visible in later examples. One example shows how to fit different instruments together. Some dynamic models related to bio are shown in :ref:`Biomacromolecules (bio)`. Multi component models for data inspection at inelastic instruments ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here we use a simple two Lorentz model for data inspection or as general receip. The model can be adopted to the needs of the experiment mixing different models e.g translational diffusion and diffusionin harmonic potential of sidechains. A more complex model that includes that all atoms contribute to COM diffusion and only a part to faster movements is shown later. As resolution we use normalized experimental data to make it simple and stay close to the experiment. As simple yet powerful predefined models :py:func:`~.dynamic.frequencydomain.doubleStretchedExp_w` and :py:func:`~.dynamic.frequencydomain.threeLorentz_w` can be used in the same way. The data in the example were measured by Margarita Kruteva and Benedetta Rosi at EMU@ANSTO and the empty cell measurement is already subtracted in Mantid. .. literalinclude:: ../../examples/example_dy_fit_InelasticInstrument_simple.py :language: python :lines: 5-164 The residual fit with components of first example above The quality of fits depends strongly on your model and this is a simple one. .. image:: ../../examples/images/inelasticInstruments_simple_residuals.png :align: center :height: 300px :alt: inelasticInstruments_together Continue with fit of all data together. Use 'workers=0' to speed up. .. literalinclude:: ../../examples/example_dy_fit_InelasticInstrument_simple.py :language: python :lines: 164- Look at a dataset of the fit of all together. The quality of fits depends strongly on your model and this is a simple one. .. image:: ../../examples/images/inelasticInstruments_simple.png :align: center :height: 300px :alt: inelasticInstruments_together Fit multiple quasielastic instruments together ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A model for incoherent scattering neglecting coherent and maybe some other contributions We use real data (spheres@MLZ) but a strongly simplified model ignoring rotational diffusion of the protein, D2O contribution and dihedral CH3 motions visible in IN5 data. Therefore the results are yet not to over interpret even if the diffusion coefficient is not bad. Also counts from background and empty cell might be present. The intention is to give a relative simple example how to fit different instruments together taking into account the different resolutions and maybe time domain and frequency domain. The combined fit allows **common parameters** as diffusion coefficient,fraction of localised motions with same rmsd and tau but still individual amplitudes and backgrounds. .. literalinclude:: ../../examples/example_dy_fit_differentInelasticInstruments.py :language: python :lines: 7- Look at the fit of all together. .. image:: ../../examples/images/inelasticInstruments_together.png :align: center :height: 300px :alt: inelasticInstruments_together One Q value only .. image:: ../../examples/images/inelasticInstruments_one.png :align: center :height: 300px :alt: inelasticInstruments_one A comparison of different dynamic models in frequency domain ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Compare different kinds of diffusion in restricted geometry by the HWHM from the spectra. .. literalinclude:: ../../examples/example_dy_dynamics.py :language: python :lines: 5- .. image:: ../../examples/DynamicModels.png :align: center :height: 300px :alt: Picture about diffusion fit Protein incoherent scattering in frequency domain ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ We look at a protein in solution that shows translational and rotational diffusion with atoms local restricted in a harmonic potential. This is what is expected for the incoherent scattering of a protein (e.g. at 50mg/ml concentration). The contribution of methyl rotation is missing. For details see : Fast internal dynamics in alcohol dehydrogenase, The Journal of Chemical Physics 143, 075101 (2015), https://doi.org/10.1063/1.4928512 Here we use a reading of a PDB structure with only CA atoms for a simple model. This can be improved using the bio module accessing positions and selecting hydrogen atoms or adding coherent scattering. First we look at the separate contributions : .. literalinclude:: ../../examples/example_dy_inelasticNeutronScattering.py :language: python :end-before: # all together in a combined model Blue arrows indicate the effect of instrument resolution at low Q. While rotation is always dominating, at :math:`\omega=10` restricted diffusion (harmonic) is stronger than translational diffusion in midrange Q. .. image:: ../../examples/inelasticNeutronScattering.png :align: center :height: 300px :alt: Picture about diffusion fit Now we add the above components to a combined model. ``exR`` defines a radius from the center of mass that discriminates between fixed hydrogen inside and hydrogen with additional restricted diffusion outside (close to the protein surface). .. literalinclude:: ../../examples/example_dy_inelasticNeutronScattering.py :language: python :start-after: # all together in a combined model We observe that the elastic intensity first increases with Q and decreases again for :math:`Q>2 nm^{-1}`. Variation of the fraction of hydrogen that show restricted diffusion is observable for midrange Q. .. image:: ../../examples/Ribonuclease_inelasticNeutronScattering.png :align: center :height: 300px :alt: Picture about diffusion fit Hydrodynamic function ^^^^^^^^^^^^^^^^^^^^^ .. literalinclude:: ../../examples/example_dy_HydrodynamicFunction.py :language: python :lines: 1- .. image:: ../../examples/HydrodynamicFunction.png :align: center :height: 300px :alt: Picture HydrodynamicFunction .. _collectivezimmdynamics: Zimm dynamics including collective effects (H(Q)/S(Q)) on center of mass diffusion ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A minimal example how to fit Iqt from NSE measurements on polyelectrolytes using finiteZimm to demonstrate how to include H(Q) and S(Q) for center of mass diffusion Dcm. For details on the physics see Interchain Hydrodynamic Interaction and Internal Friction of Polyelectrolytes Buvalaia, et al ACS Macro Letters 12(9):1218 https://doi.org/10.1021/acsmacrolett.3c00409 .. literalinclude:: ../../examples/example_dy_collectiveZimmDynamics.py :language: python :lines: 11- Checkout the structure factor and HqSq to examine the Q dependent changes in the center of mass diffusion. .. image:: ../../examples/collectiveZimm.png :align: center :height: 300px :alt: Picture collectiveZimm