biosimulators / Biosimulators_utils

Utilities for building standardized command-line interfaces for biosimulation software packages
https://docs.biosimulators.org/Biosimulators_utils
MIT License
4 stars 6 forks source link

Where possible return unit information with `get_parameters_variables_outputs_for_simulation` #69

Open jonrkarr opened 2 years ago

jonrkarr commented 2 years ago

This information would be useful for composition.

Tagging @eagmon.

bilalshaikh42 commented 2 years ago
  • CellML -- could capture units with annotations, but I don't think this is done and certainly sufficiently consistently to read this information with code. Units could be captured in OMEX Metadata files, but no one is doing that.

CellML has units defined as follows:

   <units name="uA">
      <unit prefix="micro" units="ampere"/>
   </units> 

which can then be used in variables as

   <component name="membrane">
      ...  
      <variable name="I_Stim" public_interface="out" units="uA"/>
  </component>

Am I missing something regarding why this is different from SBML/ considered not supported?

luciansmith commented 2 years ago

Not only are CellML units present and supported, they are also required.

luciansmith commented 2 years ago

Actually, it goes even further than that--CellML interpreters are supposed to at least have the option to have units affect the mathematics. In SBML '1 + 1' will always equal '2' even if they are different units (in which case, you can get a unit validation error/warning.) But in CellML, '1 g + 1 cg' should be allowed to equal 1.01 g. (Though somehow this is optional? I think?)