Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array index in form #57

Closed
sverhoeven opened this issue Mar 25, 2022 · 5 comments · Fixed by #102, #104 or #110
Closed

Array index in form #57

sverhoeven opened this issue Mar 25, 2022 · 5 comments · Fixed by #102, #104 or #110

Comments

@sverhoeven
Copy link
Member

If you have many array items is it hard to tell which index each item has. The index is sometimes used to map an item to a molecule with the same index.

It would be nice to see the index in the form for an parameter which is an array.

Implementation suggestion

  • For rjsf default array widget and index number in column before the sub-form or in the row toolbar
  • For table widget prepend a column
@sverhoeven
Copy link
Member Author

Instead of index number we could use the molecule file name.

@joaomcteixeira
Copy link
Member

These would need to be converted back to numbers to comply with haddock3 nomenclature. The hardest part of your idea is to know which parameters would comply with that. Currently, we have a python module that reads and "understands" which parameters are expandable from the configuration file. But we don't have an importable dictionary that would tell which parameters are importable from each haddock3 module. Do you think that's relevant to your needs?

Another more profound philosophical discussion is to understand what is better for haddock3: having machinery that interprets which parameters are expandable (as we have now), or manually defining the expandable parameters and building upon them.

@sverhoeven
Copy link
Member Author

These would need to be converted back to numbers to comply with haddock3 nomenclature. The hardest part of your idea is to know which parameters would comply with that. Currently, we have a python module that reads and "understands" which parameters are expandable from the configuration file. But we don't have an importable dictionary that would tell which parameters are importable from each haddock3 module. Do you think that's relevant to your needs?

For now the workflow builder determines whether a parameter is expandable (aka array or list like) and tied (eg. second item is configuration for second molecule) to another list based on its name.
Parameters which have mol_*_1 or *_1_1 in their name are treated to being expandable and tied to the molecules parameter. I think this is similar to how the existing haddock3 machinery interprets expandable parameters.

To reduce duplication it would be great if I could ask haddock3

  1. if a parameter is expandable
  2. if the expandable parameter is tied to another parameter and which parameter that is.

Another more profound philosophical discussion is to understand what is better for haddock3: having machinery that interprets which parameters are expandable (as we have now), or manually defining the expandable parameters and building upon them.

Yeah, having complex code to interpret a minimal parameter definition or having a complex parameter definition and simple code. Both ways have their pros and cons.

@sverhoeven
Copy link
Member Author

The molecule file name could be very long making it render poorly in a column. It would be nice to render the unique part of a file name. For example someverydeepdirectory/1.pdb and someverydeepdirectory/2.pdb could be rendered as ..../1.pdb and .../2.pdb

@sverhoeven
Copy link
Member Author

sverhoeven commented Jul 29, 2022

Still need to implement index with filename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants