COMCIFS / Powder_Dictionary

CIF definitions for powder diffraction
4 stars 4 forks source link

Category keys needed #114

Open rowlesmr opened 1 year ago

rowlesmr commented 1 year ago

Categories missing keys:

rowlesmr commented 1 year ago

also, does anything need a diffrn.id? PD_CALIB_WAVELENGTH has one.

jamesrhester commented 1 year ago

The specimen is already linked to the diffractogram through _pd_diffractogram.spec_id, so I don't think we need to fiddle with PD_SPEC.

PD_CHAR looks to me like you could just have a _pd_char.spec_id as key data name and be done for our purposes as we have no categories corresponding to sample or material. Because there is a _pd_diffractogram.spec_id, diffractogram is indirectly linked to PD_CHAR they both are linked to spec_id.

PD_PREP: this looks like a PD_SAMPLE category because I don't think there are any other data names that refer to sample-specific information as opposed to material or specimen. If we add a key data name to PD_PREP _pd_prep.sample_id we can then link to it from pd_spec.

What is the remaining function of PD_CALIBRATION after the new categories we've introduced? If it has none, we can leave it as a Set category and thereby indicate that it should not be used going forward. If it should be kept, then I think that the easiest thing is to give it a key data name that is a child of _diffractogram.id. I have a niggle with this in that many diffractograms might have the same correction, but on the other hand there is no label for some "grouping" of diffractograms that would allow us to point to anything else, and these corrections do get updated from time to time.

rowlesmr commented 1 year ago

I think this one is done with #133 and #127.

I do need to remind myself on what a diffn.id is for.

jamesrhester commented 1 year ago

diffrn.id is for a set of experimental conditions (see DIFFRN category), which includes wavelength and radiation type. Normally it would be associated with a diffractogram, I'd think.

rowlesmr commented 1 year ago

_diffrn.id has temperature/pressure/environment. Does it also point to DIFFRN_RADIATION_WAVELENGTH? (which is part of DIFFRN_RADIATION, which is part of DIFFRN).

PD_INSTR might need a link to DIFFRN_RADIATION_WAVELENGTH to properly associate wavelengths, and PD_DIFFRACTOGRAM might need a link to _diffrn.id to properly associate temperature/pressure.

jamesrhester commented 1 year ago

So formally, diffrn_radiation_wavelength has a pointer to _diffrn.id as one of its keys. This is done explicitly in mmCIF, if I remember correctly. To my mind the wavelength and environmental conditions can be separated from the instrument geometry, that is, a single geometry can have multiple wavelengths or conditions associated with it. So really it is only necessary to have a link from PD_DIFFRACTOGRAM to DIFFRN, and that will take care of wavelength as well.

I know it is a bit annoying that multiple environmental conditions need to repeat the wavelength value, but that is what we have inherited. Ideally wavelength would not be linked to conditions but we can't undo that now.

rowlesmr commented 1 year ago

diffrn_radiation_wavelength has a pointer to _diffrn.id as one of its keys.

Is that just because DIFFRN_RADIATION_WAVELENGTH is a subcategory of DIFFRN? There isn't a dataitem which is linked to _diffrn.id.

Where can I find a copy of the current mmCIF? All I can find is https://www.ebi.ac.uk/pdbe/docs/documentation/mmcif.html, and that is in the old format.

jamesrhester commented 1 year ago

The current mmCIF is at https://mmcif.wwpdb.org

I misremembered, DIFFRN_RADIATION has a link to _diffrn.id, but the wavelength list does not. So DIFFRN_RADIATION has a (non-key) link to a wavelength identifier from the wavelength list. If you change this wavelength identifier, you need a new _diffrn.id