Skip to content

Compatibility between DDL2 and DDLm enumeration ranges #5

@vaitkus

Description

@vaitkus

Recently, there have been some efforts to migrate the DDL2 dictionaries to DDLm (for example, the imgCIF dictionary, https://github.com/COMCIFS/imgCIF). Most DDL2 concepts align quite well with DDLm, however, I did notice a significant difference in the way enumeration ranges are defined with DDL2 seemingly using a superior approach.

DDL version Category/Item Min/Max representation Allows multiple ranges per item Allows non-inclusive min/max
DDLm _enumeration.range Min/Max as a composite string No No
DDL2 ITEM_RANGE Min/Max as separate items Yes Yes

While all DDLm ranges can be expressed in DDL2, the reverse is not true. Given the somewhat recent migration of certain DDL2 dictionaries to DDLm (e.g. imgCIF, https://github.com/COMCIFS/imgCIF), maybe it would make sense to introduce a similar more advanced range description to the DDLm dictionary as well (e.g. deprecate the old one and add a new category)? Note, that the previously mentioned imgCIF dictionary already contains non-inclusive range values that cannot be equivalently represented in DDLm (e.g. _array_element_size.size, _array_intensities.gain).

Possible approaches of specifying whether a range in inclusive were previously discussed in issue COMCIFS/cif_core#372, but I would prefer the DDL2 approach since it also allows specifying discontinuous enumeration ranges. See, for example, how the range of (0.0, 1.0] ∪ [2.0, +inf) can be expressed in DDL2:

   loop_
   _item_range.minimum
   _item_range.maximum
     0.0  1.0  
     1.0  1.0
     2.0  2.0
     2.0  .     

Is this something worth pursuing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions