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

Q Vector generator fix #445

Closed MBartkowiakSTFC closed 1 month ago

MBartkowiakSTFC commented 1 month ago

Description of work The code surrounding the q-vector generation has turned out not to be as stable as the rest of MDANSE.

Fixes

  1. Corrected the error checks around the individual lines of parameters. This prevents the GUI from crashing on invalid input.
  2. Corrected the q-vector generation code in ApproximateDispersionQVectors and MillerIndicesQVectors. There were still problems there resulting from conversion from Python 2.

To test Try typing in wrong parameters for different q-vector generators in the GUI. Run Dynamic Incoherent Structure Factor calculations using ApproximateDispersionQVectors and MillerIndicesQVectors to check if it completes without errors.

ChiCheng45 commented 1 month ago

I've added a commit to set the background color to the default. Some issues with dark scheme.

Before image

After image

ChiCheng45 commented 1 month ago

Some crashes are still occurring here some I've found from my initial testing.

Setting the following q vector settings:

Also, the GUI doesn't update properly. When I misconfigure the q-vectors it changes purple, as expected, when I change to a different q-vector generation type e.g. from CircularQVectors to LinearQVectors it stays purple.

Crashes when I try to use ApproximateDispersionQVectors with the DFTB water trajectory. Dynamic Incoherent Structure Factor calculation using MillerIndicesQVectors works fine.

MBartkowiakSTFC commented 1 month ago

Thanks for testing it in detail. I will remove the problems you listed here.

ChiCheng45 commented 1 month ago

ApproximateDispersionQVectors and MillerIndicesQVectors seem to be working fine now. Everything seems to be working well.

The only problem I've come across so far now is that when you set an invalid setting it still lets you run the calculation. It completes fine, I think it must use the default settings.

image