COMCIFS / comcifs.github.io

Draft COMCIFS documents
1 stars 4 forks source link

How to loop unit cells & temperature values #24

Open briantoby opened 1 month ago

briantoby commented 1 month ago

Back to working on CIF exports from GSAS-II.

Looking at a bug related to reporting the data measurement temperature, I am realizing that have a fundamental conflict in how to report that and unit cell constants from multiple dataset fits. Obviously one wants them to be listed in the same block with fractional coordinates -- without them the latter are useless, but when one has a multiple dataset fit, one likely has only one set of coordinates, but likely more than set of one unit cell constants and quite possibly more than one temperature value.

IMHO the right way to record this is with a loop_ structure with _cell_measurement_temperature, _cell_length_a,... and that loop can be included in the same block as the crystal structure, but I don't think these CIF items are allowed in loops. Probably makes sense to put a block pointer to the block with the raw data in that loop as well.

Temperature can certainly be included in the block with raw data, but the unit cell dimensions (possibly for more than one phase) do not belong there.

jamesrhester commented 3 weeks ago

Last year we put quite a few data names in place in both the core dictionary and powder dictionary to properly handle the various scenarios that come up in powder diffraction (see pdCIF issues and pull requests). We are, however, in dire need of a complex example, so I plan over the next month or so to create some examples, perhaps based on the GSAS-II tutorial data.

We have built flexibility in to the design, so that something like the loop you speak of (temperature and cell lengths in a single table) is allowed if the value of _audit.schema is not Default. But note that _cell_measurement.temperature is now deprecated, and only used if the cell is measured at a different temperature to the main experiment - you should use _diffrn.ambient_temperature for powder and any modern single crystal experiment.

briantoby commented 2 weeks ago

_diffrn*ambient_temperature removed from GSAS-II CIF exporter (see https://github.com/AdvancedPhotonSource/GSAS-II/issues/78) (FWIW _cell_measurement.temperature was already in use).

jamesrhester commented 2 weeks ago

Looking at that code I think it is the other way around, i.e. cell_measurement. temperature has been removed (as it should have been.)

briantoby commented 2 weeks ago

Yes, indeed. Juggling too many open windows.