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
20 stars 4 forks source link

[BUG] Total DOS should be a sum of the atom DOS? #353

Closed ChiCheng45 closed 4 months ago

ChiCheng45 commented 5 months ago

Description of the error My expectations are that the total DOS should be a sum of the individual atoms DOS. However in MDANSE this is not the case. Maybe MDANSE applies some normalisation to the both the atom and total DOS? What is the standard thing to do in this field?

Additional details This is the DOS I calculated from a H2O trajectory. image

My expectations would be to see something like this, image from this publication https://pubs.rsc.org/en/content/articlelanding/2013/cp/c3cp52741g

gonzalezma commented 5 months ago

No, in MDANSE the total (either for the DOS or any other property) is not a direct sum of the partials, but a weighted sum. This is why in your example your total dos is in between that of the O and the H. In fact, if you selected equal weights, you have for H2O that DOS_total = (1/3)DOS_O + (2/3)DOS_H.

ChiCheng45 commented 5 months ago

I see, @gonzalezma would it be useful to also include the weighted atom DOS in the results file? So that the results file would contain the following DOS results (for equal weighting).

DOS_total DOS_O_weighted = (1/3)DOS_O DOS_H_weighted = (2/3)DOS_H DOS_O DOS_H

I think this will make the results more clear for new users and also shows how the weights affected the total result.

gonzalezma commented 5 months ago

Yes, it seems a good idea to me.