aiida-common-workflows icon indicating copy to clipboard operation
aiida-common-workflows copied to clipboard

Entry points should be assigned to "extractors" functions

Open bosonie opened this issue 2 years ago • 0 comments

We started to introduce "extractors" functions that can extract from a run of a common workflow some quantities that are not explicit outputs of the common workflow. For instance it is useful to create for every implementation of the CommonRelaxWorkChain a function that extracts the TS contribution to the energy.

An entry point should be assigned to these functions and:

  • we should distinguish between "extractors with common interface" (e.g. the one for the TS contribution should have a common interface) and those specific to a code (where they can decide whatever interface they want)
  • we could use common_workflows.relax.common_extractor.ts_energy.siesta for "commonly defined" extractors (the ts_energy part is the quantity to extract, the last part is points to a specific implementation) and common_workflows.relax.custom_extractor.something.siesta for a custom SIESTA property called "something".
  • alternatively we could invert the name of the code and property common_workflows.relax.common_extractor.siesta.ts_energy and common_workflows.relax.custom_extractor.siesta.something
  • we can then think to add some easy class property to do siesta_common_workchain_node.common_extractor.ts_energy() or siesta_common_workchain_node.custom_extractor.something() (or some similar tab-completable syntax) so one does not have to remember the long name.

bosonie avatar Mar 10 '22 17:03 bosonie