Resolve "Two issues with GIMS' Band Structure and DOS setup"

Closes #74 (closed), #52 (closed)

This merge request is a major rewriting of GIMS form creation, making it easier to add fields to control generator forms, filling the fields with predefined values, making one fields depend on other and on the structure given in the previous step of the workflow. Built on the dictionary found in Fields_*.js, the MR introduces the functional values for the fields depending on the structure, thus putting filling the field values in the same place as fields themselves, e.g.

  species: {
    ...
    value: s => {
      let species = []
      s.atoms.forEach( atom => {if (!species.includes(atom.species)) species.push(atom.species)})
      return species.join(' ')
    }

Also the constraint logic is introduced, making it possible to hide or show fields based on the values of other fields in a transparent manner. The constraints also are given in the same field dictionary, e. g.

  k_grid_offset: {
    text:'k-points grid offset',
    constraint: ['xc', 'in', ['pw-lda', 'pz-lda', 'pbe', 'pbesol']],
    ...
 }

Last but not least, a new form field type is introduced, RadioField, making it possible to choose one of the several mutually exclusive options, like k_grid and k_grid_density: image

Merge request reports

Loading