COMCIFS / cif_core

The IUCr CIF core dictionary
15 stars 9 forks source link

wishlist of all the features we would like to eventually fix/address in DDLm 5/6/7 #424

Open rowlesmr opened 1 year ago

rowlesmr commented 1 year ago

From here and here

An issue tracker for future DDLm.

rowlesmr commented 1 year ago

One: A new way to do units.

Essentially, copied straight from siunitx, pp. 8-10.

Define a list of recognised units (SI + others as needed). Define prefixes. Define postfixes. The end. Units are then created by assembling the constituent parts, rather than having to modify the unit_codes enumeration all the time.

*Units*              *SI Prefixes*   *Special*    *Other units*
 ampere               quecto          square       angstrom
 candela              ronto           squared      cycle
 kelvin               yocto           cubic        electron
 kilogram             atto            cubed        pixel
 metre                zepto           tothe        element
 mole                 femto                        Bohr_magnetons
 second               pico                         photon
 gram                 nano                         arbitrary     
 becquerel            micro                        counts
 newton               milli                       
 degreeCelsius        centi                       
 ohm                  deci                        
 coulomb              deca                        
 pascal               hecto                       
 farad                kilo                        
 radian               mega                        
 gray                 giga                        
 siemens              tera 
 hertz                peta 
 sievert              exa 
 henry                zetta 
 steradian            yotta 
 joule                ronna 
 tesla                quetta
 lumen                      
 volt                            
 katal                           
 watt                            
 lux                             
 weber                           
 astronomicalunit                
 bel                             
 dalton                          
 day                             
 decibel                         
 degree                          
 electronvolt                    
 hectare                         
 hour                            
 litre                           
 arcminute (plane angle)         
 minute    (time)                
 arcsecond (plane angle)         
 neper                             
 tonne                           

Then, following _pc_char.colour, you can write:

square_metre  # m^2^
joule_cubed_per_lumen  # J^3^ / lm
_henry_tothe(5.2)  # H^5.2^
joule_per_mole_per_kelvin  # J mol^-1^ K^-1^
per_square_angstrom  #  A^-2^
centi_metre_per_atto_day_squared  # ???