ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
18 stars 4 forks source link

[BUG] Unexpected normalisation of DOS results #438

Open MBartkowiakSTFC opened 1 month ago

MBartkowiakSTFC commented 1 month ago

Description of the error I have run the Density of States on a trajectory of SrTiO3. Here are the results, depending on the atom selection: SrTiO3_DOS_allSrAtoms Each one of those curves has been calculated for ALL the Sr atoms. The selection was:

  1. blue: all atoms (Sr, Ti, O)
  2. orange: all Sr and Ti atoms
  3. green: all Sr and 4 Ti atoms,
  4. red: all Sr and 1 Ti atom.

Similarly, the Ti results are not what I expected: SrTiO3_DOS_differentTiAtoms By deselecting the O atoms I made the Ti signal increase.

Describe the expected result I would prefer if the result for Sr atoms did not change when the selection of other atoms is changed.

Describe the actual result At the moment, changing anything in the atom selection affects all the results.

Suggested fix In the first approximation, we could normalise the results to ALL the atoms in the system, and not just the selected ones.

Additional details N/A

ChiCheng45 commented 1 month ago

I guess the weight scheme should be like this then

image

where $a$ is the atom, $i$ is the index of an atom $a$ and $n_i$ is whether the atom with index $i$ is selected or not.

Currently I think its something like this

image

so the selection changes the normalization.

MBartkowiakSTFC commented 1 month ago

Yes, this would be my preference. Probably not a big deal since we are working with arbitrary units here, but still it would make the results more consistent.