Closed rowlesmr closed 1 year ago
Please note that the _pd_phase_list.id
will repeat in different data blocks, and therefore, so too will _pd_phase_mass.phase_list_id
, _pd_refln.phase_list_id
...
I don't know if that is OK.
I hope this level of indirection is possible:
loop_
_pd_phase_list.id
_pd_phase_list.phase_id
1 ALUMINA_A_BIG_LONG_STRING_THAT_IS_GLOBALLY_UNIQUE
2 SILICON_ANOTHER_STRING_THAT_IS_SUPPOSED_TO_BE_ALONE
loop_
_pd_phase_mass.phase_list_id
_pd_phase_mass.percent
1 72.11
2 27.89
PD_PHASE_LIST
is keyed on _pd_phase_list.id
and _pd_phase_list.phase_id
. _pd_phase_list.id
is an arbitrary id and _pd_phase_list.phase_id
is a child of _pd_phase.id
.
PD_PHASE_MASS
is keyed on pd_phase_mass.phase_id
and pd_phase_mass.diffractogram_id
; both of which are children of _pd_phase.id
and _pd_diffractogram.id
, respectively.
If we add _pd_phase_mass.phase_list_id
to PD_PHASE_MASS
as a child of _pd_phase_list.id
, are the values of _pd_phase_mass.percent
still able to be assigned to the correct phases?
I think this is a lost cause.
There are too many things with phase_id
s and diffractogram_id
s to then go back and double up with *_list_id
s, too.
In the DDL1 dictionary language, there was no way to formally link the contents of different data blocks. To solve this issue @briantoby (and friends) invented
_pd_block_id
, whose value is a globally* unique ID, in order to identify other data blocks containing information pertinant to the current data block.In the original DDL1 pdCIF dictionary (which is still the current official release),
PD_PHASE
is a_list yes
category (ieLoop
in DDLm), containing_pd_phase_block_id
,_pd_phase_id
,_pd_phase_mass_%
, and_pd_phase_name
._pd_phase_id
served only to link between_pd_phase_block_id
and_refln_phase_id
. See also description in §3.3.6.1 in Vol. G.Similarly,
PD_BLOCK
is a_list yes
category (ieLoop
), containing_pd_block_diffractogram_id
and_pd_block_id
.As both were lists, this enabled each of them to loop within themselves, allowing links between blocks containing phase and diffractogram information to be made.
Note: There was a single identifier (
_pd_block_id
), and depending on the data item it was referenced from, if referred to either phase or diffractogram information (eg_pd_phase_block_id
,_pd_block_diffractogram_id
,_pd_calib_std_external_block_id
...).
The new DDLm dictionary language allows for a formal definition of linkages between categories following the form of a relational database.
In the current development DDLm pdCIF dictionary, we now have formal definitions of "arbitrary labels" to identify data blocks containing phase and/or diffractogram information:
_pd_phase.id
, and_pd_diffractogram.id
. These ID values are used in categories (egPD_PHASE_MASS
) to refer to the particular phase/diffractogram ID of interest (eg_pd_phase_mass.phase_id
and_pd_phase_mass.diffractogram_id
).In adding these two separate identifiers, the exisiting
PD_PHASE
and newly createdPD_DIFFRACTOGRAM
categories are now bothSet
categories (ie_list no
in DDL1), meaning that these value cannot be looped to show, for example, all the phases present in a diffractogram.As a part of this process, we created the
PD_PHASE_BLOCK
andPD_BLOCK_DIFFRACTOGRAM
categories asLoop
in order to allow block IDs to be looped (_pd_phase_block.id
and_pd_block_diffractogram.id
), and then added_pd_phase_block.phase_id
and_pd_block_diffractogram.diffractogram_id
to allow phase and diffractogram IDs to be looped.I now believe this decision was wrong, and conflates the idea of block IDs and phase/diffractogram IDs; yes, they are both identifiers, but block IDs identify a specific data block, while phase/diffractogram IDs identify any and all blocks containing information pertinent to a particular phase/diffractogram. The definitions of
PD_PHASE_BLOCK
andPD_BLOCK_DIFFRACTOGRAM
should be reverted such they can only refer to block IDs, and new categories created to enable listing of phase/diffractogram IDs. Side ♩: I believe the definitions of_pd_phase.id
, and_pd_diffractogram.id
should be strengthened such that they are globally* unique.To this end, I believe we should create two
Loop
categories,PD_PHASE_LIST
andPD_DIFFRACTOGRAM_LIST
, to deal with cases when we need to loop phase and diffractogram ids.PD_PHASE_LIST
_pd_phase_list.id
_pd_phase.id
._pd_phase_list.phase_id
Link
back to_pd_phase.id
(which should be unique in the entire world).PD_DIFFRACTOGRAM_LIST
_pd_diffractogram_list.id
_pd_diffractogram.id
._pd_diffractogram_list.diffractogram_id
Link
back to_pd_diffractogram.id
(which should be unique in the entire world).These two categories would allow for the looping of phase and diffractogram ids in data blocks where necessary, such as in a block containing a diffractogram with many phases.
Further to the creation of these two categories, other categories that have
_categoryname.phase_id
and/or_categoryname.diffractogram_id
should also have_categoryname.phase_list_id
and/or_categoryname.diffractogram_list_id
to be able reference a_pd_phase_list.id
or_pd_diffractogram_list.id
. Such an addition should allow (I think?) something like the following to be written:This is a single CIF file containing six data blocks; two diffraction patterns four phases:
Is there enough information in here to properly link the PO corrections in
data_DIFFPATT_2
to the "correct"_pd_phase.id
values, and not the other phases?Comments, questions, suggestions, ideas, critisisms?
* literally, as in, the entire world.