adelq / thermochem

Useful Python modules for Thermodynamics and Thermochemistry
http://thermochem.readthedocs.io
Other
30 stars 17 forks source link

Support units of variable types. #26

Open ZGainsforth opened 1 year ago

ZGainsforth commented 1 year ago

One option for supporting units is to apply astropy's unit module. When initiating the JANAF (or burcat, or other db) there can be an optional parameter to add units to returned values. Then an if statement on the output would add units only if this optional flag is set to true. It would default to false to provide backward compatibility. Thoughts?

adelq commented 1 year ago

I think that's a good idea more generally to ensure that units are being used in a consistent way. I would rather use a unit library that has fewer dependencies than astropy though given the limited overlap, maybe something like pint or something similar.