bl1231 / bilbomd-ui

Frontend React SPA webapp for new BilboMD
2 stars 0 forks source link

Add results feedback to `FoXSAnalysis` component #679

Closed dsclassen closed 1 month ago

dsclassen commented 2 months ago

Develop a new component to display results from pipeline_decision_tree.py The results from this Python script will be provided by bilbomd-backend... somehow

dsclassen commented 2 months ago

@jtdelmundo I'm looking at the output of pipeline_decision_tree.py I am wondering if it might make more sense for the Python script to return your "sentences" rather than various lists and arrays e.g. chi_squares_of_regions and then we would have to reassemble the values into sentences...

Comparing chi-squares of all multistates
[2.22, 2.22, 2.15, 2.14, 3.32, 2591.46, 2591.37]

The best chi-square is 2.22 (1 multi states)

Chi-square of 0.01 < q < 0.1: 1.84
Chi-square of 0.1 < q < 0.2: 2.5
Chi-square of 0.2 < q < 0.5: 2.25

Mean residuals of 0.01 < q < 0.1: -0.07
Mean residuals of 0.1 < q < 0.2: 0.1
Mean residuals of 0.2 < q < 0.5: -0.02

Experimental MW = 67.075, Model MW = 68.775
Overall chi-square = 2.22, Moderate fit
The chi-square is highest (2.5) in the region where (0.1 < q < 0.2).
The chi-square is also high (2) is in the region where 0.2 < q < 0.5.

The difference between the model MW (68.775) and the SAXS MW (67.075) is 2.5%, within acceptable error (< 10.0%)

The overall chi-square of this fit is 2.22. Moderate. You are getting there, so let's try to improve it.

Flexibility of elongated regions must be increased, but you are close to a good fit. Try adjusting the flexible regions in the const.inp file. Buffer subtraction problems may have also occured.

{
    "mw_saxs": 67.08,
    "mw_model": 68.78,
    "mw_err": 0.0,
    "overall_chi_square": 2.22,
    "q_ranges": [
        0.011985,
        0.1,
        0.2,
        0.499587
    ],
    "chi_squares_of_regions": [
        1.84,
        2.5,
        2.25
    ],
    "residuals_of_regions": [
        -0.07,
        0.098,
        -0.017
    ],
    "mw_feedback": "The difference between the model MW (68.775) and the SAXS MW (67.075) is 2.5%, within acceptable error (< 10.0%)",
    "overall_chi_square_feedback": "The overall chi-square of this fit is 2.22. Moderate. You are getting there, so let's try to improve it.",
    "highest_chi_square_report": "The chi-square is highest (2.5) in the region where (0.1 < q < 0.2).",
    "second_highest_cs_report": "The chi-square is also high (2) is in the region where 0.2 < q < 0.5.",
    "regional_chi_square_feedback": "Flexibility of elongated regions must be increased, but you are close to a good fit. Try adjusting the flexible regions in the const.inp file. Buffer subtraction problems may have also occured."
}
dsclassen commented 2 months ago

Ignore that comment above