Conversation
krzywon
left a comment
There was a problem hiding this comment.
I haven't tested, but see my code comments.
|
@krzywon No, it is ready for merging. The |
krzywon
left a comment
There was a problem hiding this comment.
One final code review. I'll do a functionality test later.
|
I tested today and am getting a warning when trying to create the plugin model. I think this is a Win-specific issue. The path saved in the plugin model uses backslashes causing a unicode error. When I open the file generated in the model editor, I get the following error:
|
|
@krzywon Windows issue should be fixed now. I changed the structure path to always be stored as a posix path instead. Verified it works on my own Windows system. Can you can take a look at the open review conversations? |
|
|
|
This is getting closer! The code looks fine at this point, but running locally, I am seeing an error. Also, closing the GSC and immediately switching to the fitting perspective is a bit jarring and seems like the GSC crashed. Auto-loading the model is useful, but I don't think closing the tool is ideal. Steps to repeat the error below:
|
|
@krzywon what is the expected outcome when trying to calculate the solution scattering by a crystal? My library is complaining that the PDB file is invalid (and indeed it is: there's no element or residue information, only an atom name which can be misinterpreted). |
|
I have now added support for processing files with unknown residues, but I really do not think we should enable this by default. It needs an explicit toggle so users are aware of what is actually being done with their data, which is currently not possible. Regarding automatically closing the GSC: I tried disabling this, and I found that to be an even worse experience, as there is no feedback that something actually happened. I think that, though it may not be ideal, closing the GSC & opening the fitting panel with the model already selected gives much clearer feedback. And it would be the next natural step to take for the user anyway. |
|
@krzywon bump |
|
Opening the same PDB file that I tested for the last error (diamond.pdb), I am now seeing this error. Through the scripting interface, I could understand seeing this error, but from the GUI, there is no obvious way to implement this in the plugin model. Perhaps adding a couple of flags to the model file that are checked when running ausaxs, and updating the error message to reference those? Otherwise, I would say this is ready.
|
|
@klytje, the tasks left for this PR:
These can either be done within this PR, or I can approve and merge this and we create separate issues to track them. |
|
@krzywon Sorry for the delay, I was considering my options for changing the error messages when used through Python, but I don't see any good long-term solution for this. So I think it is best to leave them as is, and guide users towards the solution instead: changing the two flags which are now added to all generated plugins. The downside with this approach is that the changes are overwritten whenever a new plugin is generated. On the other hand, maybe this is fine since it is really not a good idea to have these flags enabled by default. I think it would be good to create an issue to document the changes we'd like to see in a proper GUI interface. I can do this once this is merged. |
krzywon
left a comment
There was a problem hiding this comment.
I think this is ready. I think the two flags added to the SAXS model file need more (any?) documentation, but that shouldn't hold this PR up.
Let's wait to merge this until after the biweekly call next week.
|
It generally seems to work as expected. The error occurs when when one tries to regenerate plugin. It throws error about magnetic model, which is quite confusing. Particularly because a new plugin model is generated.
|
I can see that @krzywon also faced the similiar issue |
|
@wpotrzebowski This is a new error: the previous one was thrown from inside my own library, while this new one is thrown by sasview itself. I cannot replicate this error, regenerating the plugin model works just fine for me. What are the exact steps required to trigger this? It seems to be attempting to do some intensity calculations, which makes no sense to me. |
|
@klytje it involves only a few steps:
|
|
@wpotrzebowski I still cannot replicate it. Which files are you using? And which platform? Did you use the installer or just check out this branch? |
|
@klytje I use installer on macOS and a large PDB file for the virus capsid https://github.com/Andre-lab/hbv_trSAXS/blob/master/HBVCP_empty_assembly/bayesian_models/capsid_T4.pdb |
|
@wpotrzebowski I cannot replicate the error on ubuntu. Can someone else give it a try on mac? I don't have one to test. |
|
After some discussion during todays technical meeting, the plan is to merge this as-is, and to document the issues noted. |
Description
After long discussions on how to support SAXS fitting in SasView in the short term, it was decided to extend the generic scattering calculator with a 'SAXS fitting' option.
When this option is selected, the
Computebutton text is replaced withGenerate plugin model. Loading aNuclear datafile with this option enabled circumvents the usual loading logic, and instead forwards the selected file path toAUSAXS. This serves two purposes:AUSAXSalso supportsmmCIFfiles, which is the new standard in biological scattering, andPDBloading logic with the additional information required for SAXS calculations.Clicking the
Generate plugin modelwill then create a newSAXS fit (<filename>)model, which is automatically selected & opened for the user in the fit panel. The SAXS data may then be loaded in & fitted.Though a little awkward, I found this implementation to work decently well, at least for a short-term solution. In the long run, I'd like to have the following:
AUSAXSwhich are currently difficult/impossible to expose to the user. Though this could also be implemented through a dedicated SAXS fitting window, for (1) to work, this is required.SasViewfile loaders to supportmmCIF& fullPDBdata loading, if we want to avoid relying onAUSAXSfor this. Alternatively, we could continue to rely onAUSAXSto parse the files, but store the data on theSasViewside. Or just keep it as is. I'm indifferent on this issue.This PR replaces #3194.
Review Checklist:
[if using the editor, use
[x]in place of[ ]to check a box]Documentation
Do we need documentation for this? There's links to the
AUSAXSpaper in the generated plugin model file itself, if people are interested.Installers
Licensing (untick if necessary)