#\#CIF_2.0
##########################################################################
#                                                                        #
#  CIF CORE DICTIONARY                                                   #
#                                                                        #
##########################################################################

data_CIF_CORE

    _dictionary.title             CIF_CORE
    _dictionary.class             Instance
    _dictionary.version           3.3.0
    _dictionary.date              2025-06-18
    _dictionary.uri
        https://raw.githubusercontent.com/COMCIFS/cif_core/master/cif_core.dic
    _dictionary.ddl_conformance   4.2.0
    _dictionary.namespace         CifCore
    _description.text
;
    The CIF_CORE dictionary defines data items that are common to all domains
    of crystallographic studies. These definitions are mostly used within the
    Crystallographic Information Framework (CIF).
;

save_CIF_CORE_HEAD

    _definition.id                CIF_CORE_HEAD
    _definition.scope             Category
    _definition.class             Head
    _definition.update            2024-05-15
    _description.text
;
    The CIF_CORE_HEAD category is the top-level category for all categories in
    the CIF_CORE dictionary.
;
    _name.category_id             CIF_CORE
    _name.object_id               CIF_CORE_HEAD

save_

save_DIFFRACTION

    _definition.id                DIFFRACTION
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2024-05-15
    _description.text
;
    The dictionary group encompassing the core diffraction data items defined
    and used within the Crystallographic Information Framework (CIF).
;
    _name.category_id             CIF_CORE_HEAD
    _name.object_id               DIFFRACTION

save_

save_DIFFRN

    _definition.id                DIFFRN
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2022-05-09
    _description.text
;
    The category of data items used to describe the diffraction experiment.
;
    _name.category_id             DIFFRACTION
    _name.object_id               DIFFRN
    _category_key.name            '_diffrn.id'

save_

save_diffrn.ambient_environment

    _definition.id                '_diffrn.ambient_environment'
    _alias.definition_id          '_diffrn_ambient_environment'
    _definition.update            2012-11-26
    _description.text
;
    The gas or liquid environment of the crystal sample, if not air.
;
    _name.category_id             diffrn
    _name.object_id               ambient_environment
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'He'
         'vacuum'
         'mother liquor'

save_

save_diffrn.ambient_pressure

    _definition.id                '_diffrn.ambient_pressure'
    _alias.definition_id          '_diffrn_ambient_pressure'
    _definition.update            2023-01-13
    _description.text
;
    Mean hydrostatic pressure at which intensities were measured.
;
    _name.category_id             diffrn
    _name.object_id               ambient_pressure
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kilopascals

save_

save_diffrn.ambient_pressure_su

    _definition.id                '_diffrn.ambient_pressure_su'

    loop_
      _alias.definition_id
         '_diffrn_ambient_pressure_su'
         '_diffrn.ambient_pressure_esd'

    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn.ambient_pressure.
;
    _name.category_id             diffrn
    _name.object_id               ambient_pressure_su
    _name.linked_item_id          '_diffrn.ambient_pressure'
    _units.code                   kilopascals

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn.ambient_pressure_gt

    _definition.id                '_diffrn.ambient_pressure_gt'
    _alias.definition_id          '_diffrn_ambient_pressure_gt'
    _definition.update            2012-12-13
    _description.text
;
    Mean hydrostatic pressure above which intensities were measured.
    These items allow for a pressure range to be given.
    _diffrn.ambient_pressure should be used in preference to this
    item when possible.
;
    _name.category_id             diffrn
    _name.object_id               ambient_pressure_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kilopascals

save_

save_diffrn.ambient_pressure_lt

    _definition.id                '_diffrn.ambient_pressure_lt'
    _alias.definition_id          '_diffrn_ambient_pressure_lt'
    _definition.update            2012-12-13
    _description.text
;
    Mean hydrostatic pressure below which intensities were measured.
    These items allow for a pressure range to be given.
    _diffrn.ambient_pressure should be used in preference to this
    item when possible.
;
    _name.category_id             diffrn
    _name.object_id               ambient_pressure_lt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kilopascals

save_

save_diffrn.ambient_temperature

    _definition.id                '_diffrn.ambient_temperature'

    loop_
      _alias.definition_id
         '_diffrn_ambient_temperature'
         '_diffrn_ambient_temp'
         '_diffrn.ambient_temp'

    _definition.update            2012-11-26
    _description.text
;
    Mean temperature at which intensities were measured.
;
    _name.category_id             diffrn
    _name.object_id               ambient_temperature
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_diffrn.ambient_temperature_su

    _definition.id                '_diffrn.ambient_temperature_su'

    loop_
      _alias.definition_id
         '_diffrn_ambient_temperature_su'
         '_diffrn_ambient_temp_su'
         '_diffrn.ambient_temp_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _diffrn.ambient_temperature.
;
    _name.category_id             diffrn
    _name.object_id               ambient_temperature_su
    _name.linked_item_id          '_diffrn.ambient_temperature'
    _units.code                   kelvins

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn.ambient_temperature_details

    _definition.id                '_diffrn.ambient_temperature_details'

    loop_
      _alias.definition_id
         '_diffrn_ambient_temp_details'
         '_diffrn.ambient_temp_details'

    _definition.update            2014-06-12
    _description.text
;
    A description of special aspects of temperature control during
    data collection.
;
    _name.category_id             diffrn
    _name.object_id               ambient_temperature_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_diffrn.ambient_temperature_gt

    _definition.id                '_diffrn.ambient_temperature_gt'

    loop_
      _alias.definition_id
         '_diffrn_ambient_temp_gt'
         '_diffrn_ambient_temperature_gt'
         '_diffrn.ambient_temp_gt'

    _definition.update            2012-12-13
    _description.text
;
    Mean temperature above which intensities were measured.
    These items allow for a temperature range to be given.
    _diffrn.ambient_temperature should be used in preference to
    this item when possible.
;
    _name.category_id             diffrn
    _name.object_id               ambient_temperature_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_diffrn.ambient_temperature_lt

    _definition.id                '_diffrn.ambient_temperature_lt'

    loop_
      _alias.definition_id
         '_diffrn_ambient_temp_lt'
         '_diffrn_ambient_temperature_lt'
         '_diffrn.ambient_temp_lt'

    _definition.update            2012-12-13
    _description.text
;
    Mean temperature below which intensities were measured.
    These items allow for a temperature range to be given.
    _diffrn.ambient_temperature should be used in preference to
    this item when possible.
;
    _name.category_id             diffrn
    _name.object_id               ambient_temperature_lt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_diffrn.crystal_id

    _definition.id                '_diffrn.crystal_id'
    _definition.update            2022-05-09
    _description.text
;
    Identifier for the crystal from which diffraction data were
    collected. This is a pointer to _exptl_crystal.id.
;
    _name.category_id             diffrn
    _name.object_id               crystal_id
    _name.linked_item_id          '_exptl_crystal.id'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_diffrn.crystal_support

    _definition.id                '_diffrn.crystal_support'
    _definition.update            2014-06-12
    _description.text
;
    The physical device used to support the crystal during data
    collection.
;
    _name.category_id             diffrn
    _name.object_id               crystal_support
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'glass capillary'
         'quartz capillary'
         'fiber'
         'metal loop'

save_

save_diffrn.crystal_treatment

    _definition.id                '_diffrn.crystal_treatment'
    _alias.definition_id          '_diffrn_crystal_treatment'
    _definition.update            2012-11-26
    _description.text
;
    Remarks about how the crystal was treated prior to intensity measurement.
    Particularly relevant when intensities were measured at low temperature.
;
    _name.category_id             diffrn
    _name.object_id               crystal_treatment
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'equilibrated in hutch for 24 hours'
         'flash frozen in liquid nitrogen'
         'slow cooled with direct air stream'

save_

save_diffrn.flux_density

    _definition.id                '_diffrn.flux_density'
    _definition.update            2025-02-07
    _description.text
;
    Flux density of radiation incident at the crystal.

    Reference: Dickerson, J. L., McCubbin, P. T. N., Brooks-Bartlett,
    J. C. & Garman, E. F. (2024). Doses for X-ray and electron
    diffraction: New features in RADDOSE-3D including intensity decay
    models. Protein Sci. 33, e5005.
;
    _name.category_id             diffrn
    _name.object_id               flux_density
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")
                                _units.code =
"neutrons_per_millimetre_squared_per_second"
    Else If (_diffrn_radiation.probe == "electron")
                                _units.code =
"electrons_per_angstrom_squared_per_second"
    Else                        _units.code =
"photons_per_millimetre_squared_per_second"
;
save_

save_diffrn.id

    _definition.id                '_diffrn.id'
    _definition.update            2022-05-09
    _description.text
;
    Unique identifier for a diffraction data set collected under
    particular diffraction conditions.
;
    _name.category_id             diffrn
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_diffrn.measured_fraction_theta_full

    _definition.id                '_diffrn.measured_fraction_theta_full'
    _alias.definition_id          '_diffrn_measured_fraction_theta_full'
    _definition.update            2013-01-20
    _description.text
;
    Fraction of unique (symmetry-independent) reflections measured
    out to _diffrn_reflns.theta_full.
;
    _name.category_id             diffrn
    _name.object_id               measured_fraction_theta_full
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_diffrn.measured_fraction_theta_max

    _definition.id                '_diffrn.measured_fraction_theta_max'
    _alias.definition_id          '_diffrn_measured_fraction_theta_max'
    _definition.update            2013-01-20
    _description.text
;
    Fraction of unique (symmetry-independent) reflections measured
    out to _diffrn_reflns.theta_max.
;
    _name.category_id             diffrn
    _name.object_id               measured_fraction_theta_max
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_diffrn.precession_semi_angle

    _definition.id                '_diffrn.precession_semi_angle'
    _definition.update            2024-04-22
    _description.text
;
    Angle at the sample of the tilt from the normal direction of a radiation
    beam moved in a precessional scan.
;
    _name.category_id             diffrn
    _name.object_id               precession_semi_angle
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   degrees

save_

save_diffrn.precession_semi_angle_su

    _definition.id                '_diffrn.precession_semi_angle_su'
    _definition.update            2024-04-22
    _description.text
;
    Standard uncertainty of _diffrn.precession_semi_angle.
;
    _name.category_id             diffrn
    _name.object_id               precession_semi_angle_su
    _name.linked_item_id          '_diffrn.precession_semi_angle'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Single
    _type.contents                Real
    _units.code                   degrees

save_

save_diffrn.special_details

    _definition.id                '_diffrn.special_details'

    loop_
      _alias.definition_id
         '_diffrn_special_details'
         '_diffrn.details'

    _definition.update            2012-11-26
    _description.text
;
    Special details of the diffraction measurement process. Should include
    information about source instability, crystal motion, degradation, etc.
;
    _name.category_id             diffrn
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
;
    The results may not be entirely reliable as the measurement was
    made during a heat wave when the air-conditioning had failed.
;

save_

save_diffrn.symmetry_description

    _definition.id                '_diffrn.symmetry_description'
    _alias.definition_id          '_diffrn_symmetry_description'
    _definition.update            2012-11-26
    _description.text
;
    Recorded diffraction point symmetry, systematic absences and possible
    space group(s) or superspace group(s) compatible with these.
;
    _name.category_id             diffrn
    _name.object_id               symmetry_description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_diffrn.total_dose

    _definition.id                '_diffrn.total_dose'
    _definition.update            2025-02-26
    _description.text
;
    Total radiation dose absorbed by the crystal during the diffraction
    experiment.

    Reference: Dickerson, J. L., McCubbin, P. T. N., Brooks-Bartlett,
    J. C. & Garman, E. F. (2024). Doses for X-ray and electron
    diffraction: New features in RADDOSE-3D including intensity decay
    models. Protein Sci. 33, e5005.
;
    _name.category_id             diffrn
    _name.object_id               total_dose
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   megagray

save_

save_diffrn.total_dose_su

    _definition.id                '_diffrn.total_dose_su'
    _definition.update            2025-02-26
    _description.text
;
    Standard uncertainty of _diffrn.total_dose.
;
    _name.category_id             diffrn
    _name.object_id               total_dose_su
    _name.linked_item_id          '_diffrn.total_dose'
    _units.code                   megagray

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn.total_exposure_time

    _definition.id                '_diffrn.total_exposure_time'
    _definition.update            2025-02-07
    _description.text
;
    Total time the crystal was exposed during the diffraction experiment.
;
    _name.category_id             diffrn
    _name.object_id               total_exposure_time
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   minutes

save_

save_CELL

    _definition.id                CELL
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2023-03-02
    _description.text
;
    The category of data items used to describe the parameters of
    the crystal unit cell.
;
    _name.category_id             DIFFRN
    _name.object_id               CELL
    _category_key.name            '_cell.diffrn_id'

save_

save_cell.angle_alpha

    _definition.id                '_cell.angle_alpha'
    _alias.definition_id          '_cell_angle_alpha'
    _name.category_id             cell
    _name.object_id               angle_alpha

    _import.get                   [{'file':templ_attr.cif  'save':cell_angle}]

save_

save_cell.angle_alpha_su

    _definition.id                '_cell.angle_alpha_su'

    loop_
      _alias.definition_id
         '_cell_angle_alpha_su'
         '_cell.angle_alpha_esd'

    _name.category_id             cell
    _name.object_id               angle_alpha_su
    _name.linked_item_id          '_cell.angle_alpha'

    _import.get
        [{'file':templ_attr.cif  'save':cell_angle_su}]

save_

save_cell.angle_beta

    _definition.id                '_cell.angle_beta'
    _alias.definition_id          '_cell_angle_beta'
    _name.category_id             cell
    _name.object_id               angle_beta

    _import.get                   [{'file':templ_attr.cif  'save':cell_angle}]

save_

save_cell.angle_beta_su

    _definition.id                '_cell.angle_beta_su'

    loop_
      _alias.definition_id
         '_cell_angle.beta_su'
         '_cell_angle_beta_su'
         '_cell.angle_beta_esd'

    _name.category_id             cell
    _name.object_id               angle_beta_su
    _name.linked_item_id          '_cell.angle_beta'

    _import.get
        [{'file':templ_attr.cif  'save':cell_angle_su}]

save_

save_cell.angle_gamma

    _definition.id                '_cell.angle_gamma'
    _alias.definition_id          '_cell_angle_gamma'
    _name.category_id             cell
    _name.object_id               angle_gamma

    _import.get                   [{'file':templ_attr.cif  'save':cell_angle}]

save_

save_cell.angle_gamma_su

    _definition.id                '_cell.angle_gamma_su'

    loop_
      _alias.definition_id
         '_cell_angle.gamma_su'
         '_cell_angle_gamma_su'
         '_cell.angle_gamma_esd'

    _name.category_id             cell
    _name.object_id               angle_gamma_su
    _name.linked_item_id          '_cell.angle_gamma'

    _import.get
        [{'file':templ_attr.cif  'save':cell_angle_su}]

save_

save_cell.atomic_mass

    _definition.id                '_cell.atomic_mass'
    _definition.update            2012-11-22
    _description.text
;
    Atomic mass of the contents of the unit cell. This is calculated
    from the atom sites present in the ATOM_TYPE list, rather than
    the ATOM_SITE lists of atoms in the refined model.
;
    _name.category_id             cell
    _name.object_id               atomic_mass
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   dalton
    _method.purpose               Evaluation
    _method.expression
;
    mass = 0.

    Loop t as atom_type  {

                   mass += t.number_in_cell * t.atomic_mass
    }
      _cell.atomic_mass = mass
;

save_

save_cell.convert_uij_to_betaij

    _definition.id                '_cell.convert_Uij_to_betaij'
    _definition.update            2021-09-24
    _description.text
;
    The reciprocal-space matrix for converting the U(ij) matrix of
    atomic displacement parameters to a dimensionless beta(IJ) matrix.
    The ADP factor in a structure-factor expression:

    t = exp [ - 2π^2^ ( U11 h h a* a* + ...... 2 U23 k l b* c* ) ]
    t = exp [ - 0.25  ( B11 h h a* a* + ...... 2 B23 k l b* c* ) ]
    t = exp [ -       ( β11 h h + ............ 2 β23 k l ) ]

    The conversion of the U or B matrices to the β matrix

        β =   C U C   =    C B C /8π^2^

    where C is the conversion matrix defined here.
;
    _name.category_id             cell
    _name.object_id               convert_Uij_to_betaij
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
    With c  as  cell

    _cell.convert_Uij_to_betaij =
    1.4142 * Pi * Matrix([[ c.reciprocal_length_a, 0, 0 ],
                          [ 0, c.reciprocal_length_b, 0 ],
                          [ 0, 0, c.reciprocal_length_c ]])
;

save_

save_cell.convert_uij_to_betaij_su

    _definition.id                '_cell.convert_Uij_to_betaij_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.convert_Uij_to_betaij.
;
    _name.category_id             cell
    _name.object_id               convert_Uij_to_betaij_su
    _name.linked_item_id          '_cell.convert_Uij_to_betaij'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_cell.convert_uiso_to_uij

    _definition.id                '_cell.convert_Uiso_to_Uij'
    _definition.update            2021-07-07
    _description.text
;
    The reciprocal-space matrix for converting the isotropic Uiso
    atomic displacement parameter to the anisotropic matrix Uij.

                     | 1        cos(γ*)  cos(β*) |
    Uij   =   Uiso * | cos(γ*)  1        cos(α*) |
                     | cos(β*)  cos(α*)  1       |
;
    _name.category_id             cell
    _name.object_id               convert_Uiso_to_Uij
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With c  as  cell

    _cell.convert_Uiso_to_Uij =                           [[ 1.,
    Cosd(c.reciprocal_angle_gamma), Cosd(c.reciprocal_angle_beta)  ],
                 [ Cosd(c.reciprocal_angle_gamma), 1.,
    Cosd(c.reciprocal_angle_alpha) ],                        [
    Cosd(c.reciprocal_angle_beta), Cosd(c.reciprocal_angle_alpha), 1.  ]]
;

save_

save_cell.convert_uiso_to_uij_su

    _definition.id                '_cell.convert_Uiso_to_Uij_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.convert_Uiso_to_Uij.
;
    _name.category_id             cell
    _name.object_id               convert_Uiso_to_Uij_su
    _name.linked_item_id          '_cell.convert_Uiso_to_Uij'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none

save_

save_cell.diffrn_id

    _definition.id                '_cell.diffrn_id'
    _definition.update            2023-02-01
    _description.text
;
    A pointer to the diffraction conditions to which this cell has been applied,
    for example, to locate and extract diffraction peaks. These will normally be
    the same conditions as those under which the cell was measured, but some
    legacy data sets may have used a cell measured under differing conditions,
    in which case those conditions should be indicated using the
    _cell_measurement.condition_id data item.
;
    _name.category_id             cell
    _name.object_id               diffrn_id
    _name.linked_item_id          '_diffrn.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_cell.formula_units_z

    _definition.id                '_cell.formula_units_Z'
    _alias.definition_id          '_cell_formula_units_Z'
    _definition.update            2021-03-01
    _description.text
;
    The number of the formula units in the unit cell as specified
    by _chemical_formula.structural, _chemical_formula.moiety or
    _chemical_formula.sum.
;
    _name.category_id             cell
    _name.object_id               formula_units_Z
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_cell.length_a

    _definition.id                '_cell.length_a'
    _alias.definition_id          '_cell_length_a'
    _name.category_id             cell
    _name.object_id               length_a

    _import.get                   [{'file':templ_attr.cif  'save':cell_length}]

save_

save_cell.length_a_su

    _definition.id                '_cell.length_a_su'

    loop_
      _alias.definition_id
         '_cell_length_a_su'
         '_cell.length_a_esd'

    _name.category_id             cell
    _name.object_id               length_a_su
    _name.linked_item_id          '_cell.length_a'

    _import.get
        [{'file':templ_attr.cif  'save':cell_length_su}]

save_

save_cell.length_b

    _definition.id                '_cell.length_b'
    _alias.definition_id          '_cell_length_b'
    _name.category_id             cell
    _name.object_id               length_b

    _import.get                   [{'file':templ_attr.cif  'save':cell_length}]

save_

save_cell.length_b_su

    _definition.id                '_cell.length_b_su'

    loop_
      _alias.definition_id
         '_cell_length_b_su'
         '_cell.length_b_esd'

    _name.category_id             cell
    _name.object_id               length_b_su
    _name.linked_item_id          '_cell.length_b'

    _import.get
        [{'file':templ_attr.cif  'save':cell_length_su}]

save_

save_cell.length_c

    _definition.id                '_cell.length_c'
    _alias.definition_id          '_cell_length_c'
    _name.category_id             cell
    _name.object_id               length_c

    _import.get                   [{'file':templ_attr.cif  'save':cell_length}]

save_

save_cell.length_c_su

    _definition.id                '_cell.length_c_su'

    loop_
      _alias.definition_id
         '_cell_length_c_su'
         '_cell.length_c_esd'

    _name.category_id             cell
    _name.object_id               length_c_su
    _name.linked_item_id          '_cell.length_c'

    _import.get
        [{'file':templ_attr.cif  'save':cell_length_su}]

save_

save_cell.metric_tensor

    _definition.id                '_cell.metric_tensor'
    _definition.update            2021-07-07
    _description.text
;
    The direct space (covariant) metric tensor used to transform
    vectors and coordinates from real (direct) to reciprocal space.
;
    _name.category_id             cell
    _name.object_id               metric_tensor
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstrom_squared
    _method.purpose               Evaluation
    _method.expression
;
    with c  as  cell

          _cell.metric_tensor = [[ c.vector_a*c.vector_a,
    c.vector_a*c.vector_b, c.vector_a*c.vector_c ],
     [ c.vector_b*c.vector_a, c.vector_b*c.vector_b, c.vector_b*c.vector_c ],
                               [ c.vector_c*c.vector_a, c.vector_c*c.vector_b,
    c.vector_c*c.vector_c ]]
;

save_

save_cell.orthogonal_matrix

    _definition.id                '_cell.orthogonal_matrix'
    _definition.update            2025-05-12
    _description.text
;
    Orthogonal matrix of the crystal unit cell. Definition uses
    Rollett's axial assignments with cell vectors a,b,c aligned
    with orthogonal axes X,Y,Z so that c||Z and b in plane YZ.

    Ref: Rollett, J. S. (1965). Computing Methods in Crystallography, p. 22.
    Oxford: Pergamon Press.
;
    _name.category_id             cell
    _name.object_id               orthogonal_matrix
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
     With c as cell
    _cell.orthogonal_matrix =   [
          [  c.length_a*Sind(c.angle_beta)*Sind(c.reciprocal_angle_gamma), 0,
                                 0 ],       [
    -c.length_a*Sind(c.angle_beta)*Cosd(c.reciprocal_angle_gamma),
    c.length_b*Sind(c.angle_alpha),   0 ],       [
    c.length_a*Cosd(c.angle_beta),
    c.length_b*Cosd(c.angle_alpha), c.length_c ]]
;

save_

save_cell.reciprocal_angle_alpha

    _definition.id                '_cell.reciprocal_angle_alpha'
    _alias.definition_id          '_cell_reciprocal_angle_alpha'
    _definition.update            2013-01-18
    _description.text
;
    Reciprocal of the angle between _cell.length_b and _cell.length_c.
    Ref: Buerger, M. J. (1942). X-ray Crystallography, p. 360.
         New York: John Wiley & Sons Inc.
;
    _name.category_id             cell
    _name.object_id               reciprocal_angle_alpha
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:180.0
    _units.code                   degrees
    _method.purpose               Evaluation
    _method.expression
;
     With c as cell

    _cell.reciprocal_angle_alpha =
    Acosd((Cosd(c.angle_beta)*Cosd(c.angle_gamma)-Cosd(c.angle_alpha))/
    (Sind(c.angle_beta)*Sind(c.angle_gamma)))
;

save_

save_cell.reciprocal_angle_alpha_su

    _definition.id                '_cell.reciprocal_angle_alpha_su'

    loop_
      _alias.definition_id
         '_cell_reciprocal_angle_alpha_su'
         '_cell.reciprocal_angle_alpha_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _cell.reciprocal_angle_alpha.
;
    _name.category_id             cell
    _name.object_id               reciprocal_angle_alpha_su
    _name.linked_item_id          '_cell.reciprocal_angle_alpha'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_cell.reciprocal_angle_beta

    _definition.id                '_cell.reciprocal_angle_beta'
    _alias.definition_id          '_cell_reciprocal_angle_beta'
    _definition.update            2013-01-18
    _description.text
;
    Reciprocal of the angle between _cell.length_a and _cell.length_c.
    Ref: Buerger, M. J. (1942). X-ray Crystallography, p. 360.
         New York: John Wiley & Sons Inc.
;
    _name.category_id             cell
    _name.object_id               reciprocal_angle_beta
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:180.0
    _units.code                   degrees
    _method.purpose               Evaluation
    _method.expression
;
     With c as cell

    _cell.reciprocal_angle_beta =
    Acosd((Cosd(c.angle_alpha)*Cosd(c.angle_gamma)-Cosd(c.angle_beta))/
    (Sind(c.angle_alpha)*Sind(c.angle_gamma)))
;

save_

save_cell.reciprocal_angle_beta_su

    _definition.id                '_cell.reciprocal_angle_beta_su'

    loop_
      _alias.definition_id
         '_cell_reciprocal_angle_beta_su'
         '_cell.reciprocal_angle_beta_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _cell.reciprocal_angle_beta.
;
    _name.category_id             cell
    _name.object_id               reciprocal_angle_beta_su
    _name.linked_item_id          '_cell.reciprocal_angle_beta'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_cell.reciprocal_angle_gamma

    _definition.id                '_cell.reciprocal_angle_gamma'
    _alias.definition_id          '_cell_reciprocal_angle_gamma'
    _definition.update            2016-09-09
    _description.text
;
    Reciprocal of the angle between _cell.length_a and _cell.length_b.
    Ref: Buerger, M. J. (1942). X-ray Crystallography, p. 360.
         New York: John Wiley & Sons Inc.
;
    _name.category_id             cell
    _name.object_id               reciprocal_angle_gamma
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:180.0
    _units.code                   degrees
    _method.purpose               Evaluation
    _method.expression
;
     With c as cell

    _cell.reciprocal_angle_gamma =
    Acosd((Cosd(c.angle_alpha)*Cosd(c.angle_beta)-Cosd(c.angle_gamma))/
    (Sind(c.angle_alpha)*Sind(c.angle_beta)))
;

save_

save_cell.reciprocal_angle_gamma_su

    _definition.id                '_cell.reciprocal_angle_gamma_su'

    loop_
      _alias.definition_id
         '_cell_reciprocal_angle_gamma_su'
         '_cell.reciprocal_angle_gamma_esd'

    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.reciprocal_angle_gamma.
;
    _name.category_id             cell
    _name.object_id               reciprocal_angle_gamma_su
    _name.linked_item_id          '_cell.reciprocal_angle_gamma'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_cell.reciprocal_length_a

    _definition.id                '_cell.reciprocal_length_a'
    _alias.definition_id          '_cell_reciprocal_length_a'
    _definition.update            2012-11-22
    _description.text
;
    Reciprocal of the _cell.length_a.
;
    _name.category_id             cell
    _name.object_id               reciprocal_length_a
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
    _cell.reciprocal_length_a = Norm ( _cell.reciprocal_vector_a )
;

save_

save_cell.reciprocal_length_a_su

    _definition.id                '_cell.reciprocal_length_a_su'

    loop_
      _alias.definition_id
         '_cell_reciprocal_length_a_su'
         '_cell.reciprocal_length_a_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _cell.reciprocal_length_a.
;
    _name.category_id             cell
    _name.object_id               reciprocal_length_a_su
    _name.linked_item_id          '_cell.reciprocal_length_a'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_cell.reciprocal_length_b

    _definition.id                '_cell.reciprocal_length_b'
    _alias.definition_id          '_cell_reciprocal_length_b'
    _definition.update            2012-11-22
    _description.text
;
    Reciprocal of the _cell.length_b.
;
    _name.category_id             cell
    _name.object_id               reciprocal_length_b
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
    _cell.reciprocal_length_b = Norm ( _cell.reciprocal_vector_b )
;

save_

save_cell.reciprocal_length_b_su

    _definition.id                '_cell.reciprocal_length_b_su'

    loop_
      _alias.definition_id
         '_cell_reciprocal_length_b_su'
         '_cell.reciprocal_length_b_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _cell.reciprocal_length_b.
;
    _name.category_id             cell
    _name.object_id               reciprocal_length_b_su
    _name.linked_item_id          '_cell.reciprocal_length_b'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_cell.reciprocal_length_c

    _definition.id                '_cell.reciprocal_length_c'
    _alias.definition_id          '_cell_reciprocal_length_c'
    _definition.update            2012-11-22
    _description.text
;
    Reciprocal of the _cell.length_c.
;
    _name.category_id             cell
    _name.object_id               reciprocal_length_c
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
    _cell.reciprocal_length_c = Norm ( _cell.reciprocal_vector_c )
;

save_

save_cell.reciprocal_length_c_su

    _definition.id                '_cell.reciprocal_length_c_su'

    loop_
      _alias.definition_id
         '_cell_reciprocal_length_c_su'
         '_cell.reciprocal_length_c_esd'

    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.reciprocal_length_c.
;
    _name.category_id             cell
    _name.object_id               reciprocal_length_c_su
    _name.linked_item_id          '_cell.reciprocal_length_c'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_cell.reciprocal_metric_tensor

    _definition.id                '_cell.reciprocal_metric_tensor'
    _definition.update            2021-07-07
    _description.text
;
    The reciprocal (contravariant) metric tensor used to transform
    vectors and coordinates from reciprocal space to real (direct)
    space.
;
    _name.category_id             cell
    _name.object_id               reciprocal_metric_tensor
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   reciprocal_angstrom_squared
    _method.purpose               Evaluation
    _method.expression
;
     with c as cell
    _cell.reciprocal_metric_tensor = [
         [ c.reciprocal_vector_a*c.reciprocal_vector_a,
    c.reciprocal_vector_a*c.reciprocal_vector_b,
    c.reciprocal_vector_a*c.reciprocal_vector_c ],      [
    c.reciprocal_vector_b*c.reciprocal_vector_a,
    c.reciprocal_vector_b*c.reciprocal_vector_b,
    c.reciprocal_vector_b*c.reciprocal_vector_c ],      [
    c.reciprocal_vector_c*c.reciprocal_vector_a,
    c.reciprocal_vector_c*c.reciprocal_vector_b,
    c.reciprocal_vector_c*c.reciprocal_vector_c ]]
;

save_

save_cell.reciprocal_metric_tensor_su

    _definition.id                '_cell.reciprocal_metric_tensor_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.reciprocal_metric_tensor.
;
    _name.category_id             cell
    _name.object_id               reciprocal_metric_tensor_su
    _name.linked_item_id          '_cell.reciprocal_metric_tensor'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   reciprocal_angstrom_squared

save_

save_cell.reciprocal_orthogonal_matrix

    _definition.id                '_cell.reciprocal_orthogonal_matrix'
    _definition.update            2021-07-07
    _description.text
;
    Orthogonal matrix of the reciprocal space. The matrix may be
    used to transform the non-orthogonal vector h = (h,k,l) into
    the orthogonal indices p = (p,q,r):

                    M h = p.
;
    _name.category_id             cell
    _name.object_id               reciprocal_orthogonal_matrix
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
    _cell.reciprocal_orthogonal_matrix  =  Inverse(

                           Transpose( _cell.orthogonal_matrix ))
;

save_

save_cell.reciprocal_orthogonal_matrix_su

    _definition.id                '_cell.reciprocal_orthogonal_matrix_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.reciprocal_orthogonal_matrix.
;
    _name.category_id             cell
    _name.object_id               reciprocal_orthogonal_matrix_su
    _name.linked_item_id          '_cell.reciprocal_orthogonal_matrix'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_cell.reciprocal_vector_a

    _definition.id                '_cell.reciprocal_vector_a'
    _definition.update            2021-07-07
    _description.text
;
    Reciprocal of the _cell.vector_a.
;
    _name.category_id             cell
    _name.object_id               reciprocal_vector_a
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
     With c  as  cell

    _cell.reciprocal_vector_a = c.vector_b ^ c.vector_c / _cell.volume
;

save_

save_cell.reciprocal_vector_a_su

    _definition.id                '_cell.reciprocal_vector_a_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.reciprocal_vector_a.
;
    _name.category_id             cell
    _name.object_id               reciprocal_vector_a_su
    _name.linked_item_id          '_cell.reciprocal_vector_a'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_cell.reciprocal_vector_b

    _definition.id                '_cell.reciprocal_vector_b'
    _definition.update            2021-07-07
    _description.text
;
    Reciprocal of the _cell.vector_b.
;
    _name.category_id             cell
    _name.object_id               reciprocal_vector_b
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
     With c  as  cell

    _cell.reciprocal_vector_b = c.vector_c ^ c.vector_a / _cell.volume
;

save_

save_cell.reciprocal_vector_b_su

    _definition.id                '_cell.reciprocal_vector_b_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.reciprocal_vector_b.
;
    _name.category_id             cell
    _name.object_id               reciprocal_vector_b_su
    _name.linked_item_id          '_cell.reciprocal_vector_b'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_cell.reciprocal_vector_c

    _definition.id                '_cell.reciprocal_vector_c'
    _definition.update            2021-07-07
    _description.text
;
    Reciprocal of the _cell.vector_c.
;
    _name.category_id             cell
    _name.object_id               reciprocal_vector_c
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
     With c  as  cell

    _cell.reciprocal_vector_c = c.vector_a ^ c.vector_b / _cell.volume
;

save_

save_cell.reciprocal_vector_c_su

    _definition.id                '_cell.reciprocal_vector_c_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.reciprocal_vector_c.
;
    _name.category_id             cell
    _name.object_id               reciprocal_vector_c_su
    _name.linked_item_id          '_cell.reciprocal_vector_c'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_cell.special_details

    _definition.id                '_cell.special_details'

    loop_
      _alias.definition_id
         '_cell_special_details'
         '_cell.details'

    _definition.update            2012-11-22
    _description.text
;
    Description of special aspects of the cell choice, noting
    possible alternative settings.
;
    _name.category_id             cell
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_cell.vector_a

    _definition.id                '_cell.vector_a'
    _definition.update            2021-07-07
    _description.text
;
    The cell vector along the x axis.
;
    _name.category_id             cell
    _name.object_id               vector_a
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    _cell.vector_a = _cell.orthogonal_matrix * Matrix([1,0,0])
;

save_

save_cell.vector_a_su

    _definition.id                '_cell.vector_a_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.vector_a.
;
    _name.category_id             cell
    _name.object_id               vector_a_su
    _name.linked_item_id          '_cell.vector_a'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_cell.vector_b

    _definition.id                '_cell.vector_b'
    _definition.update            2021-07-07
    _description.text
;
    The cell vector along the y axis.
;
    _name.category_id             cell
    _name.object_id               vector_b
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    _cell.vector_b = _cell.orthogonal_matrix * Matrix([0,1,0])
;

save_

save_cell.vector_b_su

    _definition.id                '_cell.vector_b_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.vector_b.
;
    _name.category_id             cell
    _name.object_id               vector_b_su
    _name.linked_item_id          '_cell.vector_b'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_cell.vector_c

    _definition.id                '_cell.vector_c'
    _definition.update            2021-07-07
    _description.text
;
    The cell vector along the z axis.
;
    _name.category_id             cell
    _name.object_id               vector_c
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    _cell.vector_c = _cell.orthogonal_matrix * Matrix([0,0,1])
;

save_

save_cell.vector_c_su

    _definition.id                '_cell.vector_c_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell.vector_c.
;
    _name.category_id             cell
    _name.object_id               vector_c_su
    _name.linked_item_id          '_cell.vector_c'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_cell.volume

    _definition.id                '_cell.volume'
    _alias.definition_id          '_cell_volume'
    _definition.update            2013-03-07
    _description.text
;
    Volume of the crystal unit cell.
;
    _name.category_id             cell
    _name.object_id               volume
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstrom_cubed
    _method.purpose               Evaluation
    _method.expression
;
    With c  as  cell

    _cell.volume =  c.vector_a * ( c.vector_b ^ c.vector_c )
;

save_

save_cell.volume_su

    _definition.id                '_cell.volume_su'

    loop_
      _alias.definition_id
         '_cell_volume_su'
         '_cell.volume_esd'

    _definition.update            2014-06-08
    _description.text
;
    Standard uncertainty of _cell.volume.
;
    _name.category_id             cell
    _name.object_id               volume_su
    _name.linked_item_id          '_cell.volume'
    _units.code                   angstrom_cubed

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_CELL_MEASUREMENT

    _definition.id                CELL_MEASUREMENT
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2022-05-25
    _description.text
;
    The category of data items used to describe the measurement of
    the cell parameters.
;
    _name.category_id             CELL
    _name.object_id               CELL_MEASUREMENT
    _category_key.name            '_cell_measurement.diffrn_id'

save_

save_cell_measurement.condition_id

    _definition.id                '_cell_measurement.condition_id'
    _definition.update            2023-02-01
    _description.text
;
    A pointer to the diffraction conditions used for cell measurement,
    where different to the diffraction conditions used for data
    collection.
;
    _name.category_id             cell_measurement
    _name.object_id               condition_id
    _name.linked_item_id          '_diffrn.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word
    _method.purpose               Definition
    _method.expression
;
    _enumeration.default = _cell_measurement.diffrn_id
;

save_

save_cell_measurement.diffrn_id

    _definition.id                '_cell_measurement.diffrn_id'
    _definition.update            2023-02-01
    _description.text
;
    A pointer to the diffraction experiment to which the measured cell
    has been applied.
;
    _name.category_id             cell_measurement
    _name.object_id               diffrn_id
    _name.linked_item_id          '_diffrn.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_cell_measurement.pressure

    _definition.id                '_cell_measurement.pressure'
    _definition_replaced.id       1
    _definition_replaced.by       '_diffrn.ambient_pressure'
    _alias.definition_id          '_cell_measurement_pressure'
    _definition.update            2022-05-25
    _description.text
;
    **DEPRECATED**

    The pressure at which the unit-cell parameters were measured
    (not the pressure used to synthesize the sample).
    Replaced by '_diffrn.ambient_pressure'
;
    _name.category_id             cell_measurement
    _name.object_id               pressure
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kilopascals

save_

save_cell_measurement.pressure_su

    _definition.id                '_cell_measurement.pressure_su'
    _definition_replaced.id       1
    _definition_replaced.by       '_diffrn.ambient_pressure_su'

    loop_
      _alias.definition_id
         '_cell_measurement_pressure_su'
         '_cell_measurement.pressure_esd'

    _definition.update            2022-05-22
    _description.text
;
    ** DEPRECATED **

    Standard uncertainty of _cell_measurement.pressure.
;
    _name.category_id             cell_measurement
    _name.object_id               pressure_su
    _name.linked_item_id          '_cell_measurement.pressure'
    _units.code                   kilopascals

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_cell_measurement.radiation

    _definition.id                '_cell_measurement.radiation'
    _definition_replaced.id       1
    _definition_replaced.by       .
    _alias.definition_id          '_cell_measurement_radiation'
    _definition.update            2022-05-22
    _description.text
;
    ** DEPRECATED **

    Description of the radiation used to measure the unit-cell data.
    Items from the DIFFRN_RADIATION category should be used instead
    of this item.
;
    _name.category_id             cell_measurement
    _name.object_id               radiation
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'neutron'
         'X-ray tube'
         'synchrotron'

save_

save_cell_measurement.reflns_used

    _definition.id                '_cell_measurement.reflns_used'
    _alias.definition_id          '_cell_measurement_reflns_used'
    _definition.update            2021-03-01
    _description.text
;
    Total number of reflections used to determine the unit cell.
    The reflections may be specified as CELL_MEASUREMENT_REFLN items.
;
    _name.category_id             cell_measurement
    _name.object_id               reflns_used
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            3:
    _units.code                   none

save_

save_cell_measurement.temperature

    _definition.id                '_cell_measurement.temperature'
    _definition_replaced.id       1
    _definition_replaced.by       '_diffrn.ambient_temperature'

    loop_
      _alias.definition_id
         '_cell_measurement_temperature'
         '_cell_measurement_temp'
         '_cell_measurement.temp'

    _definition.update            2022-05-25
    _description.text
;
    ** DEPRECATED **

    The temperature at which the unit-cell parameters were measured
    (not the temperature of synthesis).
    _diffrn.ambient_temperature should be used instead of this item.
;
    _name.category_id             cell_measurement
    _name.object_id               temperature
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_cell_measurement.temperature_su

    _definition.id                '_cell_measurement.temperature_su'
    _definition_replaced.id       1
    _definition_replaced.by       '_diffrn.ambient_temperature_su'

    loop_
      _alias.definition_id
         '_cell_measurement_temp_su'
         '_cell_measurement.temp_esd'

    _definition.update            2022-05-22
    _description.text
;
    ** DEPRECATED **

    Standard uncertainty of _cell_measurement.temperature.
;
    _name.category_id             cell_measurement
    _name.object_id               temperature_su
    _name.linked_item_id          '_cell_measurement.temperature'
    _units.code                   kelvins

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_cell_measurement.theta_max

    _definition.id                '_cell_measurement.theta_max'
    _alias.definition_id          '_cell_measurement_theta_max'
    _definition.update            2012-11-22
    _description.text
;
    Maximum θ scattering angle of reflections used to measure
    the crystal unit cell.
;
    _name.category_id             cell_measurement
    _name.object_id               theta_max
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_cell_measurement.theta_min

    _definition.id                '_cell_measurement.theta_min'
    _alias.definition_id          '_cell_measurement_theta_min'
    _definition.update            2012-11-22
    _description.text
;
    Minimum θ scattering angle of reflections used to measure
    the crystal unit cell.
;
    _name.category_id             cell_measurement
    _name.object_id               theta_min
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_cell_measurement.wavelength

    _definition.id                '_cell_measurement.wavelength'
    _definition_replaced.id       1
    _definition_replaced.by       '_diffrn_radiation_wavelength.value'
    _alias.definition_id          '_cell_measurement_wavelength'
    _definition.update            2024-07-17
    _description.text
;
    ** DEPRECATED **

    Wavelength of the radiation used to measure the unit cell.
    Items from the DIFFRN_RADIATION_WAVELENGTH category should
    be used instead of this item.
;
    _name.category_id             cell_measurement
    _name.object_id               wavelength
    _type.purpose                 Measurand
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_cell_measurement.wavelength_su

    _definition.id                '_cell_measurement.wavelength_su'
    _definition_replaced.id       1
    _definition_replaced.by       '_diffrn_radiation_wavelength.value_su'
    _definition.update            2024-07-17
    _description.text
;
    ** DEPRECATED **

    Standard uncertainty of _cell_measurement.wavelength.
;
    _name.category_id             cell_measurement
    _name.object_id               wavelength_su
    _name.linked_item_id          '_cell_measurement.wavelength'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_CELL_MEASUREMENT_REFLN

    _definition.id                CELL_MEASUREMENT_REFLN
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to describe the reflection data
    used in the measurement of the crystal unit cell.
;
    _name.category_id             CELL_MEASUREMENT
    _name.object_id               CELL_MEASUREMENT_REFLN

    loop_
      _category_key.name
         '_cell_measurement_refln.index_h'
         '_cell_measurement_refln.index_k'
         '_cell_measurement_refln.index_l'

save_

save_cell_measurement_refln.hkl

    _definition.id                '_cell_measurement_refln.hkl'
    _definition.update            2021-03-01
    _description.text
;
    Miller indices of a reflection used to measure the unit cell.
;
    _name.category_id             cell_measurement_refln
    _name.object_id               hkl
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With c  as  cell_measurement_refln

    _cell_measurement_refln.hkl = [c.index_h, c.index_k, c.index_l]
;

save_

save_cell_measurement_refln.index_h

    _definition.id                '_cell_measurement_refln.index_h'
    _alias.definition_id          '_cell_measurement_refln_index_h'
    _name.category_id             cell_measurement_refln
    _name.object_id               index_h

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_cell_measurement_refln.index_k

    _definition.id                '_cell_measurement_refln.index_k'
    _alias.definition_id          '_cell_measurement_refln_index_k'
    _name.category_id             cell_measurement_refln
    _name.object_id               index_k

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_cell_measurement_refln.index_l

    _definition.id                '_cell_measurement_refln.index_l'
    _alias.definition_id          '_cell_measurement_refln_index_l'
    _name.category_id             cell_measurement_refln
    _name.object_id               index_l

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_cell_measurement_refln.theta

    _definition.id                '_cell_measurement_refln.theta'
    _alias.definition_id          '_cell_measurement_refln_theta'
    _definition.update            2012-11-22
    _description.text
;
    Theta angle of reflection used to measure the crystal unit cell.
;
    _name.category_id             cell_measurement_refln
    _name.object_id               theta
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_cell_measurement_refln.theta_su

    _definition.id                '_cell_measurement_refln.theta_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _cell_measurement_refln.theta.
;
    _name.category_id             cell_measurement_refln
    _name.object_id               theta_su
    _name.linked_item_id          '_cell_measurement_refln.theta'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_DIFFRN_ATTENUATOR

    _definition.id                DIFFRN_ATTENUATOR
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the attenuators used in the
    diffraction source.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_ATTENUATOR
    _category_key.name            '_diffrn_attenuator.code'

save_

save_diffrn_attenuator.code

    _definition.id                '_diffrn_attenuator.code'
    _alias.definition_id          '_diffrn_attenuator_code'
    _definition.update            2012-11-26
    _description.text
;
    Code identifying a particular attenuator setting; referenced by the
    _diffrn_refln.attenuator_code which is stored with the intensities.
;
    _name.category_id             diffrn_attenuator
    _name.object_id               code
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_diffrn_attenuator.material

    _definition.id                '_diffrn_attenuator.material'
    _alias.definition_id          '_diffrn_attenuator_material'
    _definition.update            2012-11-26
    _description.text
;
    Description of the material from which the attenuator is made.
;
    _name.category_id             diffrn_attenuator
    _name.object_id               material
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_diffrn_attenuator.scale

    _definition.id                '_diffrn_attenuator.scale'
    _alias.definition_id          '_diffrn_attenuator_scale'
    _definition.update            2012-11-26
    _description.text
;
    The scale factor applied to a measured intensity if it is reduced by
    an attenuator identified by _diffrn_attenuator.code.
;
    _name.category_id             diffrn_attenuator
    _name.object_id               scale
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            1.0:
    _units.code                   none

save_

save_DIFFRN_DETECTOR

    _definition.id                DIFFRN_DETECTOR
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2023-01-13
    _description.text
;
    The category of data items which specify the detectors used
    in the measurement of diffraction intensities.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_DETECTOR

save_

save_diffrn_detector.area_resol_mean

    _definition.id                '_diffrn_detector.area_resol_mean'
    _alias.definition_id          '_diffrn_detector_area_resol_mean'
    _definition.update            2012-11-26
    _description.text
;
    The resolution limit of an area diffraction radiation detector.
;
    _name.category_id             diffrn_detector
    _name.object_id               area_resol_mean
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   pixels_per_millimetre

save_

save_diffrn_detector.description

    _definition.id                '_diffrn_detector.description'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_diffrn_radiation_detector'                                1997-01-20
         '_diffrn_detector'                                          .
         '_diffrn_detector.detector'                                 .

    _definition.update            2024-02-14
    _description.text
;
    Description of the type of diffraction radiation detector.
;
    _name.category_id             diffrn_detector
    _name.object_id               description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'photographic film'
         'scintillation counter'
         'CCD plate'
         'BF~3~ counter'

save_

save_diffrn_detector.details

    _definition.id                '_diffrn_detector.details'
    _alias.definition_id          '_diffrn_detector_details'
    _definition.update            2012-11-26
    _description.text
;
    Description of special aspects of the radiation detector.
;
    _name.category_id             diffrn_detector
    _name.object_id               details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_diffrn_detector.dtime

    _definition.id                '_diffrn_detector.dtime'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_diffrn_detector_dtime'                                    .
         '_diffrn_radiation.detector_dtime'                          .
         '_diffrn_radiation_detector_dtime'                          1997-01-20

    _definition.update            2024-02-14
    _description.text
;
    The maximum time between two detector signals that cannot be resolved.
;
    _name.category_id             diffrn_detector
    _name.object_id               dtime
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   microseconds

save_

save_diffrn_detector.make

    _definition.id                '_diffrn_detector.make'

    loop_
      _alias.definition_id
         '_diffrn_detector_type'
         '_diffrn_detector.type'

    _definition.update            2012-11-26
    _description.text
;
    The make, model or name of the diffraction radiation detector.
;
    _name.category_id             diffrn_detector
    _name.object_id               make
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_DIFFRN_MEASUREMENT

    _definition.id                DIFFRN_MEASUREMENT
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-26
    _description.text
;
    The category of data items which specify the details of the
    diffraction measurement.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_MEASUREMENT

save_

save_diffrn_measurement.details

    _definition.id                '_diffrn_measurement.details'

    loop_
      _alias.definition_id
         '_diffrn_measurement_details'
         '_diffrn.measurement_details'

    _definition.update            2012-11-26
    _description.text
;
    Description of special aspects of the diffraction measurement.
;
    _name.category_id             diffrn_measurement
    _name.object_id               details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     '440 frames of 0.25°'

save_

save_diffrn_measurement.device_class

    _definition.id                '_diffrn_measurement.device_class'

    loop_
      _alias.definition_id
         '_diffrn_measurement_device'
         '_diffrn.measurement_device_class'
         '_diffrn_measurement.device'

    _definition.update            2012-11-26
    _description.text
;
    Type of goniometer device used to mount and orient the specimen.
;
    _name.category_id             diffrn_measurement
    _name.object_id               device_class
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'three-circle diffractometer'
         'four-circle diffractometer'
         'κ-geometry diffractometer'
         'oscillation camera'
         'precession camera'

save_

save_diffrn_measurement.device_details

    _definition.id                '_diffrn_measurement.device_details'

    loop_
      _alias.definition_id
         '_diffrn_measurement_device_details'
         '_diffrn.measurement_device_details'

    _definition.update            2012-11-26
    _description.text
;
    Details of the goniometer device used in the diffraction experiment.
;
    _name.category_id             diffrn_measurement
    _name.object_id               device_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
        'commercial goniometer modified locally to allow for 90° θ arc'

save_

save_diffrn_measurement.device_make

    _definition.id                '_diffrn_measurement.device_make'

    loop_
      _alias.definition_id
         '_diffrn_measurement_device_type'
         '_diffrn.measurement_device_make'
         '_diffrn_measurement.device_type'

    _definition.update            2013-03-07
    _description.text
;
    The make, model or name of the goniometer device used.
;
    _name.category_id             diffrn_measurement
    _name.object_id               device_make
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'Supper model q'
         'Huber model r'
         'Enraf-Nonius model s'
         'home-made'

save_

save_diffrn_measurement.method

    _definition.id                '_diffrn_measurement.method'

    loop_
      _alias.definition_id
         '_diffrn_measurement_method'
         '_diffrn.measurement_method'

    _definition.update            2012-11-26
    _description.text
;
    Description of scan method used to measure diffraction intensities.
;
    _name.category_id             diffrn_measurement
    _name.object_id               method
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'profile data from θ/2θ scans'

save_

save_diffrn_measurement.method_precession

    _definition.id                '_diffrn_measurement.method_precession'
    _definition.update            2024-05-15
    _description.text
;
    Yes or no flag indicating if the radiation beam illuminates the sample
    at an angle that is rotated about a precession axis.
;
    _name.category_id             diffrn_measurement
    _name.object_id               method_precession
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code
    loop_
      _enumeration_set.state
      _enumeration_set.detail
         yes                      'Precession method is used.'
         y                        'Abbreviation for "yes".'
         no                       'Precession method is not used.'
         n                        'Abbreviation for "no".'

save_

save_diffrn_measurement.rotation_mode

    _definition.id                '_diffrn_measurement.rotation_mode'
    _definition.update            2024-12-02
    _description.text
;
    Code describing the technique used to sample as completely as possible
    the accessible range of reciprocal space.
;
    _name.category_id             diffrn_measurement
    _name.object_id               rotation_mode
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code
    loop_
      _enumeration_set.state
      _enumeration_set.detail
         rotation
;
         The detector records diffracted intensities continuously while the
         sample is rotated.
;
         stepwise
;
         The detector records diffracted intensities while the sample
         is stationary and the beam is either steady or performing a
         defined motion, typically precessing around a conical surface
         normal to the sample (precession electron diffraction).
;

save_

save_diffrn_measurement.sample_tracking

    _definition.id                '_diffrn_measurement.sample_tracking'
    _definition.update            2024-07-25
    _description.text
;
    Yes or no flag indicating if a tracking method to follow the
    crystal was used in the data acquisition. Typically used to track
    very small crystals in electron diffraction experiments.
;
    _name.category_id             diffrn_measurement
    _name.object_id               sample_tracking
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code
    loop_
      _enumeration_set.state
      _enumeration_set.detail
         yes                      'A crystal tracking method is used.'
         y                        'Abbreviation for "yes".'
         no                       'A crystal tracking method is not used.'
         n                        'Abbreviation for "no".'

save_

save_diffrn_measurement.sample_tracking_method

    _definition.id                '_diffrn_measurement.sample_tracking_method'
    _definition.update            2024-07-25
    _description.text
;
    Description of the method used to follow the crystal during data collection.
;
    _name.category_id             diffrn_measurement
    _name.object_id               sample_tracking_method
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Electron-beam tracking by PyFast-ADT'

save_

save_diffrn_measurement.specimen_attachment_type

    _definition.id                '_diffrn_measurement.specimen_attachment_type'
    _definition.update            2023-02-06
    _description.text
;
    The way in which the sample is attached to the sample holder,
    including the type of adhesive material used if relevant. The sample
    holder is usually wholly outside the beam, whereas the attachment
    method may cause non-sample material to be illuminated. If the
    attachment method is not included in the list below, 'other' should be
    chosen and details provided in _diffrn_measurement.specimen_support.
;
    _name.category_id             diffrn_measurement
    _name.object_id               specimen_attachment_type
    _type.purpose                 State
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Word

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         epoxy
;
         An epoxy glue.
;
         oil
;
         An oil.
;
         grease
;
         A type of grease, for example hydrocarbon or silicone grease.
;
         frozen_liquid
;
         A frozen liquid, not water or oil.
;
         other
;
         A method not listed here.
;
         ice
;
         The specimen is frozen in place using water ice.
;
         mechanical
;
         The specimen is held in place by mechanical forces, e.g. capillary or
         pressure cell.
;

save_

save_diffrn_measurement.specimen_support

    _definition.id                '_diffrn_measurement.specimen_support'

    loop_
      _alias.definition_id
         '_diffrn_measurement_specimen_support'
         '_diffrn.measurement_specimen_support'

    _definition.update            2013-01-23
    _description.text
;
    Mounting method for the crystal specimen during data collection.
;
    _name.category_id             diffrn_measurement
    _name.object_id               specimen_support
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'glass capillary'
         'quartz capillary'
         'fiber'
         'metal loop'

save_

save_DIFFRN_ORIENT

    _definition.id                DIFFRN_ORIENT
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-26
    _description.text
;
    The category of data items which specify the orientation of the crystal
    axes to the diffractometer goniometer.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_ORIENT

save_

save_DIFFRN_ORIENT_MATRIX

    _definition.id                DIFFRN_ORIENT_MATRIX
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-26
    _description.text
;
    The category of data items which specify the matrix specifying the
    orientation of the crystal axes to the diffractometer goniometer.
;
    _name.category_id             DIFFRN_ORIENT
    _name.object_id               DIFFRN_ORIENT_MATRIX

save_

save_diffrn_orient_matrix.type

    _definition.id                '_diffrn_orient_matrix.type'
    _alias.definition_id          '_diffrn_orient_matrix_type'
    _definition.update            2012-11-26
    _description.text
;
    Description of orientation matrix and how it should be applied to define
    the orientation of the crystal with respect to the diffractometer axes.
;
    _name.category_id             diffrn_orient_matrix
    _name.object_id               type
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_diffrn_orient_matrix.ub_11

    _definition.id                '_diffrn_orient_matrix.UB_11'

    loop_
      _alias.definition_id
         '_diffrn_orient_matrix_UB_11'
         '_diffrn_orient_matrix.UB[1][1]'

    _name.category_id             diffrn_orient_matrix
    _name.object_id               UB_11

    _import.get
        [{'file':templ_attr.cif  'save':orient_matrix}]

save_

save_diffrn_orient_matrix.ub_12

    _definition.id                '_diffrn_orient_matrix.UB_12'

    loop_
      _alias.definition_id
         '_diffrn_orient_matrix_UB_12'
         '_diffrn_orient_matrix.UB[1][2]'

    _name.category_id             diffrn_orient_matrix
    _name.object_id               UB_12

    _import.get
        [{'file':templ_attr.cif  'save':orient_matrix}]

save_

save_diffrn_orient_matrix.ub_13

    _definition.id                '_diffrn_orient_matrix.UB_13'

    loop_
      _alias.definition_id
         '_diffrn_orient_matrix_UB_13'
         '_diffrn_orient_matrix.UB[1][3]'

    _name.category_id             diffrn_orient_matrix
    _name.object_id               UB_13

    _import.get
        [{'file':templ_attr.cif  'save':orient_matrix}]

save_

save_diffrn_orient_matrix.ub_21

    _definition.id                '_diffrn_orient_matrix.UB_21'

    loop_
      _alias.definition_id
         '_diffrn_orient_matrix_UB_21'
         '_diffrn_orient_matrix.UB[2][1]'

    _name.category_id             diffrn_orient_matrix
    _name.object_id               UB_21

    _import.get
        [{'file':templ_attr.cif  'save':orient_matrix}]

save_

save_diffrn_orient_matrix.ub_22

    _definition.id                '_diffrn_orient_matrix.UB_22'

    loop_
      _alias.definition_id
         '_diffrn_orient_matrix_UB_22'
         '_diffrn_orient_matrix.UB[2][2]'

    _name.category_id             diffrn_orient_matrix
    _name.object_id               UB_22

    _import.get
        [{'file':templ_attr.cif  'save':orient_matrix}]

save_

save_diffrn_orient_matrix.ub_23

    _definition.id                '_diffrn_orient_matrix.UB_23'

    loop_
      _alias.definition_id
         '_diffrn_orient_matrix_UB_23'
         '_diffrn_orient_matrix.UB[2][3]'

    _name.category_id             diffrn_orient_matrix
    _name.object_id               UB_23

    _import.get
        [{'file':templ_attr.cif  'save':orient_matrix}]

save_

save_diffrn_orient_matrix.ub_31

    _definition.id                '_diffrn_orient_matrix.UB_31'

    loop_
      _alias.definition_id
         '_diffrn_orient_matrix_UB_31'
         '_diffrn_orient_matrix.UB[3][1]'

    _name.category_id             diffrn_orient_matrix
    _name.object_id               UB_31

    _import.get
        [{'file':templ_attr.cif  'save':orient_matrix}]

save_

save_diffrn_orient_matrix.ub_32

    _definition.id                '_diffrn_orient_matrix.UB_32'

    loop_
      _alias.definition_id
         '_diffrn_orient_matrix_UB_32'
         '_diffrn_orient_matrix.UB[3][2]'

    _name.category_id             diffrn_orient_matrix
    _name.object_id               UB_32

    _import.get
        [{'file':templ_attr.cif  'save':orient_matrix}]

save_

save_diffrn_orient_matrix.ub_33

    _definition.id                '_diffrn_orient_matrix.UB_33'

    loop_
      _alias.definition_id
         '_diffrn_orient_matrix_UB_33'
         '_diffrn_orient_matrix.UB[3][3]'

    _name.category_id             diffrn_orient_matrix
    _name.object_id               UB_33

    _import.get
        [{'file':templ_attr.cif  'save':orient_matrix}]

save_

save_diffrn_orient_matrix.ubij

    _definition.id                '_diffrn_orient_matrix.UBij'
    _definition.update            2021-03-01
    _description.text
;
    The 3x3 matrix specifying the orientation of the crystal with
    respect to the diffractometer axes.
;
    _name.category_id             diffrn_orient_matrix
    _name.object_id               UBij
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With  o  as  diffrn_orient_matrix

     _diffrn_orient_matrix.UBIJ  =   [[ o.ub_11, o.ub_12, o.ub_13 ],
                                      [ o.ub_21, o.ub_22, o.ub_23 ],
                                      [ o.ub_31, o.ub_32, o.ub_33 ]]
;

save_

save_DIFFRN_ORIENT_REFLN

    _definition.id                DIFFRN_ORIENT_REFLN
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the reflections used to
    calculate the matrix which gives the orientation of the crystal
    axes to the diffractometer goniometer.
;
    _name.category_id             DIFFRN_ORIENT
    _name.object_id               DIFFRN_ORIENT_REFLN

    loop_
      _category_key.name
         '_diffrn_orient_refln.index_h'
         '_diffrn_orient_refln.index_k'
         '_diffrn_orient_refln.index_l'

save_

save_diffrn_orient_refln.angle_chi

    _definition.id                '_diffrn_orient_refln.angle_chi'
    _alias.definition_id          '_diffrn_orient_refln_angle_chi'
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_chi

    _import.get                   [{'file':templ_attr.cif  'save':orient_angle}]

save_

save_diffrn_orient_refln.angle_chi_su

    _definition.id                '_diffrn_orient_refln.angle_chi_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_orient_refln.angle_chi.
;
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_chi_su
    _name.linked_item_id          '_diffrn_orient_refln.angle_chi'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_orient_refln.angle_kappa

    _definition.id                '_diffrn_orient_refln.angle_kappa'
    _alias.definition_id          '_diffrn_orient_refln_angle_kappa'
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_kappa

    _import.get                   [{'file':templ_attr.cif  'save':orient_angle}]

save_

save_diffrn_orient_refln.angle_kappa_su

    _definition.id                '_diffrn_orient_refln.angle_kappa_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_orient_refln.angle_kappa.
;
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_kappa_su
    _name.linked_item_id          '_diffrn_orient_refln.angle_kappa'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_orient_refln.angle_omega

    _definition.id                '_diffrn_orient_refln.angle_omega'
    _alias.definition_id          '_diffrn_orient_refln_angle_omega'
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_omega

    _import.get                   [{'file':templ_attr.cif  'save':orient_angle}]

save_

save_diffrn_orient_refln.angle_omega_su

    _definition.id                '_diffrn_orient_refln.angle_omega_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_orient_refln.angle_omega.
;
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_omega_su
    _name.linked_item_id          '_diffrn_orient_refln.angle_omega'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_orient_refln.angle_phi

    _definition.id                '_diffrn_orient_refln.angle_phi'
    _alias.definition_id          '_diffrn_orient_refln_angle_phi'
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_phi

    _import.get                   [{'file':templ_attr.cif  'save':orient_angle}]

save_

save_diffrn_orient_refln.angle_phi_su

    _definition.id                '_diffrn_orient_refln.angle_phi_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_orient_refln.angle_phi.
;
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_phi_su
    _name.linked_item_id          '_diffrn_orient_refln.angle_phi'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_orient_refln.angle_psi

    _definition.id                '_diffrn_orient_refln.angle_psi'
    _alias.definition_id          '_diffrn_orient_refln_angle_psi'
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_psi

    _import.get                   [{'file':templ_attr.cif  'save':orient_angle}]

save_

save_diffrn_orient_refln.angle_psi_su

    _definition.id                '_diffrn_orient_refln.angle_psi_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_orient_refln.angle_psi.
;
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_psi_su
    _name.linked_item_id          '_diffrn_orient_refln.angle_psi'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_orient_refln.angle_theta

    _definition.id                '_diffrn_orient_refln.angle_theta'
    _alias.definition_id          '_diffrn_orient_refln_angle_theta'
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_theta

    _import.get                   [{'file':templ_attr.cif  'save':orient_angle}]

save_

save_diffrn_orient_refln.angle_theta_su

    _definition.id                '_diffrn_orient_refln.angle_theta_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_orient_refln.angle_theta.
;
    _name.category_id             diffrn_orient_refln
    _name.object_id               angle_theta_su
    _name.linked_item_id          '_diffrn_orient_refln.angle_theta'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_orient_refln.hkl

    _definition.id                '_diffrn_orient_refln.hkl'
    _definition.update            2021-03-01
    _description.text
;
    Miller indices of a reflection used to define the orientation matrix.
;
    _name.category_id             diffrn_orient_refln
    _name.object_id               hkl
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With a as diffrn_orient_refln

      _diffrn_orient_refln.hkl =  [a.index_h, a.index_k, a.index_l]
;

save_

save_diffrn_orient_refln.index_h

    _definition.id                '_diffrn_orient_refln.index_h'
    _alias.definition_id          '_diffrn_orient_refln_index_h'
    _name.category_id             diffrn_orient_refln
    _name.object_id               index_h

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_orient_refln.index_k

    _definition.id                '_diffrn_orient_refln.index_k'
    _alias.definition_id          '_diffrn_orient_refln_index_k'
    _name.category_id             diffrn_orient_refln
    _name.object_id               index_k

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_orient_refln.index_l

    _definition.id                '_diffrn_orient_refln.index_l'
    _alias.definition_id          '_diffrn_orient_refln_index_l'
    _name.category_id             diffrn_orient_refln
    _name.object_id               index_l

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_DIFFRN_RADIATION

    _definition.id                DIFFRN_RADIATION
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2023-10-15
    _description.text
;
    The category of data items which specify the wavelength of the
    radiation used in measuring diffraction intensities. To identify
    and assign weights to distinct wavelength components from a
    polychromatic beam, see DIFFRN_RADIATION_WAVELENGTH.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_RADIATION

save_

save_diffrn_radiation.collimation

    _definition.id                '_diffrn_radiation.collimation'
    _alias.definition_id          '_diffrn_radiation_collimation'
    _definition.update            2012-11-26
    _description.text
;
    Description of the collimation or focusing applied to the radiation.
;
    _name.category_id             diffrn_radiation
    _name.object_id               collimation
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         '0.3 mm double-pinhole'
         '0.5 mm'
         'focusing mirrors'

save_

save_diffrn_radiation.filter_edge

    _definition.id                '_diffrn_radiation.filter_edge'
    _alias.definition_id          '_diffrn_radiation_filter_edge'
    _definition.update            2012-11-26
    _description.text
;
    Absorption edge of the radiation filter used.
;
    _name.category_id             diffrn_radiation
    _name.object_id               filter_edge
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_diffrn_radiation.illumination_mode

    _definition.id                '_diffrn_radiation.illumination_mode'
    _definition.update            2024-05-15
    _description.text
;
    Code describing the optical configuration of the incident beam at
    the sample. For electron diffraction, parallel illumination is
    the normal mode in transmission electron microscopy (TEM),
    convergent-beam in scanning transmission electron microscopy
    (STEM).
;
    _name.category_id             diffrn_radiation
    _name.object_id               illumination_mode
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code
    loop_
      _enumeration_set.state
      _enumeration_set.detail
         convergent               'Convergent-beam illumination'
         parallel                 'Parallel illumination'

save_

save_diffrn_radiation.inhomogeneity

    _definition.id                '_diffrn_radiation.inhomogeneity'
    _alias.definition_id          '_diffrn_radiation_inhomogeneity'
    _definition.update            2012-11-26
    _description.text
;
    Half-width of the incident beam perpendicular to the diffraction plane.
;
    _name.category_id             diffrn_radiation
    _name.object_id               inhomogeneity
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   millimetres

save_

save_diffrn_radiation.monochromator

    _definition.id                '_diffrn_radiation.monochromator'
    _alias.definition_id          '_diffrn_radiation_monochromator'
    _definition.update            2012-11-26
    _description.text
;
    Description of the method used to obtain monochromatic radiation.
    If a monochromator crystal is used the material and the indices of
    the Bragg reflection are specified.
;
    _name.category_id             diffrn_radiation
    _name.object_id               monochromator
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'Zr filter'
         'Ge 220'
         'none'
         'equatorial mounted graphite'

save_

save_diffrn_radiation.polarisn_norm

    _definition.id                '_diffrn_radiation.polarisn_norm'
    _alias.definition_id          '_diffrn_radiation_polarisn_norm'
    _definition.update            2012-11-26
    _description.text
;
    The angle, as viewed from the specimen, between the perpendicular
    component of the polarisation and the diffraction plane.
;
    _name.category_id             diffrn_radiation
    _name.object_id               polarisn_norm
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            -180.0:180.0
    _units.code                   degrees

save_

save_diffrn_radiation.polarisn_ratio

    _definition.id                '_diffrn_radiation.polarisn_ratio'
    _alias.definition_id          '_diffrn_radiation_polarisn_ratio'
    _definition.update            2012-11-26
    _description.text
;
    Polarisation ratio of the diffraction beam incident on the crystal.
    It is the ratio of the perpendicularly polarised to the parallel
    polarised component of the radiation. The perpendicular component
    forms an angle of _diffrn_radiation.polarisn_norm to the normal to
    the diffraction plane of the sample (i.e. the plane containing the
    incident and reflected beams).
;
    _name.category_id             diffrn_radiation
    _name.object_id               polarisn_ratio
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_diffrn_radiation.probe

    _definition.id                '_diffrn_radiation.probe'
    _alias.definition_id          '_diffrn_radiation_probe'
    _definition.update            2012-11-26
    _description.text
;
    Enumerated code for the nature of radiation used (i.e. name of
    subatomic particle or region of the electromagnetic spectrum).
;
    _name.category_id             diffrn_radiation
    _name.object_id               probe
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
         x-ray
         neutron
         electron
         gamma

save_

save_diffrn_radiation.type

    _definition.id                '_diffrn_radiation.type'
    _definition_replaced.id       1
    _definition_replaced.by       '_diffrn_radiation_wavelength.type'
    _alias.definition_id          '_diffrn_radiation_type'
    _definition.update            2022-10-04
    _description.text
;
    DEPRECATED. Use _diffrn_radiation_wavelength.type. Details of the
    radiation source or energy spectrum.
;
    _name.category_id             diffrn_radiation
    _name.object_id               type
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'Mo Kα'
         'Cu Kα'
         'Cu Kα~1~'
         'Cu K-L~2,3~'
         'white-beam'

save_

save_diffrn_radiation.xray_symbol

    _definition.id                '_diffrn_radiation.xray_symbol'
    _definition_replaced.id       1
    _definition_replaced.by       '_diffrn_radiation_wavelength.xray_symbol'
    _alias.definition_id          '_diffrn_radiation_xray_symbol'
    _definition.update            2022-10-04
    _description.text
;
    DEPRECATED. Use _diffrn_radiation_wavelength.xray_symbol. IUPAC
    symbol for the X-ray wavelength for probe radiation.
;
    _name.category_id             diffrn_radiation
    _name.object_id               xray_symbol
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         K-L~3~                 'Kα~1~ in older Siegbahn notation.'
         K-L~2~                 'Kα~2~ in older Siegbahn notation.'
         K-M~3~                 'Kβ~1~ in older Siegbahn notation.'
         K-L~2,3~               'Use where K-L~3~ and K-L~2~ are not resolved.'

save_

save_DIFFRN_RADIATION_WAVELENGTH

    _definition.id                DIFFRN_RADIATION_WAVELENGTH
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the wavelength of the
    radiation used in measuring diffraction intensities. Items may be
    looped to identify and assign weights to distinct wavelength
    components from a polychromatic beam.
;
    _name.category_id             DIFFRN_RADIATION
    _name.object_id               DIFFRN_RADIATION_WAVELENGTH
    _category_key.name            '_diffrn_radiation_wavelength.id'

save_

save_diffrn_radiation_wavelength.details

    _definition.id                '_diffrn_radiation_wavelength.details'

    loop_
      _alias.definition_id
         '_diffrn_radiation_wavelength_details'
         '_diffrn_radiation.wavelength_details'

    _definition.update            2012-11-26
    _description.text
;
    Information about the determination of the radiation
    diffrn_radiation_wavelength that is not conveyed completely by an
    enumerated value of _diffrn_radiation_wavelength.determination.
;
    _name.category_id             diffrn_radiation_wavelength
    _name.object_id               details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_diffrn_radiation_wavelength.determination

    _definition.id                '_diffrn_radiation_wavelength.determination'

    loop_
      _alias.definition_id
         '_diffrn_radiation_wavelength_determination'
         '_diffrn_radiation.wavelength_determination'

    _definition.update            2023-01-13
    _description.text
;
    Method by which the radiation wavelength was determined.
;
    _name.category_id             diffrn_radiation_wavelength
    _name.object_id               determination
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         fundamental
             'Fundamental property of matter, e.g. MoKα.'
         estimated
             'Estimated, e.g. from monochromator angle or time of flight.'
         refined
             'Refined using a standard crystal with known cell parameters.'

save_

save_diffrn_radiation_wavelength.id

    _definition.id                '_diffrn_radiation_wavelength.id'

    loop_
      _alias.definition_id
         '_diffrn_radiation_wavelength_id'
         '_diffrn_radiation.wavelength_id'

    _definition.update            2023-04-04
    _description.text
;
    Code identifying the radiation used in the diffraction measurements.
    This is linked to _diffrn_refln.wavelength_id and _refln.wavelength_id
;
    _name.category_id             diffrn_radiation_wavelength
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _description_example.case     x2

save_

save_diffrn_radiation_wavelength.type

    _definition.id                '_diffrn_radiation_wavelength.type'
    _definition.update            2022-10-04
    _description.text
;
    Details of the radiation source or energy spectrum.
;
    _name.category_id             diffrn_radiation_wavelength
    _name.object_id               type
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'Mo Kα'
         'Cu Kα'
         'Cu Kα~1~'
         'Cu K-L~2,3~'
         'white-beam'

save_

save_diffrn_radiation_wavelength.value

    _definition.id                '_diffrn_radiation_wavelength.value'

    loop_
      _alias.definition_id
         '_diffrn_radiation_wavelength'
         '_diffrn_radiation_wavelength.wavelength'

    _definition.update            2012-11-26
    _description.text
;
    Wavelength of radiation used in diffraction measurements.
;
    _name.category_id             diffrn_radiation_wavelength
    _name.object_id               value
    _type.purpose                 Measurand
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_diffrn_radiation_wavelength.value_su

    _definition.id                '_diffrn_radiation_wavelength.value_su'

    loop_
      _alias.definition_id
         '_diffrn_radiation_wavelength_su'
         '_diffrn_radiation_wavelength.wavelength_su'

    _definition.update            2021-08-03
    _description.text
;
    Standard uncertainty of _diffrn_radiation_wavelength.value.
;
    _name.category_id             diffrn_radiation_wavelength
    _name.object_id               value_su
    _name.linked_item_id          '_diffrn_radiation_wavelength.value'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_radiation_wavelength.wt

    _definition.id                '_diffrn_radiation_wavelength.wt'
    _alias.definition_id          '_diffrn_radiation_wavelength_wt'
    _definition.update            2012-11-26
    _description.text
;
    Relative intensity of a radiation used in the diffraction measurements.
;
    _name.category_id             diffrn_radiation_wavelength
    _name.object_id               wt
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_diffrn_radiation_wavelength.xray_symbol

    _definition.id                '_diffrn_radiation_wavelength.xray_symbol'
    _definition.update            2022-10-04
    _description.text
;
    IUPAC symbol for the X-ray wavelength for probe radiation.
;
    _name.category_id             diffrn_radiation_wavelength
    _name.object_id               xray_symbol
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         K-L~3~                 'Kα~1~ in older Siegbahn notation.'
         K-L~2~                 'Kα~2~ in older Siegbahn notation.'
         K-M~3~                 'Kβ~1~ in older Siegbahn notation.'
         K-L~2,3~               'Use where K-L~3~ and K-L~2~ are not resolved.'

save_

save_DIFFRN_REFLN

    _definition.id                DIFFRN_REFLN
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the reflection measurements,
    prior to data reduction and merging.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_REFLN
    _category_key.name            '_diffrn_refln.id'

save_

save_diffrn_refln.angle_chi

    _definition.id                '_diffrn_refln.angle_chi'
    _alias.definition_id          '_diffrn_refln_angle_chi'
    _name.category_id             diffrn_refln
    _name.object_id               angle_chi

    _import.get                   [{'file':templ_attr.cif  'save':diffr_angle}]

save_

save_diffrn_refln.angle_kappa

    _definition.id                '_diffrn_refln.angle_kappa'
    _alias.definition_id          '_diffrn_refln_angle_kappa'
    _name.category_id             diffrn_refln
    _name.object_id               angle_kappa

    _import.get                   [{'file':templ_attr.cif  'save':diffr_angle}]

save_

save_diffrn_refln.angle_omega

    _definition.id                '_diffrn_refln.angle_omega'
    _alias.definition_id          '_diffrn_refln_angle_omega'
    _name.category_id             diffrn_refln
    _name.object_id               angle_omega

    _import.get                   [{'file':templ_attr.cif  'save':diffr_angle}]

save_

save_diffrn_refln.angle_phi

    _definition.id                '_diffrn_refln.angle_phi'
    _alias.definition_id          '_diffrn_refln_angle_phi'
    _name.category_id             diffrn_refln
    _name.object_id               angle_phi

    _import.get                   [{'file':templ_attr.cif  'save':diffr_angle}]

save_

save_diffrn_refln.angle_psi

    _definition.id                '_diffrn_refln.angle_psi'
    _alias.definition_id          '_diffrn_refln_angle_psi'
    _name.category_id             diffrn_refln
    _name.object_id               angle_psi

    _import.get                   [{'file':templ_attr.cif  'save':diffr_angle}]

save_

save_diffrn_refln.angle_theta

    _definition.id                '_diffrn_refln.angle_theta'
    _alias.definition_id          '_diffrn_refln_angle_theta'
    _name.category_id             diffrn_refln
    _name.object_id               angle_theta

    _import.get                   [{'file':templ_attr.cif  'save':diffr_angle}]

save_

save_diffrn_refln.attenuator_code

    _definition.id                '_diffrn_refln.attenuator_code'
    _alias.definition_id          '_diffrn_refln_attenuator_code'
    _definition.update            2021-10-27
    _description.text
;
    Code identifying any attenuator setting for this reflection.
;
    _name.category_id             diffrn_refln
    _name.object_id               attenuator_code
    _name.linked_item_id          '_diffrn_attenuator.code'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_diffrn_refln.class_code

    _definition.id                '_diffrn_refln.class_code'
    _alias.definition_id          '_diffrn_refln_class_code'
    _definition.update            2021-10-27
    _description.text
;
    Code for reflection class, if assigned. e.g. modulated structures
;
    _name.category_id             diffrn_refln
    _name.object_id               class_code
    _name.linked_item_id          '_diffrn_reflns_class.code'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_diffrn_refln.counts_bg_1

    _definition.id                '_diffrn_refln.counts_bg_1'
    _alias.definition_id          '_diffrn_refln_counts_bg_1'
    _definition.update            2022-11-22
    _description.text
;
    The measured background scattering on one side of a diffraction
    peak when measuring using a point detector.

    Note that counts-per-second values should be converted to
    total counts.

    Standard uncertainties should not be quoted for these values.
    If the standard uncertainties differ from the square root of
    the number of counts, _diffrn_refln.intensity_* should be used.
;
    _name.category_id             diffrn_refln
    _name.object_id               counts_bg_1
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   counts

save_

save_diffrn_refln.counts_bg_2

    _definition.id                '_diffrn_refln.counts_bg_2'
    _alias.definition_id          '_diffrn_refln_counts_bg_2'
    _definition.update            2022-11-22
    _description.text
;
    The measured background counts on the other side of the
    peak to the measurement of _diffrn_refln.counts_bg_1
    when measuring using a point detector.

    Note that counts-per-second values should be converted to
    total counts.

    Standard uncertainties should not be quoted for these values.
    If the standard uncertainties differ from the square root of
    the number of counts, _diffrn_refln.intensity_* should be used.
;
    _name.category_id             diffrn_refln
    _name.object_id               counts_bg_2
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   counts

save_

save_diffrn_refln.counts_net

    _definition.id                '_diffrn_refln.counts_net'
    _alias.definition_id          '_diffrn_refln_counts_net'
    _definition.update            2022-12-12
    _description.text
;
    Counts measured in the reflection peak after background
    subtraction. If background and peak counts were collected
    for different times, the background counts must be scaled to
    the peak counts prior to subtraction.

    Note that counts-per-second values should be converted to
    total counts.

    The value for this data item must be derived from count values.
    If not, _diffrn_refln.intensity_* should be used.
;
    _name.category_id             diffrn_refln
    _name.object_id               counts_net
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   counts

save_

save_diffrn_refln.counts_net_su

    _definition.id                '_diffrn_refln.counts_net_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_refln.counts_net.
;
    _name.category_id             diffrn_refln
    _name.object_id               counts_net_su
    _name.linked_item_id          '_diffrn_refln.counts_net'
    _units.code                   counts

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_refln.counts_peak

    _definition.id                '_diffrn_refln.counts_peak'
    _alias.definition_id          '_diffrn_refln_counts_peak'
    _definition.update            2022-11-22
    _description.text
;
    Counts measured in the reflection peak before background
    subtraction. That is, the region of interest consists of
    only the diffraction peak.

    Note that counts-per-second values should be converted to
    total counts.

    Standard uncertainties should not be quoted for these values.
    If the standard uncertainties differ from the square root of
    the number of counts, _diffrn_refln.intensity_* should be used.
;
    _name.category_id             diffrn_refln
    _name.object_id               counts_peak
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   counts

save_

save_diffrn_refln.counts_total

    _definition.id                '_diffrn_refln.counts_total'
    _alias.definition_id          '_diffrn_refln_counts_total'
    _definition.update            2022-11-22
    _description.text
;
    Counts measured in the total reflection including background
    and peak regions. That is, the region of interest consists of the
    diffraction peak and an area of background immediately surrounding
    the peak of interest.

    Note that counts-per-second values should be converted to
    total counts.

    Standard uncertainties should not be quoted for these values.
    If the standard uncertainties differ from the square root of
    the number of counts, _diffrn_refln.intensity_* should be used.
;
    _name.category_id             diffrn_refln
    _name.object_id               counts_total
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   counts

save_

save_diffrn_refln.detect_slit_horiz

    _definition.id                '_diffrn_refln.detect_slit_horiz'
    _alias.definition_id          '_diffrn_refln_detect_slit_horiz'
    _definition.update            2012-11-26
    _description.text
;
    Total slit aperture angle in the diffraction plane.
;
    _name.category_id             diffrn_refln
    _name.object_id               detect_slit_horiz
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_diffrn_refln.detect_slit_vert

    _definition.id                '_diffrn_refln.detect_slit_vert'
    _alias.definition_id          '_diffrn_refln_detect_slit_vert'
    _definition.update            2012-11-26
    _description.text
;
    Total slit aperture angle perpendicular to the diffraction plane.
;
    _name.category_id             diffrn_refln
    _name.object_id               detect_slit_vert
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_diffrn_refln.elapsed_time

    _definition.id                '_diffrn_refln.elapsed_time'
    _alias.definition_id          '_diffrn_refln_elapsed_time'
    _definition.update            2012-11-26
    _description.text
;
    Elapsed time from the start to the end of the intensity measurement.
;
    _name.category_id             diffrn_refln
    _name.object_id               elapsed_time
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   minutes

save_

save_diffrn_refln.hkl

    _definition.id                '_diffrn_refln.hkl'
    _definition.update            2021-03-01
    _description.text
;
    Miller indices of a measured reflection. These need not match the
    _refln.hkl values if a transformation of the original measured
    cell has taken place.
;
    _name.category_id             diffrn_refln
    _name.object_id               hkl
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With a as diffrn_refln

          _diffrn_refln.hkl =   [a.index_h, a.index_h, a.index_l]
;

save_

save_diffrn_refln.id

    _definition.id                '_diffrn_refln.id'
    _definition.update            2024-11-12
    _description.text
;
    _diffrn_refln.id must uniquely identify the reflection.

    Note that this item need not be a number; it can be any unique
    identifier.
;
    _name.category_id             diffrn_refln
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_diffrn_refln.index_h

    _definition.id                '_diffrn_refln.index_h'
    _alias.definition_id          '_diffrn_refln_index_h'
    _name.category_id             diffrn_refln
    _name.object_id               index_h

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_refln.index_k

    _definition.id                '_diffrn_refln.index_k'
    _alias.definition_id          '_diffrn_refln_index_k'
    _name.category_id             diffrn_refln
    _name.object_id               index_k

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_refln.index_l

    _definition.id                '_diffrn_refln.index_l'
    _alias.definition_id          '_diffrn_refln_index_l'
    _name.category_id             diffrn_refln
    _name.object_id               index_l

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_refln.intensity_bg_1

    _definition.id                '_diffrn_refln.intensity_bg_1'
    _definition.update            2022-11-22
    _description.text
;
    The measured background intensity on one side of a diffraction
    peak when measuring using a point detector.

    Use these entries for measurements where intensity values are not
    counts (use _diffrn_refln.counts_* for event-counting measurements
    where the standard uncertainty is estimated as the square root of
    the number of counts).
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_bg_1
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _units.code                   none

save_

save_diffrn_refln.intensity_bg_1_su

    _definition.id                '_diffrn_refln.intensity_bg_1_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_refln.intensity_bg_1.
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_bg_1_su
    _name.linked_item_id          '_diffrn_refln.intensity_bg_1'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_refln.intensity_bg_2

    _definition.id                '_diffrn_refln.intensity_bg_2'
    _definition.update            2022-11-22
    _description.text
;
    The measured background counts on the other side of the
    peak to the measurement of _diffrn_refln.intensity_bg_1
    when measuring using a point detector.

    Use these entries for measurements where intensity values are not
    counts (use _diffrn_refln.counts_* for event-counting measurements
    where the standard uncertainty is estimated as the square root of
    the number of counts).
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_bg_2
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _units.code                   none

save_

save_diffrn_refln.intensity_bg_2_su

    _definition.id                '_diffrn_refln.intensity_bg_2_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_refln.intensity_bg_2.
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_bg_2_su
    _name.linked_item_id          '_diffrn_refln.intensity_bg_2'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_refln.intensity_net

    _definition.id                '_diffrn_refln.intensity_net'
    _alias.definition_id          '_diffrn_refln_intensity_net'
    _definition.update            2022-11-22
    _description.text
;
    Net intensity in the reflection peak calculated from the
    diffraction counts after the attenuator and standard scales
    have been applied.
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_net
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   none

save_

save_diffrn_refln.intensity_net_su

    _definition.id                '_diffrn_refln.intensity_net_su'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_diffrn_refln_intensity_u'                                 .
         '_diffrn_refln_intensity_sigma'                             1999-03-24
         '_diffrn_refln.intensity_sigma'                             .
         '_diffrn_refln.intensity_u'                                 .

    _definition.update            2024-02-14
    _description.text
;
    Standard uncertainty of _diffrn_refln.intensity_net.
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_net_su
    _name.linked_item_id          '_diffrn_refln.intensity_net'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_refln.intensity_peak

    _definition.id                '_diffrn_refln.intensity_peak'
    _definition.update            2022-11-22
    _description.text
;
    Intensity measured in the reflection peak before background
    subtraction. That is, the region of interest consists of
    only the diffraction peak.

    Use these entries for measurements where intensity values are not
    counts (use _diffrn_refln.counts_* for event-counting measurements
    where the standard uncertainty is estimated as the square root of
    the number of counts).
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_peak
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _units.code                   none

save_

save_diffrn_refln.intensity_peak_su

    _definition.id                '_diffrn_refln.intensity_peak_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_refln.intensity_peak.
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_peak_su
    _name.linked_item_id          '_diffrn_refln.intensity_peak'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_refln.intensity_total

    _definition.id                '_diffrn_refln.intensity_total'
    _definition.update            2022-11-22
    _description.text
;
    Intensity measured in the total reflection including background
    and peak regions. That is, the region of interest consists of the
    diffraction peak and an area of background immediately surrounding
    the peak of interest.

    Use these entries for measurements where intensity values are not
    counts (use _diffrn_refln.counts_* for event-counting measurements
    where the standard uncertainty is estimated as the square root of
    the number of counts).
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_total
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _units.code                   none

save_

save_diffrn_refln.intensity_total_su

    _definition.id                '_diffrn_refln.intensity_total_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_refln.intensity_total.
;
    _name.category_id             diffrn_refln
    _name.object_id               intensity_total_su
    _name.linked_item_id          '_diffrn_refln.intensity_total'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_refln.scale_group_code

    _definition.id                '_diffrn_refln.scale_group_code'
    _alias.definition_id          '_diffrn_refln_scale_group_code'
    _definition.update            2023-11-14
    _description.text
;
    Code identifying the scale applying to this reflection. The code must match
    a _diffrn_scale_group.code in the DIFFRN_SCALE_GROUP list.
;
    _name.category_id             diffrn_refln
    _name.object_id               scale_group_code
    _name.linked_item_id          '_diffrn_scale_group.code'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_diffrn_refln.scan_mode

    _definition.id                '_diffrn_refln.scan_mode'
    _alias.definition_id          '_diffrn_refln_scan_mode'
    _definition.update            2023-01-13
    _description.text
;
    Code identifying the mode of scanning with a diffractometer.
    See also _diffrn_refln.scan_width and _diffrn_refln.scan_mode_backgd.
;
    _name.category_id             diffrn_refln
    _name.object_id               scan_mode
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         om                       'ω-scan.'
         ot                       'ω/2θ-scan.'
         q                        'Q-scans (arbitrary reciprocal directions).'

save_

save_diffrn_refln.scan_mode_backgd

    _definition.id                '_diffrn_refln.scan_mode_backgd'
    _alias.definition_id          '_diffrn_refln_scan_mode_backgd'
    _definition.update            2012-11-26
    _description.text
;
    Code identifying mode of scanning to measure the background intensity.
;
    _name.category_id             diffrn_refln
    _name.object_id               scan_mode_backgd
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         st                       'Stationary counter background.'
         mo                       'Moving counter background.'

save_

save_diffrn_refln.scan_rate

    _definition.id                '_diffrn_refln.scan_rate'
    _alias.definition_id          '_diffrn_refln_scan_rate'
    _definition.update            2013-03-07
    _description.text
;
    Angular rate of scanning a reflection to measure the intensity.
;
    _name.category_id             diffrn_refln
    _name.object_id               scan_rate
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   degree_per_minute

save_

save_diffrn_refln.scan_time_backgd

    _definition.id                '_diffrn_refln.scan_time_backgd'
    _alias.definition_id          '_diffrn_refln_scan_time_backgd'
    _definition.update            2012-11-26
    _description.text
;
    Time spent measuring background counts.
;
    _name.category_id             diffrn_refln
    _name.object_id               scan_time_backgd
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   seconds

save_

save_diffrn_refln.scan_width

    _definition.id                '_diffrn_refln.scan_width'
    _alias.definition_id          '_diffrn_refln_scan_width'
    _definition.update            2012-11-26
    _description.text
;
    Angular scan width when measuring the peak intensity.
;
    _name.category_id             diffrn_refln
    _name.object_id               scan_width
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_diffrn_refln.sin_theta_over_lambda

    _definition.id                '_diffrn_refln.sin_theta_over_lambda'

    loop_
      _alias.definition_id
         '_diffrn_refln_sint/lambda'
         '_diffrn_refln_sint_over_lambda'
         '_diffrn_refln.sint_over_lambda'

    _definition.update            2012-11-26
    _description.text
;
    sin(θ)/λ value for this reflection.
;
    _name.category_id             diffrn_refln
    _name.object_id               sin_theta_over_lambda
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   reciprocal_angstroms

save_

save_diffrn_refln.standard_code

    _definition.id                '_diffrn_refln.standard_code'
    _alias.definition_id          '_diffrn_refln_standard_code'
    _definition.update            2023-11-14
    _description.text
;
    Code identifying reflections measured repeated as standard intensity.
    Must match a _diffrn_standard_refln.code value or set to '.' if
    it was not used as an intensity standard.
;
    _name.category_id             diffrn_refln
    _name.object_id               standard_code
    _name.linked_item_id          '_diffrn_standard_refln.code'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_diffrn_refln.wavelength

    _definition.id                '_diffrn_refln.wavelength'
    _alias.definition_id          '_diffrn_refln_wavelength'
    _definition.update            2012-11-26
    _description.text
;
    Mean wavelength of radiation used to measure this intensity.
;
    _name.category_id             diffrn_refln
    _name.object_id               wavelength
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_diffrn_refln.wavelength_id

    _definition.id                '_diffrn_refln.wavelength_id'
    _alias.definition_id          '_diffrn_refln_wavelength_id'
    _definition.update            2021-10-27
    _description.text
;
    Code identifying the wavelength in the diffrn_radiation_wavelength list.
;
    _name.category_id             diffrn_refln
    _name.object_id               wavelength_id
    _name.linked_item_id          '_diffrn_radiation_wavelength.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_DIFFRN_REFLNS

    _definition.id                DIFFRN_REFLNS
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-26
    _description.text
;
    The category of data items which specify the overall reflection
    measurement information.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_REFLNS

save_

save_diffrn_reflns.av_r_equivalents

    _definition.id                '_diffrn_reflns.av_R_equivalents'
    _alias.definition_id          '_diffrn_reflns_av_R_equivalents'
    _definition.update            2012-11-26
    _description.text
;
    The residual [sum av|del(I)| / sum |av(I)|] for symmetry-equivalent
    reflections used to calculate the average intensity av(I). The
    av|del(I)| term is the average absolute difference between av(I) and
    the individual symmetry-equivalent intensities.
;
    _name.category_id             diffrn_reflns
    _name.object_id               av_R_equivalents
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_diffrn_reflns.av_suneti_over_neti

    _definition.id                '_diffrn_reflns.av_sunetI_over_netI'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_diffrn_reflns_av_sigmaI/netI'                             1999-03-24
         '_diffrn_reflns.av_unetI/netI'                              .
         '_diffrn_reflns_av_unetI/netI'                              .
         '_diffrn_reflns.av_sigmaI_over_netI'                        .

    _definition.update            2024-02-14
    _description.text
;
    Recorded [sum |su(netI)| / sum |netI|] for all measured reflections.
;
    _name.category_id             diffrn_reflns
    _name.object_id               av_sunetI_over_netI
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_diffrn_reflns.laue_measured_fraction_full

    _definition.id                '_diffrn_reflns.Laue_measured_fraction_full'
    _alias.definition_id          '_diffrn_reflns_Laue_measured_fraction_full'
    _definition.update            2019-01-09
    _description.text
;
    Fraction of Laue group unique reflections (symmetry-independent in
    the Laue group) measured out to the resolution given in
    _diffrn_reflns.resolution_full or _diffrn_reflns.theta_full.
    The Laue group always contains a centre of symmetry so that
    the reflection h,k,l is always equivalent to the reflection
    -h,-k,-l even in space groups without a centre of symmetry.
    This number should not be less than 0.95, since it represents
    the fraction of reflections measured in the part of the
    diffraction pattern that is essentially complete.
;
    _name.category_id             diffrn_reflns
    _name.object_id               Laue_measured_fraction_full
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.95:1.0
    _units.code                   none

save_

save_diffrn_reflns.laue_measured_fraction_max

    _definition.id                '_diffrn_reflns.Laue_measured_fraction_max'
    _alias.definition_id          '_diffrn_reflns_Laue_measured_fraction_max'
    _definition.update            2021-03-03
    _description.text
;
    Fraction of Laue group unique reflections (symmetry-independent in
    the Laue group) measured out to the resolution given in
    _diffrn_reflns.resolution_max or _diffrn_reflns.theta_max.
    The Laue group always contains a centre of symmetry so that the
    reflection h,k,l is always equivalent to the reflection -h,-k,-l
    even in space groups without a centre of symmetry.
;
    _name.category_id             diffrn_reflns
    _name.object_id               Laue_measured_fraction_max
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_diffrn_reflns.limit_h_max

    _definition.id                '_diffrn_reflns.limit_h_max'
    _alias.definition_id          '_diffrn_reflns_limit_h_max'
    _name.category_id             diffrn_reflns
    _name.object_id               limit_h_max

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_reflns.limit_h_min

    _definition.id                '_diffrn_reflns.limit_h_min'
    _alias.definition_id          '_diffrn_reflns_limit_h_min'
    _name.category_id             diffrn_reflns
    _name.object_id               limit_h_min

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_reflns.limit_k_max

    _definition.id                '_diffrn_reflns.limit_k_max'
    _alias.definition_id          '_diffrn_reflns_limit_k_max'
    _name.category_id             diffrn_reflns
    _name.object_id               limit_k_max

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_reflns.limit_k_min

    _definition.id                '_diffrn_reflns.limit_k_min'
    _alias.definition_id          '_diffrn_reflns_limit_k_min'
    _name.category_id             diffrn_reflns
    _name.object_id               limit_k_min

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_reflns.limit_l_max

    _definition.id                '_diffrn_reflns.limit_l_max'
    _alias.definition_id          '_diffrn_reflns_limit_l_max'
    _name.category_id             diffrn_reflns
    _name.object_id               limit_l_max

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_reflns.limit_l_min

    _definition.id                '_diffrn_reflns.limit_l_min'
    _alias.definition_id          '_diffrn_reflns_limit_l_min'
    _name.category_id             diffrn_reflns
    _name.object_id               limit_l_min

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_reflns.limit_max

    _definition.id                '_diffrn_reflns.limit_max'
    _definition.update            2023-01-06
    _description.text
;
    Maximum Miller indices of measured diffraction reflections.
;
    _name.category_id             diffrn_reflns
    _name.object_id               limit_max
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With t as diffrn_reflns

    _diffrn_reflns.limit_max = [t.limit_h_max,t.limit_k_max,t.limit_l_max]
;

save_

save_diffrn_reflns.limit_min

    _definition.id                '_diffrn_reflns.limit_min'
    _definition.update            2023-01-06
    _description.text
;
    Minimum Miller indices of measured diffraction reflections.
;
    _name.category_id             diffrn_reflns
    _name.object_id               limit_min
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With t as diffrn_reflns

    _diffrn_reflns.limit_min = [t.limit_h_min,t.limit_k_min,t.limit_l_min]
;

save_

save_diffrn_reflns.number

    _definition.id                '_diffrn_reflns.number'
    _alias.definition_id          '_diffrn_reflns_number'
    _definition.update            2021-03-01
    _description.text
;
    Total number of measured intensities, excluding reflections that are
    classed as systematically absent arising from translational symmetry
    in the crystal unit cell.
;
    _name.category_id             diffrn_reflns
    _name.object_id               number
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_diffrn_reflns.point_measured_fraction_full

    _definition.id                '_diffrn_reflns.point_measured_fraction_full'
    _alias.definition_id
        '_diffrn_reflns_point_group_measured_fraction_full'
    _definition.update            2013-01-20
    _description.text
;
    Fraction of crystal point-group unique reflections (i.e.
    symmetry-independent in the crystal point group) measured
    out to the resolution given in _diffrn_reflns.resolution_full
    or _diffrn_reflns.theta_full. For space groups that do not
    contain a centre of symmetry the reflections h,k,l and
    -h,-k,-l are independent. This number should not be less
    than 0.95, since it represents the fraction of reflections
    measured in the part of the diffraction pattern that is
    essentially complete.
;
    _name.category_id             diffrn_reflns
    _name.object_id               point_measured_fraction_full
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.95:1.0
    _units.code                   none

save_

save_diffrn_reflns.point_measured_fraction_max

    _definition.id                '_diffrn_reflns.point_measured_fraction_max'
    _alias.definition_id
        '_diffrn_reflns_point_group_measured_fraction_max'
    _definition.update            2013-01-20
    _description.text
;
    Fraction of crystal point-group unique reflections (i.e.
    symmetry-independent in the crystal point group) measured
    out to the resolution given in _diffrn_reflns.resolution_max
    or _diffrn_reflns.theta_max. For space groups that do not
    contain a centre of symmetry the reflections h,k,l and
    -h,-k,-l are independent.
;
    _name.category_id             diffrn_reflns
    _name.object_id               point_measured_fraction_max
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_diffrn_reflns.reduction_process

    _definition.id                '_diffrn_reflns.reduction_process'
    _alias.definition_id          '_diffrn_reflns_reduction_process'
    _definition.update            2012-11-26
    _description.text
;
    How intensities were reduced to structure-factor magnitudes.
;
    _name.category_id             diffrn_reflns
    _name.object_id               reduction_process
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'data averaged using Fisher test'

save_

save_diffrn_reflns.resolution_full

    _definition.id                '_diffrn_reflns.resolution_full'
    _alias.definition_id          '_diffrn_reflns_resolution_full'
    _definition.update            2012-11-26
    _description.text
;
    The resolution at which the measured reflection count is close
    to complete. The fraction of unique reflections measured out
    to this angle is given by _diffrn.measured_fraction_theta_full.
;
    _name.category_id             diffrn_reflns
    _name.object_id               resolution_full
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   reciprocal_angstroms

save_

save_diffrn_reflns.resolution_max

    _definition.id                '_diffrn_reflns.resolution_max'
    _alias.definition_id          '_diffrn_reflns_resolution_max'
    _definition.update            2013-02-22
    _description.text
;
    Maximum resolution of the measured diffraction pattern.
    The fraction of unique reflections measured out to this angle
    is given by _diffrn.measured_fraction_theta_max.
;
    _name.category_id             diffrn_reflns
    _name.object_id               resolution_max
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   reciprocal_angstroms

save_

save_diffrn_reflns.theta_full

    _definition.id                '_diffrn_reflns.theta_full'
    _alias.definition_id          '_diffrn_reflns_theta_full'
    _definition.update            2023-01-13
    _description.text
;
    Theta angle at which the count of measured reflections is almost
    complete. The fraction of unique reflections measured out to
    this angle is given by _diffrn.measured_fraction_theta_full.
;
    _name.category_id             diffrn_reflns
    _name.object_id               theta_full
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_diffrn_reflns.theta_max

    _definition.id                '_diffrn_reflns.theta_max'
    _alias.definition_id          '_diffrn_reflns_theta_max'
    _definition.update            2012-11-26
    _description.text
;
    Maximum θ angle of the measured reflections.
;
    _name.category_id             diffrn_reflns
    _name.object_id               theta_max
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_diffrn_reflns.theta_min

    _definition.id                '_diffrn_reflns.theta_min'
    _alias.definition_id          '_diffrn_reflns_theta_min'
    _definition.update            2012-11-26
    _description.text
;
    Minimum θ angle of the measured reflections.
;
    _name.category_id             diffrn_reflns
    _name.object_id               theta_min
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_DIFFRN_REFLNS_CLASS

    _definition.id                DIFFRN_REFLNS_CLASS
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify different classes of
    reflections in the raw measured diffraction data.
;
    _name.category_id             DIFFRN_REFLNS
    _name.object_id               DIFFRN_REFLNS_CLASS
    _category_key.name            '_diffrn_reflns_class.code'

save_

save_diffrn_reflns_class.av_r_eq

    _definition.id                '_diffrn_reflns_class.av_R_eq'
    _alias.definition_id          '_diffrn_reflns_class_av_R_eq'
    _definition.update            2012-11-26
    _description.text
;
    Residual [sum av|del(I)|/sum|av(I)|] for symmetry-equivalent
    reflections used to calculate the average intensity av(I).
    The av|del(I)| term is the average absolute difference
    between av(I) and the individual intensities.
;
    _name.category_id             diffrn_reflns_class
    _name.object_id               av_R_eq
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_diffrn_reflns_class.av_sui_over_i

    _definition.id                '_diffrn_reflns_class.av_suI_over_I'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_diffrn_reflns_class_av_uI_over_I'                         .
         '_diffrn_reflns_class.av_uI/I'                              .
         '_diffrn_reflns_class_av_uI/I'                              .
         '_diffrn_reflns_class.av_sgI/I'                             .
         '_diffrn_reflns_class_av_sgI/I'                             1999-03-24

    _definition.update            2024-02-14
    _description.text
;
    Recorded [sum|su(net I)|/sum|net I|] in a reflection class.
;
    _name.category_id             diffrn_reflns_class
    _name.object_id               av_suI_over_I
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_diffrn_reflns_class.code

    _definition.id                '_diffrn_reflns_class.code'
    _alias.definition_id          '_diffrn_reflns_class_code'
    _definition.update            2021-10-27
    _description.text
;
    Code identifying a reflection class.
;
    _name.category_id             diffrn_reflns_class
    _name.object_id               code
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _description_example.case     m2

save_

save_diffrn_reflns_class.d_res_high

    _definition.id                '_diffrn_reflns_class.d_res_high'
    _alias.definition_id          '_diffrn_reflns_class_d_res_high'
    _definition.update            2012-11-26
    _description.text
;
    Highest resolution in reflection class i.e. smallest d value in class.
;
    _name.category_id             diffrn_reflns_class
    _name.object_id               d_res_high
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_diffrn_reflns_class.d_res_low

    _definition.id                '_diffrn_reflns_class.d_res_low'
    _alias.definition_id          '_diffrn_reflns_class_d_res_low'
    _definition.update            2012-11-26
    _description.text
;
    Lowest resolution in reflection class i.e. largest d value in class.
;
    _name.category_id             diffrn_reflns_class
    _name.object_id               d_res_low
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_diffrn_reflns_class.description

    _definition.id                '_diffrn_reflns_class.description'
    _alias.definition_id          '_diffrn_reflns_class_description'
    _definition.update            2012-11-26
    _description.text
;
    Description of a reflection class.
;
    _name.category_id             diffrn_reflns_class
    _name.object_id               description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'm=1 first order satellites'

save_

save_diffrn_reflns_class.number

    _definition.id                '_diffrn_reflns_class.number'
    _alias.definition_id          '_diffrn_reflns_class_number'
    _definition.update            2021-03-01
    _description.text
;
    Number of measured intensities for a reflection class, excluding
    the systematic absences arising from centring translations.
;
    _name.category_id             diffrn_reflns_class
    _name.object_id               number
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_DIFFRN_REFLNS_TRANSF_MATRIX

    _definition.id                DIFFRN_REFLNS_TRANSF_MATRIX
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-26
    _description.text
;
    The category of data items which specify the elements of the matrix
    used to transform the reflection indices _diffrn_refln.hkl
    into _refln.hkl.
                                |11 12 13|
           (h k l) diffraction  |21 22 23|  =  (h' k' l')
                                |31 32 33|
;
    _name.category_id             DIFFRN_REFLNS
    _name.object_id               DIFFRN_REFLNS_TRANSF_MATRIX

save_

save_diffrn_reflns_transf_matrix.11

    _definition.id                '_diffrn_reflns_transf_matrix.11'

    loop_
      _alias.definition_id
         '_diffrn_reflns_transf_matrix_11'
         '_diffrn_reflns.transf_matrix[1][1]'

    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               11

    _import.get
        [{'file':templ_attr.cif  'save':transf_matrix}]

save_

save_diffrn_reflns_transf_matrix.12

    _definition.id                '_diffrn_reflns_transf_matrix.12'

    loop_
      _alias.definition_id
         '_diffrn_reflns_transf_matrix_12'
         '_diffrn_reflns.transf_matrix[1][2]'

    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               12

    _import.get
        [{'file':templ_attr.cif  'save':transf_matrix}]

save_

save_diffrn_reflns_transf_matrix.13

    _definition.id                '_diffrn_reflns_transf_matrix.13'

    loop_
      _alias.definition_id
         '_diffrn_reflns_transf_matrix_13'
         '_diffrn_reflns.transf_matrix[1][3]'

    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               13

    _import.get
        [{'file':templ_attr.cif  'save':transf_matrix}]

save_

save_diffrn_reflns_transf_matrix.21

    _definition.id                '_diffrn_reflns_transf_matrix.21'

    loop_
      _alias.definition_id
         '_diffrn_reflns_transf_matrix_21'
         '_diffrn_reflns.transf_matrix[2][1]'

    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               21

    _import.get
        [{'file':templ_attr.cif  'save':transf_matrix}]

save_

save_diffrn_reflns_transf_matrix.22

    _definition.id                '_diffrn_reflns_transf_matrix.22'

    loop_
      _alias.definition_id
         '_diffrn_reflns_transf_matrix_22'
         '_diffrn_reflns.transf_matrix[2][2]'

    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               22

    _import.get
        [{'file':templ_attr.cif  'save':transf_matrix}]

save_

save_diffrn_reflns_transf_matrix.23

    _definition.id                '_diffrn_reflns_transf_matrix.23'

    loop_
      _alias.definition_id
         '_diffrn_reflns_transf_matrix_23'
         '_diffrn_reflns.transf_matrix[2][3]'

    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               23

    _import.get
        [{'file':templ_attr.cif  'save':transf_matrix}]

save_

save_diffrn_reflns_transf_matrix.31

    _definition.id                '_diffrn_reflns_transf_matrix.31'

    loop_
      _alias.definition_id
         '_diffrn_reflns_transf_matrix_31'
         '_diffrn_reflns.transf_matrix[3][1]'

    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               31

    _import.get
        [{'file':templ_attr.cif  'save':transf_matrix}]

save_

save_diffrn_reflns_transf_matrix.32

    _definition.id                '_diffrn_reflns_transf_matrix.32'

    loop_
      _alias.definition_id
         '_diffrn_reflns_transf_matrix_32'
         '_diffrn_reflns.transf_matrix[3][2]'

    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               32

    _import.get
        [{'file':templ_attr.cif  'save':transf_matrix}]

save_

save_diffrn_reflns_transf_matrix.33

    _definition.id                '_diffrn_reflns_transf_matrix.33'

    loop_
      _alias.definition_id
         '_diffrn_reflns_transf_matrix_33'
         '_diffrn_reflns.transf_matrix[3][3]'

    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               33

    _import.get
        [{'file':templ_attr.cif  'save':transf_matrix}]

save_

save_diffrn_reflns_transf_matrix.tij

    _definition.id                '_diffrn_reflns_transf_matrix.TIJ'
    _definition.update            2021-03-01
    _description.text
;
    Elements of the matrix used to transform the diffraction reflection
    indices _diffrn_refln.hkl into the _refln.hkl indices.
                                 |11 12 13|
            (h k l) diffraction  |21 22 23|  =  (h' k' l')
                                 |31 32 33|
;
    _name.category_id             diffrn_reflns_transf_matrix
    _name.object_id               TIJ
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With t as diffrn_reflns_transf_matrix

         _diffrn_reflns_transf_matrix.TIJ =  [[t.11, t.12, t.13],
                                              [t.21, t.22, t.23],
                                              [t.31, t.32, t.33]]
;

save_

save_DIFFRN_SCALE_GROUP

    _definition.id                DIFFRN_SCALE_GROUP
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the groups of reflections in
    the raw measured diffraction data with different relative scales.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_SCALE_GROUP
    _category_key.name            '_diffrn_scale_group.code'

save_

save_diffrn_scale_group.code

    _definition.id                '_diffrn_scale_group.code'
    _alias.definition_id          '_diffrn_scale_group_code'
    _definition.update            2023-11-14
    _description.text
;
    Code identifying a specific scale group of reflections (e.g. for
    multi-film or multi-crystal data).
;
    _name.category_id             diffrn_scale_group
    _name.object_id               code
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    loop_
      _description_example.case
         1
         2
         3
         s1
         A
         B
         c1
         c2
         c3

save_

save_diffrn_scale_group.i_net

    _definition.id                '_diffrn_scale_group.I_net'
    _alias.definition_id          '_diffrn_scale_group_I_net'
    _definition.update            2021-03-03
    _description.text
;
    Scale for a specific measurement group of reflections. Is multiplied
    with the net intensity to place all intensities on a common scale.
;
    _name.category_id             diffrn_scale_group
    _name.object_id               I_net
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_diffrn_scale_group.i_net_su

    _definition.id                '_diffrn_scale_group.I_net_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_scale_group.I_net.
;
    _name.category_id             diffrn_scale_group
    _name.object_id               I_net_su
    _name.linked_item_id          '_diffrn_scale_group.I_net'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_DIFFRN_SOURCE

    _definition.id                DIFFRN_SOURCE
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-26
    _description.text
;
    The category of data items which specify information about the
    radiation source.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_SOURCE

save_

save_diffrn_source.beamline

    _definition.id                '_diffrn_source.beamline'
    _definition.update            2021-03-01
    _description.text
;
    The name of the beamline at the synchrotron or other
    large-scale experimental facility at which the experiment
    was conducted.
;
    _name.category_id             diffrn_source
    _name.object_id               beamline
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     I19

save_

save_diffrn_source.convergence_angle

    _definition.id                '_diffrn_source.convergence_angle'
    _definition.update            2024-07-11
    _description.text
;
    The angle of convergence of the source beam (for example in
    convergent-beam electron diffraction). The convergence angle
    is the angular spread of the cone of illumination (i.e. 2α,
    where the semi-angle α is measured from the axis defining the
    beam direction).
;
    _name.category_id             diffrn_source
    _name.object_id               convergence_angle
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   degrees

save_

save_diffrn_source.current

    _definition.id                '_diffrn_source.current'
    _alias.definition_id          '_diffrn_source_current'
    _definition.update            2012-11-26
    _description.text
;
    Generator current at which the radiation source device was operated.
;
    _name.category_id             diffrn_source
    _name.object_id               current
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   milliamperes

save_

save_diffrn_source.description

    _definition.id                '_diffrn_source.description'

    loop_
      _definition_replaced.id
      _definition_replaced.by
         1                        '_diffrn_source.device'
         2                        '_diffrn_source.details'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_diffrn_source'                                            .
         '_diffrn_radiation_source'                                  1997-01-20
         '_diffrn_source.source'                                     .

    _definition.update            2024-02-14
    _description.text
;
    The general class of the source of radiation. This is deprecated.
    Use _diffrn_source.device and _diffrn_source.details.
;
    _name.category_id             diffrn_source
    _name.object_id               description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_diffrn_source.details

    _definition.id                '_diffrn_source.details'
    _alias.definition_id          '_diffrn_source_details'
    _definition.update            2021-08-18
    _description.text
;
    A description of special aspects of the source not covered by
    other data items.
;
    _name.category_id             diffrn_source
    _name.object_id               details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_diffrn_source.device

    _definition.id                '_diffrn_source.device'
    _definition.update            2018-02-26
    _description.text
;
    Enumerated code for the device providing the source of radiation.
;
    _name.category_id             diffrn_source
    _name.object_id               device
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         tube                     'Sealed X-ray tube.'
         nuclear                  'Nuclear reactor.'
         spallation               'Spallation source.'
         elect-micro              'Electron microscope.'
         rot_anode                'Rotating-anode X-ray tube.'
         synch                    'Synchrotron.'

save_

save_diffrn_source.ed_diffracting_area_selection

    _definition.id                '_diffrn_source.ed_diffracting_area_selection'
    _definition.update            2024-12-02
    _description.text
;
    Enumerated code for the technique in electron diffraction used to
    select the region of the sample from which the diffraction pattern
    is obtained.
;
    _name.category_id             diffrn_source
    _name.object_id               ed_diffracting_area_selection
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         probe  'Diffraction region selected by the size of the probe (= beam)'
         SAED   'Selected-area electron diffraction'

save_

save_diffrn_source.facility

    _definition.id                '_diffrn_source.facility'
    _definition.update            2020-09-18
    _description.text
;
    The name of the synchrotron or other large-scale
    experimental facility at which the experiment was
    conducted. Names should conform to the spelling and
    format used in the 'Light Sources of the World' listing
    of lightsources.org
    (https://lightsources.org/lightsources-of-the-world/)
;
    _name.category_id             diffrn_source
    _name.object_id               facility
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Diamond Light Source'

save_

save_diffrn_source.make

    _definition.id                '_diffrn_source.make'

    loop_
      _alias.definition_id
         '_diffrn_source_make'
         '_diffrn_source.type'
         '_diffrn_source_type'

    _definition.update            2021-07-26
    _description.text
;
    Description of the make, model or name of the source device.
    Large scale facilities should use _diffrn_source.facility and
    _diffrn_source.beamline to identify the source of radiation.
;
    _name.category_id             diffrn_source
    _name.object_id               make
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Rigaku RU2012-05-07'

save_

save_diffrn_source.power

    _definition.id                '_diffrn_source.power'
    _alias.definition_id          '_diffrn_source_power'
    _definition.update            2012-11-26
    _description.text
;
    Generator power at which the radiation source device was operated.
;
    _name.category_id             diffrn_source
    _name.object_id               power
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kilowatts

save_

save_diffrn_source.size

    _definition.id                '_diffrn_source.size'
    _alias.definition_id          '_diffrn_source_size'
    _definition.update            2012-11-26
    _description.text
;
    Description of the collimated source beam as viewed from the sample.
;
    _name.category_id             diffrn_source
    _name.object_id               size
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         '8 mm x 0.4 mm fine-focus'
         'broad focus'
         '300 nm electron beam in NBED (nano-beam electron diffraction)'
         '1 micrometre aperture size in SAED (selected-aperture el. diffr.)'

save_

save_diffrn_source.take_off_angle

    _definition.id                '_diffrn_source.take_off_angle'

    loop_
      _alias.definition_id
         '_diffrn_source_take-off_angle'
         '_diffrn_source.take-off_angle'

    _definition.update            2013-02-22
    _description.text
;
    The complement of the angle in degrees between the normal
    to the surface of the X-ray tube target and the primary
    X-ray beam for beams generated by traditional X-ray tubes.
;
    _name.category_id             diffrn_source
    _name.object_id               take_off_angle
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:90.0
    _units.code                   degrees

save_

save_diffrn_source.target

    _definition.id                '_diffrn_source.target'
    _alias.definition_id          '_diffrn_source_target'
    _definition.update            2021-10-27
    _description.text
;
    Chemical element symbol for the radiation source target (usually
    the anode). This can be used also for spallation sources.
;
    _name.category_id             diffrn_source
    _name.object_id               target
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    _import.get
        [{'file':templ_enum.cif  'save':element_symbol}]

save_

save_diffrn_source.voltage

    _definition.id                '_diffrn_source.voltage'
    _alias.definition_id          '_diffrn_source_voltage'
    _definition.update            2012-11-26
    _description.text
;
    Generator voltage at which the radiation source device was operated.
;
    _name.category_id             diffrn_source
    _name.object_id               voltage
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kilovolts

save_

save_DIFFRN_STANDARDS

    _definition.id                DIFFRN_STANDARDS
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2023-01-10
    _description.text
;
    The category of data items which specify information about the
    standard reflections used in the diffraction measurement process.
;
    _name.category_id             DIFFRN
    _name.object_id               DIFFRN_STANDARDS

save_

save_diffrn_standards.decay_percent

    _definition.id                '_diffrn_standards.decay_percent'

    loop_
      _alias.definition_id
         '_diffrn_standards_decay_%'
         '_diffrn_standards.decay_%'
         '_diffrn_standards_decay_percent'

    _definition.update            2023-01-13
    _description.text
;
    The percentage decrease in the mean of the intensities for the
    standard reflections at the start to the finish of the measurement
    process. This value affords a measure of the overall decay in
    crystal quality during measurement. Negative values only occur in
    exceptional instances where the final intensities are greater than
    the initial ones. If no measurable decay has occurred, the
    standard uncertainty should be quoted to indicate the maximum
    possible value the decay might have. A range of 3 standard
    uncertainties is considered possible. Thus 0.0(1) would indicate
    a decay of less than 0.3% or an enhancement of less than 0.3%.
;
    _name.category_id             diffrn_standards
    _name.object_id               decay_percent
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            :100.0
    _units.code                   none

    loop_
      _description_example.case
      _description_example.detail
         0.5(1)         'Represents a decay between 0.2% and 0.8%.'
         -1(1)          'Change in standards between 2% decay and 4% rise.'
         0.0(2)         'Change in standards between 0.6% decay and 0.6% rise.'

save_

save_diffrn_standards.decay_percent_su

    _definition.id                '_diffrn_standards.decay_percent_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_standards.decay_percent.
;
    _name.category_id             diffrn_standards
    _name.object_id               decay_percent_su
    _name.linked_item_id          '_diffrn_standards.decay_percent'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_diffrn_standards.interval_count

    _definition.id                '_diffrn_standards.interval_count'
    _alias.definition_id          '_diffrn_standards_interval_count'
    _definition.update            2023-01-10
    _description.text
;
    Reflection count between the standard reflection measurements.
;
    _name.category_id             diffrn_standards
    _name.object_id               interval_count
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_diffrn_standards.interval_time

    _definition.id                '_diffrn_standards.interval_time'
    _alias.definition_id          '_diffrn_standards_interval_time'
    _definition.update            2023-01-10
    _description.text
;
    Time between the standard reflection measurements.
;
    _name.category_id             diffrn_standards
    _name.object_id               interval_time
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   minutes

save_

save_diffrn_standards.number

    _definition.id                '_diffrn_standards.number'
    _alias.definition_id          '_diffrn_standards_number'
    _definition.update            2023-01-10
    _description.text
;
    Number of unique standard reflections used in measurements.
;
    _name.category_id             diffrn_standards
    _name.object_id               number
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_diffrn_standards.scale_su_average

    _definition.id                '_diffrn_standards.scale_su_average'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_diffrn_standards_scale_sigma'                             1999-03-24
         '_diffrn_standards.scale_sigma'                             .
         '_diffrn_standards.scale_u'                                 .
         '_diffrn_standards_scale_u'                                 .

    _definition.update            2024-02-14
    _description.text
;
    The average standard uncertainty of the individual standard scales
    applied to the intensity data.
;
    _name.category_id             diffrn_standards
    _name.object_id               scale_su_average
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_diffrn_standards.scale_su_average_su

    _definition.id                '_diffrn_standards.scale_su_average_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _diffrn_standards.scale_su_average.
;
    _name.category_id             diffrn_standards
    _name.object_id               scale_su_average_su
    _name.linked_item_id          '_diffrn_standards.scale_su_average'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_DIFFRN_STANDARD_REFLN

    _definition.id                DIFFRN_STANDARD_REFLN
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the "standard" reflections
    measured repeatedly to monitor variations in intensity due to source
    flux, environment conditions or crystal quality.
;
    _name.category_id             DIFFRN_STANDARDS
    _name.object_id               DIFFRN_STANDARD_REFLN

    loop_
      _category_key.name
         '_diffrn_standard_refln.index_h'
         '_diffrn_standard_refln.index_k'
         '_diffrn_standard_refln.index_l'

save_

save_diffrn_standard_refln.code

    _definition.id                '_diffrn_standard_refln.code'

    loop_
      _alias.definition_id
         '_diffrn_standard_refln_code'
         '_diffrn_standard_refln.diffrn_id'

    _definition.update            2021-10-27
    _description.text
;
    Code identifying a standard reflection used to monitor source
    intensity variations or crystal degradation or movement during
    data collection.
;
    _name.category_id             diffrn_standard_refln
    _name.object_id               code
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _description_example.case     s1

save_

save_diffrn_standard_refln.hkl

    _definition.id                '_diffrn_standard_refln.hkl'
    _definition.update            2021-03-01
    _description.text
;
    Miller indices of a standard reflection.
;
    _name.category_id             diffrn_standard_refln
    _name.object_id               hkl
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With d as diffrn_standard_refln

     _diffrn_standard_refln.hkl =  [d.index_h, d.index_h, d.index_l]
;

save_

save_diffrn_standard_refln.index_h

    _definition.id                '_diffrn_standard_refln.index_h'
    _alias.definition_id          '_diffrn_standard_refln_index_h'
    _name.category_id             diffrn_standard_refln
    _name.object_id               index_h

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_standard_refln.index_k

    _definition.id                '_diffrn_standard_refln.index_k'
    _alias.definition_id          '_diffrn_standard_refln_index_k'
    _name.category_id             diffrn_standard_refln
    _name.object_id               index_k

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_diffrn_standard_refln.index_l

    _definition.id                '_diffrn_standard_refln.index_l'
    _alias.definition_id          '_diffrn_standard_refln_index_l'
    _name.category_id             diffrn_standard_refln
    _name.object_id               index_l

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_REFLN

    _definition.id                REFLN
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2024-11-12
    _description.text
;
    The category of data items used to describe the reflection data
    used in the refinement of a crystallographic structure model.
;
    _name.category_id             DIFFRACTION
    _name.object_id               REFLN
    _category_key.name            '_refln.id'

save_

save_refln.a_calc

    _definition.id                '_refln.A_calc'
    _alias.definition_id          '_refln_A_calc'
    _definition.update            2012-11-26
    _description.text
;
    The calculated real structure-factor component A =|Fcalc|cos(phase).
;
    _name.category_id             refln
    _name.object_id               A_calc
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real

    loop_
      _method.purpose
      _method.expression
         Definition
;
              If (_diffrn_radiation.probe == "neutron")
                                              _units.code = "femtometres"
         Else If (_diffrn_radiation.probe == "electron")
                                              _units.code =  "volts"
         Else                                 _units.code =  "electrons"
;
         Evaluation
;
         _refln.A_calc =  Real ( _refln.F_complex )
;

save_

save_refln.a_calc_su

    _definition.id                '_refln.A_calc_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refln.A_calc.
;
    _name.category_id             refln
    _name.object_id               A_calc_su
    _name.linked_item_id          '_refln.A_calc'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.a_meas

    _definition.id                '_refln.A_meas'
    _alias.definition_id          '_refln_A_meas'
    _definition.update            2012-11-26
    _description.text
;
    The measured real structure-factor component A =|Fmeas|cos(phase).
;
    _name.category_id             refln
    _name.object_id               A_meas
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.a_meas_su

    _definition.id                '_refln.A_meas_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refln.A_meas.
;
    _name.category_id             refln
    _name.object_id               A_meas_su
    _name.linked_item_id          '_refln.A_meas'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.b_calc

    _definition.id                '_refln.B_calc'
    _alias.definition_id          '_refln_B_calc'
    _definition.update            2012-11-26
    _description.text
;
    The calculated imaginary structure-factor component B =|Fcalc|sin(phase).
;
    _name.category_id             refln
    _name.object_id               B_calc
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real

    loop_
      _method.purpose
      _method.expression
         Definition
;
              If (_diffrn_radiation.probe == "neutron")
                                              _units.code = "femtometres"
         Else If (_diffrn_radiation.probe == "electron")
                                              _units.code =  "volts"
         Else                                 _units.code =  "electrons"
;
         Evaluation
;
         _refln.B_calc =  Imag ( _refln.F_complex )
;

save_

save_refln.b_calc_su

    _definition.id                '_refln.B_calc_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refln.B_calc.
;
    _name.category_id             refln
    _name.object_id               B_calc_su
    _name.linked_item_id          '_refln.B_calc'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.b_meas

    _definition.id                '_refln.B_meas'
    _alias.definition_id          '_refln_B_meas'
    _definition.update            2012-11-26
    _description.text
;
    The measured imaginary structure-factor component B =|Fmeas|sin(phase).
;
    _name.category_id             refln
    _name.object_id               B_meas
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.b_meas_su

    _definition.id                '_refln.B_meas_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refln.B_meas.
;
    _name.category_id             refln
    _name.object_id               B_meas_su
    _name.linked_item_id          '_refln.B_meas'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.class_code

    _definition.id                '_refln.class_code'
    _alias.definition_id          '_refln_class_code'
    _definition.update            2021-10-27
    _description.text
;
    Code identifying the class to which this reflection has been
    assigned. This code must match a value of _reflns_class.code.
    Reflections may be grouped into classes for a variety of
    purposes. For example, for modulated structures each reflection
    class may be defined by the number m=sum|m~i~|, where the m~i~
    are the integer coefficients that, in addition to h,k,l, index
    the corresponding diffraction vector in the basis defined
    for the reciprocal lattice.
;
    _name.category_id             refln
    _name.object_id               class_code
    _name.linked_item_id          '_reflns_class.code'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_refln.d_spacing

    _definition.id                '_refln.d_spacing'
    _alias.definition_id          '_refln_d_spacing'
    _definition.update            2012-11-26
    _description.text
;
    The distance in angstroms between lattice planes in the crystal
    with the indices _refln.hkl for this reflection.
;
    _name.category_id             refln
    _name.object_id               d_spacing
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    _refln.d_spacing = 1 / (2 * _refln.sin_theta_over_lambda)
;

save_

save_refln.f_calc

    _definition.id                '_refln.F_calc'
    _alias.definition_id          '_refln_F_calc'
    _definition.update            2013-02-21
    _description.text
;
    The structure-factor amplitude for the reflection calculated from
    the atom site data.
;
    _name.category_id             refln
    _name.object_id               F_calc
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real

    loop_
      _method.purpose
      _method.expression
         Definition
;
              If (_diffrn_radiation.probe == "neutron")
                                              _units.code = "femtometres"
         Else If (_diffrn_radiation.probe == "electron")
                                              _units.code =  "volts"
         Else                                 _units.code =  "electrons"
;
         Evaluation
;
         _refln.F_calc  =   Magn ( _refln.F_complex )
;

save_

save_refln.f_calc_su

    _definition.id                '_refln.F_calc_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refln.F_calc.
;
    _name.category_id             refln
    _name.object_id               F_calc_su
    _name.linked_item_id          '_refln.F_calc'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.f_complex

    _definition.id                '_refln.F_complex'
    _alias.definition_id          '_refln_F_complex'
    _definition.update            2025-05-22
    _description.text
;
    The structure-factor vector for the reflection calculated from
    the atom site data.
;
    _name.category_id             refln
    _name.object_id               F_complex
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Complex

    loop_
      _method.purpose
      _method.expression
         Definition
;
              If (_diffrn_radiation.probe == "neutron")
                                              _units.code = "femtometres"
         Else If (_diffrn_radiation.probe == "electron")
                                              _units.code =  "volts"
         Else                                 _units.code =  "electrons"
;
         Evaluation
;
         With r  as  refln

            fc  =   Complex (0., 0.)
            h   =   r.hkl

         Loop a  as  atom_site  {

                f  =   a.site_symmetry_multiplicity * a.occupancy * (
                               r.form_factor_table [a.type_symbol]      +
                              _atom_type_scat[a.type_symbol].dispersion  )

            Loop s  as  space_group_symop  {

                t   =  Exp(-h * s.R * a.matrix_beta * s.RT * h)

                fc +=  f * t * ExpImag(TwoPi *( h *( s.R * a.fract_xyz + s.T)))
         }  }
                _refln.F_complex  =   fc / _space_group.multiplicity
;

save_

save_refln.f_complex_su

    _definition.id                '_refln.F_complex_su'
    _definition.update            2025-05-22
    _description.text
;
    Standard uncertainty of _refln.F_complex.
;
    _name.category_id             refln
    _name.object_id               F_complex_su
    _name.linked_item_id          '_refln.F_complex'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Single
    _type.contents                Complex
    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.f_meas

    _definition.id                '_refln.F_meas'
    _alias.definition_id          '_refln_F_meas'
    _definition.update            2013-02-21
    _description.text
;
    The structure-factor amplitude for the reflection derived from the
    measured intensities.
;
    _name.category_id             refln
    _name.object_id               F_meas
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.f_meas_su

    _definition.id                '_refln.F_meas_su'

    loop_
      _alias.definition_id
         '_refln_F_sigma'
         '_refln.F_meas_sigma'
         '_refln_F_meas_su'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _refln.F_meas.
;
    _name.category_id             refln
    _name.object_id               F_meas_su
    _name.linked_item_id          '_refln.F_meas'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refln.f_squared_calc

    _definition.id                '_refln.F_squared_calc'
    _alias.definition_id          '_refln_F_squared_calc'
    _definition.update            2012-11-26
    _description.text
;
    The structure-factor amplitude squared for the reflection calculated from
    the atom site data.
;
    _name.category_id             refln
    _name.object_id               F_squared_calc
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")
                                         _units.code =  "femtometre_squared"
    Else If (_diffrn_radiation.probe == "electron")
                                         _units.code =  "volt_squared"
    Else                                 _units.code =  "electron_squared"
;

save_

save_refln.f_squared_calc_su

    _definition.id                '_refln.F_squared_calc_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refln.F_squared_calc.
;
    _name.category_id             refln
    _name.object_id               F_squared_calc_su
    _name.linked_item_id          '_refln.F_squared_calc'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")
                                         _units.code =  "femtometre_squared"
    Else If (_diffrn_radiation.probe == "electron")
                                         _units.code =  "volt_squared"
    Else                                 _units.code =  "electron_squared"
;

save_

save_refln.f_squared_meas

    _definition.id                '_refln.F_squared_meas'
    _alias.definition_id          '_refln_F_squared_meas'
    _definition.update            2013-02-21
    _description.text
;
    The structure-factor amplitude for the reflection derived from the
    measured intensities.
;
    _name.category_id             refln
    _name.object_id               F_squared_meas
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")
                                         _units.code =  "femtometre_squared"
    Else If (_diffrn_radiation.probe == "electron")
                                         _units.code =  "volt_squared"
    Else                                 _units.code =  "electron_squared"
;

save_

save_refln.f_squared_meas_su

    _definition.id                '_refln.F_squared_meas_su'

    loop_
      _alias.definition_id
         '_refln_F_squared_sigma'
         '_refln.F_squared_sigma'
         '_refln_F_squared_meas_su'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _refln.F_squared_meas.
;
    _name.category_id             refln
    _name.object_id               F_squared_meas_su
    _name.linked_item_id          '_refln.F_squared_meas'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")
                                         _units.code =  "femtometre_squared"
    Else If (_diffrn_radiation.probe == "electron")
                                         _units.code =  "volt_squared"
    Else                                 _units.code =  "electron_squared"
;

save_

save_refln.fom

    _definition.id                '_refln.fom'
    _definition.update            2021-03-01
    _description.text
;
    The figure of merit m for this reflection.

        int P~α~ exp(i*α) dα
    m = --------------------
            int P~α~ dα

    P~α~ = the probability that the phase angle α is correct

    int is taken over the range α = 0 to 2 π.
;
    _name.category_id             refln
    _name.object_id               fom
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   none

save_

save_refln.form_factor_table

    _definition.id                '_refln.form_factor_table'
    _definition.update            2023-06-16
    _description.text
;
    Atomic scattering factor table for the scattering angle
    of this diffraction vector and atom types in structure.
;
    _name.category_id             refln
    _name.object_id               form_factor_table
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Table
    _type.contents                Real

    loop_
      _method.purpose
      _method.expression
         Definition
;
         _units.code = "none"

         If (_diffrn_radiation.probe == "neutron")
             _units.code = "femtometres"
;
         Evaluation
;
         With r  as  refln

           table = Table ()
           s  =    r.sin_theta_over_lambda

           Loop t  as  atom_type  {

             If (_diffrn_radiation.probe == 'neutron') {

               f  =   t.length_neutron

             } Else If (s < 2.0 ) {

               c  =   t.Cromer_Mann_coeffs

               f  =  (c[0] + c[1] * Exp (-c[2] * s*s)
                           + c[3] * Exp (-c[4] * s*s)
                           + c[5] * Exp (-c[6] * s*s)
                           + c[7] * Exp (-c[8] * s*s))
             } Else {

               c  =   t.hi_ang_Fox_coeffs

               f  =   Exp ( c[0] + c[1]*s + c[2]*s*s + c[3]*s*s*s )
             }

             table [ t.symbol ]  =   f

           }
         _refln.form_factor_table  =   table
;

save_

save_refln.hkl

    _definition.id                '_refln.hkl'
    _definition.update            2021-03-01
    _description.text
;
    The Miller indices as a reciprocal space vector.
;
    _name.category_id             refln
    _name.object_id               hkl
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With r  as  refln

           _refln.hkl =  [r.index_h, r.index_k, r.index_l]
;

save_

save_refln.id

    _definition.id                '_refln.id'
    _definition.update            2024-11-12
    _description.text
;
    _refln.id must uniquely identify the reflection.

    Note that this item need not be a number; it can be any unique
    identifier.
;
    _name.category_id             refln
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_refln.include_status

    _definition.id                '_refln.include_status'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_refln_include_status'                                     .
         '_refln_observed_status'                                    1999-03-24
         '_refln.observed_status'                                    .
         '_refln.status'                                             .

    _definition.update            2024-02-14
    _description.text
;
    Code indicating how the reflection was included in the refinement
    and R-factor calculations.
;
    _name.category_id             refln
    _name.object_id               include_status
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         o    'ob : within _reflns.threshold_expression; within d-res limits.'
         <    'lt : without _reflns.threshold_expression; within d-res limits.'
         -    'sa : systematically absent reflection due to symmetry.'
         x    'du : deemed unreliable measurement -- not used.'
         h    'hd : above _refine_ls.d_res_high.'
         l    'ld : below _refine_ls.d_res_low.'

save_

save_refln.index_h

    _definition.id                '_refln.index_h'
    _alias.definition_id          '_refln_index_h'
    _name.category_id             refln
    _name.object_id               index_h

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_refln.index_k

    _definition.id                '_refln.index_k'
    _alias.definition_id          '_refln_index_k'
    _name.category_id             refln
    _name.object_id               index_k

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_refln.index_l

    _definition.id                '_refln.index_l'
    _alias.definition_id          '_refln_index_l'
    _name.category_id             refln
    _name.object_id               index_l

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_refln.intensity_calc

    _definition.id                '_refln.intensity_calc'
    _alias.definition_id          '_refln_intensity_calc'
    _definition.update            2012-11-26
    _description.text
;
    The intensity of the reflection calculated from the atom site data.
;
    _name.category_id             refln
    _name.object_id               intensity_calc
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    _refln.intensity_calc  =   _refln.F_squared_calc / _refln.Lp_factor
;

save_

save_refln.intensity_calc_su

    _definition.id                '_refln.intensity_calc_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refln.intensity_calc.
;
    _name.category_id             refln
    _name.object_id               intensity_calc_su
    _name.linked_item_id          '_refln.intensity_calc'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refln.intensity_meas

    _definition.id                '_refln.intensity_meas'
    _alias.definition_id          '_refln_intensity_meas'
    _definition.update            2013-04-11
    _description.text
;
    The intensity of the reflection derived from the diffraction measurements.
;
    _name.category_id             refln
    _name.object_id               intensity_meas
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refln.intensity_meas_su

    _definition.id                '_refln.intensity_meas_su'

    loop_
      _alias.definition_id
         '_refln_intensity_meas_su'
         '_refln.intensity_sigma'
         '_refln_intensity_sigma'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _refln.intensity_meas.
;
    _name.category_id             refln
    _name.object_id               intensity_meas_su
    _name.linked_item_id          '_refln.intensity_meas'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refln.lp_factor

    _definition.id                '_refln.Lp_factor'
    _alias.definition_id          '_refln_Lp_factor'
    _definition.update            2012-11-26
    _description.text
;
    The Lorentz-polarization factor appropriate for the instrument
    used to measure the diffraction intensity. This is applied to
    convert the net intensity into the measured F squared.
;
    _name.category_id             refln
    _name.object_id               Lp_factor
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refln.mean_path_length_tbar

    _definition.id                '_refln.mean_path_length_tbar'
    _alias.definition_id          '_refln_mean_path_length_tbar'
    _definition.update            2012-11-26
    _description.text
;
    Mean path length through the crystal for this diffraction vector.
;
    _name.category_id             refln
    _name.object_id               mean_path_length_tbar
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   millimetres

save_

save_refln.phase_calc

    _definition.id                '_refln.phase_calc'
    _alias.definition_id          '_refln_phase_calc'
    _definition.update            2013-04-27
    _description.text
;
    The phase of the calculated structure-factor.
;
    _name.category_id             refln
    _name.object_id               phase_calc
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:360.0
    _units.code                   degrees
    _method.purpose               Evaluation
    _method.expression
;
    phase  = Atan2d ( _refln.B_calc, _refln.A_calc )
      If(phase < 0.) _refln.phase_calc = phase + 360.
      Else           _refln.phase_calc = phase
;

save_

save_refln.phase_calc_su

    _definition.id                '_refln.phase_calc_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refln.phase_calc.
;
    _name.category_id             refln
    _name.object_id               phase_calc_su
    _name.linked_item_id          '_refln.phase_calc'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refln.phase_meas

    _definition.id                '_refln.phase_meas'
    _alias.definition_id          '_refln_phase_meas'
    _definition.update            2012-11-26
    _description.text
;
    The phase of the measured structure-factor. This may be derived from
    the atom site data if available or from the phase solution process
    prior to determination of the structure.
;
    _name.category_id             refln
    _name.object_id               phase_meas
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:360.0
    _units.code                   degrees

save_

save_refln.phase_meas_su

    _definition.id                '_refln.phase_meas_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refln.phase_meas.
;
    _name.category_id             refln
    _name.object_id               phase_meas_su
    _name.linked_item_id          '_refln.phase_meas'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refln.refinement_status

    _definition.id                '_refln.refinement_status'
    _alias.definition_id          '_refln_refinement_status'
    _definition.update            2012-11-26
    _description.text
;
    Status code of reflection in the structure refinement process.
;
    _name.category_id             refln
    _name.object_id               refinement_status
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         incl                     'Included in ls process.'
         excl                     'Excluded from ls process.'
         extn                     'Excluded due to extinction.'

save_

save_refln.scale_group_code

    _definition.id                '_refln.scale_group_code'
    _alias.definition_id          '_refln_scale_group_code'
    _definition.update            2021-11-04
    _description.text
;
    Code identifying the scale (if there is more than one scale) used
    convert the measured structure factor to a common absolute value.
;
    _name.category_id             refln
    _name.object_id               scale_group_code
    _name.linked_item_id          '_reflns_scale.group_code'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_refln.sin_theta_over_lambda

    _definition.id                '_refln.sin_theta_over_lambda'

    loop_
      _alias.definition_id
         '_refln_sint/lambda'
         '_refln_sin_theta_over_lambda'
         '_refln.sint_over_lambda'

    _definition.update            2013-03-07
    _description.text
;
    The sin(θ)/λ value for this reflection.
;
    _name.category_id             refln
    _name.object_id               sin_theta_over_lambda
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
    With r  as  refln
                           h =  r.hkl
                           G =  _cell.reciprocal_metric_tensor

    r.sin_theta_over_lambda  =   Sqrt ( h * G * h ) / 2.
;

save_

save_refln.symmetry_epsilon

    _definition.id                '_refln.symmetry_epsilon'
    _alias.definition_id          '_refln_symmetry_epsilon'
    _definition.update            2021-03-01
    _description.text
;
    The symmetry reinforcement factor corresponding to the number of
    times the reflection indices are generated identically from the
    space-group symmetry operations.
;
    _name.category_id             refln
    _name.object_id               symmetry_epsilon
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:48
    _units.code                   none

save_

save_refln.symmetry_multiplicity

    _definition.id                '_refln.symmetry_multiplicity'
    _alias.definition_id          '_refln_symmetry_multiplicity'
    _definition.update            2025-06-18
    _description.text
;
    The number of reflections symmetry-equivalent under the Laue
    symmetry to the present reflection. In the Laue symmetry, Friedel
    opposites (h k l and -h -k -l) are equivalent. Tables of
    symmetry-equivalent reflections are available in International
    Tables for Crystallography, Volume A (2016), Table 3.2.3.2.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             refln
    _name.object_id               symmetry_multiplicity
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:48
    _units.code                   none

save_

save_refln.wavelength

    _definition.id                '_refln.wavelength'
    _alias.definition_id          '_refln_wavelength'
    _definition.update            2012-11-26
    _description.text
;
    The mean wavelength in angstroms of radiation used to measure
    this reflection. This is an important parameter for data
    collected using energy-dispersive detectors or the Laue method.
;
    _name.category_id             refln
    _name.object_id               wavelength
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_refln.wavelength_id

    _definition.id                '_refln.wavelength_id'
    _alias.definition_id          '_refln_wavelength_id'
    _definition.update            2021-10-27
    _description.text
;
    Code identifying the wavelength in DIFFRN_RADIATION_WAVELENGTH list.
;
    _name.category_id             refln
    _name.object_id               wavelength_id
    _name.linked_item_id          '_diffrn_radiation_wavelength.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_REFLNS

    _definition.id                REFLNS
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-26
    _description.text
;
    The category of data items used to specify parameters for the complete
    set of reflections used in the structure refinement process. Note that
    these parameters are often similar measures to those defined in the
    DIFFRN categories, but differ in that the parameters refer to the
    reduced/transformed reflections which have been used to refine the
    atom site data in the ATOM_SITE category. The DIFFRN definitions refer
    to the diffraction measurements and the raw reflection data.
;
    _name.category_id             DIFFRACTION
    _name.object_id               REFLNS

save_

save_reflns.apply_dispersion_to_fcalc

    _definition.id                '_reflns.apply_dispersion_to_Fcalc'
    _definition.update            2019-01-09
    _description.text
;
    Yes or No flag on whether the anomalous dispersion scattering
    components will be applied in the F complex calculation.
    See _refln.F_complex
;
    _name.category_id             reflns
    _name.object_id               apply_dispersion_to_Fcalc
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         yes                      'Apply dispersion.'
         y                        'Abbreviation for "yes".'
         no                       'Do not apply dispersion.'
         n                        'Abbreviation for "no".'

save_

save_reflns.d_resolution_high

    _definition.id                '_reflns.d_resolution_high'
    _alias.definition_id          '_reflns_d_resolution_high'
    _definition.update            2021-03-03
    _description.text
;
    Highest resolution for the final REFLN data set.
    This corresponds to the smallest interplanar d value.
;
    _name.category_id             reflns
    _name.object_id               d_resolution_high
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_reflns.d_resolution_low

    _definition.id                '_reflns.d_resolution_low'
    _alias.definition_id          '_reflns_d_resolution_low'
    _definition.update            2021-03-03
    _description.text
;
    Lowest resolution for the final REFLN data set.
    This corresponds to the largest interplanar d value.
;
    _name.category_id             reflns
    _name.object_id               d_resolution_low
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_reflns.friedel_coverage

    _definition.id                '_reflns.Friedel_coverage'
    _alias.definition_id          '_reflns_Friedel_coverage'
    _definition.update            2019-01-09
    _description.text
;
    The proportion of Friedel related reflections present in the number of
    the 'independent reflections' specified by the item _reflns.number_total.

    This proportion is calculated as the ratio:

          [N(Crystal class) - N(Laue symmetry)] / N(Laue symmetry)

    where, working from the DIFFRN_REFLN list,

        N(Crystal class) is the number of reflections obtained on
            averaging under the symmetry of the crystal class
        N(Laue symmetry) is the number of reflections obtained on
            averaging under the Laue symmetry.

      (a) For centrosymmetric structures its value is
          necessarily equal to 0.0 as the crystal class
          is identical to the Laue symmetry.
      (b) For whole-sphere data for a crystal in the space
          group P1, _reflns.Friedel_coverage is equal to 1.0,
          as no reflection h k l is equivalent to -h -k -l
          in the crystal class and all Friedel pairs
          {h k l; -h -k -l} have been measured.
      (c) For whole-sphere data in space group Pmm2, the value
          will be < 1.0 because although reflections h k l and
          -h -k -l are not equivalent when h k l indices are
          non-zero, they are when l=0.
      (d) For a crystal in the group Pmm2 measurements of the
          two inequivalent octants h >= 0, k >=0, l lead to the
          same value as in (c), whereas measurements of the
          two equivalent octants h >= 0, k, l >= 0 will lead to
          a zero value for _reflns.Friedel_coverage.
;
    _name.category_id             reflns
    _name.object_id               Friedel_coverage
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_reflns.friedel_fraction_full

    _definition.id                '_reflns.Friedel_fraction_full'
    _alias.definition_id          '_reflns_Friedel_fraction_full'
    _definition.update            2013-01-20
    _description.text
;
    The ratio of Friedel pairs measured to _diffrn_reflns.theta_full
    to the number theoretically possible (ignoring reflections in
    centric projections and systematic absences throughout).
    In contrast to _reflns.Friedel_coverage this can take values in
    the full range 0 to 1 for any non-centrosymmetric space group,
    and so one can see at a glance how completely the Friedel pairs
    have been measured. For centrosymmetric space groups the value
    would be given as not-applicable '.'
;
    _name.category_id             reflns
    _name.object_id               Friedel_fraction_full
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_reflns.friedel_fraction_max

    _definition.id                '_reflns.Friedel_fraction_max'
    _alias.definition_id          '_reflns_Friedel_fraction_max'
    _definition.update            2013-01-20
    _description.text
;
    The ratio of Friedel pairs measured to _diffrn_reflns.theta_max
    to the number theoretically possible (ignoring reflections in
    centric projections and systematic absences throughout).
    In contrast to _reflns.Friedel_coverage this can take values in
    the full range 0 to 1 for any non-centrosymmetric space group,
    and so one can see at a glance how completely the Friedel pairs
    have been measured. For centrosymmetric space groups the value
    would be given as not-applicable '.'
;
    _name.category_id             reflns
    _name.object_id               Friedel_fraction_max
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_reflns.limit_h_max

    _definition.id                '_reflns.limit_h_max'
    _alias.definition_id          '_reflns_limit_h_max'
    _name.category_id             reflns
    _name.object_id               limit_h_max

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_reflns.limit_h_min

    _definition.id                '_reflns.limit_h_min'
    _alias.definition_id          '_reflns_limit_h_min'
    _name.category_id             reflns
    _name.object_id               limit_h_min

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_reflns.limit_k_max

    _definition.id                '_reflns.limit_k_max'
    _alias.definition_id          '_reflns_limit_k_max'
    _name.category_id             reflns
    _name.object_id               limit_k_max

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_reflns.limit_k_min

    _definition.id                '_reflns.limit_k_min'
    _alias.definition_id          '_reflns_limit_k_min'
    _name.category_id             reflns
    _name.object_id               limit_k_min

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_reflns.limit_l_max

    _definition.id                '_reflns.limit_l_max'
    _alias.definition_id          '_reflns_limit_l_max'
    _name.category_id             reflns
    _name.object_id               limit_l_max

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_reflns.limit_l_min

    _definition.id                '_reflns.limit_l_min'
    _alias.definition_id          '_reflns_limit_l_min'
    _name.category_id             reflns
    _name.object_id               limit_l_min

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_reflns.limit_max

    _definition.id                '_reflns.limit_max'
    _definition.update            2013-01-15
    _description.text
;
    Maximum Miller indices of refined diffraction reflections.
;
    _name.category_id             reflns
    _name.object_id               limit_max
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With t as reflns

    _reflns.limit_max = [t.limit_h_max,t.limit_k_max,t.limit_l_max]
;

save_

save_reflns.limit_min

    _definition.id                '_reflns.limit_min'
    _definition.update            2013-01-15
    _description.text
;
    Minimum Miller indices of refined diffraction reflections.
;
    _name.category_id             reflns
    _name.object_id               limit_min
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With t as reflns

    _reflns.limit_min = [t.limit_h_min,t.limit_k_min,t.limit_l_min]
;

save_

save_reflns.number_gt

    _definition.id                '_reflns.number_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_reflns_number_gt'                                         .
         '_reflns_number_observed'                                   1999-03-24
         '_reflns.number_obs'                                        .

    _definition.update            2024-02-14
    _description.text
;
    Count of reflections in the REFLN set (not the DIFFRN_REFLN set) which
    are significantly intense (see _reflns.threshold_expression). It may
    include Friedel equivalent reflections (i.e. those which are equivalent
    under the Laue symmetry but inequivalent under the crystal class),
    depending on the nature of the structure and the procedures used.
;
    _name.category_id             reflns
    _name.object_id               number_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_reflns.number_total

    _definition.id                '_reflns.number_total'

    loop_
      _alias.definition_id
         '_reflns_number_total'
         '_reflns_number_all'
         '_reflns.number_all'

    _definition.update            2023-01-13
    _description.text
;
    Number of reflections in the REFLN set (not the DIFFRN_REFLN set). It may
    include Friedel equivalent reflections (i.e. those which are equivalent
    under the Laue symmetry but inequivalent under the crystal class),
    depending on the nature of the structure and the procedures used.
;
    _name.category_id             reflns
    _name.object_id               number_total
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_reflns.special_details

    _definition.id                '_reflns.special_details'

    loop_
      _alias.definition_id
         '_reflns_special_details'
         '_reflns.details'

    _definition.update            2012-11-26
    _description.text
;
    Description of the properties of the REFLN reflection list that is not
    given in other data items. Should include details about the averaging
    of symmetry-equivalent reflections including Friedel pairs.
;
    _name.category_id             reflns
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_reflns.threshold_expression

    _definition.id                '_reflns.threshold_expression'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_reflns_threshold_expression'                              .
         '_reflns_observed_criterion'                                1999-03-24
         '_reflns.observed_criterion'                                .

    _definition.update            2024-02-14
    _description.text
;
    Description of the criterion used to classify a reflection as having a
    "significant intensity". This criterion is usually expressed in terms
    of a u(I) or u(F) threshold. "u" is the standard uncertainty.
;
    _name.category_id             reflns
    _name.object_id               threshold_expression
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     I>2u(I)

save_

save_REFLNS_CLASS

    _definition.id                REFLNS_CLASS
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the properties of reflections
    in specific classes of reflections.
;
    _name.category_id             REFLNS
    _name.object_id               REFLNS_CLASS
    _category_key.name            '_reflns_class.code'

save_

save_reflns_class.code

    _definition.id                '_reflns_class.code'
    _alias.definition_id          '_reflns_class_code'
    _definition.update            2021-10-27
    _description.text
;
    Code identifying a reflection class.
;
    _name.category_id             reflns_class
    _name.object_id               code
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _description_example.case     c1

save_

save_reflns_class.d_res_high

    _definition.id                '_reflns_class.d_res_high'
    _alias.definition_id          '_reflns_class_d_res_high'
    _definition.update            2021-03-03
    _description.text
;
    Highest resolution for the reflections in this class.
    This corresponds to the smallest interplanar d value.
;
    _name.category_id             reflns_class
    _name.object_id               d_res_high
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_reflns_class.d_res_low

    _definition.id                '_reflns_class.d_res_low'
    _alias.definition_id          '_reflns_class_d_res_low'
    _definition.update            2021-03-03
    _description.text
;
    Lowest resolution for the reflections in this class.
    This corresponds to the largest interplanar d value.
;
    _name.category_id             reflns_class
    _name.object_id               d_res_low
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_reflns_class.description

    _definition.id                '_reflns_class.description'
    _alias.definition_id          '_reflns_class_description'
    _definition.update            2012-11-26
    _description.text
;
    Description of a reflection class.
;
    _name.category_id             reflns_class
    _name.object_id               description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'H0L0 common projection reflections'

save_

save_reflns_class.number_gt

    _definition.id                '_reflns_class.number_gt'

    loop_
      _alias.definition_id
         '_reflns_class_number_observed'
         '_reflns_class_number_gt'

    _definition.update            2023-01-13
    _description.text
;
    Count of reflections in this REFLN class (not the DIFFRN_REFLN set)
    which are significantly intense (see _reflns.threshold_expression). It may
    include Friedel equivalent reflections (i.e. those which are equivalent
    under the Laue symmetry but inequivalent under the crystal class),
    depending on the nature of the structure and the procedures used.
;
    _name.category_id             reflns_class
    _name.object_id               number_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_reflns_class.number_total

    _definition.id                '_reflns_class.number_total'
    _alias.definition_id          '_reflns_class_number_total'
    _definition.update            2023-01-13
    _description.text
;
    Count of reflections in this REFLN class (not the DIFFRN_REFLN set). It
    may include Friedel equivalent reflections (those which are equivalent
    under the Laue symmetry but inequivalent under the crystal class),
    depending on the nature of the structure and the procedures used.
;
    _name.category_id             reflns_class
    _name.object_id               number_total
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_reflns_class.r_factor_all

    _definition.id                '_reflns_class.R_factor_all'
    _alias.definition_id          '_reflns_class_R_factor_all'
    _definition.update            2012-11-26
    _description.text
;
    Residual factor for reflections in this class used in refinement.

                  sum | F(meas) - F(calc) |
       R(F all) = ------------------------
                        sum | F(meas) |

              F(meas) = the measured structure-factor amplitudes
              F(calc) = the calculated structure-factor amplitudes

              and the sum is taken over the specified reflections.
;
    _name.category_id             reflns_class
    _name.object_id               R_factor_all
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_class.r_factor_gt

    _definition.id                '_reflns_class.R_factor_gt'

    loop_
      _alias.definition_id
         '_reflns_class_R_factor_gt'
         '_reflns_class_R_factor_observed'

    _definition.update            2025-06-05
    _description.text
;
    Residual factor for the reflections in this class judged
    significantly intense (i.e. greater than required by the
    _reflns.threshold_expression) and included in the refinement.

                  sum | F(meas_gt) - F(calc) |
       R(F gt) = --------------------------------
                        sum | F(meas_gt) |

              F(meas_gt) = the measured structure-factor amplitudes
              F(calc) = the calculated structure-factor amplitudes

              and the sum is taken over the specified reflections.
;
    _name.category_id             reflns_class
    _name.object_id               R_factor_gt
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_class.r_fsqd_factor

    _definition.id                '_reflns_class.R_Fsqd_factor'
    _alias.definition_id          '_reflns_class_R_Fsqd_factor'
    _definition.update            2012-11-26
    _description.text
;
    Residual factor R(F^2^) for reflections in this class judged
    significantly intense (i.e. greater than required by the
    _reflns.threshold_expression) and included in the refinement.

                         sum | F(meas_gt)^2^ - F(calc)^2^ |
           R(Fsqd gt) = ------------------------------------
                                 sum F(meas_gt)^2^

         F(meas_gt)^2^ = square of the 'observed' structure factors
         F(calc   )^2^ = square of the calculated structure factors

              and the sum is taken over the specified reflections.
;
    _name.category_id             reflns_class
    _name.object_id               R_Fsqd_factor
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_class.r_i_factor

    _definition.id                '_reflns_class.R_I_factor'
    _alias.definition_id          '_reflns_class_R_I_factor'
    _definition.update            2012-11-26
    _description.text
;
    Residual factor R(I) for reflections in this class judged
    significantly intense (i.e. greater than required by the
    _reflns.threshold_expression) and included in the refinement.

                      sum | I(meas_gt) - I(calc) |
           R(I gt) =  ----------------------------
                             sum | I(meas_gt) |

              I(meas_gt) = the net 'observed' intensities
              I(calc   ) = the net calculated intensities

              and the sum is taken over the specified reflections.
;
    _name.category_id             reflns_class
    _name.object_id               R_I_factor
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_class.wr_factor_all

    _definition.id                '_reflns_class.wR_factor_all'
    _alias.definition_id          '_reflns_class_wR_factor_all'
    _definition.update            2012-11-26
    _description.text
;
    For each reflection class, the weighted residual factors for all
    reflections included in the refinement. The reflections also
    satisfy the resolution limits established by
    _reflns_class.d_res_high and _reflns_class.d_res_low.

         ( sum w [ Y(meas) - Y(calc) ]^2^  )^1/2^
    wR = ( ------------------------------- )
         (         sum w Y(meas)^2^        )

        Y(meas) = the measured amplitudes specified by
                  _refine_ls.structure_factor_coef
        Y(calc) = the calculated amplitudes specified by
                  _refine_ls.structure_factor_coef
        w       = the least-squares weights

    and the sum is taken over the reflections of this class.
;
    _name.category_id             reflns_class
    _name.object_id               wR_factor_all
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_REFLNS_SCALE

    _definition.id                REFLNS_SCALE
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the scales needed to place
    measured structure-factor coefficients on the same absolute scale.
;
    _name.category_id             REFLNS
    _name.object_id               REFLNS_SCALE
    _category_key.name            '_reflns_scale.group_code'

save_

save_reflns_scale.group_code

    _definition.id                '_reflns_scale.group_code'
    _alias.definition_id          '_reflns_scale_group_code'
    _definition.update            2021-11-04
    _description.text
;
    Code identifying a reflection scale group. These names need not
    correspond to _diffrn_scale_group.code names.
;
    _name.category_id             reflns_scale
    _name.object_id               group_code
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_reflns_scale.meas_f

    _definition.id                '_reflns_scale.meas_F'
    _alias.definition_id          '_reflns_scale_meas_F'
    _definition.update            2012-11-26
    _description.text
;
    Structure factor scale for this scale group.
;
    _name.category_id             reflns_scale
    _name.object_id               meas_F
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_scale.meas_f_su

    _definition.id                '_reflns_scale.meas_F_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _reflns_scale.meas_F.
;
    _name.category_id             reflns_scale
    _name.object_id               meas_F_su
    _name.linked_item_id          '_reflns_scale.meas_F'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_reflns_scale.meas_f_squared

    _definition.id                '_reflns_scale.meas_F_squared'
    _alias.definition_id          '_reflns_scale_meas_F_squared'
    _definition.update            2012-11-26
    _description.text
;
    Structure factor squared scale for this scale group.
;
    _name.category_id             reflns_scale
    _name.object_id               meas_F_squared
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_scale.meas_f_squared_su

    _definition.id                '_reflns_scale.meas_F_squared_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _reflns_scale.meas_F_squared.
;
    _name.category_id             reflns_scale
    _name.object_id               meas_F_squared_su
    _name.linked_item_id          '_reflns_scale.meas_F_squared'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_reflns_scale.meas_intensity

    _definition.id                '_reflns_scale.meas_intensity'
    _alias.definition_id          '_reflns_scale_meas_intensity'
    _definition.update            2012-11-26
    _description.text
;
    Net intensity scale for this scale group.
;
    _name.category_id             reflns_scale
    _name.object_id               meas_intensity
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_scale.meas_intensity_su

    _definition.id                '_reflns_scale.meas_intensity_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _reflns_scale.meas_intensity.
;
    _name.category_id             reflns_scale
    _name.object_id               meas_intensity_su
    _name.linked_item_id          '_reflns_scale.meas_intensity'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_REFLNS_SHELL

    _definition.id                REFLNS_SHELL
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the information about
    reflections divided into shells bounded by d resolution limits.
;
    _name.category_id             REFLNS
    _name.object_id               REFLNS_SHELL

    loop_
      _category_key.name
         '_reflns_shell.d_res_low'
         '_reflns_shell.d_res_high'

save_

save_reflns_shell.d_res_high

    _definition.id                '_reflns_shell.d_res_high'
    _alias.definition_id          '_reflns_shell_d_res_high'
    _definition.update            2021-03-03
    _description.text
;
    Highest resolution for the reflections in this shell.
    This corresponds to the smallest interplanar d value.
;
    _name.category_id             reflns_shell
    _name.object_id               d_res_high
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_reflns_shell.d_res_limits

    _definition.id                '_reflns_shell.d_res_limits'
    _definition.update            2012-11-26
    _description.text
;
    Resolution for the reflections in this shell stored as
    the list of lowest and highest values. This is the
    category key.
;
    _name.category_id             reflns_shell
    _name.object_id               d_res_limits
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               List
    _type.dimension               '[2]'
    _type.contents                Real
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    With s as reflns_shell

       _reflns_shell.d_res_limits =  [ s.d_res_low, s.d_res_high ]
;

save_

save_reflns_shell.d_res_low

    _definition.id                '_reflns_shell.d_res_low'
    _alias.definition_id          '_reflns_shell_d_res_low'
    _definition.update            2021-03-03
    _description.text
;
    Lowest resolution for the reflections in this shell.
    This corresponds to the largest interplanar d value.
;
    _name.category_id             reflns_shell
    _name.object_id               d_res_low
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_reflns_shell.meani_over_sui_all

    _definition.id                '_reflns_shell.meanI_over_suI_all'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_reflns_shell_meanI_over_uI_all'                           .
         '_reflns_shell_meanI_over_sigI_all'                         1999-03-24
         '_reflns_shell.meanI_over_sigI_all'                         .
         '_reflns_shell.meanI_over_uI_all'                           .

    _definition.update            2024-02-14
    _description.text
;
    Ratio of the mean intensity in a shell to the mean standard uncertainty
    of the intensities in the shell.
;
    _name.category_id             reflns_shell
    _name.object_id               meanI_over_suI_all
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_shell.meani_over_sui_gt

    _definition.id                '_reflns_shell.meanI_over_suI_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_reflns_shell_meanI_over_sigI_obs'                         1999-03-24
         '_reflns_shell.meanI_over_sigI_obs'                         .
         '_reflns_shell.meanI_over_sigI_gt'                          .
         '_reflns_shell_meanI_over_sigI_gt'                          1999-03-24
         '_reflns_shell.meanI_over_uI_gt'                            .
         '_reflns_shell_meanI_over_uI_gt'                            .

    _definition.update            2024-02-14
    _description.text
;
    Ratio of the mean intensity of significantly intense reflections (see
    _reflns.threshold_expression) in this shell to the mean standard
    uncertainty of the intensities in the shell.
;
    _name.category_id             reflns_shell
    _name.object_id               meanI_over_suI_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_shell.number_measured_all

    _definition.id                '_reflns_shell.number_measured_all'
    _alias.definition_id          '_reflns_shell_number_measured_all'
    _definition.update            2021-03-01
    _description.text
;
    Total count of reflections measured for this resolution shell.
;
    _name.category_id             reflns_shell
    _name.object_id               number_measured_all
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_reflns_shell.number_measured_gt

    _definition.id                '_reflns_shell.number_measured_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_reflns_shell_number_measured_obs'                         1999-03-24
         '_reflns_shell.number_measured_obs'                         .
         '_reflns_shell_number_measured_gt'                          .

    _definition.update            2024-02-14
    _description.text
;
    Number of reflections measured for this resolution shell which are
    significantly intense (see _reflns.threshold_expression).
;
    _name.category_id             reflns_shell
    _name.object_id               number_measured_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_reflns_shell.number_possible

    _definition.id                '_reflns_shell.number_possible'

    loop_
      _alias.definition_id
         '_reflns_shell_number_possible'
         '_reflns_shell.number_possible_all'

    _definition.update            2021-03-01
    _description.text
;
    Count of symmetry-unique reflections possible in this reflection shell.
;
    _name.category_id             reflns_shell
    _name.object_id               number_possible
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_reflns_shell.number_unique_all

    _definition.id                '_reflns_shell.number_unique_all'
    _alias.definition_id          '_reflns_shell_number_unique_all'
    _definition.update            2021-03-01
    _description.text
;
    Count of symmetry-unique reflections present in this reflection shell.
;
    _name.category_id             reflns_shell
    _name.object_id               number_unique_all
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_reflns_shell.number_unique_gt

    _definition.id                '_reflns_shell.number_unique_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_reflns_shell_number_unique_gt'                            .
         '_reflns_shell_number_unique_obs'                           1999-03-24
         '_reflns_shell.number_unique_obs'                           .

    _definition.update            2024-02-14
    _description.text
;
    Number of symmetry-unique reflections present in this reflection shell
    which are significantly intense (see _reflns.threshold_expression).
;
    _name.category_id             reflns_shell
    _name.object_id               number_unique_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_reflns_shell.percent_possible_all

    _definition.id                '_reflns_shell.percent_possible_all'
    _alias.definition_id          '_reflns_shell_percent_possible_all'
    _definition.update            2012-11-26
    _description.text
;
    Percentage of reflections present in this shell over that possible.
;
    _name.category_id             reflns_shell
    _name.object_id               percent_possible_all
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:100.0
    _units.code                   none

save_

save_reflns_shell.percent_possible_gt

    _definition.id                '_reflns_shell.percent_possible_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_reflns_shell_percent_possible_gt'                         .
         '_reflns_shell_percent_possible_obs'                        1999-03-24
         '_reflns_shell.percent_possible_obs'                        .

    _definition.update            2024-02-14
    _description.text
;
    Percentage of reflections present in this shell which are significantly
    intense (see _reflns.threshold_expression), over that possible.
;
    _name.category_id             reflns_shell
    _name.object_id               percent_possible_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:100.0
    _units.code                   none

save_

save_reflns_shell.rmerge_f_all

    _definition.id                '_reflns_shell.Rmerge_F_all'
    _alias.definition_id          '_reflns_shell_Rmerge_F_all'
    _definition.update            2012-11-26
    _description.text
;
    Rmerge(F) for all reflections in a given shell.

                    sum~i~ ( sum~j~ | F~j~ - <F> | )
        Rmerge(F) = --------------------------------
                        sum~i~ ( sum~j~ <F> )

        F~j~  = the amplitude of the jth observation of reflection i
        <F> = the mean of the amplitudes of all observations of
               reflection i

        sum~i~ is taken over all reflections
        sum~j~ is taken over all observations of each reflection.
;
    _name.category_id             reflns_shell
    _name.object_id               Rmerge_F_all
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_shell.rmerge_f_gt

    _definition.id                '_reflns_shell.Rmerge_F_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_reflns_shell_Rmerge_F_obs'                                1999-03-24
         '_reflns_shell.Rmerge_F_obs'                                .
         '_reflns_shell_Rmerge_F_gt'                                 .

    _definition.update            2024-02-14
    _description.text
;
    Rmerge(F) for reflections in a shell which are significantly intense
    (see _reflns.threshold_expression). The residual merge expression is
    shown in the _reflns_shell.Rmerge_F_all definition.
;
    _name.category_id             reflns_shell
    _name.object_id               Rmerge_F_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_shell.rmerge_i_all

    _definition.id                '_reflns_shell.Rmerge_I_all'
    _alias.definition_id          '_reflns_shell_Rmerge_I_all'
    _definition.update            2012-11-26
    _description.text
;
    Rmerge(I) for all reflections in a given shell.

                    sum~i~ ( sum~j~ | I~j~ - <I> | )
        Rmerge(I) = --------------------------------
                        sum~i~ ( sum~j~ <I> )

        I~j~  = the intensity of the jth observation of reflection i
        <I> = the mean of the intensities of all observations of
               reflection i

        sum~i~ is taken over all reflections
        sum~j~ is taken over all observations of each reflection.
;
    _name.category_id             reflns_shell
    _name.object_id               Rmerge_I_all
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_reflns_shell.rmerge_i_gt

    _definition.id                '_reflns_shell.Rmerge_I_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_reflns_shell_Rmerge_I_obs'                                1999-03-24
         '_reflns_shell.Rmerge_I_obs'                                .
         '_reflns_shell_Rmerge_I_gt'                                 .

    _definition.update            2024-02-14
    _description.text
;
    Rmerge(I) for reflections in a shell which are significantly intense
    (see _reflns.threshold_expression). The residual merge expression is
    shown in the _reflns_shell.Rmerge_I_all definition.
;
    _name.category_id             reflns_shell
    _name.object_id               Rmerge_I_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_EXPTL

    _definition.id                EXPTL
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2024-05-15
    _description.text
;
    The category of data items used to specify the experimental work
    prior to diffraction measurements. These include crystallization
    crystal measurements and absorption-correction techniques used.
;
    _name.category_id             CIF_CORE_HEAD
    _name.object_id               EXPTL

save_

save_exptl.crystals_number

    _definition.id                '_exptl.crystals_number'
    _alias.definition_id          '_exptl_crystals_number'
    _definition.update            2021-03-01
    _description.text
;
    Total number of crystals used in the measurement of intensities.
;
    _name.category_id             exptl
    _name.object_id               crystals_number
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_exptl.method

    _definition.id                '_exptl.method'
    _definition.update            2014-06-12
    _description.text
;
    The method used in the experiment.
;
    _name.category_id             exptl
    _name.object_id               method
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'single-crystal x-ray diffraction'
         'single-crystal neutron diffraction'
         'single-crystal electron diffraction'
         'fiber x-ray diffraction'
         'fiber neutron diffraction'
         'fiber electron diffraction'
         'single-crystal joint x-ray and neutron diffraction'
         'single-crystal joint x-ray and electron diffraction'
         'solution nmr'
         'solid-state nmr'
         'theoretical model'
         'other'

save_

save_exptl.method_details

    _definition.id                '_exptl.method_details'
    _definition.update            2014-06-12
    _description.text
;
    A description of special aspects of the experimental method.
;
    _name.category_id             exptl
    _name.object_id               method_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         '29 structures'
         'minimized average structure'

save_

save_exptl.special_details

    _definition.id                '_exptl.special_details'

    loop_
      _alias.definition_id
         '_exptl_special_details'
         '_exptl.details'

    _definition.update            2012-11-22
    _description.text
;
    Details of the experiment prior to intensity measurement.
    See also _exptl_crystal.preparation
;
    _name.category_id             exptl
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_exptl.transmission_factor_max

    _definition.id                '_exptl.transmission_factor_max'
    _alias.definition_id          '_exptl_transmission_factor_max'
    _definition.update            2013-04-11
    _description.text
;
    The calculated maximum value of the transmission factor for
    the specimen. Its value does not include the effects of
    absorption in the specimen mount. The presence of this
    item does not imply that the structure factors have been
    corrected for absorption. For the applied correction see
    _exptl_absorpt.correction_T_max.
;
    _name.category_id             exptl
    _name.object_id               transmission_factor_max
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_exptl.transmission_factor_max_su

    _definition.id                '_exptl.transmission_factor_max_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl.transmission_factor_max.
;
    _name.category_id             exptl
    _name.object_id               transmission_factor_max_su
    _name.linked_item_id          '_exptl.transmission_factor_max'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl.transmission_factor_min

    _definition.id                '_exptl.transmission_factor_min'
    _alias.definition_id          '_exptl_transmission_factor_min'
    _definition.update            2013-04-11
    _description.text
;
    The calculated minimum value of the transmission factor for
    the specimen. Its value does not include the effects of
    absorption in the specimen mount. The presence of this
    item does not imply that the structure factors have been
    corrected for absorption. For the applied correction see
    _exptl_absorpt.correction_T_min.
;
    _name.category_id             exptl
    _name.object_id               transmission_factor_min
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_exptl.transmission_factor_min_su

    _definition.id                '_exptl.transmission_factor_min_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl.transmission_factor_min.
;
    _name.category_id             exptl
    _name.object_id               transmission_factor_min_su
    _name.linked_item_id          '_exptl.transmission_factor_min'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_CHEMICAL

    _definition.id                CHEMICAL
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-22
    _description.text
;
    The category of data items which describe the composition and
    chemical properties of the compound under study. The formula data
    items must be consistent with the density, unit-cell and Z values.
;
    _name.category_id             EXPTL
    _name.object_id               CHEMICAL

save_

save_chemical.absolute_configuration

    _definition.id                '_chemical.absolute_configuration'
    _alias.definition_id          '_chemical_absolute_configuration'
    _definition.update            2023-02-02
    _description.text
;
    Necessary conditions for this assignment are given by H. D. Flack
    and G. Bernardinelli (1999, 2000).

    Ref: Flack, H. D. & Bernardinelli, G. (1999). Acta Cryst. A55, 908-915.
                https://doi.org/10.1107/S0108767399004262
         Flack, H. D. & Bernardinelli, G. (2000). J. Appl. Cryst. 33, 1143-1148.
                https://doi.org/10.1107/S0021889800007184
;
    _name.category_id             chemical
    _name.object_id               absolute_configuration
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         rm
;
         'reference molecule' Absolute configuration established by the
         structure determination of a compound containing a chiral reference
         molecule of known absolute configuration.
;
         ad
;
         'anomalous dispersion' Absolute configuration established by
         anomalous-dispersion effects in diffraction measurements on
         the crystal.
;
         dyn
;
         Absolute configuration determined directly from dynamical refinement.
;
         rmad
;
         'rm + ad' Absolute configuration established by the structure
         determination of a compound containing a chiral reference molecule of
         known absolute configuration and confirmed by anomalous-dispersion
         effects in diffraction measurements on the crystal.
;
         syn
;
         'synthetic' Absolute configuration has not been established by
         anomalous-dispersion effects in diffraction measurements on the
         crystal. The enantiomer has been assigned by reference to an
         unchanging chiral centre in the synthetic procedure.
;
         unk
;
         'unknown' No firm chemical or anomalous-dispersion evidence for
         an assignment is available. An arbitrary choice of enantiomer
         has been made.
;
         .
;
         Inapplicable.
;

save_

save_chemical.compound_source

    _definition.id                '_chemical.compound_source'
    _alias.definition_id          '_chemical_compound_source'
    _definition.update            2023-01-13
    _description.text
;
    Description of the source of the compound under study, or of the
    parent molecule if a simple derivative is studied. This includes
    the place of discovery for minerals or the actual source of a
    natural product.
;
    _name.category_id             chemical
    _name.object_id               compound_source
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_chemical.enantioexcess_bulk

    _definition.id                '_chemical.enantioexcess_bulk'
    _alias.definition_id          '_chemical_enantioexcess_bulk'
    _definition.update            2023-02-02
    _description.text
;
    The enantioexcess of the bulk material from which the crystals
    were grown. A value of 0.0 indicates the racemate. A value of
    1.0 indicates that the compound is enantiomerically pure.
    Enantioexcess is defined in the IUPAC Recommendations
    (Moss et al., 1996). The composition of the crystal
    and bulk must be the same.

    Ref: Moss G. P. et al. (1996). Basic Terminology of Stereochemistry.
         Pure Appl. Chem. 68, 2193-2222.
         https://doi.org/10.1351/pac199668122193
         https://iupac.qmul.ac.uk/stereo/
;
    _name.category_id             chemical
    _name.object_id               enantioexcess_bulk
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_chemical.enantioexcess_bulk_su

    _definition.id                '_chemical.enantioexcess_bulk_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _chemical.enantioexcess_bulk.
;
    _name.category_id             chemical
    _name.object_id               enantioexcess_bulk_su
    _name.linked_item_id          '_chemical.enantioexcess_bulk'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_chemical.enantioexcess_bulk_technique

    _definition.id                '_chemical.enantioexcess_bulk_technique'
    _alias.definition_id          '_chemical_enantioexcess_bulk_technique'
    _definition.update            2013-01-18
    _description.text
;
    Technique used to determine the enantioexcess of the bulk compound.
;
    _name.category_id             chemical
    _name.object_id               enantioexcess_bulk_technique
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         OA
;
         Enantioexcess determined by measurement of the specific rotation of
         the optical activity of the bulk compound in solution.
;
         CD
;
         Enantioexcess determined by measurement of the visible/near UV
         circular dichroism spectrum of the bulk compound in solution.
;
         EC
;
         Enantioexcess determined by enantioselective chromatography of the
         bulk compound in solution.
;
         other
;
         Enantioexcess determined by a technique not in this list.
;

save_

save_chemical.enantioexcess_crystal

    _definition.id                '_chemical.enantioexcess_crystal'
    _alias.definition_id          '_chemical_enantioexcess_crystal'
    _definition.update            2023-02-02
    _description.text
;
    The enantioexcess of the crystal used for the diffraction
    study. A value of 0.0 indicates the racemate. A value of
    1.0 indicates that the crystal is enantiomerically pure.
    Enantioexcess is defined in the IUPAC Recommendations
    (Moss et al., 1996).
    Ref: Moss G. P. et al. (1996). Basic Terminology of Stereochemistry.
         Pure Appl. Chem., 68, 2193-2222.
         https://doi.org/10.1351/pac199668122193
         https://iupac.qmul.ac.uk/stereo/
;
    _name.category_id             chemical
    _name.object_id               enantioexcess_crystal
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_chemical.enantioexcess_crystal_su

    _definition.id                '_chemical.enantioexcess_crystal_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _chemical.enantioexcess_crystal.
;
    _name.category_id             chemical
    _name.object_id               enantioexcess_crystal_su
    _name.linked_item_id          '_chemical.enantioexcess_crystal'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_chemical.enantioexcess_crystal_technique

    _definition.id                '_chemical.enantioexcess_crystal_technique'
    _alias.definition_id          '_chemical_enantioexcess_crystal_technique'
    _definition.update            2013-01-18
    _description.text
;
    Technique used to determine the enantioexcess of the crystal.
;
    _name.category_id             chemical
    _name.object_id               enantioexcess_crystal_technique
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         CD
;
         Enantioexcess determined by measurement of the visible/near UV
         circular dichroism spectrum of the crystal taken into solution.
;
         EC
;
         Enantioexcess determined by enantioselective chromatography of the
         crystal taken into solution.
;
         other
;
         Enantioexcess determined by a technique not in this list.
;

save_

save_chemical.identifier_inchi

    _definition.id                '_chemical.identifier_InChI'
    _alias.definition_id          '_chemical_identifier_InChI'
    _definition.update            2023-09-12
    _description.text
;
    The IUPAC International Chemical Identifier (InChI) is a
    textual identifier for chemical substances, designed to provide
    a standard and human-readable way to encode molecular information
    and to facilitate the search for such information in databases
    and on the web.
    Ref: McNaught, A. (2006). Chem. Int. (IUPAC), 28 (6), 12-14.
         https://doi.org/10.1515/ci.2006.28.6.12
         https://www.iupac.org/inchi/
;
    _name.category_id             chemical
    _name.object_id               identifier_InChI
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _description_example.case
        InChI=1/C10H8/c1-2-6-10-8-4-3-7-9(10)5-1/h1-8H
    _description_example.detail   naphthalene

save_

save_chemical.identifier_inchi_key

    _definition.id                '_chemical.identifier_InChI_key'
    _alias.definition_id          '_chemical_identifier_InChI_key'
    _definition.update            2023-09-12
    _description.text
;
    The InChIKey is a compact hashed version of the full InChI
    (IUPAC International Chemical Identifier), designed to allow
    for easy web searches of chemical compounds. See
    https://www.iupac.org/inchi/
;
    _name.category_id             chemical
    _name.object_id               identifier_InChI_key
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _description_example.case     OROGSEYTTFOCAN-DNJOTXNNSA-N
    _description_example.detail   codeine

save_

save_chemical.identifier_inchi_version

    _definition.id                '_chemical.identifier_InChI_version'
    _alias.definition_id          '_chemical_identifier_InChI_version'
    _definition.update            2021-09-24
    _description.text
;
    Version number of the InChI standard to which the associated
    chemical identifier string applies.
;
    _name.category_id             chemical
    _name.object_id               identifier_InChI_version
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code
    _description_example.case     1.03

save_

save_chemical.melting_point

    _definition.id                '_chemical.melting_point'
    _alias.definition_id          '_chemical_melting_point'
    _definition.update            2012-11-22
    _description.text
;
    The temperature at which a crystalline solid changes to a liquid.
;
    _name.category_id             chemical
    _name.object_id               melting_point
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_chemical.melting_point_su

    _definition.id                '_chemical.melting_point_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _chemical.melting_point.
;
    _name.category_id             chemical
    _name.object_id               melting_point_su
    _name.linked_item_id          '_chemical.melting_point'
    _units.code                   kelvins

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_chemical.melting_point_gt

    _definition.id                '_chemical.melting_point_gt'
    _alias.definition_id          '_chemical_melting_point_gt'
    _definition.update            2012-12-11
    _description.text
;
    A temperature above which the melting point lies.
    _chemical.melting_point should be used in preference where possible.
;
    _name.category_id             chemical
    _name.object_id               melting_point_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_chemical.melting_point_lt

    _definition.id                '_chemical.melting_point_lt'
    _alias.definition_id          '_chemical_melting_point_lt'
    _definition.update            2012-12-11
    _description.text
;
    A temperature below which the melting point lies.
    _chemical.melting_point should be used in preference where possible.
;
    _name.category_id             chemical
    _name.object_id               melting_point_lt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_chemical.name_common

    _definition.id                '_chemical.name_common'
    _alias.definition_id          '_chemical_name_common'
    _definition.update            2012-11-22
    _description.text
;
    Trivial name by which the compound is commonly known.
;
    _name.category_id             chemical
    _name.object_id               name_common
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

save_

save_chemical.name_mineral

    _definition.id                '_chemical.name_mineral'
    _alias.definition_id          '_chemical_name_mineral'
    _definition.update            2012-11-22
    _description.text
;
    Mineral name accepted by the International Mineralogical Association.
    Use only for natural minerals.
;
    _name.category_id             chemical
    _name.object_id               name_mineral
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

save_

save_chemical.name_structure_type

    _definition.id                '_chemical.name_structure_type'
    _alias.definition_id          '_chemical_name_structure_type'
    _definition.update            2012-11-22
    _description.text
;
    Commonly used structure-type name. Usually only applied to
    minerals or inorganic compounds.
;
    _name.category_id             chemical
    _name.object_id               name_structure_type
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

save_

save_chemical.name_systematic

    _definition.id                '_chemical.name_systematic'
    _alias.definition_id          '_chemical_name_systematic'
    _definition.update            2012-11-22
    _description.text
;
    IUPAC or Chemical Abstracts full name of compound.
;
    _name.category_id             chemical
    _name.object_id               name_systematic
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

save_

save_chemical.optical_rotation

    _definition.id                '_chemical.optical_rotation'
    _alias.definition_id          '_chemical_optical_rotation'
    _definition.update            2012-11-22
    _description.text
;
    The optical rotation in solution of the compound is
    specified in the following format:

       '[α]^TEMP^~WAVE~ = SORT (c = CONC, SOLV)'

    where: TEMP is the temperature of the measurement in degrees Celsius,
           WAVE is an indication of the wavelength of the light
                used for the measurement,
           CONC is the concentration of the solution given as the
                mass of the substance in g in 100 ml of solution,
           SORT is the signed value (preceded by a + or a - sign)
                of 100.α/(l.c), where α is the signed optical
                rotation in degrees measured in a cell of length l in
                dm and c is the value of CONC in g, and
           SOLV is the chemical formula of the solvent.
;
    _name.category_id             chemical
    _name.object_id               optical_rotation
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     '[α]^25^~D~ = +108 (c = 3.42, CHCl~3~)'

save_

save_chemical.properties_biological

    _definition.id                '_chemical.properties_biological'
    _alias.definition_id          '_chemical_properties_biological'
    _definition.update            2012-12-11
    _description.text
;
    A description of the biological properties of the material.
;
    _name.category_id             chemical
    _name.object_id               properties_biological
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
;
       diverse biological activities including use as a laxative
       and strong antibacterial activity against S. aureus and weak
       activity against cyclooxygenase-1 (COX-1)
;
;
       antibiotic activity against Bacillus subtilis (ATCC 6051) but no
       significant activity against Candida albicans (ATCC 14053),
       Aspergillus flavus (NRRL 6541) & Fusarium verticillioides (NRRL 25457)
;
;
       weakly potent lipoxygenase nonredox inhibitor
;
;
       no influenza A virus sialidase inhibitory & plaque reduction activities
;
;
       low toxicity against Drosophila melanogaster
;

save_

save_chemical.properties_physical

    _definition.id                '_chemical.properties_physical'
    _alias.definition_id          '_chemical_properties_physical'
    _definition.update            2012-12-11
    _description.text
;
    A description of the physical properties of the material.
;
    _name.category_id             chemical
    _name.object_id               properties_physical
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'air-sensitive'
         'moisture-sensitive'
         'hygroscopic'
         'deliquescent'
         'oxygen-sensitive'
         'photo-sensitive'
         'pyrophoric'
         'semiconductor'
         'ferromagnetic at low temperature'
         'paramagnetic and thermochromic'

save_

save_chemical.temperature_decomposition

    _definition.id                '_chemical.temperature_decomposition'
    _alias.definition_id          '_chemical_temperature_decomposition'
    _definition.update            2012-12-11
    _description.text
;
    The temperature at which a crystalline solid decomposes.
;
    _name.category_id             chemical
    _name.object_id               temperature_decomposition
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_chemical.temperature_decomposition_su

    _definition.id                '_chemical.temperature_decomposition_su'

    loop_
      _alias.definition_id
         '_chemical_temperature_decomposition_su'
         '_chemical.temperature_decomposition_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _chemical.temperature_decomposition.
;
    _name.category_id             chemical
    _name.object_id               temperature_decomposition_su
    _name.linked_item_id          '_chemical.temperature_decomposition'
    _units.code                   kelvins

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_chemical.temperature_decomposition_gt

    _definition.id                '_chemical.temperature_decomposition_gt'
    _alias.definition_id          '_chemical_temperature_decomposition_gt'
    _definition.update            2021-11-09
    _description.text
;
    The temperature above which a crystalline solid decomposes.
    _chemical.temperature_decomposition should be used in preference.
;
    _name.category_id             chemical
    _name.object_id               temperature_decomposition_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_chemical.temperature_decomposition_lt

    _definition.id                '_chemical.temperature_decomposition_lt'
    _alias.definition_id          '_chemical_temperature_decomposition_lt'
    _definition.update            2021-11-09
    _description.text
;
    The temperature below which a crystalline solid decomposes.
    _chemical.temperature_decomposition should be used in preference.
;
    _name.category_id             chemical
    _name.object_id               temperature_decomposition_lt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_chemical.temperature_sublimation

    _definition.id                '_chemical.temperature_sublimation'
    _alias.definition_id          '_chemical_temperature_sublimation'
    _definition.update            2012-12-11
    _description.text
;
    The temperature at which a crystalline solid sublimates.
;
    _name.category_id             chemical
    _name.object_id               temperature_sublimation
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_chemical.temperature_sublimation_su

    _definition.id                '_chemical.temperature_sublimation_su'

    loop_
      _alias.definition_id
         '_chemical_temperature_sublimation_su'
         '_chemical.temperature_sublimation_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _chemical.temperature_sublimation.
;
    _name.category_id             chemical
    _name.object_id               temperature_sublimation_su
    _name.linked_item_id          '_chemical.temperature_sublimation'
    _units.code                   kelvins

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_chemical.temperature_sublimation_gt

    _definition.id                '_chemical.temperature_sublimation_gt'
    _alias.definition_id          '_chemical_temperature_sublimation_gt'
    _definition.update            2021-11-09
    _description.text
;
    The temperature above which a crystalline solid sublimates.
    _chemical.temperature_sublimation should be used in preference.
;
    _name.category_id             chemical
    _name.object_id               temperature_sublimation_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_chemical.temperature_sublimation_lt

    _definition.id                '_chemical.temperature_sublimation_lt'
    _alias.definition_id          '_chemical_temperature_sublimation_lt'
    _definition.update            2021-11-09
    _description.text
;
    The temperature below which a crystalline solid sublimates.
    _chemical.temperature_sublimation should be used in preference.
;
    _name.category_id             chemical
    _name.object_id               temperature_sublimation_lt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_CHEMICAL_CONN_ATOM

    _definition.id                CHEMICAL_CONN_ATOM
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which describe the 2D chemical structure of
    the molecular species. They allow a 2D chemical diagram to be
    reconstructed for use in a publication or in a database search
    for structural and substructural relationships. In particular,
    the chemical_conn_atom data items provide information about the
    chemical properties of the atoms in the structure. In cases
    where crystallographic and molecular symmetry elements coincide
    they must also contain symmetry-generated atoms, so as to describe
    a complete chemical entity.
;
    _name.category_id             CHEMICAL
    _name.object_id               CHEMICAL_CONN_ATOM
    _category_key.name            '_chemical_conn_atom.number'

save_

save_chemical_conn_atom.charge

    _definition.id                '_chemical_conn_atom.charge'
    _alias.definition_id          '_chemical_conn_atom_charge'
    _definition.update            2021-03-01
    _description.text
;
    The net integer charge assigned to this atom. This is the
    formal charge assignment normally found in chemical diagrams.
;
    _name.category_id             chemical_conn_atom
    _name.object_id               charge
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            -6:6
    _units.code                   none

save_

save_chemical_conn_atom.display_x

    _definition.id                '_chemical_conn_atom.display_x'
    _alias.definition_id          '_chemical_conn_atom_display_x'
    _definition.update            2012-11-22
    _description.text
;
    Cartesian coordinate (x) of the atom site in a chemical diagram. The
    coordinate origin is at the lower left corner, the x axis is horizontal.
;
    _name.category_id             chemical_conn_atom
    _name.object_id               display_x
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_chemical_conn_atom.display_y

    _definition.id                '_chemical_conn_atom.display_y'
    _alias.definition_id          '_chemical_conn_atom_display_y'
    _definition.update            2012-11-22
    _description.text
;
    Cartesian coordinate (y) of the atom site in a chemical diagram. The
    coordinate origin is at the lower left corner, the y axis is vertical.
;
    _name.category_id             chemical_conn_atom
    _name.object_id               display_y
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_chemical_conn_atom.nca

    _definition.id                '_chemical_conn_atom.NCA'
    _alias.definition_id          '_chemical_conn_atom_NCA'
    _definition.update            2021-03-01
    _description.text
;
    Total number of connected atoms excluding terminal hydrogen atoms.
;
    _name.category_id             chemical_conn_atom
    _name.object_id               NCA
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_chemical_conn_atom.nh

    _definition.id                '_chemical_conn_atom.NH'
    _alias.definition_id          '_chemical_conn_atom_NH'
    _definition.update            2021-03-01
    _description.text
;
    Total number of hydrogen atoms attached to this atom,
    regardless of whether they are included in the refinement or
    the atom_site list. This number will be the same as
    _atom_site.attached_hydrogens only if none of the hydrogen
    atoms appear in the atom_site list.
;
    _name.category_id             chemical_conn_atom
    _name.object_id               NH
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_chemical_conn_atom.number

    _definition.id                '_chemical_conn_atom.number'
    _alias.definition_id          '_chemical_conn_atom_number'
    _definition.update            2021-03-01
    _description.text
;
    The chemical sequence number to be associated with this atom.
;
    _name.category_id             chemical_conn_atom
    _name.object_id               number
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_chemical_conn_atom.type_symbol

    _definition.id                '_chemical_conn_atom.type_symbol'
    _alias.definition_id          '_chemical_conn_atom_type_symbol'
    _definition.update            2021-10-27
    _description.text
;
    A code identifying the atom type.
;
    _name.category_id             chemical_conn_atom
    _name.object_id               type_symbol
    _name.linked_item_id          '_atom_type.symbol'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_CHEMICAL_CONN_BOND

    _definition.id                CHEMICAL_CONN_BOND
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the connections between
    the atoms sites in the chemical_conn_atom list and the nature
    of the chemical bond between these atoms. These are details about
    the two-dimensional (2D) chemical structure of the molecular species.
    They allow a 2D chemical diagram to be reconstructed for use in a
    publication or in a database search for structural and substructural
    relationships.
;
    _name.category_id             CHEMICAL
    _name.object_id               CHEMICAL_CONN_BOND

    loop_
      _category_key.name
         '_chemical_conn_bond.atom_1'
         '_chemical_conn_bond.atom_2'

save_

save_chemical_conn_bond.atom_1

    _definition.id                '_chemical_conn_bond.atom_1'

    loop_
      _alias.definition_id
         '_chemical_conn_bond_atom_1'
         '_chem_comp_bond.atom_id_1'

    _definition.update            2021-03-01
    _description.text
;
    Index id of first atom in a bond connecting two atom sites.
;
    _name.category_id             chemical_conn_bond
    _name.object_id               atom_1
    _name.linked_item_id          '_chemical_conn_atom.number'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_chemical_conn_bond.atom_2

    _definition.id                '_chemical_conn_bond.atom_2'

    loop_
      _alias.definition_id
         '_chemical_conn_bond_atom_2'
         '_chem_comp_bond.atom_id_2'

    _definition.update            2021-03-01
    _description.text
;
    Index id of second atom in a bond connecting two atom sites.
;
    _name.category_id             chemical_conn_bond
    _name.object_id               atom_2
    _name.linked_item_id          '_chemical_conn_atom.number'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_chemical_conn_bond.distance

    _definition.id                '_chemical_conn_bond.distance'
    _alias.definition_id          '_chem_comp_bond.value_dist'
    _definition.update            2014-06-12
    _description.text
;
    The value that should be taken as the target for the chemical
    bond associated with the specified atoms, expressed as a
    distance.
;
    _name.category_id             chemical_conn_bond
    _name.object_id               distance
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_chemical_conn_bond.id

    _definition.id                '_chemical_conn_bond.id'
    _definition.update            2023-02-02
    _description.text
;
    Unique identifier for the bond.
;
    _name.category_id             chemical_conn_bond
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Derived
    _type.container               Single
    _type.contents                Word

save_

save_chemical_conn_bond.type

    _definition.id                '_chemical_conn_bond.type'

    loop_
      _alias.definition_id
         '_chemical_conn_bond_type'
         '_chem_comp_bond.value_order'

    _definition.update            2012-11-22
    _description.text
;
    Code for the chemical bond type.
;
    _name.category_id             chemical_conn_bond
    _name.object_id               type
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         sing                     'Single bond.'
         doub                     'Double bond.'
         trip                     'Triple bond.'
         quad                     'Quadruple bond.'
         arom                     'Aromatic bond.'
         poly                     'Polymeric bond.'
         delo                     'Delocalized double bond.'
         pi                       'Pi bond.'

save_

save_CHEMICAL_FORMULA

    _definition.id                CHEMICAL_FORMULA
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2023-01-13
    _description.text
;
    The category of data items which specify the composition and chemical
    properties of the compound. The formula data items must agree
    with those that specify the density, unit-cell and Z values.

    The following rules apply to the construction of the data items
    _chemical_formula.analytical, *.structural and *.sum. For the
    data item *.moiety the formula construction is broken up into
    residues or moieties, i.e. groups of atoms that form a molecular
    unit or molecular ion. The rules given below apply within each
    moiety, but different requirements apply to the way that moieties
    are connected (see _chemical_formula.moiety).

    1. Only recognized element symbols may be used.

    2. Each element symbol is followed by a 'count' number. A count of
       '1' may be omitted.

    3. A space or parenthesis must separate each cluster of (element
       symbol + count).

    4. Where a group of elements is enclosed in parentheses, the
       multiplier for the group must follow the closing parentheses.
       That is, all element and group multipliers are assumed to be
       printed as subscripted numbers. [An exception to this rule
       exists for *.moiety formulae where pre- and post-multipliers
       are permitted for molecular units].

    5. Unless the elements are ordered in a manner that corresponds to
       their chemical structure, as in _chemical_formula.structural,
       the order of the elements within any group or moiety
       depends on whether or not carbon is present. If carbon is
       present, the order should be: C, then H, then the other
       elements in alphabetical order of their symbol. If carbon is
       not present, the elements are listed purely in alphabetical order
       of their symbol. This is the 'Hill' system used by Chemical
       Abstracts. This ordering is used in _chemical_formula.moiety
       and _chemical_formula.sum.

          _chemical_formula.IUPAC      '[Mo (C O)4 (C18 H33 P)2]'
          _chemical_formula.moiety     'C40 H66 Mo O4 P2'
          _chemical_formula.structural '((C O)4 (P (C6 H11)3)2)Mo'
          _chemical_formula.sum         'C40 H66 Mo O4 P2'
          _chemical_formula.weight      768.81
;
    _name.category_id             CHEMICAL
    _name.object_id               CHEMICAL_FORMULA

save_

save_chemical_formula.analytical

    _definition.id                '_chemical_formula.analytical'
    _alias.definition_id          '_chemical_formula_analytical'
    _definition.update            2012-11-22
    _description.text
;
    Formula determined by standard chemical analysis including trace
    elements. Parentheses are used only for standard uncertainties (su's).
;
    _name.category_id             chemical_formula
    _name.object_id               analytical
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Fe2.45(2)  Ni1.60(3)  S4'

save_

save_chemical_formula.iupac

    _definition.id                '_chemical_formula.IUPAC'
    _alias.definition_id          '_chemical_formula_IUPAC'
    _definition.update            2021-09-24
    _description.text
;
    Formula expressed in conformance with IUPAC rules for inorganic
    and metal-organic compounds where these conflict with the rules
    for any other chemical_formula entries. Typically used for
    formatting a formula in accordance with journal rules. This
    should appear in the data block in addition to the most
    appropriate of the other chemical_formula data names.
    Ref: IUPAC (1990). Nomenclature of Inorganic Chemistry.
         Oxford: Blackwell Scientific Publications.
;
    _name.category_id             chemical_formula
    _name.object_id               IUPAC
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text
    _description_example.case     '[Co Re (C12 H22 P)2 (C O)6].0.5C H3 O H'

save_

save_chemical_formula.moiety

    _definition.id                '_chemical_formula.moiety'
    _alias.definition_id          '_chemical_formula_moiety'
    _definition.update            2012-11-22
    _description.text
;
    Formula with each discrete bonded residue or ion shown as a
    separate moiety. See above CHEMICAL_FORMULA for rules
    for writing chemical formulae. In addition to the general
    formulae requirements, the following rules apply:
       1. Moieties are separated by commas ','.
       2. The order of elements within a moiety follows general rule
          5 in CHEMICAL_FORMULA.
       3. Parentheses are not used within moieties but may surround
          a moiety. Parentheses may not be nested.
       4. Charges should be placed at the end of the moiety. The
          charge '+' or '-' may be preceded by a numerical multiplier
          and should be separated from the last (element symbol +
          count) by a space. Pre- or post-multipliers may be used for
          individual moieties.
;
    _name.category_id             chemical_formula
    _name.object_id               moiety
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'C7 H4 Cl Hg N O3 S'
         'C12 H17 N4 O S 1+, C6 H2 N3 O7 1-'
         'C12 H16 N2 O6, 5(H2 O1)'
         '(Cd 2+)3, (C6 N6 Cr 3-)2, 2(H2 O)'

save_

save_chemical_formula.structural

    _definition.id                '_chemical_formula.structural'
    _alias.definition_id          '_chemical_formula_structural'
    _definition.update            2023-01-13
    _description.text
;
    This formula should correspond to the structure as reported, i.e.
    trace elements not included in atom type and atom site lists should
    not be included. See category description for the rules for writing
    chemical formulae for inorganics, organometallics, metal complexes
    etc., in which bonded groups are preserved as discrete entities
    within parentheses, with post-multipliers as required. The order of
    the elements should give as much information as possible about the
    chemical structure. Parentheses may be used and nested as required.
    This formula should correspond to the structure as actually reported,
    i.e. trace elements not included in atom-type and atom-site lists
    should not be included (see also _chemical_formula.analytical).
;
    _name.category_id             chemical_formula
    _name.object_id               structural
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         '(Pt (N H3)2 (C5 H7 N3 O)2) (Cl O4)2'
         'Ca ((Cl O3)2 O)2 (H2 O)6'

save_

save_chemical_formula.sum

    _definition.id                '_chemical_formula.sum'
    _alias.definition_id          '_chemical_formula_sum'
    _definition.update            2012-11-22
    _description.text
;
    Chemical formulae in which all discrete bonded residues and ions are
    summed over the constituent elements, following the ordering given
    in rule 5 of the category description. Parentheses normally not used.
;
    _name.category_id             chemical_formula
    _name.object_id               sum
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text
    _description_example.case     'C18 H19 N7 O8 S'

save_

save_chemical_formula.weight

    _definition.id                '_chemical_formula.weight'
    _alias.definition_id          '_chemical_formula_weight'
    _definition.update            2021-09-24
    _description.text
;
    Mass corresponding to the formulae _chemical_formula.structural,
    *.IUPAC, *.moiety or *.sum and, together with the Z value and cell
    parameters yield the density given as _exptl_crystal.density_diffrn.
;
    _name.category_id             chemical_formula
    _name.object_id               weight
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            1.0:
    _units.code                   dalton

save_

save_chemical_formula.weight_meas

    _definition.id                '_chemical_formula.weight_meas'
    _alias.definition_id          '_chemical_formula_weight_meas'
    _definition.update            2012-11-22
    _description.text
;
    Formula mass measured by a non-diffraction experiment.
;
    _name.category_id             chemical_formula
    _name.object_id               weight_meas
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            1.0:
    _units.code                   dalton

save_

save_chemical_formula.weight_meas_su

    _definition.id                '_chemical_formula.weight_meas_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _chemical_formula.weight_meas.
;
    _name.category_id             chemical_formula
    _name.object_id               weight_meas_su
    _name.linked_item_id          '_chemical_formula.weight_meas'
    _units.code                   dalton

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_EXPTL_ABSORPT

    _definition.id                EXPTL_ABSORPT
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2023-01-13
    _description.text
;
    The category of data items used to specify the experimental details
    of the absorption measurements and corrections to the diffraction data.
;
    _name.category_id             EXPTL
    _name.object_id               EXPTL_ABSORPT

save_

save_exptl_absorpt.coefficient_mu

    _definition.id                '_exptl_absorpt.coefficient_mu'

    loop_
      _alias.definition_id
         '_exptl_absorpt_coefficient_mu'
         '_exptl.absorpt_coefficient_mu'

    _definition.update            2023-06-25
    _description.text
;
    Linear absorption coefficient, μ, calculated from the atomic content of
    the cell, the density and the radiation wavelength.
;
    _name.category_id             exptl_absorpt
    _name.object_id               coefficient_mu
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   reciprocal_millimetres

save_

save_exptl_absorpt.coefficient_mu_su

    _definition.id                '_exptl_absorpt.coefficient_mu_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_absorpt.coefficient_mu.
;
    _name.category_id             exptl_absorpt
    _name.object_id               coefficient_mu_su
    _name.linked_item_id          '_exptl_absorpt.coefficient_mu'
    _units.code                   reciprocal_millimetres

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_absorpt.correction_t_max

    _definition.id                '_exptl_absorpt.correction_T_max'

    loop_
      _alias.definition_id
         '_exptl_absorpt_correction_T_max'
         '_exptl.absorpt_correction_T_max'

    _definition.update            2012-11-22
    _description.text
;
    Maximum transmission factor for the crystal and radiation applied
    to the measured intensities, it includes the correction for
    absorption by the specimen mount and diffractometer as well
    as by the specimen itself. These values give the transmission (T)
    factor by which measured intensities have been REDUCED due to
    absorption. Sometimes referred to as absorption correction A or
    1/A* (see "Crystal Structure Analysis for Chemists and Biologists"
    by J.P. Glusker et al., Wiley)
;
    _name.category_id             exptl_absorpt
    _name.object_id               correction_T_max
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_exptl_absorpt.correction_t_min

    _definition.id                '_exptl_absorpt.correction_T_min'

    loop_
      _alias.definition_id
         '_exptl_absorpt_correction_T_min'
         '_exptl.absorpt_correction_T_min'

    _definition.update            2021-08-15
    _description.text
;
    Minimum transmission factor for the crystal and radiation applied
    to the measured intensities, it includes the correction for
    absorption by the specimen mount and diffractometer as well
    as by the specimen itself. These values give the transmission (T)
    factor by which measured intensities have been REDUCED due to
    absorption. Sometimes referred to as absorption correction A or
    1/A* (see "Crystal Structure Analysis for Chemists and Biologists"
    by J.P. Glusker et al., Wiley)
;
    _name.category_id             exptl_absorpt
    _name.object_id               correction_T_min
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_exptl_absorpt.correction_type

    _definition.id                '_exptl_absorpt.correction_type'

    loop_
      _alias.definition_id
         '_exptl_absorpt_correction_type'
         '_exptl.absorpt_correction_type'

    _definition.update            2023-01-13
    _description.text
;
    Code identifying the absorption correction type and method.
    The 'empirical' approach should NOT be used if more detailed
    information on the crystal shape is available.
;
    _name.category_id             exptl_absorpt
    _name.object_id               correction_type
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         analytical               'Analytical from crystal shape.'
         cylinder                 'Cylindrical.'
         empirical                'Empirical from intensities.'
         gaussian                 'Gaussian from crystal shape.'
         integration              'Integration from crystal shape.'
         multi-scan               'Symmetry-related measurements.'
         none                     'No absorption correction applied.'
         numerical                'Numerical from crystal shape.'
         psi-scan                 'Psi-scan corrections.'
         refdelf                  'Refined from delta-F.'
         sphere                   'Spherical.'

save_

save_exptl_absorpt.process_details

    _definition.id                '_exptl_absorpt.process_details'

    loop_
      _alias.definition_id
         '_exptl_absorpt_process_details'
         '_exptl.absorpt_process_details'

    _definition.update            2012-11-22
    _description.text
;
    Description of the absorption correction process applied to the
    measured intensities. A literature reference should be supplied
    for psi-scan or multi-scan techniques.
;
    _name.category_id             exptl_absorpt
    _name.object_id               process_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'Tompa analytical'
         'MolEN (Fair, 1990)'
         '(North, Phillips & Mathews, 1968)'

save_

save_exptl_absorpt.special_details

    _definition.id                '_exptl_absorpt.special_details'
    _alias.definition_id          '_exptl_absorpt_special_details'
    _definition.update            2022-12-03
    _description.text
;
    Details of the absorption correction process applied to the
    measured intensities that cannot otherwise be given using
    other data items from the EXPTL_ABSORPT category.
;
    _name.category_id             exptl_absorpt
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
      _description_example.detail
;
         X-ray beam inhomogeneity and goniometer imperfection account for much
         of the difference between estimated values of Tmin and Tmax and the
         _exptl_absorpt_correction_ values.
;
;
         Text modified from:
         Petty, Anthony J. et al. Computationally aided design of a high-
         performance organic semiconductor: the development of a universal
         crystal engineering core. Chemical Science, 2019
         https://doi.org/10.1039/C9SC02930C
         COD 1552381
;
;
         Neutron linear absorption coefficient is wavelength dependent. The
         value of 0.2216 (mm^-1^) shown in _exptl_absorpt_coefficient_mu is the
         sample absorption coefficient for a neutron wavelength at 1.0 Å.
;
;
         Text modified from:
         Lengyel, Jeff et al. Antiferroelectric Phase Transition in a
         Proton-Transfer Salt of Squaric Acid and 2,3-Dimethylpyrazine.
         Journal of the American Chemical Society, 2019, 141, 16279-16287
         https://doi.org/10.1021/jacs.9b04473
         COD 4127699
;

save_

save_EXPTL_CRYSTAL

    _definition.id                EXPTL_CRYSTAL
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2022-05-09
    _description.text
;
    The category of data items used to specify information about
    crystals used in the diffraction measurements.
;
    _name.category_id             EXPTL
    _name.object_id               EXPTL_CRYSTAL
    _category_key.name            '_exptl_crystal.id'

save_

save_exptl_crystal.colour

    _definition.id                '_exptl_crystal.colour'
    _alias.definition_id          '_exptl_crystal_colour'
    _definition.update            2023-01-12
    _description.text
;
    Colour description of the crystal.

    Data items from EXPTL_CRYSTAL_APPEARANCE category should be used in
    preference to this item when possible.
;
    _name.category_id             exptl_crystal
    _name.object_id               colour
    _type.purpose                 Composite
    _type.source                  Derived
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'translucent pale green'
         'dark yellow'
         'metallic blue'
         'red'
         'colourless'
         'dichroic dark purple/pale blue'

    _method.purpose               Definition
    _method.expression
;
    default_value = ""
    With c as exptl_crystal_appearance {
        if (not Is_missing(c.general))
            default_value = c.general
        if (not Is_missing(c.intensity)) {
            if (len(default_value) > 0) default_value = default_value + " "
            default_value = default_value + c.intensity
        }
        if (not Is_missing(c.hue)) {
            if (len(default_value) > 0) default_value = default_value + " "
            default_value = default_value + c.hue
        }
    }

    if (len(default_value) > 0)
        _enumeration.default = default_value
;

save_

save_exptl_crystal.density_diffrn

    _definition.id                '_exptl_crystal.density_diffrn'
    _alias.definition_id          '_exptl_crystal_density_diffrn'
    _definition.update            2012-11-22
    _description.text
;
    Crystal density calculated from crystal unit cell and atomic content.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_diffrn
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   megagrams_per_metre_cubed
    _method.purpose               Evaluation
    _method.expression
;
    _exptl_crystal.density_diffrn = 1.6605 * _cell.atomic_mass / _cell.volume
;

save_

save_exptl_crystal.density_diffrn_su

    _definition.id                '_exptl_crystal.density_diffrn_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal.density_diffrn.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_diffrn_su
    _name.linked_item_id          '_exptl_crystal.density_diffrn'
    _units.code                   megagrams_per_metre_cubed

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal.density_meas

    _definition.id                '_exptl_crystal.density_meas'
    _alias.definition_id          '_exptl_crystal_density_meas'
    _definition.update            2012-11-22
    _description.text
;
    Crystal density measured using standard chemical and physical methods.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_meas
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   megagrams_per_metre_cubed

save_

save_exptl_crystal.density_meas_su

    _definition.id                '_exptl_crystal.density_meas_su'

    loop_
      _alias.definition_id
         '_exptl_crystal_density_meas_su'
         '_exptl_crystal.density_meas_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _exptl_crystal.density_meas.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_meas_su
    _name.linked_item_id          '_exptl_crystal.density_meas'
    _units.code                   megagrams_per_metre_cubed

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal.density_meas_gt

    _definition.id                '_exptl_crystal.density_meas_gt'
    _alias.definition_id          '_exptl_crystal_density_meas_gt'
    _definition.update            2021-11-09
    _description.text
;
    The value above which the density measured using standard
    chemical and physical methods lies. This item is used only
    when _exptl_crystal.density_meas cannot be employed. It is
    intended for use in reporting information in databases and
    archives which would be misleading if reported otherwise.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_meas_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   megagrams_per_metre_cubed

save_

save_exptl_crystal.density_meas_lt

    _definition.id                '_exptl_crystal.density_meas_lt'
    _alias.definition_id          '_exptl_crystal_density_meas_lt'
    _definition.update            2021-11-09
    _description.text
;
    The value below which the density measured using standard
    chemical and physical methods lies. This item is used only
    when _exptl_crystal.density_meas cannot be employed. It is
    intended for use in reporting information in databases and
    archives which would be misleading if reported otherwise.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_meas_lt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   megagrams_per_metre_cubed

save_

save_exptl_crystal.density_meas_temp

    _definition.id                '_exptl_crystal.density_meas_temp'
    _alias.definition_id          '_exptl_crystal_density_meas_temp'
    _definition.update            2012-11-22
    _description.text
;
    Temperature at which _exptl_crystal.density_meas was determined.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_meas_temp
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_exptl_crystal.density_meas_temp_su

    _definition.id                '_exptl_crystal.density_meas_temp_su'

    loop_
      _alias.definition_id
         '_exptl_crystal_density_meas_temp_su'
         '_exptl_crystal.density_meas_temp_esd'

    _definition.update            2012-11-22
    _description.text
;
    Standard uncertainty of _exptl_crystal.density_meas_temp.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_meas_temp_su
    _name.linked_item_id          '_exptl_crystal.density_meas_temp'
    _units.code                   kelvins

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal.density_meas_temp_gt

    _definition.id                '_exptl_crystal.density_meas_temp_gt'
    _alias.definition_id          '_exptl_crystal_density_meas_temp_gt'
    _definition.update            2021-11-09
    _description.text
;
    Temperature above which the measured density was determined.
    This item is used only when _exptl_crystal.density_meas_temp
    cannot be employed. It is intended for use in reporting values
    from databases which would be misleading if reported otherwise.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_meas_temp_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_exptl_crystal.density_meas_temp_lt

    _definition.id                '_exptl_crystal.density_meas_temp_lt'
    _alias.definition_id          '_exptl_crystal_density_meas_temp_lt'
    _definition.update            2021-11-09
    _description.text
;
    Temperature below which the measured density was determined.
    This item is used only when _exptl_crystal.density_meas_temp
    cannot be employed. It is intended for use in reporting values
    from databases which would be misleading if reported otherwise.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_meas_temp_lt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_exptl_crystal.density_method

    _definition.id                '_exptl_crystal.density_method'
    _alias.definition_id          '_exptl_crystal_density_method'
    _definition.update            2012-11-22
    _description.text
;
    Description of method used to measure _exptl_crystal.density_meas.
;
    _name.category_id             exptl_crystal
    _name.object_id               density_method
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'flotation in aqueous KI'

save_

save_exptl_crystal.description

    _definition.id                '_exptl_crystal.description'
    _alias.definition_id          '_exptl_crystal_description'
    _definition.update            2021-08-18
    _description.text
;
    Description of the quality and habit of the crystal. The crystal
    dimensions should be provided using the _exptl_crystal.size_* data items.
;
    _name.category_id             exptl_crystal
    _name.object_id               description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_exptl_crystal.f_000

    _definition.id                '_exptl_crystal.F_000'
    _alias.definition_id          '_exptl_crystal_F_000'
    _definition.update            2023-02-02
    _description.text
;
    Number of electrons in the crystal unit cell contributing to F(000).
    It may contain dispersion contributions, and is calculated as

         F(000) = [ (sum f~r~)^2^ + (sum f~i~)^2^ ]^1/2^

         f~r~   = real part of the scattering factors at θ = 0
         f~i~   = imaginary part of the scattering factors at θ = 0

                 the sum is taken over each atom in the unit cell

    For X-rays, non-dispersive F(000) is a positive number and counts
    the effective number of electrons in the unit cell; for neutrons,
    non-dispersive F(000) (which may be negative) counts the total
    nuclear scattering power in the unit cell. See
       https://dictionary.iucr.org/F(000)
;
    _name.category_id             exptl_crystal
    _name.object_id               F_000
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_exptl_crystal.id

    _definition.id                '_exptl_crystal.id'
    _alias.definition_id          '_exptl_crystal_id'
    _definition.update            2022-05-09
    _description.text
;
    Code identifying a crystal.
;
    _name.category_id             exptl_crystal
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_exptl_crystal.mosaic_block_size

    _definition.id                '_exptl_crystal.mosaic_block_size'
    _definition.update            2024-07-22
    _description.text
;
    Isotropic and resolution-independent term representing the average size of
    mosaic domains in the crystal specified in angstroms. Larger size indicates
    better ordered crystals.
;
    _name.category_id             exptl_crystal
    _name.object_id               mosaic_block_size
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.:
    _units.code                   angstroms

save_

save_exptl_crystal.mosaic_block_size_su

    _definition.id                '_exptl_crystal.mosaic_block_size_su'
    _definition.update            2024-07-22
    _description.text
;
    Standard uncertainty of _exptl_crystal.mosaic_block_size.
;
    _name.category_id             exptl_crystal
    _name.object_id               mosaic_block_size_su
    _name.linked_item_id          '_exptl_crystal.mosaic_block_size'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Single
    _type.contents                Real
    _units.code                   angstroms

save_

save_exptl_crystal.mosaic_method

    _definition.id                '_exptl_crystal.mosaic_method'
    _definition.update            2024-05-07
    _description.text
;
    How parameters derived from the spot shape (such as mosaic block
    size and rotation, beam divergence, and crossfire) and their
    errors were estimated.

    This can be a written description or a citation to a specific
    software package that determined these parameters.
;
    _name.category_id             exptl_crystal
    _name.object_id               mosaic_method
    _type.purpose                 Describe
    _type.source                  Derived
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Determined from rocking curve.'

save_

save_exptl_crystal.mosaicity

    _definition.id                '_exptl_crystal.mosaicity'
    _definition.update            2024-07-09
    _description.text
;
    Isotropic approximation of the distribution of mis-orientation angles
    specified in degrees of all the mosaic domain blocks in the crystal,
    represented as a standard deviation. Here, a mosaic block is a set of
    contiguous unit cells assumed to be perfectly aligned. Lower mosaicity
    indicates better ordered crystals. See for example:

    Nave, C. (1998). Acta Cryst. D54, 848-853.

    Note that many software packages estimate the mosaic rotation distribution
    differently and may combine several physical properties of the experiment
    into a single mosaic term. This term will help fit the modelled spots
    to the observed spots without necessarily being directly related to the
    physics of the crystal itself.
;
    _name.category_id             exptl_crystal
    _name.object_id               mosaicity
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.:
    _units.code                   degrees

save_

save_exptl_crystal.mosaicity_su

    _definition.id                '_exptl_crystal.mosaicity_su'
    _definition.update            2024-07-09
    _description.text
;
    Standard uncertainty of _exptl_crystal.mosaicity.
;
    _name.category_id             exptl_crystal
    _name.object_id               mosaicity_su
    _name.linked_item_id          '_exptl_crystal.mosaicity'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Single
    _type.contents                Real
    _units.code                   degrees

save_

save_exptl_crystal.preparation

    _definition.id                '_exptl_crystal.preparation'
    _alias.definition_id          '_exptl_crystal_preparation'
    _definition.update            2012-11-22
    _description.text
;
    Details of crystal growth and preparation of the crystals
    (e.g. mounting) prior to the intensity measurements.
;
    _name.category_id             exptl_crystal
    _name.object_id               preparation
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'mounted in an argon-filled quartz capillary'

save_

save_exptl_crystal.pressure_history

    _definition.id                '_exptl_crystal.pressure_history'
    _alias.definition_id          '_exptl_crystal_pressure_history'
    _definition.update            2012-11-22
    _description.text
;
    Details concerning the pressure history of the crystals.
;
    _name.category_id             exptl_crystal
    _name.object_id               pressure_history
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_exptl_crystal.recrystallization_method

    _definition.id                '_exptl_crystal.recrystallization_method'
    _alias.definition_id          '_exptl_crystal_recrystallization_method'
    _definition.update            2012-12-11
    _description.text
;
    Method used to recrystallize the sample. Sufficient details should
    be given for the procedure to be repeated. Temperatures, solvents,
    flux or carrier gases with concentrations or pressures and ambient
    atmosphere details should be given.
;
    _name.category_id             exptl_crystal
    _name.object_id               recrystallization_method
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_exptl_crystal.size_length

    _definition.id                '_exptl_crystal.size_length'
    _alias.definition_id          '_exptl_crystal_size_length'
    _definition.update            2012-11-22
    _description.text
;
    The length of needle/cylindrical crystals.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_length
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   millimetres

save_

save_exptl_crystal.size_length_su

    _definition.id                '_exptl_crystal.size_length_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal.size_length.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_length_su
    _name.linked_item_id          '_exptl_crystal.size_length'
    _units.code                   millimetres

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal.size_max

    _definition.id                '_exptl_crystal.size_max'
    _alias.definition_id          '_exptl_crystal_size_max'
    _definition.update            2012-11-22
    _description.text
;
    The maximum dimension of a crystal.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_max
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   millimetres

save_

save_exptl_crystal.size_max_su

    _definition.id                '_exptl_crystal.size_max_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal.size_max.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_max_su
    _name.linked_item_id          '_exptl_crystal.size_max'
    _units.code                   millimetres

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal.size_mid

    _definition.id                '_exptl_crystal.size_mid'
    _alias.definition_id          '_exptl_crystal_size_mid'
    _definition.update            2023-01-16
    _description.text
;
    The medial dimension of a crystal.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_mid
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   millimetres

save_

save_exptl_crystal.size_mid_su

    _definition.id                '_exptl_crystal.size_mid_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal.size_mid.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_mid_su
    _name.linked_item_id          '_exptl_crystal.size_mid'
    _units.code                   millimetres

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal.size_min

    _definition.id                '_exptl_crystal.size_min'
    _alias.definition_id          '_exptl_crystal_size_min'
    _definition.update            2012-11-22
    _description.text
;
    The minimum dimension of a crystal.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_min
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   millimetres

save_

save_exptl_crystal.size_min_su

    _definition.id                '_exptl_crystal.size_min_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal.size_min.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_min_su
    _name.linked_item_id          '_exptl_crystal.size_min'
    _units.code                   millimetres

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal.size_rad

    _definition.id                '_exptl_crystal.size_rad'
    _alias.definition_id          '_exptl_crystal_size_rad'
    _definition.update            2012-11-22
    _description.text
;
    The radius of a spherical or cylindrical crystal.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_rad
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   millimetres

save_

save_exptl_crystal.size_rad_su

    _definition.id                '_exptl_crystal.size_rad_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal.size_rad.
;
    _name.category_id             exptl_crystal
    _name.object_id               size_rad_su
    _name.linked_item_id          '_exptl_crystal.size_rad'
    _units.code                   millimetres

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal.thermal_history

    _definition.id                '_exptl_crystal.thermal_history'
    _alias.definition_id          '_exptl_crystal_thermal_history'
    _definition.update            2012-11-22
    _description.text
;
    Details concerning the thermal history of the crystals.
;
    _name.category_id             exptl_crystal
    _name.object_id               thermal_history
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_EXPTL_CRYSTAL_APPEARANCE

    _definition.id                EXPTL_CRYSTAL_APPEARANCE
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-22
    _description.text
;
    The category of enumeration items used to specify information about the
    crystal colour and appearance.
;
    _name.category_id             EXPTL_CRYSTAL
    _name.object_id               EXPTL_CRYSTAL_APPEARANCE

save_

save_exptl_crystal_appearance.general

    _definition.id                '_exptl_crystal_appearance.general'

    loop_
      _alias.definition_id
         '_exptl_crystal_colour_lustre'
         '_exptl_crystal.colour_lustre'

    _definition.update            2021-11-04
    _description.text
;
    Appearance of the crystal as prescribed state codes. Note that 'dull'
    and 'clear' should no longer be used.
;
    _name.category_id             exptl_crystal_appearance
    _name.object_id               general
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    loop_
      _enumeration_set.state
         metallic
         lustrous
         transparent
         translucent
         opaque
         dull
         clear
         .

save_

save_exptl_crystal_appearance.hue

    _definition.id                '_exptl_crystal_appearance.hue'

    loop_
      _alias.definition_id
         '_exptl_crystal_colour_primary'
         '_exptl_crystal.colour_primary'

    _definition.update            2021-11-04
    _description.text
;
    Colour hue of the crystals as prescribed state codes.
;
    _name.category_id             exptl_crystal_appearance
    _name.object_id               hue
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    _import.get                   [{'file':templ_enum.cif  'save':colour_rgb}]

save_

save_exptl_crystal_appearance.intensity

    _definition.id                '_exptl_crystal_appearance.intensity'

    loop_
      _alias.definition_id
         '_exptl_crystal_colour_modifier'
         '_exptl_crystal.colour_modifier'

    _definition.update            2021-11-04
    _description.text
;
    Colour intensity of the crystal as prescribed state codes.
;
    _name.category_id             exptl_crystal_appearance
    _name.object_id               intensity
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    loop_
      _enumeration_set.state
         dark
         light
         intense
         pale
         whitish
         blackish
         greyish
         grayish
         brownish
         reddish
         pinkish
         orangish
         yellowish
         greenish
         bluish
         .

save_

save_EXPTL_CRYSTAL_FACE

    _definition.id                EXPTL_CRYSTAL_FACE
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items which specify the dimensions of the
    crystal used in the diffraction measurements.
;
    _name.category_id             EXPTL_CRYSTAL
    _name.object_id               EXPTL_CRYSTAL_FACE

    loop_
      _category_key.name
         '_exptl_crystal_face.index_h'
         '_exptl_crystal_face.index_k'
         '_exptl_crystal_face.index_l'

save_

save_exptl_crystal_face.diffr_chi

    _definition.id                '_exptl_crystal_face.diffr_chi'
    _alias.definition_id          '_exptl_crystal_face_diffr_chi'
    _name.category_id             exptl_crystal_face
    _name.object_id               diffr_chi

    _import.get                   [{'file':templ_attr.cif  'save':face_angle}]

save_

save_exptl_crystal_face.diffr_chi_su

    _definition.id                '_exptl_crystal_face.diffr_chi_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal_face.diffr_chi.
;
    _name.category_id             exptl_crystal_face
    _name.object_id               diffr_chi_su
    _name.linked_item_id          '_exptl_crystal_face.diffr_chi'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal_face.diffr_kappa

    _definition.id                '_exptl_crystal_face.diffr_kappa'
    _alias.definition_id          '_exptl_crystal_face_diffr_kappa'
    _name.category_id             exptl_crystal_face
    _name.object_id               diffr_kappa

    _import.get                   [{'file':templ_attr.cif  'save':face_angle}]

save_

save_exptl_crystal_face.diffr_kappa_su

    _definition.id                '_exptl_crystal_face.diffr_kappa_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal_face.diffr_kappa.
;
    _name.category_id             exptl_crystal_face
    _name.object_id               diffr_kappa_su
    _name.linked_item_id          '_exptl_crystal_face.diffr_kappa'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal_face.diffr_phi

    _definition.id                '_exptl_crystal_face.diffr_phi'
    _alias.definition_id          '_exptl_crystal_face_diffr_phi'
    _name.category_id             exptl_crystal_face
    _name.object_id               diffr_phi

    _import.get                   [{'file':templ_attr.cif  'save':face_angle}]

save_

save_exptl_crystal_face.diffr_phi_su

    _definition.id                '_exptl_crystal_face.diffr_phi_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal_face.diffr_phi.
;
    _name.category_id             exptl_crystal_face
    _name.object_id               diffr_phi_su
    _name.linked_item_id          '_exptl_crystal_face.diffr_phi'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal_face.diffr_psi

    _definition.id                '_exptl_crystal_face.diffr_psi'
    _alias.definition_id          '_exptl_crystal_face_diffr_psi'
    _name.category_id             exptl_crystal_face
    _name.object_id               diffr_psi

    _import.get                   [{'file':templ_attr.cif  'save':face_angle}]

save_

save_exptl_crystal_face.diffr_psi_su

    _definition.id                '_exptl_crystal_face.diffr_psi_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal_face.diffr_psi.
;
    _name.category_id             exptl_crystal_face
    _name.object_id               diffr_psi_su
    _name.linked_item_id          '_exptl_crystal_face.diffr_psi'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_exptl_crystal_face.hkl

    _definition.id                '_exptl_crystal_face.hkl'
    _definition.update            2021-03-01
    _description.text
;
    Miller indices of the crystal face.
;
    _name.category_id             exptl_crystal_face
    _name.object_id               hkl
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With f as exptl_crystal_face

     _exptl_crystal_face.hkl = [f.index_h, f.index_h, f.index_l]
;

save_

save_exptl_crystal_face.index_h

    _definition.id                '_exptl_crystal_face.index_h'
    _alias.definition_id          '_exptl_crystal_face_index_h'
    _name.category_id             exptl_crystal_face
    _name.object_id               index_h

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_exptl_crystal_face.index_k

    _definition.id                '_exptl_crystal_face.index_k'
    _alias.definition_id          '_exptl_crystal_face_index_k'
    _name.category_id             exptl_crystal_face
    _name.object_id               index_k

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_exptl_crystal_face.index_l

    _definition.id                '_exptl_crystal_face.index_l'
    _alias.definition_id          '_exptl_crystal_face_index_l'
    _name.category_id             exptl_crystal_face
    _name.object_id               index_l

    _import.get                   [{'file':templ_attr.cif  'save':miller_index}]

save_

save_exptl_crystal_face.perp_dist

    _definition.id                '_exptl_crystal_face.perp_dist'
    _alias.definition_id          '_exptl_crystal_face_perp_dist'
    _definition.update            2012-11-22
    _description.text
;
    Perpendicular distance of face to the centre of rotation of the crystal.
;
    _name.category_id             exptl_crystal_face
    _name.object_id               perp_dist
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   millimetres

save_

save_exptl_crystal_face.perp_dist_su

    _definition.id                '_exptl_crystal_face.perp_dist_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _exptl_crystal_face.perp_dist.
;
    _name.category_id             exptl_crystal_face
    _name.object_id               perp_dist_su
    _name.linked_item_id          '_exptl_crystal_face.perp_dist'
    _units.code                   millimetres

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_SPACE_GROUP

    _definition.id                SPACE_GROUP
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2025-06-18
    _description.text
;
    The category of data items used to specify space group
    information about the crystal used in the diffraction measurements.

    Space-group types are identified by their number as listed in
    International Tables for Crystallography Volume A, or by their
    Schoenflies symbol. Specific settings of the space groups can
    be identified by their Hall symbol, by specifying their
    symmetry operations or generators, or by giving the
    transformation that relates the specific setting to the
    reference setting based on International Tables Volume A and
    stored in this dictionary.

    The commonly used Hermann-Mauguin symbol determines the
    space-group type uniquely, but several different Hermann-Mauguin
    symbols may refer to the same space-group type. A
    Hermann-Mauguin symbol contains information on the choice of
    the basis, but not on the choice of origin.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             EXPTL
    _name.object_id               SPACE_GROUP

save_

save_space_group.bravais_type

    _definition.id                '_space_group.Bravais_type'
    _definition.update            2025-06-18
    _description.text
;
    The symbol denoting the lattice type (Bravais type) to which the
    translational subgroup (vector lattice) of the space group
    belongs. It consists of a lower-case letter indicating the
    crystal system followed by an upper-case letter indicating
    the lattice centring. The setting-independent symbol mS
    replaces the setting-dependent symbols mB and mC, and the
    setting-independent symbol oS replaces the setting-dependent
    symbols oA, oB and oC.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.,
         Tables 1.3.4.1 and 2.1.1.1.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group
    _name.object_id               Bravais_type
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
         aP
         mP
         mS
         oP
         oS
         oI
         oF
         tP
         tI
         hP
         hR
         cP
         cI
         cF

    _description_example.case     aP
    _description_example.detail   'Triclinic (anorthic) primitive lattice.'

save_

save_space_group.centring_type

    _definition.id                '_space_group.centring_type'
    _definition.update            2014-06-12
    _description.text
;
    Symbol for the lattice centring. This symbol may be dependent
    on the coordinate system chosen.
;
    _name.category_id             space_group
    _name.object_id               centring_type
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         P         'Primitive            no centring'
         A         'A-face centred       (0,1/2,1/2)'
         B         'B-face centred       (1/2,0,1/2)'
         C         'C-face centred       (1/2,1/2,0)'
         F         'All faces centred    (0,1/2,1/2), (1/2,0,1/2), (1/2,1/2,0)'
         I         'Body centred         (1/2,1/2,1/2)'
         R         'Rhombohedral obverse centred (2/3,1/3,1/3), (1/3,2/3,2/3)'
         Rrev      'Rhombohedral reverse centred (1/3,2/3,1/3), (2/3,1/3,2/3)'
         H         'Hexagonal centred    (2/3,1/3,0), (1/3,2/3,0)'

save_

save_space_group.crystal_system

    _definition.id                '_space_group.crystal_system'
    _alias.definition_id          '_space_group_crystal_system'
    _definition.update            2016-05-09
    _description.text
;
    The name of the system of geometric crystal classes of space
    groups (crystal system) to which the space group belongs.
    Note that rhombohedral space groups belong to the
    trigonal system.
;
    _name.category_id             space_group
    _name.object_id               crystal_system
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
         triclinic
         monoclinic
         orthorhombic
         tetragonal
         trigonal
         hexagonal
         cubic

save_

save_space_group.it_coordinate_system_code

    _definition.id                '_space_group.IT_coordinate_system_code'
    _definition.update            2025-06-18
    _description.text
;
    A qualifier taken from the enumeration list identifying which
    setting in International Tables for Crystallography Volume A
    (2016) (IT) is used.  See IT Table 1.5.4.4, Section 2.1.3.15,
    Table 2.1.3.11 and Fig. 2.1.3.4.  This item is not
    computer-interpretable and cannot be used to define the
    coordinate system.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group
    _name.object_id               IT_coordinate_system_code
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         b1                     'monoclinic unique axis b, cell choice 1, abc'
         b2                     'monoclinic unique axis b, cell choice 2, abc'
         b3                     'monoclinic unique axis b, cell choice 3, abc'
         -b1                    'monoclinic unique axis b, cell choice 1, c-ba'
         -b2                    'monoclinic unique axis b, cell choice 2, c-ba'
         -b3                    'monoclinic unique axis b, cell choice 3, c-ba'
         c1                     'monoclinic unique axis c, cell choice 1, abc'
         c2                     'monoclinic unique axis c, cell choice 2, abc'
         c3                     'monoclinic unique axis c, cell choice 3, abc'
         -c1                    'monoclinic unique axis c, cell choice 1, ba-c'
         -c2                    'monoclinic unique axis c, cell choice 2, ba-c'
         -c3                    'monoclinic unique axis c, cell choice 3, ba-c'
         a1                     'monoclinic unique axis a, cell choice 1, abc'
         a2                     'monoclinic unique axis a, cell choice 2, abc'
         a3                     'monoclinic unique axis a, cell choice 3, abc'
         -a1                    'monoclinic unique axis a, cell choice 1, -acb'
         -a2                    'monoclinic unique axis a, cell choice 2, -acb'
         -a3                    'monoclinic unique axis a, cell choice 3, -acb'
         abc                    'orthorhombic'
         ba-c                   'orthorhombic'
         cab                    'orthorhombic'
         -cba                   'orthorhombic'
         bca                    'orthorhombic'
         a-cb                   'orthorhombic'
         1abc                   'orthorhombic origin choice 1'
         1ba-c                  'orthorhombic origin choice 1'
         1cab                   'orthorhombic origin choice 1'
         1-cba                  'orthorhombic origin choice 1'
         1bca                   'orthorhombic origin choice 1'
         1a-cb                  'orthorhombic origin choice 1'
         2abc                   'orthorhombic origin choice 2'
         2ba-c                  'orthorhombic origin choice 2'
         2cab                   'orthorhombic origin choice 2'
         2-cba                  'orthorhombic origin choice 2'
         2bca                   'orthorhombic origin choice 2'
         2a-cb                  'orthorhombic origin choice 2'
         1                      'tetragonal or cubic origin choice 1'
         2                      'tetragonal or cubic origin choice 2'
         h                      'trigonal using hexagonal axes'
         r                      'trigonal using rhombohedral axes'

save_

save_space_group.it_number

    _definition.id                '_space_group.IT_number'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_space_group_IT_number'                                    .
         '_symmetry.Int_Tables_number'                               .
         '_symmetry_Int_Tables_number'                               2003-10-04

    _definition.update            2024-02-14
    _description.text
;
    The number as assigned in International Tables for Crystallography
    Vol. A, specifying the proper affine class (i.e. the orientation
    preserving affine class) of space groups (crystallographic space
    group type) to which the space group belongs. This number defines
    the space group type but not the coordinate system expressed.
;
    _name.category_id             space_group
    _name.object_id               IT_number
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:230
    _units.code                   none

save_

save_space_group.laue_class

    _definition.id                '_space_group.Laue_class'
    _definition.update            2014-06-12
    _description.text
;
    The Hermann-Mauguin symbol of the geometric crystal class of the
    point group of the space group where a centre of inversion is
    added if not already present.
;
    _name.category_id             space_group
    _name.object_id               Laue_class
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
         -1
         2/m
         mmm
         4/m
         4/mmm
         -3
         -3m
         6/m
         6/mmm
         m-3
         m-3m

save_

save_space_group.multiplicity

    _definition.id                '_space_group.multiplicity'
    _definition.update            2021-03-01
    _description.text
;
    Number of unique symmetry elements in the space group.
;
    _name.category_id             space_group
    _name.object_id               multiplicity
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:192
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    n =  0

    Loop  s  as  space_group_symop  n +=  1

     _space_group.multiplicity  =   n
;

save_

save_space_group.name_h-m_alt

    _definition.id                '_space_group.name_H-M_alt'
    _alias.definition_id          '_space_group_name_H-M_alt'
    _definition.update            2023-01-13
    _description.text
;
    _space_group.name_H-M_alt allows for any Hermann-Mauguin symbol
    to be given. The way in which this item is used is determined
    by the user and in general is not intended to be interpreted by
    computer. It may, for example, be used to give one of the
    extended Hermann-Mauguin symbols given in Table 4.3.1 of
    International Tables for Crystallography Vol. A (1995) or
    a Hermann-Mauguin symbol for a conventional or unconventional
    setting.
    Each component of the space group name is separated by a
    space or underscore. The use of space is strongly
    recommended. The underscore is only retained because it
    was used in earlier archived files. It should not be
    used in new CIFs. Subscripts should appear without special
    symbols. Bars should be given as negative signs before the
    numbers to which they apply.
    The commonly used Hermann-Mauguin symbol determines the space
    group type uniquely, but a given space group type may be
    described by more than one Hermann-Mauguin symbol. The space
    group type is best described using _space_group.IT_number.
    The Hermann-Mauguin symbol may contain information on the
    choice of basis though not on the choice of origin. To
    define the setting uniquely use _space_group.name_Hall or
    list the symmetry operations.
;
    _name.category_id             space_group
    _name.object_id               name_H_M_alt
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
      _description_example.detail
         'P 1 21/m 1'                            'Space group No. 10.'
         'P 2/n 2/n 2/n (origin at -1)'          'Space group No. 48 origin 2.'
         'R -3 2/m'                              'Space group No. 166 rhomb.'

save_

save_space_group.name_h-m_alt_description

    _definition.id                '_space_group.name_H-M_alt_description'
    _definition.update            2016-05-13
    _description.text
;
    A free-text description of the code appearing in
    _space_group.name_H-M_alt.
;
    _name.category_id             space_group
    _name.object_id               name_H_M_alt_description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_space_group.name_h-m_full

    _definition.id                '_space_group.name_H-M_full'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_symmetry.space_group_name_H-M'                            .
         '_symmetry_space_group_name_H-M'                            2003-10-04

    _definition.update            2025-06-18
    _description.text
;
    The full international Hermann-Mauguin space-group symbol as
    defined in Section 2.1.3.3 and given as the second item of the
    second line of each of the space-group tables of Chapter 2.3 of
    International Tables for Crystallography Volume A (2016).

    Each component of the space-group name is separated by a
    space or an underscore character. The use of a space is
    strongly recommended.  The underscore is only retained
    because it was used in old CIFs. It should not be used in
    new CIFs.

    Subscripts should appear without special symbols. Bars should
    be given as negative signs before the numbers to which they
    apply. The commonly used Hermann-Mauguin symbol determines the
    space-group type uniquely, but a given space-group type may
    be described by more than one Hermann-Mauguin symbol. The
    space-group type is best described using
    _space_group.IT_number or _space_group.name_Schoenflies. The
    full international Hermann-Mauguin symbol contains information
    about the choice of basis for monoclinic and orthorhombic
    space groups, but does not give information about the choice
    of origin. To define the setting uniquely use
    _space_group.name_Hall, or list the symmetry operations
    or generators.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group
    _name.object_id               name_H_M_full
    _type.purpose                 Describe
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text
    _description_example.case     'P 21/n 21/m 21/a'
    _description_example.detail   'Full symbol for Pnma.'

save_

save_space_group.name_h-m_ref

    _definition.id                '_space_group.name_H-M_ref'
    _definition.update            2021-10-21
    _description.text
;
    The short international Hermann-Mauguin space-group symbol as
    defined in Section 2.1.3.3 and given as the first item of each
    space-group table in Chapter 2.3 of International Tables
    for Crystallography Volume A (2016).

    Each component of the space-group name is separated by a
    space character. Subscripts appear without special symbols.
    Bars are given as negative signs before the numbers to which
    they apply.

    The short international Hermann-Mauguin symbol determines
    the space-group type uniquely. However, the space-group
    type is better described using _space_group.IT_number or
    _space_group.name_Schoenflies. The short international
    Hermann-Mauguin symbol contains no information on the
    choice of basis or origin. To define the setting uniquely
    use _space_group.name_Hall, or list the symmetry operations
    or generators.

    _space_group.name_H-M_alt may be used to give the
    Hermann-Mauguin symbol corresponding to the setting used.

    In the enumeration list, each possible value is identified by
    space-group number and Schoenflies symbol.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group
    _name.object_id               name_H_M_ref
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    _import.get                   [{'file':templ_enum.cif  'save':h_m_ref}]

save_

save_space_group.name_hall

    _definition.id                '_space_group.name_Hall'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_space_group_name_Hall'                                    .
         '_symmetry_space_group_name_Hall'                           2003-10-04
         '_symmetry.space_group_name_Hall'                           .

    _definition.update            2023-02-13
    _description.text
;
    Space group symbol defined by Hall. Each component of the
    space group name is separated by a space or an underscore.
    The use of space is strongly recommended because it specifies
    the coordinate system. The underscore in the name is only
    retained because it was used in earlier archived files. It
    should not be used in new CIFs.
    Ref: Hall, S. R. (1981). Acta Cryst. A37, 517-525
         [See also International Tables for Crystallography,
         Vol. B (1993) 1.4 Appendix B]
;
    _name.category_id             space_group
    _name.object_id               name_Hall
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'P 2ac 2n'
         '-R 3 2"'
         'P 61 2 2 (0 0 -1)'

save_

save_space_group.name_schoenflies

    _definition.id                '_space_group.name_Schoenflies'
    _definition.update            2023-02-06
    _description.text
;
    The Schoenflies symbol as listed in International Tables for
    Crystallography Volume A denoting the proper affine class (i.e.
    orientation-preserving affine class) of space groups
    (space-group type) to which the space group belongs. This
    symbol defines the space-group type independently of the
    coordinate system in which the space group is expressed.

    The symbol is given with a period, '.', separating the
    Schoenflies point group and the superscript.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group
    _name.object_id               name_Schoenflies
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _description_example.case     C2h.5
    _description_example.detail   'Schoenflies symbol for space group No. 14.'

    _import.get                   [{'file':templ_enum.cif  'save':schoenflies}]

save_

save_space_group.patterson_name_h-m

    _definition.id                '_space_group.Patterson_name_H-M'
    _definition.update            2025-06-18
    _description.text
;
    The Hermann-Mauguin symbol of the type of that centrosymmetric
    symmorphic space group to which the Patterson function belongs;
    see Table 2.1.3.3 in International Tables for Crystallography
    Volume A (2016).

    A space separates each symbol referring to different axes.
    Underscores may replace the spaces, but this use is discouraged.
    Subscripts should appear without special symbols.
    Bars should be given as negative signs before the number
    to which they apply.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed., Table 2.1.3.3.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group
    _name.object_id               Patterson_name_H_M
    _type.purpose                 Describe
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'P -1'
         'P 2/m'
         'C 2/m'
         'P m m m'
         'C m m m'
         'I m m m'
         'F m m m'
         'P 4/m'
         'I 4/m'
         'P 4/m m m'
         'I 4/m m m'
         'P -3'
         'R -3'
         'P -3 m 1'
         'R -3 m'
         'P -3 1 m'
         'P 6/m'
         'P 6/m m m'
         'P m -3'
         'I m -3'
         'F m -3'
         'P m -3 m'
         'I m -3 m'
         'F m -3 m'

save_

save_space_group.point_group_h-m

    _definition.id                '_space_group.point_group_H-M'
    _definition.update            2016-05-13
    _description.text
;
    The Hermann-Mauguin symbol denoting the geometric crystal
    class of space groups to which the space group belongs, and
    the geometric crystal class of point groups to which the
    point group of the space group belongs.
;
    _name.category_id             space_group
    _name.object_id               point_group_H_M
    _type.purpose                 Describe
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         -4
         4/m

save_

save_symmetry.cell_setting

    _definition.id                '_symmetry.cell_setting'
    _definition_replaced.id       1
    _definition_replaced.by       '_space_group.crystal_system'
    _alias.definition_id          '_symmetry_cell_setting'
    _alias.deprecation_date       2003-10-04
    _definition.update            2024-02-14
    _description.text
;
    This data item should not be used and is DEPRECATED as it is
    ambiguous.

    The original definition is as follows:

    The cell settings for this space-group symmetry.
;
    _name.category_id             space_group
    _name.object_id               deprecated_setting
    _type.purpose                 Describe
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
         triclinic
         monoclinic
         orthorhombic
         tetragonal
         rhombohedral
         trigonal
         hexagonal
         cubic

save_

save_SPACE_GROUP_GENERATOR

    _definition.id                SPACE_GROUP_GENERATOR
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2025-04-28
    _description.text
;
    The category of data items used to list generators for
    the space group
;
    _name.category_id             SPACE_GROUP
    _name.object_id               SPACE_GROUP_GENERATOR
    _category_key.name            '_space_group_generator.id'

save_

save_space_group_generator.id

    _definition.id                '_space_group_generator.id'
    _definition.update            2025-04-28
    _description.text
;
    Arbitrary identifier for each entry in the _space_group_generator.xyz list.
;
    _name.category_id             space_group_generator
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_space_group_generator.xyz

    _definition.id                '_space_group_generator.xyz'
    _definition.update            2016-05-10
    _description.text
;
    A parsable string giving one of the symmetry generators of the
    space group in algebraic form.  If W is a matrix representation
    of the rotational part of the generator defined by the positions
    and signs of x, y and z, and w is a column of translations
    defined by the fractions, an equivalent position X' is
    generated from a given position X by

              X' = WX + w.

    (Note: X is used to represent the bold italic x in International
    Tables for Crystallography Volume A, Chapter 1.5.)

    When a list of symmetry generators is given, it is assumed
    that the complete list of symmetry operations of the space
    group (including the identity operation) can be generated
    through repeated multiplication of the generators, that is,
    (W3, w3) is an operation of the space group if (W2,w2) and
    (W1,w1) [where (W1,w1) is applied first] are either operations
    or generators and:

            W3 = W2 x W1
            w3 = W2 x w1 + w2.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group_generator
    _name.object_id               xyz
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code
    _description_example.case     x,1/2-y,1/2+z
    _description_example.detail
;
    C glide reflection through the plane (x,1/4,z) chosen as one of
    the generators of the space group.
;

save_

save_SPACE_GROUP_SYMOP

    _definition.id                SPACE_GROUP_SYMOP
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to describe symmetry equivalent sites
    in the crystal unit cell.
;
    _name.category_id             SPACE_GROUP
    _name.object_id               SPACE_GROUP_SYMOP
    _category_key.name            '_space_group_symop.id'

save_

save_space_group_symop.id

    _definition.id                '_space_group_symop.id'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_space_group_symop_id'                                     .
         '_symmetry_equiv.pos_site_id'                               .
         '_symmetry_equiv_pos_site_id'                               2003-10-04

    _definition.update            2024-02-14
    _description.text
;
    Index identifying each entry in the _space_group_symop.operation_xyz
    list. It is normally the sequence number of the entry in that
    list, and should be identified with the code 'n' in the geometry
    symmetry codes of the form 'n_pqr'. The identity operation
    (i.e. _space_group_symop.operation_xyz set to 'x,y,z') should be
    set to 1.
;
    _name.category_id             space_group_symop
    _name.object_id               id
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:192
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    _space_group_symop.id = Current_row(space_group_symop.id) + 1
;

save_

save_space_group_symop.operation_description

    _definition.id                '_space_group_symop.operation_description'
    _definition.update            2016-05-13
    _description.text
;
    An optional text description of a particular symmetry operation
    of the space group.
;
    _name.category_id             space_group_symop
    _name.object_id               operation_description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_space_group_symop.operation_xyz

    _definition.id                '_space_group_symop.operation_xyz'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_space_group_symop_operation_xyz'                          .
         '_symmetry_equiv.pos_as_xyz'                                .
         '_symmetry_equiv_pos_as_xyz'                                2003-10-04

    _definition.update            2024-02-14
    _description.text
;
    A parsable string giving one of the symmetry operations of the
    space group in algebraic form.  If W is a matrix representation
    of the rotational part of the symmetry operation defined by the
    positions and signs of x, y and z, and w is a column of
    translations defined by fractions, an equivalent position
    X' is generated from a given position X by the equation

              X' = WX + w.

    (Note: X is used to represent bold_italics_x in International
    Tables for Crystallography Vol. A, Part 5.)

    When a list of symmetry operations is given, it must contain
    a complete set of coordinate representatives which generates
    all the operations of the space group by the addition of
    all primitive translations of the space group. Such
    representatives are to be found as the coordinates of
    the general-equivalent position in International Tables for
    Crystallography Vol. A (2002), to which it is necessary to
    add any centring translations shown above the
    general-equivalent position.

    That is to say, it is necessary to list explicitly all the
    symmetry operations required to generate all the atoms in
    the unit cell defined by the setting used.
;
    _name.category_id             space_group_symop
    _name.object_id               operation_xyz
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     x,1/2-y,1/2+z
    _description_example.detail
        'Glide reflection through the plane (x,1/4,z) with glide vector (1/2)c.'

save_

save_space_group_symop.r

    _definition.id                '_space_group_symop.R'
    _definition.update            2021-07-07
    _description.text
;
    A matrix containing the symmetry rotation operations of a space group.

                   |  r11  r12  r13  |
             R  =  |  r21  r22  r23  |
                   |  r31  r32  r33  |
;
    _name.category_id             space_group_symop
    _name.object_id               R
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
                   sm =  _space_group_symop.Seitz_matrix
    _space_group_symop.R =  [[sm[0,0],sm[0,1],sm[0,2]],
                          [sm[1,0],sm[1,1],sm[1,2]],
                          [sm[2,0],sm[2,1],sm[2,2]]]
;

save_

save_space_group_symop.rt

    _definition.id                '_space_group_symop.RT'
    _definition.update            2021-03-03
    _description.text
;
    The transpose of the symmetry rotation matrix representing the point
    group operations of the space group.

                    |  r11  r21  r31  |
             RT  =  |  r12  r22  r32  |
                    |  r13  r23  r33  |
;
    _name.category_id             space_group_symop
    _name.object_id               RT
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    _space_group_symop.RT =  Transpose (_space_group_symop.R)
;

save_

save_space_group_symop.seitz_matrix

    _definition.id                '_space_group_symop.Seitz_matrix'
    _definition.update            2021-03-01
    _description.text
;
    A matrix containing the symmetry operations of a space group
    in 4x4 Seitz format.

                   |  r11  r12  r13  t1  |
      | R  T |     |  r21  r22  r23  t2  |
      | 0  1 |     |  r31  r32  r33  t3  |
                   |   0    0    0    1  |
;
    _name.category_id             space_group_symop
    _name.object_id               Seitz_matrix
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[4,4]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    _space_group_symop.Seitz_matrix =
    SeitzFromJones(_space_group_symop.operation_xyz)
;

save_

save_space_group_symop.t

    _definition.id                '_space_group_symop.T'
    _definition.update            2021-03-01
    _description.text
;
    A vector containing the symmetry translation operations of a space group.
;
    _name.category_id             space_group_symop
    _name.object_id               T
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
                   sm =  _space_group_symop.Seitz_matrix

    _space_group_symop.T =   [sm[0,3],sm[1,3],sm[2,3]]
;

save_

save_SPACE_GROUP_WYCKOFF

    _definition.id                SPACE_GROUP_WYCKOFF
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2023-01-13
    _description.text
;
    Contains information about Wyckoff positions of a space group.
    Only one site can be given for each special position, but the
    remainder can be generated by applying the symmetry operations
    stored in _space_group_symop.operation_xyz.
;
    _name.category_id             SPACE_GROUP
    _name.object_id               SPACE_GROUP_WYCKOFF
    _category_key.name            '_space_group_Wyckoff.id'

save_

save_space_group_wyckoff.coords_xyz

    _definition.id                '_space_group_Wyckoff.coords_xyz'
    _definition.update            2014-06-12
    _description.text
;
    Coordinates of one site of a Wyckoff position expressed in
    terms of its fractional coordinates (x,y,z) in the unit cell.
    To generate the coordinates of all sites of this Wyckoff
    position, it is necessary to multiply these coordinates by the
    symmetry operations stored in _space_group_symop.operation_xyz.
;
    _name.category_id             space_group_Wyckoff
    _name.object_id               coords_xyz
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code
    _description_example.case     x,1/2,0
    _description_example.detail
        'Coordinates of Wyckoff site with 2.. symmetry.'

save_

save_space_group_wyckoff.id

    _definition.id                '_space_group_Wyckoff.id'
    _definition.update            2023-09-12
    _description.text
;
    An arbitrary code that is unique to a particular Wyckoff position.
;
    _name.category_id             space_group_Wyckoff
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_space_group_wyckoff.letter

    _definition.id                '_space_group_Wyckoff.letter'
    _definition.update            2025-06-18
    _description.text
;
    The Wyckoff letter associated with this position, as given in
    International Tables for Crystallography Volume A. The
    enumeration values '\a' and α are equivalent, and correspond to
    the Greek letter 'alpha' used in International Tables.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group_Wyckoff
    _name.object_id               letter
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    _import.get
        [{'file':templ_enum.cif  'save':wyckoff_letter}]

save_

save_space_group_wyckoff.multiplicity

    _definition.id                '_space_group_Wyckoff.multiplicity'
    _definition.update            2025-06-18
    _description.text
;
    The multiplicity of this Wyckoff position as given in
    International Tables Volume A. It is the number of equivalent
    sites per conventional unit cell.

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group_Wyckoff
    _name.object_id               multiplicity
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:192
    _units.code                   none

save_

save_space_group_wyckoff.site_symmetry

    _definition.id                '_space_group_Wyckoff.site_symmetry'
    _definition.update            2025-06-18
    _description.text
;
    The subgroup of the space group that leaves the point fixed.
    It is isomorphic to a subgroup of the point group of the
    space group. The site-symmetry symbol indicates the symmetry
    in the symmetry direction determined by the Hermann-Mauguin
    symbol of the space group (see International Tables for
    Crystallography Volume A, Section 2.1.3.12).

    Ref: International Tables for Crystallography (2016). Volume A,
         Space-group symmetry, edited by M. I. Aroyo, 6th ed.
         Chichester: John Wiley & Sons.
;
    _name.category_id             space_group_Wyckoff
    _name.object_id               site_symmetry
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

    loop_
      _description_example.case
      _description_example.detail
         2.22
;
         Position 2b in space group No. 94, P 42 21 2.
;
         42.2
;
         Position 6b in space group No. 222, P n -3 n.
;
         2..
;
         Site symmetry for the Wyckoff position 96f in space group
         No. 228, F d -3 c.  The site-symmetry group is isomorphic to
         the point group 2 with the twofold axis along one of the {100}
         directions.
;

save_

save_MODEL

    _definition.id                MODEL
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2024-05-15
    _description.text
;
    Items in the MODEL Category specify data for the crystal structure
    postulated and modelled from the atomic coordinates derived and
    refined from the diffraction information. The structural model is
    described principally in terms of the geometry of the 'connected'
    atom sites and the crystal symmetry in which they reside.
;
    _name.category_id             CIF_CORE_HEAD
    _name.object_id               MODEL

save_

save_GEOM

    _definition.id                GEOM
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-22
    _description.text
;
    The category of data items used to specify the geometry
    of the structural model as derived from the atomic sites.
    The geometry is expressed in terms of the interatomic
    angles (GEOM_ANGLE data), covalent bond distances
    (GEOM_BOND data), contact distances (GEOM_CONTACT data),
    hydrogen bonds (GEOM_HBOND data) and torsion geometry
    (GEOM_TORSION data).
    Geometry data are usually redundant, in that they can be
    calculated from other more fundamental quantities in the data
    block. However, they serve the dual purposes of providing a
    check on the correctness of both sets of data and of enabling
    the most important geometric data to be identified for
    publication by setting the appropriate publication flag.
;
    _name.category_id             MODEL
    _name.object_id               GEOM

save_

save_geom.bond_distance_incr

    _definition.id                '_geom.bond_distance_incr'
    _definition.update            2012-11-22
    _description.text
;
    Increment added to the bond radii for the atomic species to
    specify the maximum permitted "bonded" distance between two
    atom sites.
;
    _name.category_id             geom
    _name.object_id               bond_distance_incr
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _units.code                   angstroms

save_

save_geom.bond_distance_min

    _definition.id                '_geom.bond_distance_min'
    _definition.update            2012-11-22
    _description.text
;
    Minimum permitted "bonded" distance between two atom sites.
;
    _name.category_id             geom
    _name.object_id               bond_distance_min
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _units.code                   angstroms

save_

save_geom.contact_distance_incr

    _definition.id                '_geom.contact_distance_incr'
    _definition.update            2012-11-22
    _description.text
;
    Increment added to the bond radii for the atomic species to
    specify the maximum permitted "contact" distance between two
    "non-bonded" atom sites.
;
    _name.category_id             geom
    _name.object_id               contact_distance_incr
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _units.code                   angstroms

save_

save_geom.contact_distance_min

    _definition.id                '_geom.contact_distance_min'
    _definition.update            2012-11-22
    _description.text
;
    Minimum permitted "contact" distance between two "non-bonded" atom sites.
;
    _name.category_id             geom
    _name.object_id               contact_distance_min
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _units.code                   angstroms

save_

save_geom.special_details

    _definition.id                '_geom.special_details'

    loop_
      _alias.definition_id
         '_geom_special_details'
         '_geom.details'

    _definition.update            2012-11-22
    _description.text
;
    Description of geometry information not covered by the existing data
    names in the geometry categories, such as least-squares planes.
;
    _name.category_id             geom
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_GEOM_ANGLE

    _definition.id                GEOM_ANGLE
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to specify the geometry angles in the
    structural model as derived from the atomic sites.
;
    _name.category_id             GEOM
    _name.object_id               GEOM_ANGLE

    loop_
      _category_key.name
         '_geom_angle.atom_site_label_1'
         '_geom_angle.atom_site_label_2'
         '_geom_angle.atom_site_label_3'
         '_geom_angle.site_symmetry_1'
         '_geom_angle.site_symmetry_2'
         '_geom_angle.site_symmetry_3'

    _method.purpose               Evaluation
    _method.expression
;
    dmin =  _geom.bond_distance_min

    Loop  m1  as  model_site  :i  {   # loop vertex model site

       rad1  =   m1.radius_bond + _geom.bond_distance_incr

       Loop  m2  as  model_site  :j  {  # loop first target site

          If (i==j or m1.mole_index != m2.mole_index) Next
          v1 =  m2.Cartn_xyz - m1.Cartn_xyz
          d1 =  Norm (v1)

          If (d1<dmin or d1>(rad1+m2.radius_bond))  Next

          rad2  =   m2.radius_bond + _geom.bond_distance_incr

          Loop  m3  as  model_site  :k>j  {  # loop second target site

             If (i==k or m1.mole_index != m3.mole_index) Next
             v2 =  m3.Cartn_xyz - m1.Cartn_xyz
             d2 =  Norm (v2)

             If (d2<dmin or d2>(rad2+m3.radius_bond)) Next

             angle =  Acosd ( v1*v2 / (d1*d2) )

             geom_angle( .atom_site_label_1  = m2.label,
                         .atom_site_label_2  = m1.label,
                         .atom_site_label_3  = m3.label,
                         .site_symmetry_1 = m2.symop,
                         .site_symmetry_2 = m1.symop,
                         .site_symmetry_3 = m3.symop,
                         .distances =  List ( d1, d2 ),
                         .value     =  angle )
    }   }   }
;

save_

save_geom_angle.atom_site_label_1

    _definition.id                '_geom_angle.atom_site_label_1'

    loop_
      _alias.definition_id
         '_geom_angle_atom_site_label_1'
         '_geom_angle.atom_site_id_1'

    _name.category_id             geom_angle
    _name.object_id               atom_site_label_1

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_angle.atom_site_label_2

    _definition.id                '_geom_angle.atom_site_label_2'

    loop_
      _alias.definition_id
         '_geom_angle_atom_site_label_2'
         '_geom_angle.atom_site_id_2'

    _definition.update            2019-04-03
    _description.text
;
    The unique identifier for the vertex atom of the angle.
;
    _name.category_id             geom_angle
    _name.object_id               atom_site_label_2
    _name.linked_item_id          '_atom_site.label'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_geom_angle.atom_site_label_3

    _definition.id                '_geom_angle.atom_site_label_3'

    loop_
      _alias.definition_id
         '_geom_angle_atom_site_label_3'
         '_geom_angle.atom_site_id_3'

    _name.category_id             geom_angle
    _name.object_id               atom_site_label_3

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_angle.distances

    _definition.id                '_geom_angle.distances'
    _definition.update            2012-11-22
    _description.text
;
    The pair of distances between sites 1 - 2 and 2 - 3.
;
    _name.category_id             geom_angle
    _name.object_id               distances
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               List
    _type.dimension               '[2]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_geom_angle.distances_su

    _definition.id                '_geom_angle.distances_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _geom_angle.distances.
;
    _name.category_id             geom_angle
    _name.object_id               distances_su
    _name.linked_item_id          '_geom_angle.distances'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               List
    _type.dimension               '[2]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_geom_angle.id

    _definition.id                '_geom_angle.id'
    _definition.update            2023-02-02
    _description.text
;
    An arbitrary, unique identifier for the angle formed by the three atoms.
;
    _name.category_id             geom_angle
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Derived
    _type.container               Single
    _type.contents                Word

save_

save_geom_angle.publ_flag

    _definition.id                '_geom_angle.publ_flag'
    _alias.definition_id          '_geom_angle_publ_flag'
    _definition.update            2012-11-22
    _description.text
;
    Code signals if the angle is referred to in a publication or
    should be placed in a table of significant angles.
;
    _name.category_id             geom_angle
    _name.object_id               publ_flag
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         no                       'Do not include angle in special list.'
         n                        'Abbreviation for "no".'
         yes                      'Do include angle in special list.'
         y                        'Abbreviation for "yes".'

    _enumeration.default          no

save_

save_geom_angle.site_symmetry_1

    _definition.id                '_geom_angle.site_symmetry_1'
    _alias.definition_id          '_geom_angle_site_symmetry_1'
    _name.category_id             geom_angle
    _name.object_id               site_symmetry_1

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_angle.site_symmetry_2

    _definition.id                '_geom_angle.site_symmetry_2'
    _alias.definition_id          '_geom_angle_site_symmetry_2'
    _name.category_id             geom_angle
    _name.object_id               site_symmetry_2

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_angle.site_symmetry_3

    _definition.id                '_geom_angle.site_symmetry_3'
    _alias.definition_id          '_geom_angle_site_symmetry_3'
    _name.category_id             geom_angle
    _name.object_id               site_symmetry_3

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_angle.value

    _definition.id                '_geom_angle.value'
    _alias.definition_id          '_geom_angle'
    _definition.update            2020-03-13
    _description.text
;
    Angle defined by the atoms located at atom_site_x/site_symmetry_x for
    x = 1,2,3. The vertex atom is at site x = 2.
;
    _name.category_id             geom_angle
    _name.object_id               value
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:180.0
    _units.code                   degrees
    _method.purpose               Evaluation
    _method.expression
;
    With a as geom_angle
    xc = List()
    bundle = [[a.site_symmetry_1,a.atom_site_label_1],
              [a.site_symmetry_2,a.atom_site_label_2],
              [a.site_symmetry_3.a.atom_site_label_3]]
    for symop,label in bundle {
        xf   =   SymEquiv(symop,  _atom_site[label].fract_xyz)
        xc ++=  _atom_sites_Cartn_transform.matrix * xf
    }
      v1,v2  =  xc[0]-xc[1], xc[2]-xc[1]

     _geom_angle.value =  Acosd ( v1 * v2 / ( Norm (v1) * Norm (v2) ) )
;

save_

save_geom_angle.value_su

    _definition.id                '_geom_angle.value_su'

    loop_
      _alias.definition_id
         '_geom_angle_su'
         '_geom_angle.value_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _geom_angle.value.
;
    _name.category_id             geom_angle
    _name.object_id               value_su
    _name.linked_item_id          '_geom_angle.value'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_GEOM_BOND

    _definition.id                GEOM_BOND
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to specify the geometry bonds in the
    structural model as derived from the atomic sites.
;
    _name.category_id             GEOM
    _name.object_id               GEOM_BOND

    loop_
      _category_key.name
         '_geom_bond.atom_site_label_1'
         '_geom_bond.atom_site_label_2'
         '_geom_bond.site_symmetry_1'
         '_geom_bond.site_symmetry_2'

    _method.purpose               Evaluation
    _method.expression
;
    dmin =  _geom.bond_distance_min

    Loop  m1  as  model_site  :i  {

       rad   =   m1.radius_bond + _geom.bond_distance_incr

       Loop  m2  as  model_site  :j  {

          If (i==j or m1.mole_index != m2.mole_index) Next

          d =  Norm (m1.Cartn_xyz - m2.Cartn_xyz)

          If (d<dmin or d>(rad+m2.radius_bond)) Next

          geom_bond( .atom_site_label_1        =  m1.label,
                     .atom_site_label_2        =  m2.label,
                     .site_symmetry_1          =  m1.symop,
                     .site_symmetry_2          =  m2.symop,
                     .distance  =  d  )
     }   }
;

save_

save_geom_bond.atom_site_label_1

    _definition.id                '_geom_bond.atom_site_label_1'

    loop_
      _alias.definition_id
         '_geom_bond_atom_site_label_1'
         '_geom_bond.atom_site_id_1'

    _name.category_id             geom_bond
    _name.object_id               atom_site_label_1

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_bond.atom_site_label_2

    _definition.id                '_geom_bond.atom_site_label_2'

    loop_
      _alias.definition_id
         '_geom_bond_atom_site_label_2'
         '_geom_bond.atom_site_id_2'

    _name.category_id             geom_bond
    _name.object_id               atom_site_label_2

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_bond.distance

    _definition.id                '_geom_bond.distance'

    loop_
      _alias.definition_id
         '_geom_bond_distance'
         '_geom_bond.dist'

    _definition.update            2012-12-14
    _description.text
;
    Intramolecular bond distance between the sites identified
    by _geom_bond.id
;
    _name.category_id             geom_bond
    _name.object_id               distance
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    With b as geom_bond

    xc = List()

    For [label,symop] in  [[b.atom_site_label_1,b.site_symmetry_1],
                           [b.atom_site_label_2,b.site_symmetry_2]]   {

        xf   =   SymEquiv(symop, _atom_site[label].fract_xyz)

        xc ++=  _atom_sites_Cartn_transform.matrix * xf
     }
     _geom_bond.distance =  Norm ( xc[0] - xc[1] )
;

save_

save_geom_bond.distance_su

    _definition.id                '_geom_bond.distance_su'

    loop_
      _alias.definition_id
         '_geom_bond_distance_su'
         '_geom_bond.dist_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _geom_bond.distance.
;
    _name.category_id             geom_bond
    _name.object_id               distance_su
    _name.linked_item_id          '_geom_bond.distance'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_geom_bond.id

    _definition.id                '_geom_bond.id'
    _definition.update            2023-02-02
    _description.text
;
    Unique identifier for the bond.
;
    _name.category_id             geom_bond
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Derived
    _type.container               Single
    _type.contents                Word

save_

save_geom_bond.multiplicity

    _definition.id                '_geom_bond.multiplicity'
    _alias.definition_id          '_geom_bond_multiplicity'
    _definition.update            2021-03-01
    _description.text
;
    The number of times the given bond appears in the environment
    of the atoms labelled _geom_bond.atom_site_label_1. In cases
    where the full list of bonds is given, one of the series of
    equivalent bonds may be assigned the appropriate multiplicity
    while the others are assigned a value of 0.
;
    _name.category_id             geom_bond
    _name.object_id               multiplicity
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_geom_bond.publ_flag

    _definition.id                '_geom_bond.publ_flag'
    _alias.definition_id          '_geom_bond_publ_flag'
    _definition.update            2012-11-22
    _description.text
;
    This code signals whether the angle is referred to in a
    publication or should be placed in a table of significant angles.
;
    _name.category_id             geom_bond
    _name.object_id               publ_flag
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         no                       'Do not include bond in special list.'
         n                        'Abbreviation for "no".'
         yes                      'Do include bond in special list.'
         y                        'Abbreviation for "yes".'

    _enumeration.default          no

save_

save_geom_bond.site_symmetry_1

    _definition.id                '_geom_bond.site_symmetry_1'
    _alias.definition_id          '_geom_bond_site_symmetry_1'
    _name.category_id             geom_bond
    _name.object_id               site_symmetry_1

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_bond.site_symmetry_2

    _definition.id                '_geom_bond.site_symmetry_2'
    _alias.definition_id          '_geom_bond_site_symmetry_2'
    _name.category_id             geom_bond
    _name.object_id               site_symmetry_2

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_bond.valence

    _definition.id                '_geom_bond.valence'
    _alias.definition_id          '_geom_bond_valence'
    _definition.update            2012-12-11
    _description.text
;
    Bond valence calculated from the bond distance.
;
    _name.category_id             geom_bond
    _name.object_id               valence
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   electrons

save_

save_geom_bond.valence_su

    _definition.id                '_geom_bond.valence_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _geom_bond.valence.
;
    _name.category_id             geom_bond
    _name.object_id               valence_su
    _name.linked_item_id          '_geom_bond.valence'
    _units.code                   electrons

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_GEOM_CONTACT

    _definition.id                GEOM_CONTACT
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to specify the interatomic
    contact distances in the structural model.
;
    _name.category_id             GEOM
    _name.object_id               GEOM_CONTACT

    loop_
      _category_key.name
         '_geom_contact.atom_site_label_1'
         '_geom_contact.atom_site_label_2'
         '_geom_contact.site_symmetry_1'
         '_geom_contact.site_symmetry_2'

    _method.purpose               Evaluation
    _method.expression
;
    Loop  m1  as  model_site  {

       rb  =   m1.radius_bond    + _geom.bond_distance_incr
       rc  =   m1.radius_contact + _geom.contact_distance_incr

       Loop  m2  as  model_site  {

          If (m2.symop != '1_555')  Next
          radb  =   rb + m2.radius_bond
          radc  =   rc + m2.radius_contact
          label =   m2.label

          Loop  s  as  space_group_symop  :ns   {

             axyz      =   s.R * m2.fract_xyz + s.T

             Do i = -2,2 { Do j = -2,2 { Do k = -2,2 { # cell translations

                tran  =   List ([i,j,k])
                bxyz  =   axyz + tran
                cxyz  =  _atom_sites_Cartn_transform.matrix * bxyz
                d     =   Norm (cxyz - m1.Cartn_xyz)

                If (d < radb or d > radc) Next

                geom_contact( .atom_site_label_1        =  m1.label,
                              .site_symmetry_1          =  m1.symop,
                              .atom_site_label_2        =  label,
                              .site_symmetry_2          = Symop(ns+1,tran),
                              .distance  =  d  )
    }  }  }  }  }  }
;

save_

save_geom_contact.atom_site_label_1

    _definition.id                '_geom_contact.atom_site_label_1'

    loop_
      _alias.definition_id
         '_geom_contact_atom_site_label_1'
         '_geom_contact.atom_site_id_1'

    _name.category_id             geom_contact
    _name.object_id               atom_site_label_1

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_contact.atom_site_label_2

    _definition.id                '_geom_contact.atom_site_label_2'

    loop_
      _alias.definition_id
         '_geom_contact_atom_site_label_2'
         '_geom_contact.atom_site_id_2'

    _name.category_id             geom_contact
    _name.object_id               atom_site_label_2

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_contact.distance

    _definition.id                '_geom_contact.distance'

    loop_
      _alias.definition_id
         '_geom_contact_distance'
         '_geom_contact.dist'

    _definition.update            2019-07-25
    _description.text
;
    Intermolecular distance between the atomic sites identified
    by _geom_contact.id
;
    _name.category_id             geom_contact
    _name.object_id               distance
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    With c as geom_contact

    xc = List()

    For [label,symop] in  [[c.atom_site_label_1,c.site_symmetry_1,
                            c.atom_site_label_2,c.site_symmetry_2]] {

        xf   =   SymEquiv(symop, _atom_site[label].fract_xyz)

        xc ++=  _atom_sites_Cartn_transform.matrix * xf
    }
    _geom_contact.distance =  Norm ( xc[0] - xc[1] )
;

save_

save_geom_contact.distance_su

    _definition.id                '_geom_contact.distance_su'

    loop_
      _alias.definition_id
         '_geom_contact_distance_su'
         '_geom_contact.dist_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _geom_contact.distance.
;
    _name.category_id             geom_contact
    _name.object_id               distance_su
    _name.linked_item_id          '_geom_contact.distance'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_geom_contact.id

    _definition.id                '_geom_contact.id'
    _definition.update            2023-02-02
    _description.text
;
    An identifier for the contact that is unique within the loop.
;
    _name.category_id             geom_contact
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Derived
    _type.container               Single
    _type.contents                Word

save_

save_geom_contact.publ_flag

    _definition.id                '_geom_contact.publ_flag'
    _alias.definition_id          '_geom_contact_publ_flag'
    _definition.update            2012-11-22
    _description.text
;
    This code signals whether the contact distance is referred to
    in a publication or should be placed in a list of significant
    contact distances.
;
    _name.category_id             geom_contact
    _name.object_id               publ_flag
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         no                       'Do not include distance in special list.'
         n                        'Abbreviation for "no".'
         yes                      'Do include distance in special list.'
         y                        'Abbreviation for "yes".'

    _enumeration.default          no

save_

save_geom_contact.site_symmetry_1

    _definition.id                '_geom_contact.site_symmetry_1'
    _alias.definition_id          '_geom_contact_site_symmetry_1'
    _name.category_id             geom_contact
    _name.object_id               site_symmetry_1

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_contact.site_symmetry_2

    _definition.id                '_geom_contact.site_symmetry_2'
    _alias.definition_id          '_geom_contact_site_symmetry_2'
    _name.category_id             geom_contact
    _name.object_id               site_symmetry_2

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_GEOM_HBOND

    _definition.id                GEOM_HBOND
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to specify the hydrogen bond
    distances in the structural model as derived from atomic sites.
;
    _name.category_id             GEOM
    _name.object_id               GEOM_HBOND

    loop_
      _category_key.name
         '_geom_hbond.atom_site_label_D'
         '_geom_hbond.atom_site_label_H'
         '_geom_hbond.atom_site_label_A'
         '_geom_hbond.site_symmetry_D'
         '_geom_hbond.site_symmetry_H'
         '_geom_hbond.site_symmetry_A'

save_

save_geom_hbond.angle_dha

    _definition.id                '_geom_hbond.angle_DHA'
    _alias.definition_id          '_geom_hbond_angle_DHA'
    _definition.update            2020-03-13
    _description.text
;
    Angle subtended by the sites identified by _geom_hbond.id.
    The hydrogen at site H is at the apex of the angle.
;
    _name.category_id             geom_hbond
    _name.object_id               angle_DHA
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:180.0
    _units.code                   degrees
    _method.purpose               Evaluation
    _method.expression
;
    With a as geom_hbond

    xc = List()

    bundle = [[ a.atom_site_label_D, a.site_symmetry_D ],
              [ a.atom_site_label_H, a.site_symmetry_H ],
              [ a.atom_site_label_A, a.site_symmetry_A ]]
    For [label,symop] in bundle   {

        xf   =   SymEquiv(symop, _atom_site[label].fract_xyz)

        xc ++=  _atom_sites_Cartn_transform.matrix * xf
     }
        v1,v2  =  xc[0]-xc[1], xc[2]-xc[1]

    _geom_hbond.angle_DHA  =  Acosd ( v1 * v2 / ( Norm (v1) * Norm (v2) ) )
;

save_

save_geom_hbond.angle_dha_su

    _definition.id                '_geom_hbond.angle_DHA_su'

    loop_
      _alias.definition_id
         '_geom_hbond_angle_DHA_su'
         '_geom_hbond.angle_DHA_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _geom_hbond.angle_DHA.
;
    _name.category_id             geom_hbond
    _name.object_id               angle_DHA_su
    _name.linked_item_id          '_geom_hbond.angle_DHA'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_geom_hbond.atom_site_label_a

    _definition.id                '_geom_hbond.atom_site_label_A'

    loop_
      _alias.definition_id
         '_geom_hbond_atom_site_label_A'
         '_geom_hbond.atom_site_id_A'

    _name.category_id             geom_hbond
    _name.object_id               atom_site_label_A

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_hbond.atom_site_label_d

    _definition.id                '_geom_hbond.atom_site_label_D'

    loop_
      _alias.definition_id
         '_geom_hbond_atom_site_label_D'
         '_geom_hbond.atom_site_id_D'

    _name.category_id             geom_hbond
    _name.object_id               atom_site_label_D

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_hbond.atom_site_label_h

    _definition.id                '_geom_hbond.atom_site_label_H'

    loop_
      _alias.definition_id
         '_geom_hbond_atom_site_label_H'
         '_geom_hbond.atom_site_id_H'

    _name.category_id             geom_hbond
    _name.object_id               atom_site_label_H

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_hbond.distance_da

    _definition.id                '_geom_hbond.distance_DA'

    loop_
      _alias.definition_id
         '_geom_hbond_distance_DA'
         '_geom_hbond.dist_DA'

    _definition.update            2012-12-14
    _description.text
;
    The set of data items which specify the distance between the
    three atom sites identified by _geom_hbond.id.
;
    _name.category_id             geom_hbond
    _name.object_id               distance_DA
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    with g as geom_hbond
    l,s  =   g.atom_site_label_D, g.site_symmetry_D
    d_pos =   SymEquiv(s, _atom_site[l].fract_xyz)
    d_pos =  _atom_sites_Cartn_transform.matrix * d_pos
    l,s  =   g.atom_site_label_A,g.site_symmetry_A
    a_pos   =   SymEquiv(s, _atom_site[l].fract_xyz)
    a_pos   = _atom_sites_Cartn_transform.matrix * a_pos
    _geom_hbond.distance_DA =  Norm ( a_pos - d_pos )
;

save_

save_geom_hbond.distance_da_su

    _definition.id                '_geom_hbond.distance_DA_su'

    loop_
      _alias.definition_id
         '_geom_hbond_distance_DA_su'
         '_geom_hbond.dist_DA_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _geom_hbond.distance_DA.
;
    _name.category_id             geom_hbond
    _name.object_id               distance_DA_su
    _name.linked_item_id          '_geom_hbond.distance_DA'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_geom_hbond.distance_dh

    _definition.id                '_geom_hbond.distance_DH'

    loop_
      _alias.definition_id
         '_geom_hbond_distance_DH'
         '_geom_hbond.dist_DH'

    _definition.update            2012-12-14
    _description.text
;
    The set of data items which specify the distance between the
    three atom sites identified by _geom_hbond.id.
;
    _name.category_id             geom_hbond
    _name.object_id               distance_DH
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    with g as geom_hbond
    l,s  =   g.atom_site_label_D, g.site_symmetry_D
    d_pos =   SymEquiv(s, _atom_site[l].fract_xyz)
    d_pos =  _atom_sites_Cartn_transform.matrix * d_pos
    l,s  =   g.atom_site_label_H,g.site_symmetry_H
    h_pos   =   SymEquiv(s, _atom_site[l].fract_xyz)
    h_pos   = _atom_sites_Cartn_transform.matrix * h_pos
    _geom_hbond.distance_DH =  Norm ( h_pos - d_pos )
;

save_

save_geom_hbond.distance_dh_su

    _definition.id                '_geom_hbond.distance_DH_su'

    loop_
      _alias.definition_id
         '_geom_hbond_distance_DH_su'
         '_geom_hbond.dist_DH_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _geom_hbond.distance_DH.
;
    _name.category_id             geom_hbond
    _name.object_id               distance_DH_su
    _name.linked_item_id          '_geom_hbond.distance_DH'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_geom_hbond.distance_ha

    _definition.id                '_geom_hbond.distance_HA'

    loop_
      _alias.definition_id
         '_geom_hbond_distance_HA'
         '_geom_hbond.dist_HA'

    _definition.update            2012-12-14
    _description.text
;
    The set of data items which specify the distance between the
    three atom sites identified by _geom_hbond.id.
;
    _name.category_id             geom_hbond
    _name.object_id               distance_HA
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    with g as geom_hbond
    l,s  =   g.atom_site_label_A, g.site_symmetry_A
    a_pos =   SymEquiv(s, _atom_site[l].fract_xyz)
    a_pos =  _atom_sites_Cartn_transform.matrix * a_pos
    l,s  =   g.atom_site_label_H,g.site_symmetry_H
    h_pos   =   SymEquiv(s, _atom_site[l].fract_xyz)
    h_pos   = _atom_sites_Cartn_transform.matrix * h_pos
    _geom_hbond.distance_HA =  Norm ( h_pos - a_pos )
;

save_

save_geom_hbond.distance_ha_su

    _definition.id                '_geom_hbond.distance_HA_su'

    loop_
      _alias.definition_id
         '_geom_hbond_distance_HA_su'
         '_geom_hbond.dist_HA_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _geom_hbond.distance_HA.
;
    _name.category_id             geom_hbond
    _name.object_id               distance_HA_su
    _name.linked_item_id          '_geom_hbond.distance_HA'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_geom_hbond.id

    _definition.id                '_geom_hbond.id'
    _definition.update            2023-02-02
    _description.text
;
    An identifier for the hydrogen bond that is unique within the loop.
;
    _name.category_id             geom_hbond
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Derived
    _type.container               Single
    _type.contents                Word

save_

save_geom_hbond.publ_flag

    _definition.id                '_geom_hbond.publ_flag'
    _alias.definition_id          '_geom_hbond_publ_flag'
    _definition.update            2012-11-22
    _description.text
;
    This code signals whether the hydrogen-bond information
    is referred to in a publication or should be placed in a
    table of significant hydrogen-bond geometry.
;
    _name.category_id             geom_hbond
    _name.object_id               publ_flag
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         no                       'Do not include bond in special list.'
         n                        'Abbreviation for "no".'
         yes                      'Do include bond in special list.'
         y                        'Abbreviation for "yes".'

    _enumeration.default          no

save_

save_geom_hbond.site_symmetry_a

    _definition.id                '_geom_hbond.site_symmetry_A'
    _alias.definition_id          '_geom_hbond_site_symmetry_A'
    _name.category_id             geom_hbond
    _name.object_id               site_symmetry_A

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_hbond.site_symmetry_d

    _definition.id                '_geom_hbond.site_symmetry_D'
    _alias.definition_id          '_geom_hbond_site_symmetry_D'
    _name.category_id             geom_hbond
    _name.object_id               site_symmetry_D

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_hbond.site_symmetry_h

    _definition.id                '_geom_hbond.site_symmetry_H'
    _alias.definition_id          '_geom_hbond_site_symmetry_H'
    _name.category_id             geom_hbond
    _name.object_id               site_symmetry_H

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_GEOM_TORSION

    _definition.id                GEOM_TORSION
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to specify the torsion angles in the
    structural model as derived from the atomic sites.
;
    _name.category_id             GEOM
    _name.object_id               GEOM_TORSION

    loop_
      _category_key.name
         '_geom_torsion.atom_site_label_1'
         '_geom_torsion.atom_site_label_2'
         '_geom_torsion.atom_site_label_3'
         '_geom_torsion.atom_site_label_4'
         '_geom_torsion.site_symmetry_1'
         '_geom_torsion.site_symmetry_2'
         '_geom_torsion.site_symmetry_3'
         '_geom_torsion.site_symmetry_4'

    _method.purpose               Evaluation
    _method.expression
;
    dmin =  _geom.bond_distance_min

    Loop  m1  as  model_site  :i  {

       rad1  =   m1.radius_bond + _geom.bond_distance_incr

       Loop  m2  as  model_site  :j  {

          If (i==j or m2.mole_index!=m1.mole_index) Next
          v21 =  m1.Cartn_xyz - m2.Cartn_xyz
          d21 =  Norm (v21)

          If (d21 < dmin or d21 > (rad1+m2.radius_bond)) Next
          rad2  =   m2.radius_bond + _geom.bond_distance_incr

          Loop  m3  as  model_site  :k  {

             If (k==i or k==j or m3.mole_index!=m2.mole_index) Next
             v23 =  m3.Cartn_xyz - m2.Cartn_xyz
             d23 =  Norm (v23)

             If (d23 < dmin or d23 > (rad2+m3.radius_bond)) Next
             rad3  =   m3.radius_bond + _geom.bond_distance_incr

             Loop  m4  as  model_site  :l  {

                If (l==k or l==j or l==i or m4.mole_index!=m3.mole_index) Next
                v34 =  m4.Cartn_xyz - m3.Cartn_xyz
                d34 =  Norm (v34)

                If (d34 < dmin or d34 > (rad3+m4.radius_bond)) Next

                u1    =   v21 ^ v23
                u2    =   v34 ^ v23

                angle =  Acosd ( u1 * u2 / ( Norm(u1) * Norm(u2) ) )
                If ( (u1^u2)*v23 < 0 ) angle = -angle

                geom_torsion(
                              .atom_site_label_1 = m1.label,
                              .atom_site_label_2 = m2.label,
                              .atom_site_label_3 = m3.label,
                              .atom_site_label_4 = m4.label,
                              .site_symmetry_1   = m1.symop,
                              .site_symmetry_2   = m2.symop,
                              .site_symmetry_3   = m3.symop,
                              .site_symmetry_4   = m4.symop,
                              .distances =  List ( d21,d23,d34 ),
                              .angle     =  angle )
    }   }   }    }
;

save_

save_geom_torsion.angle

    _definition.id                '_geom_torsion.angle'

    loop_
      _alias.definition_id
         '_geom_torsion'
         '_geom_torsion.value'

    _definition.update            2019-07-25
    _description.text
;
    Angle defined by the sites identified by _geom_torsion.id.
    The torsion-angle definition should be that of Klyne and Prelog.
    The vector direction *_label_2 to *_label_3 is the viewing
    direction, and the torsion angle is the angle of twist required
    to superimpose the projection of the vector between site 2 and
    site 1 onto the projection of the vector between site 3 and
    site 4. Clockwise torsions are positive, anticlockwise torsions
    are negative.
    Ref: Klyne, W. & Prelog, V. (1960). Experientia, 16, 521-523.
;
    _name.category_id             geom_torsion
    _name.object_id               angle
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            -180.0:180.0
    _units.code                   degrees

save_

save_geom_torsion.angle_su

    _definition.id                '_geom_torsion.angle_su'

    loop_
      _alias.definition_id
         '_geom_torsion_su'
         '_geom_torsion.value_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _geom_torsion.angle.
;
    _name.category_id             geom_torsion
    _name.object_id               angle_su
    _name.linked_item_id          '_geom_torsion.angle'
    _units.code                   degrees

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_geom_torsion.atom_site_label_1

    _definition.id                '_geom_torsion.atom_site_label_1'

    loop_
      _alias.definition_id
         '_geom_torsion_atom_site_label_1'
         '_geom_torsion.atom_site_id_1'

    _name.category_id             geom_torsion
    _name.object_id               atom_site_label_1

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_torsion.atom_site_label_2

    _definition.id                '_geom_torsion.atom_site_label_2'

    loop_
      _alias.definition_id
         '_geom_torsion_atom_site_label_2'
         '_geom_torsion.atom_site_id_2'

    _name.category_id             geom_torsion
    _name.object_id               atom_site_label_2

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_torsion.atom_site_label_3

    _definition.id                '_geom_torsion.atom_site_label_3'

    loop_
      _alias.definition_id
         '_geom_torsion_atom_site_label_3'
         '_geom_torsion.atom_site_id_3'

    _name.category_id             geom_torsion
    _name.object_id               atom_site_label_3

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_torsion.atom_site_label_4

    _definition.id                '_geom_torsion.atom_site_label_4'

    loop_
      _alias.definition_id
         '_geom_torsion_atom_site_label_4'
         '_geom_torsion.atom_site_id_4'

    _name.category_id             geom_torsion
    _name.object_id               atom_site_label_4

    _import.get                   [{'file':templ_attr.cif  'save':atom_site_id}]

save_

save_geom_torsion.distances

    _definition.id                '_geom_torsion.distances'
    _definition.update            2012-11-22
    _description.text
;
    Distances between sites 1 - 2, 2 - 3 and 3 - 4.
;
    _name.category_id             geom_torsion
    _name.object_id               distances
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               List
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_geom_torsion.distances_su

    _definition.id                '_geom_torsion.distances_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _geom_torsion.distances.
;
    _name.category_id             geom_torsion
    _name.object_id               distances_su
    _name.linked_item_id          '_geom_torsion.distances'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               List
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_geom_torsion.id

    _definition.id                '_geom_torsion.id'
    _definition.update            2023-02-02
    _description.text
;
    An identifier for the torsion angle that is unique within its loop.
;
    _name.category_id             geom_torsion
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Derived
    _type.container               Single
    _type.contents                Word

save_

save_geom_torsion.publ_flag

    _definition.id                '_geom_torsion.publ_flag'
    _alias.definition_id          '_geom_torsion_publ_flag'
    _definition.update            2012-11-22
    _description.text
;
    Code signals if the torsion angle is required for publication.
;
    _name.category_id             geom_torsion
    _name.object_id               publ_flag
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         yes                      'Publish.'
         y                        'Abbreviation for "yes".'
         no                       'Do not publish.'
         n                        'Abbreviation for "no".'

    _enumeration.default          no

save_

save_geom_torsion.site_symmetry_1

    _definition.id                '_geom_torsion.site_symmetry_1'
    _alias.definition_id          '_geom_torsion_site_symmetry_1'
    _name.category_id             geom_torsion
    _name.object_id               site_symmetry_1

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_torsion.site_symmetry_2

    _definition.id                '_geom_torsion.site_symmetry_2'
    _alias.definition_id          '_geom_torsion_site_symmetry_2'
    _name.category_id             geom_torsion
    _name.object_id               site_symmetry_2

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_torsion.site_symmetry_3

    _definition.id                '_geom_torsion.site_symmetry_3'
    _alias.definition_id          '_geom_torsion_site_symmetry_3'
    _name.category_id             geom_torsion
    _name.object_id               site_symmetry_3

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_geom_torsion.site_symmetry_4

    _definition.id                '_geom_torsion.site_symmetry_4'
    _alias.definition_id          '_geom_torsion_site_symmetry_4'
    _name.category_id             geom_torsion
    _name.object_id               site_symmetry_4

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_MODEL_SITE

    _definition.id                MODEL_SITE
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to describe atomic sites and
    connections in the proposed atomic model.
;
    _name.category_id             MODEL
    _name.object_id               MODEL_SITE

    loop_
      _category_key.name
         '_model_site.label'
         '_model_site.symop'

    _method.purpose               Evaluation
    _method.expression
;
    atomlist  = List()
    Loop  a  as  atom_site  {
       axyz       =    a.fract_xyz
       cxyz       =   _atom_sites_Cartn_transform.matrix * axyz
       radb       =   _atom_type[a.type_symbol].radius_bond
       radc       =   _atom_type[a.type_symbol].radius_contact
       ls         =   List ( a.label, "1_555" )
       atomlist ++=   [ls, axyz, cxyz, radb, radc, 0]
    }

    molelist  = List()
    dmin     =  _geom.bond_distance_min
    m        =  0
    n        =  0

    For [ls1,a1,c1,rb1,rc1,m1] in atomlist  {
        If (m1 != 0) Next
        m         +=  1
        n         +=  1
        molelist ++=  [ls1,a1,c1,rb1,rc1,n,m]
        atomlist --=  [ls1,a1,c1,rb1,rc1,m]

        Repeat  {
            connect =  "no"

            For [ls2,a2,c2,rb2,rc2,n2,m2] in molelist  {
                If (m2 != m) Next

                For [ls3,a3,c3,rb3,rc3,m3] in atomlist  {
                    dmax  =  rb2 + rb3 + _geom.bond_distance_incr

                    Loop  s  as  space_group_symop  :ns   {

                        axyz      =   s.R * a3 + s.T
                        tran      =   Closest (axyz, a2)
                        bxyz      =   axyz + tran
                        cxyz      =  _atom_sites_Cartn_transform.matrix *bxyz
                        d         =   Norm (cxyz - c2)

                       If (d > dmin and d < dmax)          {
                           ls  =   List ( ls3[0], Symop(ns+1, tran) )

                           If (ls not in Strip(molelist,0))    {
                               n         +=  1
                               molelist ++=  [ls,bxyz,cxyz,rb3,rc3,n,m]
                               atomlist --=  [ls3,a3,c3,rb3,rc3,m]
                               connect    =  "yes"
        }   }   }   }   }
       If (connect == "no") Break
    }  }

    For [ls,ax,cx,rb,rc,n,m] in molelist  {

       model_site( .label              =  ls[0],
                   .symop           =  ls[1],
                   .fract_xyz       =  ax,
                   .Cartn_xyz       =  cx,
                   .radius_bond     =  rb,
                   .radius_contact  =  rc,
                   .index           =  n,
                   .mole_index      =  m  )
     }
;

save_

save_model_site.adp_eigenvalues

    _definition.id                '_model_site.ADP_eigenvalues'
    _definition.update            2021-09-24
    _description.text
;
    The set of three ADP eigenvalues for the associated eigenvectors
    given by _model_site.ADP_eigenvectors. The eigenvalues are
    sorted in order of magnitude with the largest first.
;
    _name.category_id             model_site
    _name.object_id               ADP_eigenvalues
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Array
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    A    =  _cell.orthogonal_matrix
    U    =  A * _model_site.ADP_matrix_beta * Transpose(A) /(2*Pi**2)
    _model_site.ADP_eigenvalues  =  Eigen( U )[:,0]
;

save_

save_model_site.adp_eigenvalues_su

    _definition.id                '_model_site.ADP_eigenvalues_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _model_site.ADP_eigenvalues.
;
    _name.category_id             model_site
    _name.object_id               ADP_eigenvalues_su
    _name.linked_item_id          '_model_site.ADP_eigenvalues'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Array
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none

save_

save_model_site.adp_eigenvectors

    _definition.id                '_model_site.ADP_eigenvectors'
    _definition.update            2021-09-24
    _description.text
;
    The set of three ADP eigenvectors corresponding to the values
    given in _model_site.ADP_eigenvalues. The eigenvectors are
    contained in the rows of a matrix ordered from top to bottom
    in order largest to smallest corresponding eigenvalue. The
    eigenvector elements are direction cosines to the orthogonal
    axes X,Y,Z.
;
    _name.category_id             model_site
    _name.object_id               ADP_eigenvectors
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Array
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstrom_squared
    _method.purpose               Evaluation
    _method.expression
;
    A    =  _cell.orthogonal_matrix
    U    =  A * _model_site.ADP_matrix_beta * Transpose(A) /(2*Pi**2)
    _model_site.ADP_eigenvectors  =  Eigen( U )[:,1:4]
;

save_

save_model_site.adp_eigenvectors_su

    _definition.id                '_model_site.ADP_eigenvectors_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _model_site.ADP_eigenvectors.
;
    _name.category_id             model_site
    _name.object_id               ADP_eigenvectors_su
    _name.linked_item_id          '_model_site.ADP_eigenvectors'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Array
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstrom_squared

save_

save_model_site.adp_matrix_beta

    _definition.id                '_model_site.ADP_matrix_beta'
    _definition.update            2021-09-24
    _description.text
;
    Matrix of dimensionless anisotropic atomic displacement parameters.
;
    _name.category_id             model_site
    _name.object_id               ADP_matrix_beta
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    with m as model_site
    a = atom_site[m.label]
    s = space_group_symop[SymKey(m.symop)]

    _model_site.ADP_matrix_beta =  s.R * a.matrix_beta * s.RT
;

save_

save_model_site.adp_matrix_beta_su

    _definition.id                '_model_site.ADP_matrix_beta_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _model_site.ADP_matrix_beta.
;
    _name.category_id             model_site
    _name.object_id               ADP_matrix_beta_su
    _name.linked_item_id          '_model_site.ADP_matrix_beta'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none

save_

save_model_site.cartn_xyz

    _definition.id                '_model_site.Cartn_xyz'
    _definition.update            2021-07-07
    _description.text
;
    Vector of Cartesian (orthogonal angstrom) atom site coordinates.
;
    _name.category_id             model_site
    _name.object_id               Cartn_xyz
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
     With  m  as  model_site

    _model_site.Cartn_xyz =  _atom_sites_Cartn_transform.matrix * m.fract_xyz
;

save_

save_model_site.cartn_xyz_su

    _definition.id                '_model_site.Cartn_xyz_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _model_site.Cartn_xyz.
;
    _name.category_id             model_site
    _name.object_id               Cartn_xyz_su
    _name.linked_item_id          '_model_site.Cartn_xyz'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_model_site.display_colour

    _definition.id                '_model_site.display_colour'
    _definition.update            2023-02-06
    _description.text
;
    Display colour code assigned to this atom site. Note that the
    possible colours are enumerated in the colour_RGB list, and
    the default code is enumerated in the colour_hue list.
;
    _name.category_id             model_site
    _name.object_id               display_colour
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _enumeration.def_index_id     '_model_site.type_symbol'

    _import.get                   [
                                   {'file':templ_enum.cif  'save':colour_rgb}
                                   {'file':templ_enum.cif  'save':colour_hue}
                                  ]

save_

save_model_site.fract_xyz

    _definition.id                '_model_site.fract_xyz'
    _definition.update            2021-03-01
    _description.text
;
    Vector of fractional atom site coordinates.
;
    _name.category_id             model_site
    _name.object_id               fract_xyz
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
        With  m  as  model_site

                      xyz =  _atom_site[m.label].fract_xyz

    _model_site.fract_xyz =  SymEquiv(m.symop, xyz)
;

save_

save_model_site.fract_xyz_su

    _definition.id                '_model_site.fract_xyz_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _model_site.fract_xyz.
;
    _name.category_id             model_site
    _name.object_id               fract_xyz_su
    _name.linked_item_id          '_model_site.fract_xyz'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none

save_

save_model_site.id

    _definition.id                '_model_site.id'
    _definition.update            2023-02-02
    _description.text
;
    An identifier for the model site that is unique within its loop.
;
    _name.category_id             model_site
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Derived
    _type.container               Single
    _type.contents                Word

save_

save_model_site.index

    _definition.id                '_model_site.index'
    _definition.update            2021-03-01
    _description.text
;
    Index number of an atomic site in the connected molecule.
;
    _name.category_id             model_site
    _name.object_id               index
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_model_site.label

    _definition.id                '_model_site.label'
    _definition.update            2012-11-22
    _description.text
;
    Code identifies a site in the ATOM_SITE category of data.
;
    _name.category_id             model_site
    _name.object_id               label
    _name.linked_item_id          '_atom_site.label'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_model_site.mole_index

    _definition.id                '_model_site.mole_index'
    _definition.update            2023-01-13
    _description.text
;
    Index number of distinct molecules in the cell, not related by symmetry.
;
    _name.category_id             model_site
    _name.object_id               mole_index
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_model_site.radius_bond

    _definition.id                '_model_site.radius_bond'
    _definition.update            2012-11-22
    _description.text
;
    Atomic radius of atom located at this site.
;
    _name.category_id             model_site
    _name.object_id               radius_bond
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.1:
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
     With  m  as  model_site

    _model_site.radius_bond =  _atom_type[m.type_symbol].radius_bond
;

save_

save_model_site.radius_contact

    _definition.id                '_model_site.radius_contact'
    _definition.update            2012-11-22
    _description.text
;
    Atomic contact radius of atom specie located at this site.
;
    _name.category_id             model_site
    _name.object_id               radius_contact
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            1.0:
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
     With  m  as  model_site

    _model_site.radius_contact =  _atom_type[m.type_symbol].radius_contact
;

save_

save_model_site.symop

    _definition.id                '_model_site.symop'
    _name.category_id             model_site
    _name.object_id               symop

    _import.get
        [{'file':templ_attr.cif  'save':site_symmetry}]

save_

save_model_site.type_symbol

    _definition.id                '_model_site.type_symbol'
    _definition.update            2021-10-27
    _description.text
;
    Code to identify the atom specie(s) occupying this site.
;
    _name.category_id             model_site
    _name.object_id               type_symbol
    _name.linked_item_id          '_atom_type.symbol'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word
    _method.purpose               Evaluation
    _method.expression
;
    _model_site.type_symbol  =   AtomType ( _model_site.label )
;

save_

save_VALENCE

    _definition.id                VALENCE
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-12-13
    _description.text
;
    The category of items used to specify bond-valence parameters
    used to calculate bond valences from bond lengths.
;
    _name.category_id             MODEL
    _name.object_id               VALENCE

save_

save_VALENCE_PARAM

    _definition.id                VALENCE_PARAM
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of items for listing bond valences.
;
    _name.category_id             VALENCE
    _name.object_id               VALENCE_PARAM
    _category_key.name            '_valence_param.id'

save_

save_valence_param.atom_1

    _definition.id                '_valence_param.atom_1'
    _alias.definition_id          '_valence_param_atom_1'
    _definition.update            2021-10-27
    _description.text
;
    Atom type symbol for atom 1 forming a bond whose
    valence parameters are given in this category.
;
    _name.category_id             valence_param
    _name.object_id               atom_1
    _name.linked_item_id          '_atom_type.symbol'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_valence_param.atom_1_valence

    _definition.id                '_valence_param.atom_1_valence'
    _alias.definition_id          '_valence_param_atom_1_valence'
    _definition.update            2021-03-01
    _description.text
;
    The formal charge of the atom 1 whose bond-valence parameters
    are given in this category.
;
    _name.category_id             valence_param
    _name.object_id               atom_1_valence
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_valence_param.atom_2

    _definition.id                '_valence_param.atom_2'
    _alias.definition_id          '_valence_param_atom_2'
    _definition.update            2021-10-27
    _description.text
;
    Atom type symbol for atom 2 forming a bond whose
    valence parameters are given in this category.
;
    _name.category_id             valence_param
    _name.object_id               atom_2
    _name.linked_item_id          '_atom_type.symbol'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_valence_param.atom_2_valence

    _definition.id                '_valence_param.atom_2_valence'
    _alias.definition_id          '_valence_param_atom_2_valence'
    _definition.update            2021-03-01
    _description.text
;
    The formal charge of the atom 2 whose bond-valence parameters
    are given in this category.
;
    _name.category_id             valence_param
    _name.object_id               atom_2_valence
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_valence_param.b

    _definition.id                '_valence_param.B'
    _alias.definition_id          '_valence_param_B'
    _definition.update            2012-12-13
    _description.text
;
    The bond-valence parameter B used in the expression
    s = exp[(Ro - R)/B], where s is the valence of bond length R.
;
    _name.category_id             valence_param
    _name.object_id               B
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.1:
    _units.code                   angstroms

save_

save_valence_param.details

    _definition.id                '_valence_param.details'
    _alias.definition_id          '_valence_param_details'
    _definition.update            2012-12-13
    _description.text
;
    Details of valence parameters of stated bond.
;
    _name.category_id             valence_param
    _name.object_id               details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_valence_param.id

    _definition.id                '_valence_param.id'
    _alias.definition_id          '_valence_param_id'
    _definition.update            2021-03-01
    _description.text
;
    Unique index loop number of the valence parameter loop.
;
    _name.category_id             valence_param
    _name.object_id               id
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_valence_param.ref_id

    _definition.id                '_valence_param.ref_id'
    _alias.definition_id          '_valence_param_ref_id'
    _definition.update            2021-10-27
    _description.text
;
    Code linking parameters to the key _valence_ref.id key
    in the reference list in category VALENCE_REF.
;
    _name.category_id             valence_param
    _name.object_id               ref_id
    _name.linked_item_id          '_valence_ref.id'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_valence_param.ro

    _definition.id                '_valence_param.Ro'
    _alias.definition_id          '_valence_param_Ro'
    _definition.update            2012-12-13
    _description.text
;
    The bond-valence parameter Ro used in the expression
    s = exp[(Ro - R)/B], where s is the valence of bond length R.
;
    _name.category_id             valence_param
    _name.object_id               Ro
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            1.0:
    _units.code                   angstroms

save_

save_VALENCE_REF

    _definition.id                VALENCE_REF
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of items for listing valence references.
;
    _name.category_id             VALENCE
    _name.object_id               VALENCE_REF
    _category_key.name            '_valence_ref.id'

save_

save_valence_ref.id

    _definition.id                '_valence_ref.id'
    _alias.definition_id          '_valence_ref_id'
    _definition.update            2023-09-12
    _description.text
;
    Unique loop code of the valence references.
;
    _name.category_id             valence_ref
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_valence_ref.reference

    _definition.id                '_valence_ref.reference'
    _alias.definition_id          '_valence_ref_reference'
    _definition.update            2021-03-03
    _description.text
;
    Literature reference from which the valence parameters
    identified by _valence_param.id were taken.
;
    _name.category_id             valence_ref
    _name.object_id               reference
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_PUBLICATION

    _definition.id                PUBLICATION
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2024-05-15
    _description.text
;
    The dictionary group encompassing the core publication data items defined
    and used within the Crystallographic Information Framework (CIF).
;
    _name.category_id             CIF_CORE_HEAD
    _name.object_id               PUBLICATION

save_

save_AUDIT

    _definition.id                AUDIT
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-05-07
    _description.text
;
    The category of data items used to record details about the
    creation and subsequent updating of the data block.
;
    _name.category_id             PUBLICATION
    _name.object_id               AUDIT

save_

save_audit.block_code

    _definition.id                '_audit.block_code'

    loop_
      _alias.definition_id
         '_audit_block_code'
         '_audit.revision_id'

    _definition.update            2019-01-09
    _description.text
;
    A unique block code identifier for each revision.
;
    _name.category_id             audit
    _name.object_id               block_code
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Word
    _description_example.case     TOZ_1991-03-20

save_

save_audit.block_doi

    _definition.id                '_audit.block_DOI'
    _alias.definition_id          '_audit_block_DOI'
    _definition.update            2023-02-02
    _description.text
;
    The digital object identifier (DOI) registered to identify
    the data set publication represented by the current
    data block. This can be used as a unique identifier for
    the data block so long as the code used is a valid DOI
    (i.e. begins with a valid publisher prefix assigned by a
    Registration Agency and a suffix guaranteed to be unique
    by the publisher) and has had its metadata deposited
    with a DOI Registration Agency.

    A DOI is a unique character string identifying any
    object of intellectual property. It provides a
    persistent identifier for an object on a digital network
    and permits the association of related current data in a
    structured extensible way. A DOI is an implementation
    of the Internet concepts of Uniform Resource Name and
    Universal Resource Locator managed according to the
    specifications of the International DOI Foundation
    (see https://www.doi.org/).
;
    _name.category_id             audit
    _name.object_id               block_DOI
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text
    _description_example.case     10.5517/CC6V9DQ

save_

save_audit.creation_date

    _definition.id                '_audit.creation_date'
    _alias.definition_id          '_audit_creation_date'
    _definition.update            2019-03-26
    _description.text
;
    The timestamp of the data revision.
;
    _name.category_id             audit
    _name.object_id               creation_date
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                DateTime

    loop_
      _description_example.case
         1991-03-20
         2019-03-26T10:33:06Z
         2019-03-26T18:33:06.42-08:00

save_

save_audit.creation_method

    _definition.id                '_audit.creation_method'
    _alias.definition_id          '_audit_creation_method'
    _definition.update            2012-11-29
    _description.text
;
    A description of how the revision was applied to the data.
;
    _name.category_id             audit
    _name.object_id               creation_method
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'spawned by the program QBEE'

save_

save_audit.schema

    _definition.id                '_audit.schema'
    _definition.update            2021-08-18
    _description.text
;
    This data item identifies the type of information contained in the
    data block. Software written for one schema will not, in general,
    correctly interpret datafiles written against a different schema.

    Specifically, each value of _audit.schema corresponds to a list
    of categories that were (potentially implicitly) restricted to a
    single packet in the default Base schema, but which can contain
    multiple packets in the specified schema.  All categories
    containing child keys of the listed categories may also contain
    multiple packets and do not need to be listed.

    The category list for each schema may instead be determined from
    examination of the dictionaries that this data block conforms to
    (see _audit_conform.dict_name).
;
    _name.category_id             audit
    _name.object_id               schema
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         'Base'
;
         Original Core CIF schema.
;
         'Space group tables'
;
         space_group category is looped.
;
         'Entry'
;
         Entry category is defined and looped: information from multiple data
         blocks in one block.
;
         'Custom'
;
         Examine dictionaries listed using data items from the AUDIT_CONFORM
         category.
;
         'Local'
;
         Locally modified dictionaries. These datafiles should not be
         distributed.
;

    _enumeration.default          Base

save_

save_audit.update_record

    _definition.id                '_audit.update_record'
    _alias.definition_id          '_audit_update_record'
    _definition.update            2021-08-18
    _description.text
;
    A description of the revision applied to the data.
;
    _name.category_id             audit
    _name.object_id               update_record
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Updated by coeditor'

save_

save_AUDIT_AUTHOR

    _definition.id                AUDIT_AUTHOR
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used for author(s) details.
;
    _name.category_id             AUDIT
    _name.object_id               AUDIT_AUTHOR
    _category_key.name            '_audit_author.id'

save_

save_audit_author.address

    _definition.id                '_audit_author.address'
    _alias.definition_id          '_audit_author_address'
    _definition.update            2019-01-09
    _description.text
;
    The address of an author of this data block. If there are
    multiple authors, _audit_author.address is looped with
    _audit_author.name.
;
    _name.category_id             audit_author
    _name.object_id               address
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
;
    Department
    Institute
    Street
    City and postcode
    COUNTRY
;

save_

save_audit_author.email

    _definition.id                '_audit_author.email'
    _definition.update            2023-06-02
    _description.text
;
    The electronic mail address of an author of the data block, in a form
    recognizable to international networks. The format of e-mail addresses is
    given in Section 3.4, Address Specification, of Internet Message Format,
    RFC 2822, P. Resnick (Editor), Network Standards Group, April 2001.
;
    _name.category_id             audit_author
    _name.object_id               email
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         name@host.domain.country
         bm@iucr.org

save_

save_audit_author.fax

    _definition.id                '_audit_author.fax'
    _definition.update            2023-06-02
    _description.text
;
    Facsimile telephone number of an author of the data block.
    The recommended style is the international dialing prefix, followed
    by the area code in parentheses, followed by the local number with
    no spaces. The earlier convention of including the international
    dialing prefix in parentheses is no longer recommended.
;
    _name.category_id             audit_author
    _name.object_id               fax
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         12(34)9477334
         12()349477334

save_

save_audit_author.id

    _definition.id                '_audit_author.id'
    _definition.update            2023-02-02
    _description.text
;
    Arbitrary identifier for this author.
;
    _name.category_id             audit_author
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Related
    _type.container               Single
    _type.contents                Word
    _method.purpose               Definition
    _method.expression
;
    _enumeration.default = Unique_id(audit_author.id)
;

save_

save_audit_author.id_orcid

    _definition.id                '_audit_author.id_ORCID'
    _definition.update            2023-02-02
    _description.text
;
    Identifier in the ORCID Registry of a publication
    author. ORCID is an open, non-profit, community-driven
    service to provide a registry of unique researcher
    identifiers (https://orcid.org/).
;
    _name.category_id             audit_author
    _name.object_id               id_ORCID
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code
    _description_example.case     0000-0003-0391-0002

save_

save_audit_author.name

    _definition.id                '_audit_author.name'
    _alias.definition_id          '_audit_author_name'
    _definition.update            2023-01-10
    _description.text
;
    The name of an author of this data block. If there are multiple
    authors, _audit_author.name is looped with _audit_author.address.
    The family name(s), followed by a comma and including any
    dynastic components, precedes the first name(s) or initial(s).
    For authors with only one name, provide the full name without
    abbreviation.
;
    _name.category_id             audit_author
    _name.object_id               name
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         "Bleary, Percival R."
         "O'Neil, F.K."
         "Van den Bossche, G."
         "Yang, D.-L."
         "Simonov, Yu.A."
         "Müller, H.A."
         "Ross II, C.R."
         "Chandra"

save_

save_audit_author.phone

    _definition.id                '_audit_author.phone'
    _definition.update            2023-06-02
    _description.text
;
    Telephone number of an author of the data block.
    The recommended style is the international dialing prefix,
    followed by the area code in parentheses, followed by the
    local number and any extension number prefixed by 'x', with
    no spaces. The earlier convention of including the international
    dialing prefix in parentheses is no longer recommended.
;
    _name.category_id             audit_author
    _name.object_id               phone
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         12(34)9477330
         12()349477330
         12(34)9477330x5543

save_

save_AUDIT_AUTHOR_ROLE

    _definition.id                AUDIT_AUTHOR_ROLE
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2020-08-06
    _description.text
;
    The category of data items used to describe the role that
    authors took in the production of the dataset.
;
    _name.category_id             AUDIT
    _name.object_id               AUDIT_AUTHOR_ROLE

    loop_
      _category_key.name
         '_audit_author_role.id'
         '_audit_author_role.role'

save_

save_audit_author_role.id

    _definition.id                '_audit_author_role.id'
    _definition.update            2023-02-02
    _description.text
;
    Unique identifier for the author for whom a role is identified.
    This may be repeated where an author took on multiple roles.
    The identifier for the author is drawn from the list of authors
    given in the AUDIT_AUTHOR category.
;
    _name.category_id             audit_author_role
    _name.object_id               id
    _name.linked_item_id          '_audit_author.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_audit_author_role.role

    _definition.id                '_audit_author_role.role'
    _definition.update            2023-01-13
    _description.text
;
    The role taken by the author identified by _audit_author_role.id,
    drawn from a predefined list. Additional details can be provided
    in _audit_author_role.special_details
;
    _name.category_id             audit_author_role
    _name.object_id               role
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         design
;
         Conceived and/or designed the experiment.
;
         synthesis
;
         Synthesized the samples.
;
         preparation
;
         Prepared the samples for measurement, e.g. crystallized or
         recrystallized the sample.
;
         characterisation
;
         Performed non-crystallographic measurements on the samples.
;
         measurement
;
         Collected and/or reduced diffraction data.
;
         analysis
;
         Obtained fitted parameters, such as a structural model, from the data.
;
         software
;
         Developed bespoke software for specialised data processing and/or
         analysis.
;
         submission
;
         Prepared the final CIF file.
;
         other
;
         None of the listed roles. See _audit_author_role.special_details.
;

save_

save_audit_author_role.special_details

    _definition.id                '_audit_author_role.special_details'
    _definition.update            2020-09-17
    _description.text
;
    Description of the contribution of the author identified by
    _audit_author_role.id.
;
    _name.category_id             audit_author_role
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

save_

save_AUDIT_CONFORM

    _definition.id                AUDIT_CONFORM
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used describe dictionary versions
    by which data names in the current data block are conformant.
;
    _name.category_id             AUDIT
    _name.object_id               AUDIT_CONFORM
    _category_key.name            '_audit_conform.dict_name'

save_

save_audit_conform.dict_location

    _definition.id                '_audit_conform.dict_location'
    _alias.definition_id          '_audit_conform_dict_location'
    _definition.update            2012-11-29
    _description.text
;
    File name or uniform resource locator (URL) where the
    conformant data dictionary resides.
;
    _name.category_id             audit_conform
    _name.object_id               dict_location
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_audit_conform.dict_name

    _definition.id                '_audit_conform.dict_name'
    _alias.definition_id          '_audit_conform_dict_name'
    _definition.update            2012-11-29
    _description.text
;
    Name identifying highest-level data dictionary defining
    data names used in this file.
;
    _name.category_id             audit_conform
    _name.object_id               dict_name
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_audit_conform.dict_version

    _definition.id                '_audit_conform.dict_version'
    _alias.definition_id          '_audit_conform_dict_version'
    _definition.update            2021-11-04
    _description.text
;
    Code for the version of data dictionary defining data names
    used in this file.
;
    _name.category_id             audit_conform
    _name.object_id               dict_version
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Word

save_

save_AUDIT_CONTACT_AUTHOR

    _definition.id                AUDIT_CONTACT_AUTHOR
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used for contact author(s) details.
;
    _name.category_id             AUDIT
    _name.object_id               AUDIT_CONTACT_AUTHOR
    _category_key.name            '_audit_contact_author.id'

save_

save_audit_contact_author.address

    _definition.id                '_audit_contact_author.address'
    _alias.definition_id          '_audit_contact_author_address'
    _definition.update            2019-01-09
    _description.text
;
    The mailing address of the author of the data block to whom
    correspondence should be addressed.
;
    _name.category_id             audit_contact_author
    _name.object_id               address
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
;
    Department
    Institute
    Street
    City and postcode
    COUNTRY
;

save_

save_audit_contact_author.email

    _definition.id                '_audit_contact_author.email'
    _alias.definition_id          '_audit_contact_author_email'
    _definition.update            2012-11-29
    _description.text
;
    The electronic mail address of the author of the data block
    to whom correspondence should be addressed, in a form
    recognizable to international networks. The format of e-mail
    addresses is given in Section 3.4, Address Specification, of
    Internet Message Format, RFC 2822, P. Resnick (Editor),
    Network Standards Group, April 2001.
;
    _name.category_id             audit_contact_author
    _name.object_id               email
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         name@host.domain.country
         bm@iucr.org

save_

save_audit_contact_author.fax

    _definition.id                '_audit_contact_author.fax'
    _alias.definition_id          '_audit_contact_author_fax'
    _definition.update            2012-11-29
    _description.text
;
    Facsimile telephone number of the author submitting the manuscript
    and data block.
    The recommended style is the international dialing prefix, followed
    by the area code in parentheses, followed by the local number with
    no spaces. The earlier convention of including the international
    dialing prefix in parentheses is no longer recommended.
;
    _name.category_id             audit_contact_author
    _name.object_id               fax
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         12(34)9477334
         12()349477334

save_

save_audit_contact_author.id

    _definition.id                '_audit_contact_author.id'
    _definition.update            2023-02-02
    _description.text
;
    Arbitrary identifier for this author.
;
    _name.category_id             audit_contact_author
    _name.object_id               id
    _name.linked_item_id          '_audit_author.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word
    _method.purpose               Definition
    _method.expression
;
    with aca as audit_contact_author
    count = 0
    target = ''
    loop aa as audit_author {
        if (aca.name == aa.name) {
            count++
            target = aa.id
            }
        }
    if (count == 1) {
        _enumeration.default = target
        }
    else {
        _enumeration.default = missing
    }
;

save_

save_audit_contact_author.name

    _definition.id                '_audit_contact_author.name'

    loop_
      _alias.definition_id
         '_audit_contact_author_name'
         '_audit_contact_author'

    _definition.update            2023-01-10
    _description.text
;
    The name of the author of the data block to whom correspondence
    should be addressed. The family name(s), followed by a comma and
    including any dynastic components, precedes the first name(s) or
    initial(s). For authors with only one name, provide the full name
    without abbreviation.
;
    _name.category_id             audit_contact_author
    _name.object_id               name
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         "Bleary, Percival R."
         "O'Neil, F.K."
         "Van den Bossche, G."
         "Chandra"

save_

save_audit_contact_author.phone

    _definition.id                '_audit_contact_author.phone'
    _alias.definition_id          '_audit_contact_author_phone'
    _definition.update            2012-11-29
    _description.text
;
    Telephone number of author submitting the manuscript and data block.
    The recommended style is the international dialing prefix,
    followed by the area code in parentheses, followed by the
    local number and any extension number prefixed by 'x', with
    no spaces. The earlier convention of including the international
    dialing prefix in parentheses is no longer recommended.
;
    _name.category_id             audit_contact_author
    _name.object_id               phone
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         12(34)9477330
         12()349477330
         12(34)9477330x5543

save_

save_AUDIT_LINK

    _definition.id                AUDIT_LINK
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to record details about the
    relationships between data blocks in the current CIF.
;
    _name.category_id             AUDIT
    _name.object_id               AUDIT_LINK
    _category_key.name            '_audit_link.block_code'

save_

save_audit_link.block_code

    _definition.id                '_audit_link.block_code'
    _alias.definition_id          '_audit_link_block_code'
    _definition.update            2021-10-27
    _description.text
;
    The value of _audit.block_code associated with a data block
    in the current file related to the current data block. The
    special value '.' may be used to refer to the current data
    block for completeness.
;
    _name.category_id             audit_link
    _name.object_id               block_code
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Word

save_

save_audit_link.block_description

    _definition.id                '_audit_link.block_description'
    _alias.definition_id          '_audit_link_block_description'
    _definition.update            2012-11-29
    _description.text
;
    Description of the relationship of the referenced data block
    to the current one.
;
    _name.category_id             audit_link
    _name.object_id               block_description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_AUDIT_SUPPORT

    _definition.id                AUDIT_SUPPORT
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-09-27
    _description.text
;
    Data items in the AUDIT_SUPPORT category record details about the
    funding support for the data collected and analysed in the data set.
;
    _name.category_id             AUDIT
    _name.object_id               AUDIT_SUPPORT
    _category_key.name            '_audit_support.id'
    _description_example.case
;
    loop_
    _audit_support.id
    _audit_support.funding_organization
    _audit_support.funding_organization_doi
    _audit_support.award_type
    _audit_support.award_number
    _audit_support.award_recipient

    1 'Engineering and Physical Sciences Research Council'
    'https://doi.org/10.13039/501100000266'
    studentship 'EP-M506515-1' 'E. T. Broadhurst'
    2 'Swedish Funding Council'
    ?
    grant '2017-05333' 'M. Lightowler'
    3 'Wellcome Trust'
    'https://doi.org/10.13039/100004440'
    grant 'WT087658' 'University of Edinburgh EM facility'
    4 'Scottish Universities Life Sciences Alliance (SULSA)'
    ?
    other ? 'University of Edinburgh EM facility'
    5 'Harvard Medical School'
    'https://doi.org/10.13039/100006691'
    ? ? ?
;
    _description_example.detail
;
    Example prepared from funding data published in
    https://doi.org/10.1107/S2052252519016105.
;

save_

save_audit_support.award_number

    _definition.id                '_audit_support.award_number'
    _definition.update            2020-08-23
    _description.text
;
    The award number associated with this source of support.
;
    _name.category_id             audit_support
    _name.object_id               award_number
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     FA9550-14-1-0409

save_

save_audit_support.award_recipient

    _definition.id                '_audit_support.award_recipient'
    _definition.update            2020-08-23
    _description.text
;
    The recipient of the support. May be an
    individual or institution.
;
    _name.category_id             audit_support
    _name.object_id               award_recipient
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Cardiff University'

save_

save_audit_support.award_type

    _definition.id                '_audit_support.award_type'
    _definition.update            2024-10-18
    _description.text
;
    Type or kind of award.
;
    _name.category_id             audit_support
    _name.object_id               award_type
    _type.purpose                 State
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         gift
;
         Funds were drawn from an unobligated, discretionary source under the
         control of one of the participants in the research program. This
         includes prize money and personal funds.
;
         grant
;
         Funds were provided by an organization or person outside the research
         program for the specific purpose of supporting the research, as
         directed by the primary investigator.
;
         contract
;
         Funds were provided as part of a contractual agreement not covered by
         other award types.
;
         studentship
;
         Funds were provided specifically to support a student in conducting
         research, whether directly or indirectly. This category includes
         scholarships and bursaries where the student is expected to engage in
         research.
;
         other
;
         Other type of support, including financial support not explicitly
         directed towards research. This category includes scholarships and
         bursaries for students that cover living expenses while pursuing
         higher education with no requirement to conduct research.
;

save_

save_audit_support.funding_organization

    _definition.id                '_audit_support.funding_organization'
    _definition.update            2023-02-02
    _description.text
;
    The name of the organization providing funding support for
    the data collected and analysed in the data block. The
    recommended source for such names is the Open Funder Registry
    (https://gitlab.com/crossref/open_funder_registry).
;
    _name.category_id             audit_support
    _name.object_id               funding_organization
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
        'National Center for Complementary and Alternative Medicine'

save_

save_audit_support.funding_organization_doi

    _definition.id                '_audit_support.funding_organization_DOI'
    _definition.update            2023-01-13
    _description.text
;
    The Digital Object Identifier (DOI) associated with the
    Organization providing funding support for
    the data collected and analysed in the data block. In
    accordance with CrossRef guidelines, the full URI of
    the resolved page describing the funding organization
    should be given (i.e. including the https://doi.org/
    component).
;
    _name.category_id             audit_support
    _name.object_id               funding_organization_DOI
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     https://doi.org/10.13039/100000064

save_

save_audit_support.funding_organization_url

    _definition.id                '_audit_support.funding_organization_URL'
    _definition.update            2024-10-21
    _description.text
;
    The Uniform Resource Locator (URL) associated with the funding organisation.

    The _audit_support.funding_organization_DOI data item should be provided
    alongside this item when possible.
;
    _name.category_id             audit_support
    _name.object_id               funding_organization_URL
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Uri
    _description_example.case     https://www.nccih.nih.gov/

save_

save_audit_support.id

    _definition.id                '_audit_support.id'
    _definition.update            2023-02-02
    _description.text
;
    An arbitrary unique identifier for each source of support for
    the data collected and analysed in the data block.
;
    _name.category_id             audit_support
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_audit_support.special_details

    _definition.id                '_audit_support.special_details'
    _definition.update            2024-10-21
    _description.text
;
    Details of the funding support that cannot be specified by other data items
    from the AUDIT_SUPPORT category.
;
    _name.category_id             audit_support
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_CITATION

    _definition.id                CITATION
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    Data items in the CITATION category record details about the
    literature cited as being relevant to the contents of the data
    block.
;
    _name.category_id             PUBLICATION
    _name.object_id               CITATION
    _category_key.name            '_citation.id'

save_

save_citation.abstract

    _definition.id                '_citation.abstract'
    _alias.definition_id          '_citation_abstract'
    _definition.update            2012-12-11
    _description.text
;
    Abstract for the citation. This is used most when the
    citation is extracted from a bibliographic database that
    contains full text or abstract information.
;
    _name.category_id             citation
    _name.object_id               abstract
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.abstract_id_cas

    _definition.id                '_citation.abstract_id_CAS'
    _alias.definition_id          '_citation_abstract_id_CAS'
    _definition.update            2012-12-11
    _description.text
;
    Chemical Abstracts Service (CAS) abstract identifier.
;
    _name.category_id             citation
    _name.object_id               abstract_id_CAS
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.book_id_isbn

    _definition.id                '_citation.book_id_ISBN'
    _alias.definition_id          '_citation_book_id_ISBN'
    _definition.update            2023-02-02
    _description.text
;
    International Standard Book Number (ISBN) for book chapter cited.
;
    _name.category_id             citation
    _name.object_id               book_id_ISBN
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code

save_

save_citation.book_publisher

    _definition.id                '_citation.book_publisher'
    _alias.definition_id          '_citation_book_publisher'
    _definition.update            2012-12-11
    _description.text
;
    Publisher of the citation; relevant for book chapters.
;
    _name.category_id             citation
    _name.object_id               book_publisher
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.book_publisher_city

    _definition.id                '_citation.book_publisher_city'
    _alias.definition_id          '_citation_book_publisher_city'
    _definition.update            2012-12-11
    _description.text
;
    Location of publisher of the citation; relevant for book chapters.
;
    _name.category_id             citation
    _name.object_id               book_publisher_city
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.book_title

    _definition.id                '_citation.book_title'
    _alias.definition_id          '_citation_book_title'
    _definition.update            2012-12-11
    _description.text
;
    Title of the book in which the citation appeared.
;
    _name.category_id             citation
    _name.object_id               book_title
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.coordinate_linkage

    _definition.id                '_citation.coordinate_linkage'
    _alias.definition_id          '_citation_coordinate_linkage'
    _definition.update            2012-12-11
    _description.text
;
    Code specifies whether this citation is concerned with precisely
    the set of coordinates given in the data block. If, for instance,
    the publication described the same structure, but the coordinates
    had undergone further refinement prior to creation of the data
    block, the value of this data item would be 'no'.
;
    _name.category_id             citation
    _name.object_id               coordinate_linkage
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         no                       'Citation unrelated to current coordinates.'
         n                        'Abbreviation for "no".'
         yes                      'Citation related to current coordinates.'
         y                        'Abbreviation for "yes".'

save_

save_citation.country

    _definition.id                '_citation.country'
    _alias.definition_id          '_citation_country'
    _definition.update            2012-12-11
    _description.text
;
    Country of publication; for journal articles and book chapters.
;
    _name.category_id             citation
    _name.object_id               country
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.database_id_csd

    _definition.id                '_citation.database_id_CSD'
    _alias.definition_id          '_citation_database_id_CSD'
    _definition.update            2021-10-27
    _description.text
;
    Identifier ('refcode') of the database record in the Cambridge
    Structural Database containing details of the cited structure.
;
    _name.category_id             citation
    _name.object_id               database_id_CSD
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Word

save_

save_citation.database_id_medline

    _definition.id                '_citation.database_id_Medline'
    _alias.definition_id          '_citation_database_id_Medline'
    _definition.update            2021-03-03
    _description.text
;
    MEDLINE accession number categorizing a bibliographic entry.
;
    _name.category_id             citation
    _name.object_id               database_id_Medline
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code

save_

save_citation.doi

    _definition.id                '_citation.DOI'
    _alias.definition_id          '_citation_DOI'
    _definition.update            2023-02-02
    _description.text
;
    The Digital Object Identifier (DOI) of the cited work.

    A DOI is a unique character string identifying any
    object of intellectual property. It provides a
    persistent identifier for an object on a digital network
    and permits the association of related current data in a
    structured extensible way. A DOI is an implementation
    of the Internet concepts of Uniform Resource Name and
    Universal Resource Locator managed according to the
    specifications of the International DOI Foundation
    (see https://www.doi.org/).
;
    _name.category_id             citation
    _name.object_id               DOI
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     10.5517/CC6V9DQ

save_

save_citation.id

    _definition.id                '_citation.id'
    _alias.definition_id          '_citation_id'
    _definition.update            2023-04-04
    _description.text
;
    Unique identifier to the CITATION list. A value of 'primary'
    should be used to indicate the citation that the author(s)
    consider to be the most pertinent to the contents of the data
    block. Note that this item need not be a number; it can be
    any unique identifier.
;
    _name.category_id             citation
    _name.object_id               id
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    loop_
      _description_example.case
         primary
         1
         2
         3

    _method.purpose               Definition
    _method.expression
;
    if (len(citation) == 1) {
        _enumeration.default = "primary"
    } else {
        _enumeration.default = missing
    }
;

save_

save_citation.journal_abbrev

    _definition.id                '_citation.journal_abbrev'
    _alias.definition_id          '_citation_journal_abbrev'
    _definition.update            2012-12-11
    _description.text
;
    Abbreviated name of the journal cited as given in the Chemical
    Abstracts Service Source Index.
;
    _name.category_id             citation
    _name.object_id               journal_abbrev
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'J. Mol. Biol.'

save_

save_citation.journal_full

    _definition.id                '_citation.journal_full'
    _alias.definition_id          '_citation_journal_full'
    _definition.update            2012-12-11
    _description.text
;
    Full name of the journal cited; relevant for journal articles.
;
    _name.category_id             citation
    _name.object_id               journal_full
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Journal of Molecular Biology'

save_

save_citation.journal_id_astm

    _definition.id                '_citation.journal_id_ASTM'
    _alias.definition_id          '_citation_journal_id_ASTM'
    _definition.update            2012-12-11
    _description.text
;
    American Society for the Testing of Materials (ASTM) code assigned
    to the journal cited (also referred to as the CODEN designator of
    the Chemical Abstracts Service); relevant for journal articles.
;
    _name.category_id             citation
    _name.object_id               journal_id_ASTM
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code

save_

save_citation.journal_id_csd

    _definition.id                '_citation.journal_id_CSD'
    _alias.definition_id          '_citation_journal_id_CSD'
    _definition.update            2012-12-11
    _description.text
;
    The Cambridge Structural Database (CSD) code assigned to the
    journal cited; relevant for journal articles. This is also the
    system used at the Protein Data Bank (PDB).
;
    _name.category_id             citation
    _name.object_id               journal_id_CSD
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code
    _description_example.case     0070

save_

save_citation.journal_id_issn

    _definition.id                '_citation.journal_id_ISSN'
    _alias.definition_id          '_citation_journal_id_ISSN'
    _definition.update            2012-12-11
    _description.text
;
    The International Standard Serial Number (ISSN) code assigned to
    the journal cited. Relevant for journal articles.
;
    _name.category_id             citation
    _name.object_id               journal_id_ISSN
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code

save_

save_citation.journal_issue

    _definition.id                '_citation.journal_issue'
    _alias.definition_id          '_citation_journal_issue'
    _definition.update            2021-11-12
    _description.text
;
    Issue identifier of the journal cited; relevant for articles.
;
    _name.category_id             citation
    _name.object_id               journal_issue
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         '2'
         'Special Issue'

save_

save_citation.journal_volume

    _definition.id                '_citation.journal_volume'
    _alias.definition_id          '_citation_journal_volume'
    _definition.update            2021-03-01
    _description.text
;
    Volume number of the journal cited; relevant for articles.
;
    _name.category_id             citation
    _name.object_id               journal_volume
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none
    _description_example.case     174

save_

save_citation.language

    _definition.id                '_citation.language'
    _alias.definition_id          '_citation_language'
    _definition.update            2012-12-11
    _description.text
;
    Language in which the citation appears.
;
    _name.category_id             citation
    _name.object_id               language
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     German

save_

save_citation.page_first

    _definition.id                '_citation.page_first'
    _alias.definition_id          '_citation_page_first'
    _definition.update            2012-12-11
    _description.text
;
    First page of citation; relevant for articles and book chapters.
;
    _name.category_id             citation
    _name.object_id               page_first
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.page_last

    _definition.id                '_citation.page_last'
    _alias.definition_id          '_citation_page_last'
    _definition.update            2012-12-11
    _description.text
;
    Last page of citation; relevant for articles and book chapters.
;
    _name.category_id             citation
    _name.object_id               page_last
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.publisher

    _definition.id                '_citation.publisher'
    _alias.definition_id          '_citation_publisher'
    _definition.update            2017-09-23
    _description.text
;
    The name of the publisher of the cited work. This should be used
    for citations of journal articles or datasets (in the latter case
    the publisher could be a curated database). For books or book chapters
    use _citation.book_publisher.
;
    _name.category_id             citation
    _name.object_id               publisher
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Cambridge Crystallographic Data Centre'

save_

save_citation.special_details

    _definition.id                '_citation.special_details'

    loop_
      _alias.definition_id
         '_citation_special_details'
         '_citation.details'

    _definition.update            2012-12-11
    _description.text
;
    Special aspects of the relationship of the data block contents
    to the literature item cited.
;
    _name.category_id             citation
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.title

    _definition.id                '_citation.title'
    _alias.definition_id          '_citation_title'
    _definition.update            2012-12-11
    _description.text
;
    Title of citation; relevant for articles and book chapters.
;
    _name.category_id             citation
    _name.object_id               title
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_citation.url

    _definition.id                '_citation.URL'
    _definition.update            2023-01-26
    _description.text
;
    The Uniform Resource Locator (URL) of the cited work.

    The _citation.DOI data item should be used in preference to this item when
    possible.
;
    _name.category_id             citation
    _name.object_id               URL
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Uri
    _description_example.case     https://arxiv.org/abs/1203.5146v4

save_

save_citation.year

    _definition.id                '_citation.year'
    _alias.definition_id          '_citation_year'
    _definition.update            2021-11-14
    _description.text
;
    Year of citation; relevant for articles and book chapters.
;
    _name.category_id             citation
    _name.object_id               year
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _units.code                   none

save_

save_CITATION_AUTHOR

    _definition.id                CITATION_AUTHOR
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    Category of items describing citation author(s) details.
;
    _name.category_id             PUBLICATION
    _name.object_id               CITATION_AUTHOR

    loop_
      _category_key.name
         '_citation_author.citation_id'
         '_citation_author.ordinal'

save_

save_citation_author.citation_id

    _definition.id                '_citation_author.citation_id'
    _alias.definition_id          '_citation_author_citation_id'
    _definition.update            2021-10-27
    _description.text
;
    Code identifier in the CITATION data list. The value of must match
    an identifier specified in the CITATION list.
;
    _name.category_id             citation_author
    _name.object_id               citation_id
    _name.linked_item_id          '_citation.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_citation_author.name

    _definition.id                '_citation_author.name'
    _alias.definition_id          '_citation_author_name'
    _definition.update            2023-01-10
    _description.text
;
    Name of citation author; relevant for articles and book chapters.
    The family name(s), followed by a comma and including any
    dynastic components, precedes the first name(s) or initial(s).
    For authors with only one name, provide the full name without
    abbreviation.
;
    _name.category_id             citation_author
    _name.object_id               name
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         "Bleary, Percival R."
         "O'Neil, F.K."
         "Van den Bossche, G."
         "Yang, D.-L."
         "Simonov, Yu.A"
         "Müller, H.A."
         "Ross II, C.R."
         "Chandra"

save_

save_citation_author.ordinal

    _definition.id                '_citation_author.ordinal'
    _alias.definition_id          '_citation_author_ordinal'
    _definition.update            2021-03-01
    _description.text
;
    Ordinal code specifies the order of the author's name in the list
    of authors of the citation.
;
    _name.category_id             citation_author
    _name.object_id               ordinal
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_CITATION_EDITOR

    _definition.id                CITATION_EDITOR
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    Category of items describing citation editor(s) details.
;
    _name.category_id             PUBLICATION
    _name.object_id               CITATION_EDITOR

    loop_
      _category_key.name
         '_citation_editor.citation_id'
         '_citation_editor.ordinal'

save_

save_citation_editor.citation_id

    _definition.id                '_citation_editor.citation_id'
    _alias.definition_id          '_citation_editor_citation_id'
    _definition.update            2021-10-27
    _description.text
;
    Code identifier in the CITATION list. The value must match an
    identifier specified by _citation.id in the CITATION list.
;
    _name.category_id             citation_editor
    _name.object_id               citation_id
    _name.linked_item_id          '_citation.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_citation_editor.name

    _definition.id                '_citation_editor.name'

    loop_
      _alias.definition_id
         '_citation_editor'
         '_citation_editor_name'

    _definition.update            2012-12-11
    _description.text
;
    Name of citation editor; relevant for book chapters.
    The family name(s), followed by a comma and including any
    dynastic components, precedes the first name(s) or initial(s).
;
    _name.category_id             citation_editor
    _name.object_id               name
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         "Bleary, Percival R."
         "O'Neil, F.K."
         "Van den Bossche, G."
         "Yang, D.-L."
         "Simonov, Yu.A"
         "Müller, H.A."
         "Ross II, C.R."

save_

save_citation_editor.ordinal

    _definition.id                '_citation_editor.ordinal'
    _alias.definition_id          '_citation_editor_ordinal'
    _definition.update            2021-03-01
    _description.text
;
    This data item defines the order of the editor's name in the
    list of editors of a citation.
;
    _name.category_id             citation_editor
    _name.object_id               ordinal
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_COMPUTING

    _definition.id                COMPUTING
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-05-07
    _description.text
;
    The category of data items used to record details of the
    computer programs used in the crystal structure analysis.
;
    _name.category_id             PUBLICATION
    _name.object_id               COMPUTING

save_

save_computing.cell_refinement

    _definition.id                '_computing.cell_refinement'
    _alias.definition_id          '_computing_cell_refinement'
    _definition.update            2019-01-09
    _description.text
;
    Brief description of software used for cell refinement.
;
    _name.category_id             computing
    _name.object_id               cell_refinement
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'CAD-4 (Enraf-Nonius, 1989)'

save_

save_computing.diffrn_collection

    _definition.id                '_computing.diffrn_collection'

    loop_
      _alias.definition_id
         '_computing_data_collection'
         '_computing.data_collection'

    _definition.update            2012-12-11
    _description.text
;
    Description of software used to measure diffraction data.
;
    _name.category_id             computing
    _name.object_id               diffrn_collection
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'CAD-4 (Enraf-Nonius, 1989)'

save_

save_computing.diffrn_reduction

    _definition.id                '_computing.diffrn_reduction'

    loop_
      _alias.definition_id
         '_computing_data_reduction'
         '_computing.data_reduction'

    _definition.update            2012-12-11
    _description.text
;
    Description of software used to convert diffraction data
    to measured structure factors.
;
    _name.category_id             computing
    _name.object_id               diffrn_reduction
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
        'DIFDAT, SORTRF, ADDREF (Hall & Stewart, 1990)'

save_

save_computing.molecular_graphics

    _definition.id                '_computing.molecular_graphics'
    _alias.definition_id          '_computing_molecular_graphics'
    _definition.update            2019-01-09
    _description.text
;
    Brief description of software used for molecular graphics.
;
    _name.category_id             computing
    _name.object_id               molecular_graphics
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_computing.publication_material

    _definition.id                '_computing.publication_material'
    _alias.definition_id          '_computing_publication_material'
    _definition.update            2019-01-09
    _description.text
;
    Brief description of software used for publication material.
;
    _name.category_id             computing
    _name.object_id               publication_material
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_computing.sample_tracking

    _definition.id                '_computing.sample_tracking'
    _definition.update            2024-07-08
    _description.text
;
    Reference to software used to track the position of a sample with
    respect to the diffraction source beam. Typically used in 3D
    electron diffraction. More details of the tracking method may be
    provided in _diffrn_measurement.sample_tracking_method.
;
    _name.category_id             computing
    _name.object_id               sample_tracking
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'PyFast-ADT (Santucci, 2024)'

save_

save_computing.structure_refinement

    _definition.id                '_computing.structure_refinement'
    _alias.definition_id          '_computing_structure_refinement'
    _definition.update            2019-01-09
    _description.text
;
    Brief description of software used for structure refinement.
;
    _name.category_id             computing
    _name.object_id               structure_refinement
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'SHELXL93 (Sheldrick, 1993)'

save_

save_computing.structure_solution

    _definition.id                '_computing.structure_solution'
    _alias.definition_id          '_computing_structure_solution'
    _definition.update            2019-01-09
    _description.text
;
    Brief description of software used for structure solution.
;
    _name.category_id             computing
    _name.object_id               structure_solution
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'SHELXS86 (Sheldrick, 1990)'

save_

save_DATABASE

    _definition.id                DATABASE
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-12-13
    _description.text
;
    The category of data items recording database deposition.
;
    _name.category_id             PUBLICATION
    _name.object_id               DATABASE

save_

save_database.csd_history

    _definition.id                '_database.CSD_history'
    _alias.definition_id          '_database_CSD_history'
    _definition.update            2012-12-13
    _description.text
;
    The history of changes made by the Cambridge Crystallographic Data
    Centre and incorporated into the Cambridge Structural Database (CSD).
;
    _name.category_id             database
    _name.object_id               CSD_history
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_database.dataset_doi

    _definition.id                '_database.dataset_DOI'
    _alias.definition_id          '_database_dataset_DOI'
    _definition.update            2023-02-02
    _description.text
;
    The digital object identifier (DOI) registered to identify
    a data set publication associated with the structure
    described in the current data block. This should be used
    for a dataset obtained from a curated database such as
    CSD or PDB.

    A DOI is a unique character string identifying any
    object of intellectual property. It provides a
    persistent identifier for an object on a digital network
    and permits the association of related current data in a
    structured extensible way. A DOI is an implementation
    of the Internet concepts of Uniform Resource Name and
    Universal Resource Locator managed according to the
    specifications of the International DOI Foundation
    (see https://www.doi.org/).
;
    _name.category_id             database
    _name.object_id               dataset_DOI
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     10.2210/pdb4hhb/pdb

save_

save_database.journal_astm

    _definition.id                '_database.journal_ASTM'
    _alias.definition_id          '_database_journal_ASTM'
    _definition.update            2012-12-13
    _description.text
;
    ASTM CODEN designator for a journal as given in the Chemical
    Source List maintained by the Chemical Abstracts Service.
;
    _name.category_id             database
    _name.object_id               journal_ASTM
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code

save_

save_database.journal_csd

    _definition.id                '_database.journal_CSD'
    _alias.definition_id          '_database_journal_CSD'
    _definition.update            2012-12-13
    _description.text
;
    The journal code used in the Cambridge Structural Database.
;
    _name.category_id             database
    _name.object_id               journal_CSD
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code

save_

save_DATABASE_CODE

    _definition.id                DATABASE_CODE
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-12-13
    _description.text
;
    The category of data items recording database deposition. These data items
    are assigned by database managers and should only appear in a CIF if they
    originate from that source.
;
    _name.category_id             DATABASE
    _name.object_id               DATABASE_CODE

save_

save_database_code.bincstrdb

    _definition.id                '_database_code.BIncStrDB'

    _definition.update            2024-03-27
    _description.text
;
    Code assigned by the Bilbao Modulated Structures Database
    (B-IncStrDB).
;
    _name.category_id             database_code
    _name.object_id               BIncStrDB
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_database_code.cas

    _definition.id                '_database_code.CAS'

    loop_
      _alias.definition_id
         '_database_code_CAS'
         '_database.code_CAS'

    _definition.update            2012-12-13
    _description.text
;
    Code assigned by the Chemical Abstracts Service.
;
    _name.category_id             database_code
    _name.object_id               CAS
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_database_code.cod

    _definition.id                '_database_code.COD'

    loop_
      _alias.definition_id
         '_database_code_COD'
         '_database.code_COD'

    _definition.update            2021-03-03
    _description.text
;
    Code assigned by the Crystallography Open Database (COD).
;
    _name.category_id             database_code
    _name.object_id               COD
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_database_code.csd

    _definition.id                '_database_code.CSD'

    loop_
      _alias.definition_id
         '_database_code_CSD'
         '_database.code_CSD'

    _definition.update            2021-11-04
    _description.text
;
    Code assigned by the Cambridge Structural Database.
;
    _name.category_id             database_code
    _name.object_id               CSD
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_database_code.depnum_ccdc_archive

    _definition.id                '_database_code.depnum_CCDC_archive'

    loop_
      _alias.definition_id
         '_database_code_depnum_CCDC_archive'
         '_database.code_depnum_CCDC_archive'

    _definition.update            2021-09-24
    _description.text
;
    Deposition numbers assigned by the Cambridge Crystallographic
    Data Centre (CCDC) to files containing structural information
    archived by the CCDC.
;
    _name.category_id             database_code
    _name.object_id               depnum_CCDC_archive
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_database_code.depnum_ccdc_fiz

    _definition.id                '_database_code.depnum_CCDC_fiz'

    loop_
      _alias.definition_id
         '_database_code_depnum_CCDC_fiz'
         '_database.code_depnum_CCDC_fiz'

    _definition.update            2021-09-24
    _description.text
;
    Deposition numbers assigned by the Fachinformationszentrum
    Karlsruhe (FIZ) to files containing structural information
    archived by the Cambridge Crystallographic Data Centre (CCDC).
;
    _name.category_id             database_code
    _name.object_id               depnum_CCDC_fiz
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_database_code.depnum_ccdc_journal

    _definition.id                '_database_code.depnum_CCDC_journal'

    loop_
      _alias.definition_id
         '_database_code_depnum_CCDC_journal'
         '_database.code_depnum_CCDC_journal'

    _definition.update            2021-09-24
    _description.text
;
    Deposition numbers assigned by various journals to files
    containing structural information archived by the Cambridge
    Crystallographic Data Centre (CCDC).
;
    _name.category_id             database_code
    _name.object_id               depnum_CCDC_journal
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_database_code.icsd

    _definition.id                '_database_code.ICSD'

    loop_
      _alias.definition_id
         '_database_code_ICSD'
         '_database.code_ICSD'

    _definition.update            2012-12-13
    _description.text
;
    Code assigned by the Inorganic Crystal Structure Database.
;
    _name.category_id             database_code
    _name.object_id               ICSD
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_database_code.mdf

    _definition.id                '_database_code.MDF'

    loop_
      _alias.definition_id
         '_database_code_MDF'
         '_database.code_MDF'

    _definition.update            2012-12-13
    _description.text
;
    Code assigned in the Metals Data File.
;
    _name.category_id             database_code
    _name.object_id               MDF
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code

save_

save_database_code.nbs

    _definition.id                '_database_code.NBS'

    loop_
      _alias.definition_id
         '_database_code_NBS'
         '_database.code_NBS'

    _definition.update            2012-12-13
    _description.text
;
    Code assigned by the NBS (NIST) Crystal Data Database.
;
    _name.category_id             database_code
    _name.object_id               NBS
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_database_code.pdb

    _definition.id                '_database_code.PDB'

    loop_
      _alias.definition_id
         '_database_code_PDB'
         '_database.code_PDB'

    _definition.update            2021-11-04
    _description.text
;
    Code assigned by the Protein Data Bank.
;
    _name.category_id             database_code
    _name.object_id               PDB
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_database_code.pdf

    _definition.id                '_database_code.PDF'

    loop_
      _alias.definition_id
         '_database_code_PDF'
         '_database.code_PDF'

    _definition.update            2012-12-13
    _description.text
;
    Code assigned in the Powder Diffraction File.
;
    _name.category_id             database_code
    _name.object_id               PDF
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_DATABASE_RELATED

    _definition.id                DATABASE_RELATED
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2019-01-08
    _description.text
;
    A category of items recording entries in databases that describe
    the same or related data. Databases wishing to insert their own
    canonical codes when archiving and delivering data blocks should
    use items from the DATABASE category.
;
    _name.category_id             PUBLICATION
    _name.object_id               DATABASE_RELATED
    _category_key.name            '_database_related.id'
    _description_example.case
;
    loop_
      _database_related.id
      _database_related.database_id
      _database_related.entry_code
      _database_related.relation
      _database_related.special_details
       1 CAS 58-55-9  Other     'Describes the same compound.'
       2 COD 2006182  Identical .
       3 CSD BAPLOT01 Identical .
;
    _description_example.detail
;
    The loop relates a specific instance of a theophylline crystal structure
    to corresponding entries in the COD and CSD crystallographic databases
    as well as to the general description of the theophyline compound in the
    CAS registry.

    This example loop could potentially be added to the CIF file that is
    provided as supplementary material for the following publication:
      Ebisuzaki, Y. et al. (1997). Acta Crystallographica, Section C:
      Crystal Structure Communications, 53(6), 777-779.
      https://doi.org/10.1107/S0108270197001960
;

save_

save_database_related.database_id

    _definition.id                '_database_related.database_id'
    _definition.update            2023-02-02
    _description.text
;
    An identifier for the database that contains the related dataset.
;
    _name.category_id             database_related
    _name.object_id               database_id
    _type.purpose                 State
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Word

    _import.get
        [{'file':templ_enum.cif  'save':database_list}]

save_

save_database_related.entry_code

    _definition.id                '_database_related.entry_code'
    _definition.update            2019-01-08
    _description.text
;
    The code used by the database referred to in
    _database_related.database_id to identify the
    related dataset.
;
    _name.category_id             database_related
    _name.object_id               entry_code
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_database_related.id

    _definition.id                '_database_related.id'
    _definition.update            2023-02-02
    _description.text
;
    An identifier for this database reference.
;
    _name.category_id             database_related
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Word

save_

save_database_related.relation

    _definition.id                '_database_related.relation'
    _definition.update            2023-02-03
    _description.text
;
    The general relationship of the data in the data block
    to the dataset referred to in the database.
;
    _name.category_id             database_related
    _name.object_id               relation
    _type.purpose                 State
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         Identical
;
         The dataset contents are identical.
;
         Subset
;
         The dataset contents are a proper subset of the contents of the data
         block.
;
         Superset
;
         The dataset contents include the contents of the data block.
;
         Derived
;
         The dataset contents are derivable from the contents of the data block.
;
         Common
;
         The dataset contents share a common source.
;
         Other
;
         The dataset contents are related to the contents of the data block in
         a way not included elsewhere in this list. In case this value is used,
         it is strongly recommended to also provide the specifics of the
         relationship using the _database_related.special_details data item.
;

save_

save_database_related.special_details

    _definition.id                '_database_related.special_details'
    _definition.update            2019-01-08
    _description.text
;
    Information about the external dataset and relationship not encoded
    elsewhere.
;
    _name.category_id             database_related
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_DISPLAY

    _definition.id                DISPLAY
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-05-07
    _description.text
;
    The category of data items used to enumerate the display
    parameters used in the discipline.
;
    _name.category_id             PUBLICATION
    _name.object_id               DISPLAY

save_

save_DISPLAY_COLOUR

    _definition.id                DISPLAY_COLOUR
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to enumerate the display
    colour codes used in the discipline.
;
    _name.category_id             DISPLAY
    _name.object_id               DISPLAY_COLOUR
    _category_key.name            '_display_colour.hue'

save_

save_display_colour.blue

    _definition.id                '_display_colour.blue'
    _name.category_id             display_colour
    _name.object_id               blue

    _import.get
        [{'file':templ_attr.cif  'save':display_colour}]

save_

save_display_colour.green

    _definition.id                '_display_colour.green'
    _name.category_id             display_colour
    _name.object_id               green

    _import.get
        [{'file':templ_attr.cif  'save':display_colour}]

save_

save_display_colour.hue

    _definition.id                '_display_colour.hue'
    _definition.update            2023-02-06
    _description.text
;
    Colour hue as an enumerated code.
;
    _name.category_id             display_colour
    _name.object_id               hue
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    _import.get                   [{'file':templ_enum.cif  'save':colour_rgb}]

save_

save_display_colour.red

    _definition.id                '_display_colour.red'
    _name.category_id             display_colour
    _name.object_id               red

    _import.get
        [{'file':templ_attr.cif  'save':display_colour}]

save_

save_display_colour.rgb

    _definition.id                '_display_colour.RGB'
    _definition.update            2021-03-01
    _description.text
;
    The red-green-blue intensities, bases 256, for each colour code.
;
    _name.category_id             display_colour
    _name.object_id               RGB
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               List
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With c  as  display_colour

               _display_colour.RGB  =  [ c.red, c.green, c.blue ]
;

save_

save_JOURNAL

    _definition.id                JOURNAL
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-12-11
    _description.text
;
    Category of items recording details about the book-keeping
    by the journal staff when processing a CIF submitted for
    publication.  The creator of a CIF will not normally specify
    these data items.
;
    _name.category_id             PUBLICATION
    _name.object_id               JOURNAL

save_

save_journal.coden_astm

    _definition.id                '_journal.coden_ASTM'
    _alias.definition_id          '_journal_coden_ASTM'
    _definition.update            2012-12-11
    _description.text
;
    ASTM code assigned to journal.
;
    _name.category_id             journal
    _name.object_id               coden_ASTM
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_journal.coden_cambridge

    _definition.id                '_journal.coden_Cambridge'
    _alias.definition_id          '_journal_coden_Cambridge'
    _definition.update            2012-12-11
    _description.text
;
    Cambridge Cryst. Data Centre code assigned to journal.
;
    _name.category_id             journal
    _name.object_id               coden_Cambridge
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code

save_

save_journal.issue

    _definition.id                '_journal.issue'
    _alias.definition_id          '_journal_issue'
    _definition.update            2021-11-12
    _description.text
;
    Issue identifier within the journal.
;
    _name.category_id             journal
    _name.object_id               issue
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         '2'
         'Special Issue'

save_

save_journal.language

    _definition.id                '_journal.language'
    _alias.definition_id          '_journal_language'
    _definition.update            2012-12-11
    _description.text
;
    Language of the publication.
;
    _name.category_id             journal
    _name.object_id               language
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal.name_full

    _definition.id                '_journal.name_full'
    _alias.definition_id          '_journal_name_full'
    _definition.update            2012-12-11
    _description.text
;
    Full name of the journal.
;
    _name.category_id             journal
    _name.object_id               name_full
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal.page_first

    _definition.id                '_journal.page_first'
    _alias.definition_id          '_journal_page_first'
    _definition.update            2012-12-11
    _description.text
;
    First page of the publication in the journal.
;
    _name.category_id             journal
    _name.object_id               page_first
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal.page_last

    _definition.id                '_journal.page_last'
    _alias.definition_id          '_journal_page_last'
    _definition.update            2012-12-11
    _description.text
;
    Last page of the publication in the journal.
;
    _name.category_id             journal
    _name.object_id               page_last
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal.paper_category

    _definition.id                '_journal.paper_category'
    _alias.definition_id          '_journal_paper_category'
    _definition.update            2021-11-04
    _description.text
;
    Category of the publication in the journal.
;
    _name.category_id             journal
    _name.object_id               paper_category
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal.paper_doi

    _definition.id                '_journal.paper_DOI'
    _alias.definition_id          '_journal_paper_DOI'
    _definition.update            2021-12-01
    _description.text
;
    DOI of the publication in the journal.
;
    _name.category_id             journal
    _name.object_id               paper_DOI
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     10.5555/12345678

save_

save_journal.paper_number

    _definition.id                '_journal.paper_number'
    _definition.update            2023-02-02
    _description.text
;
    Article number that is used by some journals instead of a page range.
    Usually applies to electronic-only journals.
;
    _name.category_id             journal
    _name.object_id               paper_number
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         e0222394
         L041303
         044501

save_

save_journal.paper_pages

    _definition.id                '_journal.paper_pages'
    _definition.update            2023-02-02
    _description.text
;
    Number of pages in the journal article.
;
    _name.category_id             journal
    _name.object_id               paper_pages
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

    loop_
      _description_example.case
         1
         4
         13

save_

save_journal.paper_url

    _definition.id                '_journal.paper_URL'
    _definition.update            2023-01-26
    _description.text
;
    The Uniform Resource Locator (URL) of the publication.

    The _journal.paper_DOI data item should be used in preference to this item
    when possible.
;
    _name.category_id             journal
    _name.object_id               paper_URL
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Uri
    _description_example.case     https://arxiv.org/abs/1203.5146v4

save_

save_journal.suppl_publ_number

    _definition.id                '_journal.suppl_publ_number'
    _alias.definition_id          '_journal_suppl_publ_number'
    _definition.update            2021-11-04
    _description.text
;
    Number of the supplementary publication.
;
    _name.category_id             journal
    _name.object_id               suppl_publ_number
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal.suppl_publ_pages

    _definition.id                '_journal.suppl_publ_pages'
    _alias.definition_id          '_journal_suppl_publ_pages'
    _definition.update            2021-03-01
    _description.text
;
    Number of pages in the supplementary publication.
;
    _name.category_id             journal
    _name.object_id               suppl_publ_pages
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_journal.validation_number

    _definition.id                '_journal.validation_number'

    loop_
      _alias.definition_id
         '_journal.data_validation_number'
         '_journal_data_validation_number'

    _definition.update            2025-03-27
    _description.text
;
    Data validation number identifying a published structure that
    has been processed by a standard validation/checking procedure;
    assigned by a journal.
;
    _name.category_id             journal
    _name.object_id               validation_number
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_journal.volume

    _definition.id                '_journal.volume'
    _alias.definition_id          '_journal_volume'
    _definition.update            2021-03-01
    _description.text
;
    Volume number of the publication.
;
    _name.category_id             journal
    _name.object_id               volume
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_journal.year

    _definition.id                '_journal.year'
    _alias.definition_id          '_journal_year'
    _definition.update            2021-11-14
    _description.text
;
    Year of the publication.
;
    _name.category_id             journal
    _name.object_id               year
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _units.code                   none

save_

save_JOURNAL_COEDITOR

    _definition.id                JOURNAL_COEDITOR
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2021-08-18
    _description.text
;
    Category of items recording coeditor details.
;
    _name.category_id             JOURNAL
    _name.object_id               JOURNAL_COEDITOR

save_

save_journal_coeditor.address

    _definition.id                '_journal_coeditor.address'

    loop_
      _alias.definition_id
         '_journal_coeditor_address'
         '_journal.coeditor_address'

    _definition.update            2012-12-11
    _description.text
;
    The postal address of the coeditor.
;
    _name.category_id             journal_coeditor
    _name.object_id               address
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_coeditor.code

    _definition.id                '_journal_coeditor.code'

    loop_
      _alias.definition_id
         '_journal_coeditor_code'
         '_journal.coeditor_code'

    _definition.update            2012-12-11
    _description.text
;
    The coeditor identifier.
;
    _name.category_id             journal_coeditor
    _name.object_id               code
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code

save_

save_journal_coeditor.email

    _definition.id                '_journal_coeditor.email'

    loop_
      _alias.definition_id
         '_journal_coeditor_email'
         '_journal.coeditor_email'

    _definition.update            2012-12-11
    _description.text
;
    The email address of the coeditor.
;
    _name.category_id             journal_coeditor
    _name.object_id               email
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_coeditor.fax

    _definition.id                '_journal_coeditor.fax'

    loop_
      _alias.definition_id
         '_journal_coeditor_fax'
         '_journal.coeditor_fax'

    _definition.update            2012-12-11
    _description.text
;
    The fax number of the coeditor.
;
    _name.category_id             journal_coeditor
    _name.object_id               fax
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_coeditor.name

    _definition.id                '_journal_coeditor.name'

    loop_
      _alias.definition_id
         '_journal_coeditor_name'
         '_journal.coeditor_name'

    _definition.update            2012-12-11
    _description.text
;
    The name of the coeditor.
;
    _name.category_id             journal_coeditor
    _name.object_id               name
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_coeditor.notes

    _definition.id                '_journal_coeditor.notes'

    loop_
      _alias.definition_id
         '_journal_coeditor_notes'
         '_journal.coeditor_notes'

    _definition.update            2012-12-11
    _description.text
;
    Notes on coeditor interaction wrt this publication.
;
    _name.category_id             journal_coeditor
    _name.object_id               notes
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_coeditor.phone

    _definition.id                '_journal_coeditor.phone'

    loop_
      _alias.definition_id
         '_journal_coeditor_phone'
         '_journal.coeditor_phone'

    _definition.update            2012-12-11
    _description.text
;
    The phone number of the coeditor.
;
    _name.category_id             journal_coeditor
    _name.object_id               phone
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_JOURNAL_DATE

    _definition.id                JOURNAL_DATE
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-12-11
    _description.text
;
    Category of items recording dates of publication processing.
;
    _name.category_id             JOURNAL
    _name.object_id               JOURNAL_DATE

save_

save_journal_date.accepted

    _definition.id                '_journal_date.accepted'

    loop_
      _alias.definition_id
         '_journal_date_accepted'
         '_journal.date_accepted'

    _definition.update            2021-03-03
    _description.text
;
    Date when the publication was accepted.
;
    _name.category_id             journal_date
    _name.object_id               accepted
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_journal_date.from_coeditor

    _definition.id                '_journal_date.from_coeditor'

    loop_
      _alias.definition_id
         '_journal_date_from_coeditor'
         '_journal.date_from_coeditor'

    _definition.update            2021-03-03
    _description.text
;
    Date when the publication was received from the coeditor.
;
    _name.category_id             journal_date
    _name.object_id               from_coeditor
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_journal_date.printers_final

    _definition.id                '_journal_date.printers_final'

    loop_
      _alias.definition_id
         '_journal_date_printers_final'
         '_journal.date_printers_final'

    _definition.update            2021-03-03
    _description.text
;
    Date when the publication was last sent to the printers.
;
    _name.category_id             journal_date
    _name.object_id               printers_final
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_journal_date.printers_first

    _definition.id                '_journal_date.printers_first'

    loop_
      _alias.definition_id
         '_journal_date_printers_first'
         '_journal.date_printers_first'

    _definition.update            2021-03-03
    _description.text
;
    Date when the publication was first sent to the printers.
;
    _name.category_id             journal_date
    _name.object_id               printers_first
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_journal_date.proofs_in

    _definition.id                '_journal_date.proofs_in'

    loop_
      _alias.definition_id
         '_journal_date_proofs_in'
         '_journal.date_proofs_in'

    _definition.update            2021-03-03
    _description.text
;
    Date when the publication proofs were received.
;
    _name.category_id             journal_date
    _name.object_id               proofs_in
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_journal_date.proofs_out

    _definition.id                '_journal_date.proofs_out'

    loop_
      _alias.definition_id
         '_journal_date_proofs_out'
         '_journal.date_proofs_out'

    _definition.update            2021-03-03
    _description.text
;
    Date when the publication proofs were sent out.
;
    _name.category_id             journal_date
    _name.object_id               proofs_out
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_journal_date.recd_copyright

    _definition.id                '_journal_date.recd_copyright'

    loop_
      _alias.definition_id
         '_journal_date_recd_copyright'
         '_journal.date_recd_copyright'

    _definition.update            2021-03-03
    _description.text
;
    Date when the completed copyright was received.
;
    _name.category_id             journal_date
    _name.object_id               recd_copyright
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_journal_date.recd_electronic

    _definition.id                '_journal_date.recd_electronic'

    loop_
      _alias.definition_id
         '_journal_date_recd_electronic'
         '_journal.date_recd_electronic'

    _definition.update            2021-03-03
    _description.text
;
    Date when the publication was received electronically.
;
    _name.category_id             journal_date
    _name.object_id               recd_electronic
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_journal_date.recd_hard_copy

    _definition.id                '_journal_date.recd_hard_copy'

    loop_
      _alias.definition_id
         '_journal_date_recd_hard_copy'
         '_journal.date_recd_hard_copy'

    _definition.update            2021-03-03
    _description.text
;
    Date when the publication was received as hard copy.
;
    _name.category_id             journal_date
    _name.object_id               recd_hard_copy
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_journal_date.to_coeditor

    _definition.id                '_journal_date.to_coeditor'

    loop_
      _alias.definition_id
         '_journal_date_to_coeditor'
         '_journal.date_to_coeditor'

    _definition.update            2021-03-03
    _description.text
;
    Date when the publication was sent to the coeditor.
;
    _name.category_id             journal_date
    _name.object_id               to_coeditor
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Date

save_

save_JOURNAL_INDEX

    _definition.id                JOURNAL_INDEX
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    Category of items describing publication indices.
;
    _name.category_id             JOURNAL
    _name.object_id               JOURNAL_INDEX
    _category_key.name            '_journal_index.id'

save_

save_journal_index.id

    _definition.id                '_journal_index.id'
    _definition.update            2023-07-13
    _description.text
;
    Unique identifier for a journal index entry.
;
    _name.category_id             journal_index
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_journal_index.subterm

    _definition.id                '_journal_index.subterm'
    _alias.definition_id          '_journal_index_subterm'
    _definition.update            2012-12-11
    _description.text
;
    Sub-term index assigned for the publication.
;
    _name.category_id             journal_index
    _name.object_id               subterm
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

save_

save_journal_index.term

    _definition.id                '_journal_index.term'
    _alias.definition_id          '_journal_index_term'
    _definition.update            2012-12-11
    _description.text
;
    Term index assigned for the publication.
;
    _name.category_id             journal_index
    _name.object_id               term
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

save_

save_journal_index.type

    _definition.id                '_journal_index.type'
    _alias.definition_id          '_journal_index_type'
    _definition.update            2021-07-07
    _description.text
;
    Type of index assigned for the publication.
;
    _name.category_id             journal_index
    _name.object_id               type
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         O                        'Organic formula index.'
         I                        'Inorganic formula index.'
         M                        'Metal-organic formula index.'
         S                        'Subject index.'

    _enumeration.default          O

save_

save_JOURNAL_TECHEDITOR

    _definition.id                JOURNAL_TECHEDITOR
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-12-11
    _description.text
;
    Category of items recording details of the technical editor
    processing this publication.
;
    _name.category_id             JOURNAL
    _name.object_id               JOURNAL_TECHEDITOR

save_

save_journal_techeditor.address

    _definition.id                '_journal_techeditor.address'

    loop_
      _alias.definition_id
         '_journal_techeditor_address'
         '_journal.techeditor_address'

    _definition.update            2012-12-11
    _description.text
;
    Postal address of the technical editor for this publication.
;
    _name.category_id             journal_techeditor
    _name.object_id               address
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_techeditor.code

    _definition.id                '_journal_techeditor.code'

    loop_
      _alias.definition_id
         '_journal_techeditor_code'
         '_journal.techeditor_code'

    _definition.update            2021-11-04
    _description.text
;
    Code of the technical editor for this publication.
;
    _name.category_id             journal_techeditor
    _name.object_id               code
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_techeditor.email

    _definition.id                '_journal_techeditor.email'

    loop_
      _alias.definition_id
         '_journal_techeditor_email'
         '_journal.techeditor_email'

    _definition.update            2012-12-11
    _description.text
;
    Email address of the technical editor for this publication.
;
    _name.category_id             journal_techeditor
    _name.object_id               email
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_techeditor.fax

    _definition.id                '_journal_techeditor.fax'

    loop_
      _alias.definition_id
         '_journal_techeditor_fax'
         '_journal.techeditor_fax'

    _definition.update            2012-12-11
    _description.text
;
    Fax number of the technical editor for this publication.
;
    _name.category_id             journal_techeditor
    _name.object_id               fax
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_techeditor.name

    _definition.id                '_journal_techeditor.name'

    loop_
      _alias.definition_id
         '_journal_techeditor_name'
         '_journal.techeditor_name'

    _definition.update            2012-12-11
    _description.text
;
    Name of the technical editor for this publication.
;
    _name.category_id             journal_techeditor
    _name.object_id               name
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_techeditor.notes

    _definition.id                '_journal_techeditor.notes'

    loop_
      _alias.definition_id
         '_journal_techeditor_notes'
         '_journal.techeditor_notes'

    _definition.update            2012-12-11
    _description.text
;
    Notes of the technical editor for this publication.
;
    _name.category_id             journal_techeditor
    _name.object_id               notes
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_journal_techeditor.phone

    _definition.id                '_journal_techeditor.phone'

    loop_
      _alias.definition_id
         '_journal_techeditor_phone'
         '_journal.techeditor_phone'

    _definition.update            2012-12-11
    _description.text
;
    Phone number of the technical editor for this publication.
;
    _name.category_id             journal_techeditor
    _name.object_id               phone
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_PUBL

    _definition.id                PUBL
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-05-07
    _description.text
;
    Data items in the PUBL category are used when submitting a
    manuscript for publication. They refer either to the paper as
    a whole, or to specific named elements within a paper (such as
    the title and abstract, or the Comment and Experimental
    sections of Acta Crystallographica Section C). The data items
    in the PUBL_BODY category should be used for the textual
    content of other submissions. Typically, each journal will
    supply a list of the specific items it requires in its Notes
    for Authors.
;
    _name.category_id             PUBLICATION
    _name.object_id               PUBL

save_

save_publ.contact_letter

    _definition.id                '_publ.contact_letter'
    _alias.definition_id          '_publ_contact_letter'
    _definition.update            2012-11-29
    _description.text
;
    A letter submitted to the journal editor by the contact author.
;
    _name.category_id             publ
    _name.object_id               contact_letter
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_PUBL_AUTHOR

    _definition.id                PUBL_AUTHOR
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    Category of data items recording the author information.
;
    _name.category_id             PUBL
    _name.object_id               PUBL_AUTHOR
    _category_key.name            '_publ_author.id'

save_

save_publ_author.address

    _definition.id                '_publ_author.address'
    _alias.definition_id          '_publ_author_address'
    _definition.update            2019-01-09
    _description.text
;
    The address of a publication author. If there is more than one
    author, this will be looped with _publ_author.name.
;
    _name.category_id             publ_author
    _name.object_id               address
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
;
    Department
    Institute
    Street
    City and postcode
    COUNTRY
;

save_

save_publ_author.email

    _definition.id                '_publ_author.email'
    _alias.definition_id          '_publ_author_email'
    _definition.update            2019-01-09
    _description.text
;
    The e-mail address of a publication author. If there is more
    than one author, this will be looped with _publ_author.name.
    The format of e-mail addresses is given in Section 3.4, Address
    Specification, of Internet Message Format, RFC 2822, P. Resnick
    (Editor), Network Standards Group, April 2001.
;
    _name.category_id             publ_author
    _name.object_id               email
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_author.footnote

    _definition.id                '_publ_author.footnote'
    _alias.definition_id          '_publ_author_footnote'
    _definition.update            2012-12-13
    _description.text
;
    A footnote accompanying an author's name in the list of authors
    of a paper. Typically indicates sabbatical address, additional
    affiliations or date of decease.
;
    _name.category_id             publ_author
    _name.object_id               footnote
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_author.id

    _definition.id                '_publ_author.id'
    _definition.update            2023-02-02
    _description.text
;
    Arbitrary identifier for this author.
;
    _name.category_id             publ_author
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Related
    _type.container               Single
    _type.contents                Word
    _method.purpose               Definition
    _method.expression
;
    _enumeration.default = Unique_id(publ_author.id)
;

save_

save_publ_author.id_audit

    _definition.id                '_publ_author.id_audit'
    _definition.update            2023-02-02
    _description.text
;
    Identifier corresponding to this author in the AUDIT_AUTHOR category list,
    if present.
;
    _name.category_id             publ_author
    _name.object_id               id_audit
    _name.linked_item_id          '_audit_author.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_publ_author.id_iucr

    _definition.id                '_publ_author.id_IUCr'
    _alias.definition_id          '_publ_author_id_IUCr'
    _definition.update            2023-02-02
    _description.text
;
    Identifier in the IUCr contact database of a publication
    author. This identifier may be available from the World
    Directory of Crystallographers (http://wdc.iucr.org).
;
    _name.category_id             publ_author
    _name.object_id               id_IUCr
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Word

save_

save_publ_author.id_orcid

    _definition.id                '_publ_author.id_ORCID'
    _alias.definition_id          '_publ_author_id_ORCID'
    _definition.update            2023-02-02
    _description.text
;
    Identifier in the ORCID Registry of a publication
    author. ORCID is an open, non-profit, community-driven
    service to provide a registry of unique researcher
    identifiers (https://orcid.org/).
;
    _name.category_id             publ_author
    _name.object_id               id_ORCID
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code
    _description_example.case     0000-0003-0391-0002

save_

save_publ_author.name

    _definition.id                '_publ_author.name'
    _alias.definition_id          '_publ_author_name'
    _definition.update            2023-01-10
    _description.text
;
    The name of a publication author. If there are multiple authors,
    this will be looped with _publ_author.address. The family
    name(s), followed by a comma and including any dynastic
    components, precedes the first names or initials. For authors
    with only one name, provide the full name without abbreviation.
;
    _name.category_id             publ_author
    _name.object_id               name
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         "Bleary, Percival R."
         "O'Neil, F.K."
         "Van den Bossche, G."
         "Yang, D.-L."
         "Simonov, Yu.A"
         "Müller, H.A."
         "Ross II, C.R."
         "Chandra"

save_

save_publ_author.phone

    _definition.id                '_publ_author.phone'
    _alias.definition_id          '_publ_author_phone'
    _definition.update            2014-06-12
    _description.text
;
    Telephone number of the author submitting the manuscript and
    data block.

    The recommended style starts with the international dialing
    prefix, followed by the area code in parentheses, followed by the
    local number and any extension number prefixed by 'x',
    with no spaces. The earlier convention of including
    the international dialing prefix in parentheses is no longer
    recommended.
;
    _name.category_id             publ_author
    _name.object_id               phone
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         12(34)9477330
         12()349477330
         12(34)9477330x5543

save_

save_PUBL_BODY

    _definition.id                PUBL_BODY
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    Data items in the PUBL_BODY category permit labelling of
    different text sections within the body of a submitted paper.
    Note that these should not be used in a paper which has
    a standard format with sections tagged by specific data names
    (such as in Acta Crystallographica Section C). Typically,
    each journal will supply a list of the specific items it
    requires in its Notes for Authors.
;
    _name.category_id             PUBL
    _name.object_id               PUBL_BODY
    _category_key.name            '_publ_body.label'

save_

save_publ_body.contents

    _definition.id                '_publ_body.contents'
    _alias.definition_id          '_publ_body_contents'
    _definition.update            2012-12-13
    _description.text
;
    A text section of a submitted paper.
;
    _name.category_id             publ_body
    _name.object_id               contents
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_body.element

    _definition.id                '_publ_body.element'
    _alias.definition_id          '_publ_body_element'
    _definition.update            2012-12-13
    _description.text
;
    The functional role of the associated text section.
;
    _name.category_id             publ_body
    _name.object_id               element
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
         section
         subsection
         subsubsection
         appendix
         footnote

    _enumeration.default          section

save_

save_publ_body.format

    _definition.id                '_publ_body.format'
    _alias.definition_id          '_publ_body_format'
    _definition.update            2012-12-13
    _description.text
;
    Enumerated state indicating the appropriate typesetting
    conventions for accented characters and special symbols
    in the text section.
;
    _name.category_id             publ_body
    _name.object_id               format
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         ascii                    'No coding for special symbols.'
         cif                      'CIF convention.'
         latex                    'LaTeX.'
         rtf                      'Rich Text Format.'
         sgml                     'SGML (ISO 8879).'
         tex                      'TeX.'
         troff                    'troff or nroff.'

    _enumeration.default          cif

save_

save_publ_body.label

    _definition.id                '_publ_body.label'
    _alias.definition_id          '_publ_body_label'
    _definition.update            2021-10-27
    _description.text
;
    Unique identifier for each part of the body of the paper.
;
    _name.category_id             publ_body
    _name.object_id               label
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    loop_
      _description_example.case
         1
         1.1
         2.1.3

save_

save_publ_body.title

    _definition.id                '_publ_body.title'
    _alias.definition_id          '_publ_body_title'
    _definition.update            2012-12-13
    _description.text
;
    Title of the associated section of text.
;
    _name.category_id             publ_body
    _name.object_id               title
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_PUBL_CONTACT_AUTHOR

    _definition.id                PUBL_CONTACT_AUTHOR
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    Category of items describing contact author(s) details.
;
    _name.category_id             PUBL
    _name.object_id               PUBL_CONTACT_AUTHOR
    _category_key.name            '_publ_contact_author.id'

save_

save_publ_contact_author.address

    _definition.id                '_publ_contact_author.address'

    loop_
      _alias.definition_id
         '_publ_contact_author_address'
         '_publ.contact_author_address'

    _definition.update            2012-11-29
    _description.text
;
    The address of the author submitting the manuscript and
    data block. This is the person contacted by the journal
    editorial staff.
;
    _name.category_id             publ_contact_author
    _name.object_id               address
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
;
    Department of Chemistry and Biochemistry
    University of Guelph
    Ontario
    Canada
    N1G 2W1
;

save_

save_publ_contact_author.contact_details

    _definition.id                '_publ_contact_author.contact_details'

    loop_
      _definition_replaced.id
      _definition_replaced.by
         1                        '_publ_contact_author.name'
         2                        '_publ_contact_author.address'

    loop_
      _alias.definition_id
         '_publ_contact_author'
         '_publ.contact_author'

    _definition.update            2024-08-28
    _description.text
;
    DEPRECATED. The _publ_contact_author.name and _publ_contact_author.address
    data items should be used instead of this item.

    The name and address of the author submitting the manuscript and data block.
    This is the person contacted by the journal editorial staff.
;
    _name.category_id             publ_contact_author
    _name.object_id               contact_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
;
    Professor George Ferguson
    Department of Chemistry and Biochemistry
    University of Guelph
    Ontario
    Canada
    N1G 2W1
;

save_

save_publ_contact_author.email

    _definition.id                '_publ_contact_author.email'

    loop_
      _alias.definition_id
         '_publ_contact_author_email'
         '_publ.contact_author_email'

    _definition.update            2014-06-12
    _description.text
;
    E-mail address in a form recognizable to international networks.
    The format of e-mail addresses is given in Section 3.4, Address
    Specification, of Internet Message Format, RFC 2822, P. Resnick
    (Editor), Network Standards Group, April 2001.
;
    _name.category_id             publ_contact_author
    _name.object_id               email
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         name@host.domain.country
         banjo.patterson@gulgong.edu.au

save_

save_publ_contact_author.fax

    _definition.id                '_publ_contact_author.fax'

    loop_
      _alias.definition_id
         '_publ_contact_author_fax'
         '_publ.contact_author_fax'

    _definition.update            2012-11-29
    _description.text
;
    Facsimile telephone number of the author submitting the manuscript
    and data block.
    The recommended style is the international dialing prefix, followed
    by the area code in parentheses, followed by the local number with
    no spaces. The earlier convention of including the international
    dialing prefix in parentheses is no longer recommended.
;
    _name.category_id             publ_contact_author
    _name.object_id               fax
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_contact_author.id

    _definition.id                '_publ_contact_author.id'
    _definition.update            2023-02-02
    _description.text
;
    Arbitrary identifier for this author.
;
    _name.category_id             publ_contact_author
    _name.object_id               id
    _name.linked_item_id          '_publ_author.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word
    _method.purpose               Definition
    _method.expression
;
    with pca as publ_contact_author
    count = 0
    target = ''
    loop pa as publ_author {
        if (pca.name == pa.name) {
            count++
            target = pa.id
            }
        }
    if (count == 1) {
        _enumeration.default = target
        }
    else {
        _enumeration.default = missing
    }
;

save_

save_publ_contact_author.id_iucr

    _definition.id                '_publ_contact_author.id_IUCr'
    _alias.definition_id          '_publ_contact_author_id_IUCr'
    _definition.update            2023-02-02
    _description.text
;
    Identifier in the IUCr contact database of the author submitting
    the manuscript and data block. This identifier may be available
    from the World Directory of Crystallographers (https://wdc.iucr.org/).
;
    _name.category_id             publ_contact_author
    _name.object_id               id_IUCr
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Word

save_

save_publ_contact_author.id_orcid

    _definition.id                '_publ_contact_author.id_ORCID'
    _alias.definition_id          '_publ_contact_author_id_ORCID'
    _definition.update            2023-02-02
    _description.text
;
    Identifier in the ORCID Registry of the author submitting
    the manuscript and data block. ORCID is an open, non-profit,
    community-driven service to provide a registry of unique
    researcher identifiers (https://orcid.org/).
;
    _name.category_id             publ_contact_author
    _name.object_id               id_ORCID
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Code
    _description_example.case     0000-0003-0391-0002

save_

save_publ_contact_author.name

    _definition.id                '_publ_contact_author.name'

    loop_
      _alias.definition_id
         '_publ_contact_author_name'
         '_publ.contact_author_name'

    _definition.update            2012-11-29
    _description.text
;
    The name of the author(s) submitting the manuscript and
    data block. This is the person contacted by the journal
    editorial staff.
;
    _name.category_id             publ_contact_author
    _name.object_id               name
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Professor George Ferguson'

save_

save_publ_contact_author.phone

    _definition.id                '_publ_contact_author.phone'

    loop_
      _alias.definition_id
         '_publ_contact_author_phone'
         '_publ.contact_author_phone'

    _definition.update            2012-11-29
    _description.text
;
    Telephone number of author submitting the manuscript and data block.
    The recommended style is the international dialing prefix,
    followed by the area code in parentheses, followed by the
    local number and any extension number prefixed by 'x', with
    no spaces. The earlier convention of including the international
    dialing prefix in parentheses is no longer recommended.
;
    _name.category_id             publ_contact_author
    _name.object_id               phone
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         12(34)9477330
         12()349477330
         12(34)9477330x5543

save_

save_PUBL_MANUSCRIPT

    _definition.id                PUBL_MANUSCRIPT
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-12-13
    _description.text
;
    Category of items describing the publication manuscript.
;
    _name.category_id             PUBL
    _name.object_id               PUBL_MANUSCRIPT

save_

save_publ_manuscript.creation

    _definition.id                '_publ_manuscript.creation'

    loop_
      _alias.definition_id
         '_publ_manuscript_creation'
         '_publ.manuscript_creation'

    _definition.update            2023-01-13
    _description.text
;
    A description of the word processor package and computer used to
    create the manuscript stored as _publ_manuscript.processed.
;
    _name.category_id             publ_manuscript
    _name.object_id               creation
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_manuscript.processed

    _definition.id                '_publ_manuscript.processed'

    loop_
      _alias.definition_id
         '_publ_manuscript_processed'
         '_publ.manuscript_processed'

    _definition.update            2012-11-29
    _description.text
;
    The full manuscript of a paper (excluding possibly the figures
    and the tables) output in ASCII characters from a word processor.
    Information about the generation of this data item must be
    specified in the data item _publ_manuscript.creation.
;
    _name.category_id             publ_manuscript
    _name.object_id               processed
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_manuscript.text

    _definition.id                '_publ_manuscript.text'

    loop_
      _alias.definition_id
         '_publ_manuscript_text'
         '_publ.manuscript_text'

    _definition.update            2012-11-29
    _description.text
;
    The full manuscript of a paper (excluding figures and possibly
    the tables) output as standard ASCII text.
;
    _name.category_id             publ_manuscript
    _name.object_id               text
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_PUBL_MANUSCRIPT_INCL_EXTRA

    _definition.id                PUBL_MANUSCRIPT_INCL_EXTRA
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    Category of data items that allow the authors of a manuscript to
    submit for publication data names that should be added to the
    standard request list employed by journal printing software.
    Although these fields are primarily intended to identify CIF data
    items that the author wishes to include in a published paper, they
    can also be used to identify data names created so that non-CIF items
    can be included in the publication. Note that *.item names MUST be
    enclosed in single quotes.
;
    _name.category_id             PUBL_MANUSCRIPT
    _name.object_id               PUBL_MANUSCRIPT_INCL_EXTRA
    _category_key.name            '_publ_manuscript_incl_extra.item'

save_

save_publ_manuscript_incl_extra.defn

    _definition.id                '_publ_manuscript_incl_extra.defn'

    loop_
      _alias.definition_id
         '_publ_manuscript_incl_extra_defn'
         '_publ_manuscript_incl.extra_defn'

    _definition.update            2012-12-13
    _description.text
;
    Yes/No flags whether the corresponding data item marked for inclusion
    in a journal request list is a standard CIF definition or not.
;
    _name.category_id             publ_manuscript_incl_extra
    _name.object_id               defn
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         yes                      'Include item in journal request list.'
         y                        'Include item in journal request list.'
         no                       'Exclude item in journal request list.'
         n                        'Exclude item in journal request list.'

    _enumeration.default          yes

save_

save_publ_manuscript_incl_extra.info

    _definition.id                '_publ_manuscript_incl_extra.info'

    loop_
      _alias.definition_id
         '_publ_manuscript_incl_extra_info'
         '_publ_manuscript_incl.extra_info'

    _definition.update            2012-12-13
    _description.text
;
    A short note indicating the reason why the author wishes the
    corresponding data item marked for inclusion in the journal
    request list to be published.
;
    _name.category_id             publ_manuscript_incl_extra
    _name.object_id               info
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_manuscript_incl_extra.item

    _definition.id                '_publ_manuscript_incl_extra.item'

    loop_
      _alias.definition_id
         '_publ_manuscript_incl_extra_item'
         '_publ_manuscript_incl.extra_item'

    _definition.update            2012-12-13
    _description.text
;
    The data name (i.e. Tag) of a specific data item included in the
    manuscript which is not normally requested by the journal. The values
    of this item are the extra data names (which MUST be enclosed
    in single quotes) that will be added to the journal request list.
;
    _name.category_id             publ_manuscript_incl_extra
    _name.object_id               item
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Tag

save_

save_PUBL_REQUESTED

    _definition.id                PUBL_REQUESTED
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-12-13
    _description.text
;
    The category of data items that enable the author to make
    specific requests to the journal office for processing.
;
    _name.category_id             PUBL
    _name.object_id               PUBL_REQUESTED

save_

save_publ_requested.category

    _definition.id                '_publ_requested.category'

    loop_
      _alias.definition_id
         '_publ_requested_category'
         '_publ.requested_category'

    _definition.update            2012-12-13
    _description.text
;
    The category of paper submitted. For submission to Acta
    Crystallographica Section C or Acta Crystallographica
    Section E, ONLY those codes indicated for use with those
    journals should be used.
;
    _name.category_id             publ_requested
    _name.object_id               category
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         AD     'Addenda and Errata (Acta C, Acta E).'
         CI     'CIF-access paper - inorganic (Acta C) (no longer in use).'
         CM     'CIF-access paper - metal-organic (Acta C) (no longer in use).'
         CO     'CIF-access paper - organic (Acta C)  (no longer in use).'
         EI     'Electronic submission - inorganic (Acta E).'
         EM     'Electronic submission - metal-organic (Acta E).'
         EO     'Electronic submission - organic (Acta E).'
         FA     'Full article.'
         FI     'Full submission - inorganic (Acta C).'
         FM     'Full submission - metal-organic (Acta C).'
         FO     'Full submission - organic (Acta C).'
         GI     'Research communications - inorganic compounds (Acta E).'
         GM     'Research communications - metal-organic compounds (Acta E).'
         GO     'Research communications - organic compounds (Acta E).'
         HI     'Data reports - inorganic compounds (Acta E).'
         HM     'Data reports - metal-organic compounds (Acta E).'
         HO     'Data reports - organic compounds (Acta E).'
         QI     'Inorganic compounds (Acta E).'
         QM     'Metal-organic compounds (Acta E).'
         QO     'Organic compounds (Acta E).'
         SC     'Short communication.'

    _enumeration.default          FA

save_

save_publ_requested.coeditor_name

    _definition.id                '_publ_requested.coeditor_name'

    loop_
      _alias.definition_id
         '_publ_requested_coeditor_name'
         '_publ.requested_coeditor_name'

    _definition.update            2021-08-18
    _description.text
;
    The name of the coeditor whom the authors would like to
    process the submitted manuscript.
;
    _name.category_id             publ_requested
    _name.object_id               coeditor_name
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_requested.journal

    _definition.id                '_publ_requested.journal'

    loop_
      _alias.definition_id
         '_publ_requested_journal'
         '_publ.requested_journal'

    _definition.update            2012-12-13
    _description.text
;
    Name of the journal to which the manuscript is being submitted.
;
    _name.category_id             publ_requested
    _name.object_id               journal
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_PUBL_SECTION

    _definition.id                PUBL_SECTION
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-05-07
    _description.text
;
    Manuscript section data if submitted in parts. See also
    _publ_manuscript.text and _publ_manuscript.processed.
    The _publ_section.exptl_prep, _publ_section.exptl_refinement
    and _publ_section.exptl_solution items are preferred for
    separating the chemical preparation, refinement and structure
    solution aspects of the experimental description.
;
    _name.category_id             PUBL
    _name.object_id               PUBL_SECTION

save_

save_publ_section.abstract

    _definition.id                '_publ_section.abstract'

    loop_
      _alias.definition_id
         '_publ_section_abstract'
         '_publ.section_abstract'

    _definition.update            2012-11-29
    _description.text
;
    The abstract of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               abstract
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.acknowledgements

    _definition.id                '_publ_section.acknowledgements'

    loop_
      _alias.definition_id
         '_publ_section_acknowledgements'
         '_publ.section_acknowledgements'

    _definition.update            2012-11-29
    _description.text
;
    The acknowledgements section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               acknowledgements
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.comment

    _definition.id                '_publ_section.comment'

    loop_
      _alias.definition_id
         '_publ_section_comment'
         '_publ.section_comment'

    _definition.update            2013-02-22
    _description.text
;
    The comment section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               comment
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.discussion

    _definition.id                '_publ_section.discussion'

    loop_
      _alias.definition_id
         '_publ_section_discussion'
         '_publ.section_discussion'

    _definition.update            2012-11-29
    _description.text
;
    The discussion section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               discussion
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.experimental

    _definition.id                '_publ_section.experimental'

    loop_
      _alias.definition_id
         '_publ_section_experimental'
         '_publ.section_experimental'

    _definition.update            2012-11-29
    _description.text
;
    The experimental section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               experimental
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.exptl_prep

    _definition.id                '_publ_section.exptl_prep'

    loop_
      _alias.definition_id
         '_publ_section_exptl_prep'
         '_publ.section_exptl_prep'

    _definition.update            2012-11-29
    _description.text
;
    The experimental preparation section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               exptl_prep
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.exptl_refinement

    _definition.id                '_publ_section.exptl_refinement'

    loop_
      _alias.definition_id
         '_publ_section_exptl_refinement'
         '_publ.section_exptl_refinement'

    _definition.update            2012-11-29
    _description.text
;
    The experimental refinement section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               exptl_refinement
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.exptl_solution

    _definition.id                '_publ_section.exptl_solution'

    loop_
      _alias.definition_id
         '_publ_section_exptl_solution'
         '_publ.section_exptl_solution'

    _definition.update            2012-11-29
    _description.text
;
    The experimental solution section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               exptl_solution
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.figure_captions

    _definition.id                '_publ_section.figure_captions'

    loop_
      _alias.definition_id
         '_publ_section_figure_captions'
         '_publ.section_figure_captions'

    _definition.update            2012-11-29
    _description.text
;
    The figure captions of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               figure_captions
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.introduction

    _definition.id                '_publ_section.introduction'

    loop_
      _alias.definition_id
         '_publ_section_introduction'
         '_publ.section_introduction'

    _definition.update            2012-11-29
    _description.text
;
    The introduction section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               introduction
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.keywords

    _definition.id                '_publ_section.keywords'

    loop_
      _alias.definition_id
         '_publ_section_keywords'
         '_publ.section_keywords'

    _definition.update            2012-11-29
    _description.text
;
    The keywords of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               keywords
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.references

    _definition.id                '_publ_section.references'

    loop_
      _alias.definition_id
         '_publ_section_references'
         '_publ.section_references'

    _definition.update            2012-11-29
    _description.text
;
    The references section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               references
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.related_literature

    _definition.id                '_publ_section.related_literature'

    loop_
      _alias.definition_id
         '_publ_section_related_literature'
         '_publ.section_related_literature'

    _definition.update            2012-11-29
    _description.text
;
    The related literature section of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               related_literature
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.synopsis

    _definition.id                '_publ_section.synopsis'

    loop_
      _alias.definition_id
         '_publ_section_synopsis'
         '_publ.section_synopsis'

    _definition.update            2012-11-29
    _description.text
;
    The synopsis of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               synopsis
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.table_legends

    _definition.id                '_publ_section.table_legends'

    loop_
      _alias.definition_id
         '_publ_section_table_legends'
         '_publ.section_table_legends'

    _definition.update            2012-11-29
    _description.text
;
    The table legends of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               table_legends
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.title

    _definition.id                '_publ_section.title'

    loop_
      _alias.definition_id
         '_publ_section_title'
         '_publ.section_title'

    _definition.update            2012-11-29
    _description.text
;
    The full title of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               title
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_publ_section.title_footnote

    _definition.id                '_publ_section.title_footnote'

    loop_
      _alias.definition_id
         '_publ_section_title_footnote'
         '_publ.section_title_footnote'

    _definition.update            2012-11-29
    _description.text
;
    Footnote (if any) to the title of the submitted paper.
;
    _name.category_id             publ_section
    _name.object_id               title_footnote
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_STRUCTURE

    _definition.id                STRUCTURE
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2024-05-15
    _description.text
;
    The dictionary group encompassing the core structure data items defined
    and used within the Crystallographic Information Framework (CIF).
;
    _name.category_id             CIF_CORE_HEAD
    _name.object_id               STRUCTURE

save_

save_ATOM

    _definition.id                ATOM
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-20
    _description.text
;
    The category of data items used to describe atomic information
    used in crystallographic structure studies.
;
    _name.category_id             STRUCTURE
    _name.object_id               ATOM

save_

save_ATOM_ANALYTICAL

    _definition.id                ATOM_ANALYTICAL
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2022-11-19
    _description.text
;
    The category of data items used to describe elemental
    composition information used in crystallographic
    structure studies.
;
    _name.category_id             ATOM
    _name.object_id               ATOM_ANALYTICAL
    _category_key.name            '_atom_analytical.id'
    _description_example.case
;
    loop_
    _atom_analytical.id
    _atom_analytical.analyte
    _atom_analytical.meas_id
    _atom_analytical.chemical_species
    _atom_analytical.analyte_mass_percent
    _atom_analytical.chemical_species_mass_percent
    1 Si  a 'Si O2'   ?     22.7
    2 Al  a 'Al2 O3'  ?     27.4
    3 Ti  b 'Ti O2'   ?      2.7
    4 Si  c .         10.5  .
    5 Si  d Si        11.7  11.7
;
    _description_example.detail
;
    There are three separate determinations of Si content, and one each
    of Al and Ti. The amount of Al is reported as the mass percent of
    Al2O3. The equivalent amount of Al is not given. There are four
    different measurements presented in this table.
;

save_

save_atom_analytical.analyte

    _definition.id                '_atom_analytical.analyte'
    _definition.update            2022-11-19
    _description.text
;
    Symbol of the element for which a particular composition
    refers to, as given by _atom_analytical.analyte_mass_percent.
;
    _name.category_id             atom_analytical
    _name.object_id               analyte
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    _import.get
        [{'file':templ_enum.cif  'save':element_symbol}]

save_

save_atom_analytical.analyte_mass_percent

    _definition.id                '_atom_analytical.analyte_mass_percent'
    _definition.update            2022-11-19
    _description.text
;
    Mass percentage of the analyte element derived from elemental analysis.
;
    _name.category_id             atom_analytical
    _name.object_id               analyte_mass_percent
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:100.0
    _units.code                   none

save_

save_atom_analytical.analyte_mass_percent_su

    _definition.id                '_atom_analytical.analyte_mass_percent_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_analytical.analyte_mass_percent.
;
    _name.category_id             atom_analytical
    _name.object_id               analyte_mass_percent_su
    _name.linked_item_id          '_atom_analytical.analyte_mass_percent'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_analytical.chemical_species

    _definition.id                '_atom_analytical.chemical_species'
    _definition.update            2023-01-13
    _description.text
;
    Chemical formula of the species for which the corresponding
    _atom_analytical.chemical_species_mass_percent refers.

    The following rules apply in the construction of the formula:

    1. Only recognized element symbols may be used.

    2. The first element corresponds to the analyte. The remaining
       elements should be given in alphabetical order by symbol.

    3. Each element symbol is followed by a 'count' number. A count of
       '1' may be omitted.

    4. A space or parenthesis must separate each cluster of (element
       symbol + count). A formula cannot begin with a paranthesis.

    5. Where a group of elements is enclosed in parentheses, the
       multiplier for the group must follow the closing parentheses.
       That is, all element and group multipliers are assumed to be
       printed as subscripted numbers.
;
    _name.category_id             atom_analytical
    _name.object_id               chemical_species
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'Fe2 O3'
         'Li'
         'Si O2'
         'Ca S O4 (H2 O)2'

save_

save_atom_analytical.chemical_species_mass_percent

    _definition.id
        '_atom_analytical.chemical_species_mass_percent'
    _definition.update            2022-11-19
    _description.text
;
    Mass percentage of the chemical species given in
    _atom_analytical.chemical_species as derived from elemental analysis.

    This is most often used in elemental compositions determined by XRF,
    where elements are reported as equivalent mass percentages of their
    relevant oxide. For example: Al is reported as Al2O3, P is reported
    as P2O5.
;
    _name.category_id             atom_analytical
    _name.object_id               chemical_species_mass_percent
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:100.0
    _units.code                   none

save_

save_atom_analytical.chemical_species_mass_percent_su

    _definition.id
        '_atom_analytical.chemical_species_mass_percent_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_analytical.chemical_species_mass_percent.
;
    _name.category_id             atom_analytical
    _name.object_id               chemical_species_mass_percent_su
    _name.linked_item_id
        '_atom_analytical.chemical_species_mass_percent'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_analytical.id

    _definition.id                '_atom_analytical.id'
    _definition.update            2022-11-18
    _description.text
;
    Arbitrary label uniquely identifying a single composition value.
;
    _name.category_id             atom_analytical
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_atom_analytical.meas_id

    _definition.id                '_atom_analytical.meas_id'
    _definition.update            2022-11-18
    _description.text
;
    Arbitrary label identifying the source of an elemental composition.
    This code must match the _atom_analytical_source.id of the associated
    technique in the analytical source list.
;
    _name.category_id             atom_analytical
    _name.object_id               meas_id
    _name.linked_item_id          '_atom_analytical_source.id'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_ATOM_ANALYTICAL_MASS_LOSS

    _definition.id                ATOM_ANALYTICAL_MASS_LOSS
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2022-11-21
    _description.text
;
    The category of data items used to describe information
    pertaining to mass loss during specimen preparation for
    the purposes of determining elemental composition
    information for use in crystallographic structure studies.
;
    _name.category_id             ATOM
    _name.object_id               ATOM_ANALYTICAL_MASS_LOSS
    _category_key.name            '_atom_analytical_mass_loss.id'
    _description_example.case
;
    loop_
    _atom_analytical_mass_loss.id
    _atom_analytical_mass_loss.meas_id
    _atom_analytical_mass_loss.percent
    _atom_analytical_mass_loss.temperature
    LOD1 a   2  328
    LOI1 a   5  623
    LOI2 a  10 1023
    LOI3 a  15 1373
    LOI4 b   5  673
    LOI5 b  10 1123
;
    _description_example.detail
;
    Four mass-loss percentages are given for measurement 'a', and two
    for measurement 'b'. The mass losses were recorded after exposing
    the specimen to the listed temperatures. The mass lost at a lower
    temperature for the same measurement should be included in the
    higher temperatures; that is, for measurement 'a', the total mass
    loss after four measurements is 15 wt%, not (2+5+10+15) wt%.
;

save_

save_atom_analytical_mass_loss.id

    _definition.id                '_atom_analytical_mass_loss.id'
    _definition.update            2022-11-21
    _description.text
;
    Arbitrary label uniquely identifying the source of an elemental
    composition value. This value is used by _atom_analytical.meas_id
    to link individual composition values to their corresponding
    technique of determination.
;
    _name.category_id             atom_analytical_mass_loss
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_atom_analytical_mass_loss.meas_id

    _definition.id                '_atom_analytical_mass_loss.meas_id'
    _definition.update            2022-11-18
    _description.text
;
    Arbitrary label identifying the source of an elemental composition.
    This code must match the _atom_analytical_source.id of the associated
    technique in the analytical source list.
;
    _name.category_id             atom_analytical_mass_loss
    _name.object_id               meas_id
    _name.linked_item_id          '_atom_analytical_source.id'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_atom_analytical_mass_loss.percent

    _definition.id                '_atom_analytical_mass_loss.percent'
    _definition.update            2022-11-21
    _description.text
;
    Mass lost by the specimen during specimen preparation expressed
    as a percentage. The temperature at which the mass loss was recorded
    is given by _atom_analytical_mass_loss.temperature. A mass gain
    is represented by a negative value.

    This data name would be used to record mass loss on drying, or mass
    loss on ignition, during, for example, fusion bead preparation for
    XRF analysis.
;
    _name.category_id             atom_analytical_mass_loss
    _name.object_id               percent
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   none

    loop_
      _description_example.case
      _description_example.detail
         12.5
;
         Represents a mass loss of 12.5 wt% upon exposure of the specimen
         to the temperature given in _atom_analytical_mass_loss.temperature.
;
         -7.2
;
         Represents a mass gain of 7.2 wt% upon exposure of the specimen
         to the temperature given in _atom_analytical_mass_loss.temperature.
;

save_

save_atom_analytical_mass_loss.percent_su

    _definition.id                '_atom_analytical_mass_loss.percent_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_analytical_mass_loss.percent.
;
    _name.category_id             atom_analytical_mass_loss
    _name.object_id               percent_su
    _name.linked_item_id          '_atom_analytical_mass_loss.percent'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_analytical_mass_loss.special_details

    _definition.id                '_atom_analytical_mass_loss.special_details'
    _definition.update            2022-11-21
    _description.text
;
    Text describing the conditions under which the data were collected
    that are not able to be captured using other data names
    within the ATOM_ANALYTICAL_MASS_LOSS category.
;
    _name.category_id             atom_analytical_mass_loss
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_atom_analytical_mass_loss.temperature

    _definition.id                '_atom_analytical_mass_loss.temperature'
    _definition.update            2022-11-21
    _description.text
;
    The temperature, in kelvin, at which the mass loss was recorded
    as given by _atom_analytical_mass_loss.percent.

    This would be used to record the temperature of drying or ignition,
    during, for example, fusion bead preparation for XRF analysis.
;
    _name.category_id             atom_analytical_mass_loss
    _name.object_id               temperature
    _type.purpose                 Measurand
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   kelvins

save_

save_atom_analytical_mass_loss.temperature_su

    _definition.id                '_atom_analytical_mass_loss.temperature_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_analytical_mass_loss.temperature.
;
    _name.category_id             atom_analytical_mass_loss
    _name.object_id               analysis_temperature_su
    _name.linked_item_id          '_atom_analytical_mass_loss.temperature'
    _units.code                   kelvins

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_ATOM_ANALYTICAL_SOURCE

    _definition.id                ATOM_ANALYTICAL_SOURCE
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2022-11-19
    _description.text
;
    The category of data items used to describe the source
    of elemental composition information used in crystallographic
    structure studies.
;
    _name.category_id             ATOM
    _name.object_id               ATOM_ANALYTICAL_SOURCE
    _category_key.name            '_atom_analytical_source.id'
    _description_example.case
;
    loop_
    _atom_analytical_source.id
    _atom_analytical_source.technique
    _atom_analytical_source.equipment_make
    a  XRF 'Hitachi Lab-X5000'
    b  'X-ray fluorescence EDS' 'Hitachi Lab-X5000'
    c  ICP .
    d  EDS .
;
    _description_example.detail
;
    Four different measurements of elemental composition are enumerated.
;

save_

save_atom_analytical_source.equipment_make

    _definition.id                '_atom_analytical_source.equipment_make'
    _definition.update            2022-11-18
    _description.text
;
    The make, model or name of the equipment used to determine the
    elemental composition.
;
    _name.category_id             atom_analytical_source
    _name.object_id               equipment_make
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'Bruker'
         'ELEMISSION'
         'Thermo Fisher Scientific'

save_

save_atom_analytical_source.id

    _definition.id                '_atom_analytical_source.id'
    _definition.update            2022-11-18
    _description.text
;
    Arbitrary label uniquely identifying the source of an elemental
    composition value. This value is used by _atom_analytical.meas_id
    to link individual composition values to their corresponding
    technique of determination.
;
    _name.category_id             atom_analytical_source
    _name.object_id               id
    _type.purpose                 Key
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_atom_analytical_source.special_details

    _definition.id                '_atom_analytical_source.special_details'
    _definition.update            2022-11-18
    _description.text
;
    Text describing the equipment or conditions under which the
    data were collected that are not able to be captured using
    _atom_analytical_source.equipment_make or
    _atom_analytical_source.technique.
;
    _name.category_id             atom_analytical_source
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
;
       XRF utilising a WDS detector system calibrated for the
       analysis of iron ores.
;
;
       Laser Induced Breakdown Spectroscopy. Measurements carried
       out by commercial laboratory, report #P90.
;
;
       Detector calibrated following Smith (2018).
;

save_

save_atom_analytical_source.technique

    _definition.id                '_atom_analytical_source.technique'
    _definition.update            2022-11-18
    _description.text
;
    Succinct text or acronym describing the experimental technique used
    to find the elemental composition.

    If further details are required to properly describe the experimental
    technique, or the given acronym is not in common use, use
    _atom_analytical_source.special_details.
;
    _name.category_id             atom_analytical_source
    _name.object_id               technique
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'XRF'
         'LIBS'
         'ICP OES'

save_

save_ATOM_SCAT_VERSUS_STOL

    _definition.id                ATOM_SCAT_VERSUS_STOL
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2023-07-05
    _description.text
;
    The category of data items used to list atomic scattering factor values for
    use in crystallographic structure studies.
;
    _name.category_id             ATOM
    _name.object_id               ATOM_SCAT_VERSUS_STOL

    loop_
      _category_key.name
         '_atom_scat_versus_stol.atom_type'
         '_atom_scat_versus_stol.stol_value'

    _description_example.case
;
        loop_
        _atom_scat_versus_stol.atom_type
        _atom_scat_versus_stol.stol_value
        _atom_scat_versus_stol.scat_value
        Ac  0.00  89.00000
        Ac  0.01  88.91457
        Ac  0.02  88.66288
        #...
        Ac  4.00   8.24987
        Ac  5.00   5.98858
        Ac  6.00   4.90623
        O   0.00   8.00000
        O   0.01   7.99171
        O   0.02   7.96693
        #...
        O   4.00   0.13431
        O   5.00   0.06740
        O   6.00   0.03670
;
    _description_example.detail
;
        A listing of the scattering factors for Ac and O in the range
        (0, 6.00) reciprocal angstroms.
;
save_

save_atom_scat_versus_stol.atom_type

    _definition.id                '_atom_scat_versus_stol.atom_type'
    _definition.update            2023-07-05
    _description.text
;
    The identity of the atom specie(s) representing this atom type.
    See _atom_type.symbol for further details.
;
    _name.category_id             atom_scat_versus_stol
    _name.object_id               atom_type
    _name.linked_item_id          '_atom_type.symbol'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_atom_scat_versus_stol.scat_value

    _definition.id                '_atom_scat_versus_stol.scat_value'
    _definition.update            2024-05-15
    _description.text
;
    The value of the scattering factor of a particular atom type at a particular
    stol value.
;
    _name.category_id             atom_scat_versus_stol
    _name.object_id               scat_value
    _type.purpose                 Measurand
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   electrons

save_

save_atom_scat_versus_stol.scat_value_su

    _definition.id                '_atom_scat_versus_stol.scat_value_su'
    _definition.update            2023-07-05
    _description.text
;
    Standard uncertainty of _atom_scat_versus_stol.scat_value.
;
    _name.category_id             atom_scat_versus_stol
    _name.object_id               scat_value_su
    _name.linked_item_id          '_atom_scat_versus_stol.scat_value'
    _units.code                   electrons

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_scat_versus_stol.stol_value

    _definition.id                '_atom_scat_versus_stol.stol_value'
    _definition.update            2024-05-15
    _description.text
;
    The value of sin(θ)/λ (sin theta over lambda, stol) to which the
    accompanying atom symbol and scattering factor value correspond.

    A regularly spaced grid is strongly recommended.
;
    _name.category_id             atom_scat_versus_stol
    _name.object_id               stol_value
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   reciprocal_angstroms

save_

save_ATOM_SITE

    _definition.id                ATOM_SITE
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2023-02-03
    _description.text
;
    The category of data items used to describe atom site information
    used in crystallographic structure studies.
;
    _name.category_id             ATOM
    _name.object_id               ATOM_SITE
    _category_key.name            '_atom_site.label'

    loop_
      _description_example.case
      _description_example.detail
;
         loop_
           _atom_site.label
           _atom_site.occupancy
           _atom_site.disorder_assembly
           _atom_site.disorder_group
            C1     1      .     .
            H11A   .5     M     1
            H12A   .5     M     1
            H13A   .5     M     1
            H11B   .5     M     2
            H12B   .5     M     2
            H13B   .5     M     2
;
;
         A hypothetical example of a positional disorder description. Disorder
         assembly 'M' describes a methyl group with two alternative
         configurations '1' and '2':

                            H11B    H11A      H13B
                              .      |      .
                                .    |    .
                                  .  |  .
                                     C1 --------C2---
                                   / .  \
                                 /   .    \
                               /     .      \
                            H12A    H12B    H13A
;
;
         loop_
           _atom_site.label
           _atom_site.type_symbol
           _atom_site.fract_x
           _atom_site.fract_y
           _atom_site.fract_z
           _atom_site.occupancy
           _atom_site.disorder_assembly
           _atom_site.disorder_group
            Cu1 Cu 0.78443(2) 0.88297(4) 0.37825(2)  1       . .
            Co1 Co 0.77504(2) 0.66957(4) 0.54249(2)  0.78(3) A 1
            Mn1 Mn 0.77504(2) 0.66957(4) 0.54249(2)  0.22(3) A 2
            O1   O 0.85532(9) 0.95747(19) 0.28965(9) 1       . .
            O2   O 0.84868(9) 0.94662(19) 0.14953(8) 1       . .
            # ...
;
;
         An example of a compositional disorder description. Disorder assembly
         'A' describes a site that is simultaneously occupied by Co and Mn
         atoms which are assigned to disorder group '1' and disorder group '2'
         respectively.

         The example was created based on data from:
             Li, Ang et al. (2021). Dalton Transactions, 50(2), 681-688.
             https://doi.org/10.1039/d0dt03269g
;

save_

save_atom_site.adp_type

    _definition.id                '_atom_site.ADP_type'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_atom_site_ADP_type'                                       .
         '_atom_site_thermal_displace_type'                          1999-03-24
         '_atom_site.thermal_displace_type'                          .

    _definition.update            2024-02-14
    _description.text
;
    Code for type of atomic displacement parameters used for the site.
;
    _name.category_id             atom_site
    _name.object_id               ADP_type
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         Uani                     'Anisotropic Uij.'
         Uiso                     'Isotropic U.'
         Uovl                     'Overall U.'
         Umpe                     'Multipole expansion U.'
         Bani                     'Anisotropic Bij.'
         Biso                     'Isotropic B.'
         Bovl                     'Overall B.'
         betaani                  'Anisotropic betaij.'

save_

save_atom_site.attached_hydrogens

    _definition.id                '_atom_site.attached_hydrogens'
    _alias.definition_id          '_atom_site_attached_hydrogens'
    _definition.update            2021-03-01
    _description.text
;
    Number of hydrogen atoms attached to the atom at this site
    excluding any H atoms for which coordinates (measured or calculated)
    are given.
;
    _name.category_id             atom_site
    _name.object_id               attached_hydrogens
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:8
    _units.code                   none

    loop_
      _description_example.case
      _description_example.detail
         2                        'Water oxygen.'
         1                        'Hydroxyl oxygen.'
         4                        'Ammonium nitrogen.'

save_

save_atom_site.b_equiv_geom_mean

    _definition.id                '_atom_site.B_equiv_geom_mean'
    _alias.definition_id          '_atom_site_B_equiv_geom_mean'
    _definition.update            2012-11-20
    _description.text
;
    Equivalent isotropic atomic displacement parameter, B(equiv),
    in angstroms squared, calculated as the geometric mean of
    the anisotropic atomic displacement parameters.

                B(equiv) = (B~i~ B~j~ B~k~)^1/3^

    B~n~  = the principal components of the orthogonalized B^ij^

    The IUCr Commission on Nomenclature recommends against the use
    of B for reporting atomic displacement parameters. U, being
    directly proportional to B, is preferred.
;
    _name.category_id             atom_site
    _name.object_id               B_equiv_geom_mean
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstrom_squared

save_

save_atom_site.b_equiv_geom_mean_su

    _definition.id                '_atom_site.B_equiv_geom_mean_su'

    loop_
      _alias.definition_id
         '_atom_site_B_equiv_geom_mean_su'
         '_atom_site.B_equiv_geom_mean_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _atom_site.B_equiv_geom_mean.
;
    _name.category_id             atom_site
    _name.object_id               B_equiv_geom_mean_su
    _name.linked_item_id          '_atom_site.B_equiv_geom_mean'
    _units.code                   angstrom_squared

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_site.b_iso_or_equiv

    _definition.id                '_atom_site.B_iso_or_equiv'
    _alias.definition_id          '_atom_site_B_iso_or_equiv'
    _definition.update            2023-01-16
    _description.text
;
    Isotropic atomic displacement parameter, or equivalent isotropic
    atomic displacement parameter, B(equiv), in angstroms squared,
    calculated from anisotropic atomic displacement parameters.

        B(equiv) = (1/3) sum~i~[sum~j~(B^ij^ a*~i~ a*~j~ a~i~.a~j~)]

    a     = the real-space cell vectors
    a*    = the reciprocal-space cell lengths
    B^ij^ = 8 π^2^ U^ij^
    Ref: Fischer, R. X. & Tillmanns, E. (1988). Acta Cryst. C44, 775-776.

    The IUCr Commission on Nomenclature recommends against the use
    of B for reporting atomic displacement parameters. U, being
    directly proportional to B, is preferred.
;
    _name.category_id             atom_site
    _name.object_id               B_iso_or_equiv
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstrom_squared

save_

save_atom_site.b_iso_or_equiv_su

    _definition.id                '_atom_site.B_iso_or_equiv_su'

    loop_
      _alias.definition_id
         '_atom_site_B_iso_or_equiv_su'
         '_atom_site.B_iso_or_equiv_esd'

    _definition.update            2023-01-16
    _description.text
;
    Standard uncertainty of _atom_site.B_iso_or_equiv.
;
    _name.category_id             atom_site
    _name.object_id               B_iso_or_equiv_su
    _name.linked_item_id          '_atom_site.B_iso_or_equiv'
    _units.code                   angstrom_squared

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_site.calc_attached_atom

    _definition.id                '_atom_site.calc_attached_atom'
    _alias.definition_id          '_atom_site_calc_attached_atom'
    _definition.update            2023-01-13
    _description.text
;
    The _atom_site.label of the atom site to which the 'geometry-calculated'
    atom site is attached.
;
    _name.category_id             atom_site
    _name.object_id               calc_attached_atom
    _name.linked_item_id          '_atom_site.label'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

save_

save_atom_site.calc_flag

    _definition.id                '_atom_site.calc_flag'
    _alias.definition_id          '_atom_site_calc_flag'
    _definition.update            2012-11-20
    _description.text
;
    A standard code to signal if the site coordinates have been
    determined from the intensities or calculated from the geometry
    of surrounding sites, or have been assigned dummy coordinates.
;
    _name.category_id             atom_site
    _name.object_id               calc_flag
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         d                        'Determined from diffraction measurements.'
         calc                     'Calculated from molecular geometry.'
         c                        'Abbreviation for "calc".'
         dum                      'Dummy site with meaningless coordinates.'

save_

save_atom_site.cartn_x

    _definition.id                '_atom_site.Cartn_x'
    _alias.definition_id          '_atom_site_Cartn_x'
    _name.category_id             atom_site
    _name.object_id               Cartn_x

    _import.get                   [{'file':templ_attr.cif  'save':cartn_coord}]

save_

save_atom_site.cartn_x_su

    _definition.id                '_atom_site.Cartn_x_su'

    loop_
      _alias.definition_id
         '_atom_site_Cartn_x_su'
         '_atom_site.Cartn_x_esd'

    _name.category_id             atom_site
    _name.object_id               Cartn_x_su
    _name.linked_item_id          '_atom_site.Cartn_x'

    _import.get
        [{'file':templ_attr.cif  'save':cartn_coord_su}]

save_

save_atom_site.cartn_xyz

    _definition.id                '_atom_site.Cartn_xyz'
    _definition.update            2021-07-07
    _description.text
;
    Vector of Cartesian (orthogonal angstrom) atom site coordinates.
;
    _name.category_id             atom_site
    _name.object_id               Cartn_xyz
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    With a  as  atom_site

    _atom_site.Cartn_xyz =   [a.Cartn_x, a.Cartn_y, a.Cartn_z]
;

save_

save_atom_site.cartn_xyz_su

    _definition.id                '_atom_site.Cartn_xyz_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_site.Cartn_xyz.
;
    _name.category_id             atom_site
    _name.object_id               Cartn_xyz_su
    _name.linked_item_id          '_atom_site.Cartn_xyz'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_atom_site.cartn_y

    _definition.id                '_atom_site.Cartn_y'
    _alias.definition_id          '_atom_site_Cartn_y'
    _name.category_id             atom_site
    _name.object_id               Cartn_y

    _import.get                   [{'file':templ_attr.cif  'save':cartn_coord}]

save_

save_atom_site.cartn_y_su

    _definition.id                '_atom_site.Cartn_y_su'

    loop_
      _alias.definition_id
         '_atom_site_Cartn_y_su'
         '_atom_site.Cartn_y_esd'

    _name.category_id             atom_site
    _name.object_id               Cartn_y_su
    _name.linked_item_id          '_atom_site.Cartn_y'

    _import.get
        [{'file':templ_attr.cif  'save':cartn_coord_su}]

save_

save_atom_site.cartn_z

    _definition.id                '_atom_site.Cartn_z'
    _alias.definition_id          '_atom_site_Cartn_z'
    _name.category_id             atom_site
    _name.object_id               Cartn_z

    _import.get                   [{'file':templ_attr.cif  'save':cartn_coord}]

save_

save_atom_site.cartn_z_su

    _definition.id                '_atom_site.Cartn_z_su'

    loop_
      _alias.definition_id
         '_atom_site_Cartn_z_su'
         '_atom_site.Cartn_z_esd'

    _name.category_id             atom_site
    _name.object_id               Cartn_z_su
    _name.linked_item_id          '_atom_site.Cartn_z'

    _import.get
        [{'file':templ_attr.cif  'save':cartn_coord_su}]

save_

save_atom_site.chemical_conn_number

    _definition.id                '_atom_site.chemical_conn_number'
    _alias.definition_id          '_atom_site_chemical_conn_number'
    _definition.update            2021-03-01
    _description.text
;
    This number links an atom site to the chemical connectivity list.
    It must match a number specified by _chemical_conn_atom.number.
;
    _name.category_id             atom_site
    _name.object_id               chemical_conn_number
    _name.linked_item_id          '_chemical_conn_atom.number'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_atom_site.constraints

    _definition.id                '_atom_site.constraints'
    _alias.definition_id          '_atom_site_constraints'
    _definition.update            2012-11-20
    _description.text
;
    A description of the constraints applied to parameters at this
    site during refinement. See also _atom_site.refinement_flags_*
    and _refine_ls.number_constraints.
;
    _name.category_id             atom_site
    _name.object_id               constraints
    _type.purpose                 Encode
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     pop=1.0-pop(Zn3)

save_

save_atom_site.description

    _definition.id                '_atom_site.description'

    loop_
      _alias.definition_id
         '_atom_site_description'
         '_atom_site.details'

    _definition.update            2023-01-13
    _description.text
;
    A description of special aspects of this site. See also
    _atom_site.refinement_flags_*.
;
    _name.category_id             atom_site
    _name.object_id               description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Ag/Si disordered'

save_

save_atom_site.disorder_assembly

    _definition.id                '_atom_site.disorder_assembly'
    _alias.definition_id          '_atom_site_disorder_assembly'
    _definition.update            2023-01-29
    _description.text
;
    A code which identifies a cluster of atoms that show long range disorder
    but are locally ordered. Within each such cluster of atoms,
    _atom_site.disorder_group is used to identify the sites that are
    simultaneously occupied. This field is only needed if there is more than
    one cluster of disordered atoms showing independent local order.
;
    _name.category_id             atom_site
    _name.object_id               disorder_assembly
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    loop_
      _description_example.case
      _description_example.detail
         A
;
         Disordered methyl assembly with groups 1 and 2.
;
         B
;
         Disordered sites related by a mirror.
;
         C
;
         Assembly with groups that describe alternative compositions of a
         compositionally disordered site.
;
         S
;
         Disordered sites independent of symmetry.
;

save_

save_atom_site.disorder_group

    _definition.id                '_atom_site.disorder_group'
    _alias.definition_id          '_atom_site_disorder_group'
    _definition.update            2023-01-29
    _description.text
;
    A code that identifies a group of disordered atom sites that are locally
    simultaneously occupied. Atoms that are positionally disordered over two or
    more sites (e.g. the H atoms of a methyl group that exists in two
    orientations) should be assigned to two or more groups. Similarly, atoms
    that describe a specific alternative composition of a compositionally
    disordered site should be assigned to a distinct disorder group (e.g. a site
    that is partially occupied by Mg and Mn atoms should be described by
    assigning the Mg atom to one group and the Mn atom to another group). Sites
    belonging to the same group are simultaneously occupied, but those belonging
    to different groups are not. A minus prefix (e.g. "-1") is used to indicate
    sites disordered about a special position.
;
    _name.category_id             atom_site
    _name.object_id               disorder_group
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    loop_
      _description_example.case
      _description_example.detail
         1
;
         Unique disordered site in group 1.
;
         2
;
         Unique disordered site in group 2.
;
         3
;
         Group describes a specific alternative composition of a compositionally
         disordered site.
;
         -1
;
         Symmetry-independent disordered site.'
;

save_

save_atom_site.fract_symmform

    _definition.id                '_atom_site.fract_symmform'
    _alias.definition_id          '_atom_site_fract_symmform'
    _definition.update            2024-02-20
    _description.text
;
    A symbolic expression that indicates the symmetry-restricted form of the
    components of the positional coordinates of an atom.
;
    _name.category_id             atom_site
    _name.object_id               symmform
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
      _description_example.detail
         Dx,Dy,Dz
;
         No symmetry restrictions.
;
         Dx,-Dx,0
;
         y component equal and opposite to x component with z component zero.
;
         Dx,0,Dz
;
         y component zero.
;

save_

save_atom_site.fract_x

    _definition.id                '_atom_site.fract_x'
    _alias.definition_id          '_atom_site_fract_x'
    _name.category_id             atom_site
    _name.object_id               fract_x

    _import.get                   [{'file':templ_attr.cif  'save':fract_coord}]

save_

save_atom_site.fract_x_su

    _definition.id                '_atom_site.fract_x_su'

    loop_
      _alias.definition_id
         '_atom_site_fract_x_su'
         '_atom_site.fract_x_esd'

    _name.category_id             atom_site
    _name.object_id               fract_x_su
    _name.linked_item_id          '_atom_site.fract_x'

    _import.get
        [{'file':templ_attr.cif  'save':fract_coord_su}]

save_

save_atom_site.fract_xyz

    _definition.id                '_atom_site.fract_xyz'
    _definition.update            2021-03-01
    _description.text
;
    Vector of atom site coordinates projected onto the crystal unit
    cell as fractions of the cell lengths.
;
    _name.category_id             atom_site
    _name.object_id               fract_xyz
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With a  as  atom_site

    _atom_site.fract_xyz =  [a.fract_x, a.fract_y, a.fract_z]
;

save_

save_atom_site.fract_xyz_su

    _definition.id                '_atom_site.fract_xyz_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_site.fract_xyz.
;
    _name.category_id             atom_site
    _name.object_id               fract_xyz_su
    _name.linked_item_id          '_atom_site.fract_xyz'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none

save_

save_atom_site.fract_y

    _definition.id                '_atom_site.fract_y'
    _alias.definition_id          '_atom_site_fract_y'
    _name.category_id             atom_site
    _name.object_id               fract_y

    _import.get                   [{'file':templ_attr.cif  'save':fract_coord}]

save_

save_atom_site.fract_y_su

    _definition.id                '_atom_site.fract_y_su'

    loop_
      _alias.definition_id
         '_atom_site_fract_y_su'
         '_atom_site.fract_y_esd'

    _name.category_id             atom_site
    _name.object_id               fract_y_su
    _name.linked_item_id          '_atom_site.fract_y'

    _import.get
        [{'file':templ_attr.cif  'save':fract_coord_su}]

save_

save_atom_site.fract_z

    _definition.id                '_atom_site.fract_z'
    _alias.definition_id          '_atom_site_fract_z'
    _name.category_id             atom_site
    _name.object_id               fract_z

    _import.get                   [{'file':templ_attr.cif  'save':fract_coord}]

save_

save_atom_site.fract_z_su

    _definition.id                '_atom_site.fract_z_su'

    loop_
      _alias.definition_id
         '_atom_site_fract_z_su'
         '_atom_site.fract_z_esd'

    _name.category_id             atom_site
    _name.object_id               fract_z_su
    _name.linked_item_id          '_atom_site.fract_z'

    _import.get
        [{'file':templ_attr.cif  'save':fract_coord_su}]

save_

save_atom_site.label

    _definition.id                '_atom_site.label'

    loop_
      _alias.definition_id
         '_atom_site_label'
         '_atom_site.id'

    _name.category_id             atom_site
    _name.object_id               label

    _import.get
        [{'file':templ_attr.cif  'save':atom_site_label}]

save_

save_atom_site.label_component_0

    _definition.id                '_atom_site.label_component_0'
    _alias.definition_id          '_atom_site_label_component_0'
    _name.category_id             atom_site
    _name.object_id               label_component_0

    _import.get
        [{'file':templ_attr.cif  'save':label_component}]

save_

save_atom_site.label_component_1

    _definition.id                '_atom_site.label_component_1'
    _alias.definition_id          '_atom_site_label_component_1'
    _name.category_id             atom_site
    _name.object_id               label_component_1

    _import.get                   [{'file':templ_attr.cif  'save':label_comp}]

save_

save_atom_site.label_component_2

    _definition.id                '_atom_site.label_component_2'
    _alias.definition_id          '_atom_site_label_component_2'
    _name.category_id             atom_site
    _name.object_id               label_component_2

    _import.get                   [{'file':templ_attr.cif  'save':label_comp}]

save_

save_atom_site.label_component_3

    _definition.id                '_atom_site.label_component_3'
    _alias.definition_id          '_atom_site_label_component_3'
    _name.category_id             atom_site
    _name.object_id               label_component_3

    _import.get                   [{'file':templ_attr.cif  'save':label_comp}]

save_

save_atom_site.label_component_4

    _definition.id                '_atom_site.label_component_4'
    _alias.definition_id          '_atom_site_label_component_4'
    _name.category_id             atom_site
    _name.object_id               label_component_4

    _import.get                   [{'file':templ_attr.cif  'save':label_comp}]

save_

save_atom_site.label_component_5

    _definition.id                '_atom_site.label_component_5'
    _alias.definition_id          '_atom_site_label_component_5'
    _name.category_id             atom_site
    _name.object_id               label_component_5

    _import.get                   [{'file':templ_attr.cif  'save':label_comp}]

save_

save_atom_site.label_component_6

    _definition.id                '_atom_site.label_component_6'
    _alias.definition_id          '_atom_site_label_component_6'
    _name.category_id             atom_site
    _name.object_id               label_component_6

    _import.get                   [{'file':templ_attr.cif  'save':label_comp}]

save_

save_atom_site.occupancy

    _definition.id                '_atom_site.occupancy'
    _alias.definition_id          '_atom_site_occupancy'
    _definition.update            2012-11-20
    _description.text
;
    The fraction of the atom type present at this site.
    The sum of the occupancies of all the atom types at this site
    may not significantly exceed 1.0 unless it is a dummy site. The
    value must lie in the 99.97% Gaussian confidence interval
    -3u =< x =< 1 + 3u. The _enumeration.range of 0.0:1.0 is thus
    correctly interpreted as meaning (0.0 - 3u) =< x =< (1.0 + 3u).
;
    _name.category_id             atom_site
    _name.object_id               occupancy
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_atom_site.occupancy_su

    _definition.id                '_atom_site.occupancy_su'

    loop_
      _alias.definition_id
         '_atom_site_occupancy_su'
         '_atom_site.occupancy_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _atom_site.occupancy.
;
    _name.category_id             atom_site
    _name.object_id               occupancy_su
    _name.linked_item_id          '_atom_site.occupancy'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_site.refinement_flags

    _definition.id                '_atom_site.refinement_flags'

    loop_
      _definition_replaced.id
      _definition_replaced.by
         1                        '_atom_site.refinement_flags_posn'
         2                        '_atom_site.refinement_flags_ADP'
         3                        '_atom_site.refinement_flags_occupancy'

    _alias.definition_id          '_atom_site_refinement_flags'
    _definition.update            2021-09-24
    _description.text
;
    A concatenated series of single-letter codes which indicate the
    refinement restraints or constraints applied to this site. This
    item should not be used. It has been replaced by
    _atom_site.refinement_flags_posn, _ADP and _occupancy. It is
    retained in this dictionary only to provide compatibility with
    legacy CIFs.
;
    _name.category_id             atom_site
    _name.object_id               refinement_flags
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         S                      'Special position constraint on site.'
         G                      'Rigid group refinement of site.'
         R                      'Riding-atom site attached to non-riding atom.'
         D                      'Distance or angle restraint on site.'
         T                      'Thermal displacement constraints.'
         U                      'Uiso or Uij restraint (rigid bond).'
         P                      'Partial occupancy constraint.'
         .                      'No refinement constraints.'

save_

save_atom_site.refinement_flags_adp

    _definition.id                '_atom_site.refinement_flags_ADP'
    _alias.definition_id          '_atom_site_refinement_flags_ADP'
    _definition.update            2021-09-24
    _description.text
;
    A code which indicates the refinement restraints or constraints
    applied to the atomic displacement parameters of this site.
;
    _name.category_id             atom_site
    _name.object_id               refinement_flags_ADP
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         .    'No constraints on atomic displacement parameters.'
         T    'Special-position constraints on atomic displacement parameters.'
         U    'Uiso or Uij restraint (rigid bond).'
         TU   'Both constraints applied.'

save_

save_atom_site.refinement_flags_occupancy

    _definition.id                '_atom_site.refinement_flags_occupancy'
    _alias.definition_id          '_atom_site_refinement_flags_occupancy'
    _definition.update            2012-11-20
    _description.text
;
    A code which indicates the refinement restraints or constraints
    applied to the occupancy of this site.
;
    _name.category_id             atom_site
    _name.object_id               refinement_flags_occupancy
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         .                       'No constraints on site-occupancy parameters.'
         P                       'Site-occupancy constraint.'

save_

save_atom_site.refinement_flags_posn

    _definition.id                '_atom_site.refinement_flags_posn'
    _alias.definition_id          '_atom_site_refinement_flags_posn'
    _definition.update            2012-11-20
    _description.text
;
    A code which indicates the refinement restraints or constraints
    applied to the positional coordinates of this site.
;
    _name.category_id             atom_site
    _name.object_id               refinement_flags_posn
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         .             'No constraints on positional coordinates.'
         D             'Distance or angle restraint on positional coordinates.'
         G             'Rigid-group refinement of positional coordinates.'
         R             'Riding-atom site attached to non-riding atom.'
         S             'Special-position constraint on positional coordinates.'
         DG            'Combination of the above constraints.'
         DR            'Combination of the above constraints.'
         DS            'Combination of the above constraints.'
         GR            'Combination of the above constraints.'
         GS            'Combination of the above constraints.'
         RS            'Combination of the above constraints.'
         DGR           'Combination of the above constraints.'
         DGS           'Combination of the above constraints.'
         DRS           'Combination of the above constraints.'
         GRS           'Combination of the above constraints.'
         DGRS          'Combination of the above constraints.'

save_

save_atom_site.restraints

    _definition.id                '_atom_site.restraints'
    _alias.definition_id          '_atom_site_restraints'
    _definition.update            2023-01-13
    _description.text
;
    A description of restraints applied to specific parameters at
    this site during refinement. See also _atom_site.refinement_flags_*
    and _refine_ls.number_restraints.
;
    _name.category_id             atom_site
    _name.object_id               restraints
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'restrained to planar ring'

save_

save_atom_site.site_symmetry_multiplicity

    _definition.id                '_atom_site.site_symmetry_multiplicity'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_atom_site_site_symmetry_multiplicity'                     .
         '_atom_site_symmetry_multiplicity'                          2014-05-20
         '_atom_site.symmetry_multiplicity'                          .

    _definition.update            2024-02-14
    _description.text
;
    The number of different sites that are generated by the
    application of the space-group symmetry to the coordinates
    given for this site. It is equal to the multiplicity given
    for this Wyckoff site in International Tables for Cryst.
    Vol. A (2002). It is equal to the multiplicity of the general
    position divided by the order of the site symmetry given in
    _atom_site.site_symmetry_order.

    The _atom_site_symmetry_multiplicity form of this data name is
    deprecated because of historical inconsistencies in practice among
    structure refinement software packages and should not be used.
;
    _name.category_id             atom_site
    _name.object_id               site_symmetry_multiplicity
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:192
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
     With  a  as  atom_site

        mul  =   0
        xyz  =   a.fract_xyz

          Loop  s  as  space_group_symop  {
             sxyz  =   s.R * xyz + s.T
             diff  =   Mod( 99.5 + xyz - sxyz, 1.0) - 0.5
             If ( Norm ( diff ) < 0.1 ) mul +=  1
       }
    _atom_site.site_symmetry_multiplicity =  _space_group.multiplicity / mul
;

save_

save_atom_site.site_symmetry_order

    _definition.id                '_atom_site.site_symmetry_order'
    _alias.definition_id          '_atom_site_site_symmetry_order'
    _definition.update            2021-03-01
    _description.text
;
    The number of times application of the crystallographic symmetry
    to the coordinates for this site generates the same coordinates.
    That is:
            multiplicity of the general position
            ------------------------------------
            _atom_site.site_symmetry_multiplicity
;
    _name.category_id             atom_site
    _name.object_id               site_symmetry_order
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:48
    _units.code                   none

save_

save_atom_site.type_symbol

    _definition.id                '_atom_site.type_symbol'
    _alias.definition_id          '_atom_site_type_symbol'
    _definition.update            2021-10-27
    _description.text
;
    A code to identify the atom specie(s) occupying this site.
    This code must match a corresponding _atom_type.symbol. The
    specification of this code is optional if component_0 of the
    _atom_site.label is used for this purpose. See _atom_type.symbol.
;
    _name.category_id             atom_site
    _name.object_id               type_symbol
    _name.linked_item_id          '_atom_type.symbol'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

    loop_
      _description_example.case
         Cu
         Cu2+
         S
         O1-

    _method.purpose               Evaluation
    _method.expression
;
    _atom_site.type_symbol  =   AtomType ( _atom_site.label )
;

save_

save_atom_site.u_equiv_geom_mean

    _definition.id                '_atom_site.U_equiv_geom_mean'
    _alias.definition_id          '_atom_site_U_equiv_geom_mean'
    _definition.update            2012-11-20
    _description.text
;
    Equivalent isotropic atomic displacement parameter, U(equiv),
    in angstroms squared, calculated as the geometric mean of
    the anisotropic atomic displacement parameters.

               U(equiv) = (U~i~ U~j~ U~k~)^1/3^

    U~n~ = the principal components of the orthogonalized U^ij^
;
    _name.category_id             atom_site
    _name.object_id               U_equiv_geom_mean
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstrom_squared

save_

save_atom_site.u_equiv_geom_mean_su

    _definition.id                '_atom_site.U_equiv_geom_mean_su'

    loop_
      _alias.definition_id
         '_atom_site_U_equiv_geom_mean_su'
         '_atom_site.U_equiv_geom_mean_esd'

    _definition.update            2012-11-20
    _description.text
;
    Standard uncertainty of _atom_site.U_equiv_geom_mean.
;
    _name.category_id             atom_site
    _name.object_id               U_equiv_geom_mean_su
    _name.linked_item_id          '_atom_site.U_equiv_geom_mean'
    _units.code                   angstrom_squared

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_site.u_iso_or_equiv

    _definition.id                '_atom_site.U_iso_or_equiv'
    _alias.definition_id          '_atom_site_U_iso_or_equiv'
    _definition.update            2023-01-13
    _description.text
;
    Isotropic atomic displacement parameter, or equivalent isotropic
    atomic displacement parameter, U(equiv), in angstroms squared,
    calculated from anisotropic atomic displacement parameters.

       U(equiv) = (1/3) sum~i~[sum~j~(U^ij^ a*~i~ a*~j~ a~i~.a~j~)]

    a  = the real-space cell vectors
    a* = the reciprocal-space cell lengths
    Ref: Fischer, R. X. & Tillmanns, E. (1988). Acta Cryst. C44, 775-776.
;
    _name.category_id             atom_site
    _name.object_id               U_iso_or_equiv
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstrom_squared

save_

save_atom_site.u_iso_or_equiv_su

    _definition.id                '_atom_site.U_iso_or_equiv_su'

    loop_
      _alias.definition_id
         '_atom_site_U_iso_or_equiv_su'
         '_atom_site.U_iso_or_equiv_esd'

    _definition.update            2012-11-20
    _description.text
;
    Standard uncertainty of _atom_site.U_iso_or_equiv.
;
    _name.category_id             atom_site
    _name.object_id               U_iso_or_equiv_su
    _name.linked_item_id          '_atom_site.U_iso_or_equiv'
    _units.code                   angstrom_squared

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_site.wyckoff_symbol

    _definition.id                '_atom_site.Wyckoff_symbol'
    _alias.definition_id          '_atom_site_Wyckoff_symbol'
    _definition.update            2021-09-23
    _description.text
;
    The Wyckoff symbol (letter) as listed in the space-group section
    of International Tables for Crystallography, Vol. A (1987).
;
    _name.category_id             atom_site
    _name.object_id               Wyckoff_symbol
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    _import.get
        [{'file':templ_enum.cif  'save':wyckoff_letter}]

save_

save_ATOM_SITE_ANISO

    _definition.id                ATOM_SITE_ANISO
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2023-01-16
    _description.text
;
    The category of data items used to describe the anisotropic atomic
    displacement parameters of the atomic sites in a crystal structure.
;
    _name.category_id             ATOM_SITE
    _name.object_id               ATOM_SITE_ANISO
    _category_key.name            '_atom_site_aniso.label'

save_

save_atom_site_aniso.b_11

    _definition.id                '_atom_site_aniso.B_11'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_11'
         '_atom_site.aniso_B[1][1]'
         '_atom_site_anisotrop.B[1][1]'

    _name.category_id             atom_site_aniso
    _name.object_id               B_11

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij}]

save_

save_atom_site_aniso.b_11_su

    _definition.id                '_atom_site_aniso.B_11_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_11_su'
         '_atom_site.aniso_B[1][1]_esd'
         '_atom_site_anisotrop.B[1][1]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               B_11_su
    _name.linked_item_id          '_atom_site_aniso.B_11'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij_su}]

save_

save_atom_site_aniso.b_12

    _definition.id                '_atom_site_aniso.B_12'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_12'
         '_atom_site.aniso_B[1][2]'
         '_atom_site_anisotrop.B[1][2]'

    _name.category_id             atom_site_aniso
    _name.object_id               B_12

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij}]

save_

save_atom_site_aniso.b_12_su

    _definition.id                '_atom_site_aniso.B_12_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_12_su'
         '_atom_site.aniso_B[1][2]_esd'
         '_atom_site_anisotrop.B[1][2]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               B_12_su
    _name.linked_item_id          '_atom_site_aniso.B_12'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij_su}]

save_

save_atom_site_aniso.b_13

    _definition.id                '_atom_site_aniso.B_13'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_13'
         '_atom_site.aniso_B[1][3]'
         '_atom_site_anisotrop.B[1][3]'

    _name.category_id             atom_site_aniso
    _name.object_id               B_13

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij}]

save_

save_atom_site_aniso.b_13_su

    _definition.id                '_atom_site_aniso.B_13_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_13_su'
         '_atom_site.aniso_B[1][3]_esd'
         '_atom_site_anisotrop.B[1][3]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               B_13_su
    _name.linked_item_id          '_atom_site_aniso.B_13'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij_su}]

save_

save_atom_site_aniso.b_22

    _definition.id                '_atom_site_aniso.B_22'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_22'
         '_atom_site.aniso_B[2][2]'
         '_atom_site_anisotrop.B[2][2]'

    _name.category_id             atom_site_aniso
    _name.object_id               B_22

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij}]

save_

save_atom_site_aniso.b_22_su

    _definition.id                '_atom_site_aniso.B_22_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_22_su'
         '_atom_site.aniso_B[2][2]_esd'
         '_atom_site_anisotrop.B[2][2]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               B_22_su
    _name.linked_item_id          '_atom_site_aniso.B_22'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij_su}]

save_

save_atom_site_aniso.b_23

    _definition.id                '_atom_site_aniso.B_23'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_23'
         '_atom_site.aniso_B[2][3]'
         '_atom_site_anisotrop.B[2][3]'

    _name.category_id             atom_site_aniso
    _name.object_id               B_23

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij}]

save_

save_atom_site_aniso.b_23_su

    _definition.id                '_atom_site_aniso.B_23_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_23_su'
         '_atom_site.aniso_B[2][3]_esd'
         '_atom_site_anisotrop.B[2][3]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               B_23_su
    _name.linked_item_id          '_atom_site_aniso.B_23'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij_su}]

save_

save_atom_site_aniso.b_33

    _definition.id                '_atom_site_aniso.B_33'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_33'
         '_atom_site.aniso_B[3][3]'
         '_atom_site_anisotrop.B[3][3]'

    _name.category_id             atom_site_aniso
    _name.object_id               B_33

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij}]

save_

save_atom_site_aniso.b_33_su

    _definition.id                '_atom_site_aniso.B_33_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_B_33_su'
         '_atom_site.aniso_B[3][3]_esd'
         '_atom_site_anisotrop.B[3][3]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               B_33_su
    _name.linked_item_id          '_atom_site_aniso.B_33'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_bij_su}]

save_

save_atom_site_aniso.beta_11

    _definition.id                '_atom_site_aniso.beta_11'
    _alias.definition_id          '_atom_site_aniso_beta_11'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_11

    _import.get                   [{'file':templ_attr.cif  'save':aniso_betaij}]

save_

save_atom_site_aniso.beta_11_su

    _definition.id                '_atom_site_aniso.beta_11_su'
    _alias.definition_id          '_atom_site_aniso_beta_11_su'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_11_su
    _name.linked_item_id          '_atom_site_aniso.beta_11'

    _import.get
        [{'file':templ_attr.cif  'save':aniso_betaij_su}]

save_

save_atom_site_aniso.beta_12

    _definition.id                '_atom_site_aniso.beta_12'
    _alias.definition_id          '_atom_site_aniso_beta_12'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_12

    _import.get                   [{'file':templ_attr.cif  'save':aniso_betaij}]

save_

save_atom_site_aniso.beta_12_su

    _definition.id                '_atom_site_aniso.beta_12_su'
    _alias.definition_id          '_atom_site_aniso_beta_12_su'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_12_su
    _name.linked_item_id          '_atom_site_aniso.beta_12'

    _import.get
        [{'file':templ_attr.cif  'save':aniso_betaij_su}]

save_

save_atom_site_aniso.beta_13

    _definition.id                '_atom_site_aniso.beta_13'
    _alias.definition_id          '_atom_site_aniso_beta_13'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_13

    _import.get                   [{'file':templ_attr.cif  'save':aniso_betaij}]

save_

save_atom_site_aniso.beta_13_su

    _definition.id                '_atom_site_aniso.beta_13_su'
    _alias.definition_id          '_atom_site_aniso_beta_13_su'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_13_su
    _name.linked_item_id          '_atom_site_aniso.beta_13'

    _import.get
        [{'file':templ_attr.cif  'save':aniso_betaij_su}]

save_

save_atom_site_aniso.beta_22

    _definition.id                '_atom_site_aniso.beta_22'
    _alias.definition_id          '_atom_site_aniso_beta_22'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_22

    _import.get                   [{'file':templ_attr.cif  'save':aniso_betaij}]

save_

save_atom_site_aniso.beta_22_su

    _definition.id                '_atom_site_aniso.beta_22_su'
    _alias.definition_id          '_atom_site_aniso_beta_22_su'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_22_su
    _name.linked_item_id          '_atom_site_aniso.beta_22'

    _import.get
        [{'file':templ_attr.cif  'save':aniso_betaij_su}]

save_

save_atom_site_aniso.beta_23

    _definition.id                '_atom_site_aniso.beta_23'
    _alias.definition_id          '_atom_site_aniso_beta_23'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_23

    _import.get                   [{'file':templ_attr.cif  'save':aniso_betaij}]

save_

save_atom_site_aniso.beta_23_su

    _definition.id                '_atom_site_aniso.beta_23_su'
    _alias.definition_id          '_atom_site_aniso_beta_23_su'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_23_su
    _name.linked_item_id          '_atom_site_aniso.beta_23'

    _import.get
        [{'file':templ_attr.cif  'save':aniso_betaij_su}]

save_

save_atom_site_aniso.beta_33

    _definition.id                '_atom_site_aniso.beta_33'
    _alias.definition_id          '_atom_site_aniso_beta_33'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_33

    _import.get                   [{'file':templ_attr.cif  'save':aniso_betaij}]

save_

save_atom_site_aniso.beta_33_su

    _definition.id                '_atom_site_aniso.beta_33_su'
    _alias.definition_id          '_atom_site_aniso_beta_33_su'
    _name.category_id             atom_site_aniso
    _name.object_id               beta_33_su
    _name.linked_item_id          '_atom_site_aniso.beta_33'

    _import.get
        [{'file':templ_attr.cif  'save':aniso_betaij_su}]

save_

save_atom_site_aniso.label

    _definition.id                '_atom_site_aniso.label'

    loop_
      _alias.definition_id
         '_atom_site_aniso_label'
         '_atom_site_anisotrop.id'

    _definition.update            2019-04-03
    _description.text
;
    Anisotropic atomic displacement parameters are usually looped in
    a separate list. If this is the case, this code must match the
    _atom_site.label of the associated atom in the atom coordinate
    list and conform with the same rules described in _atom_site.label.
;
    _name.category_id             atom_site_aniso
    _name.object_id               label
    _name.linked_item_id          '_atom_site.label'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_atom_site_aniso.matrix_b

    _definition.id                '_atom_site_aniso.matrix_B'
    _definition.update            2021-07-07
    _description.text
;
    The symmetric anisotropic atomic displacement matrix B.
;
    _name.category_id             atom_site_aniso
    _name.object_id               matrix_B
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstrom_squared
    _method.purpose               Evaluation
    _method.expression
;
    With a as atom_site_aniso

     a.matrix_B =  [[ a.B_11, a.B_12, a.B_13 ],
                    [ a.B_12, a.B_22, a.B_23 ],
                    [ a.B_13, a.B_23, a.B_33 ]]
;

save_

save_atom_site_aniso.matrix_b_su

    _definition.id                '_atom_site_aniso.matrix_B_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_site_aniso.matrix_B.
;
    _name.category_id             atom_site_aniso
    _name.object_id               matrix_B_su
    _name.linked_item_id          '_atom_site_aniso.matrix_B'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstrom_squared

save_

save_atom_site_aniso.matrix_beta

    _definition.id                '_atom_site_aniso.matrix_beta'
    _alias.definition_id          '_atom_site.tensor_beta'
    _definition.update            2023-06-16
    _description.text
;
    The symmetric anisotropic atomic displacement parameter (ADP) matrix, β,
    which appears in a structure-factor expression.

    The contribution of the ADPs to the calculation of the structure factor is
    given as

        T = exp{-1 * Sum[Sum(β^ij^ * h~i~ * h~j~, j=1:3), i=1:3]}

    where β^ij^ are the matrix elements and h~m~ are the Miller indices.

    The ADP matrix β is related to the ADP matrices U and B as follows:

                |a~1~*   0     0  |   |t^11^ t^12^ t^13^|   |a~1~*   0     0  |
        β = C * |  0   a~2~*   0  | * |t^12^ t^22^ t^23^| * |  0   a~2~*   0  |
                |  0     0   a~3~*|   |t^13^ t^23^ t^33^|   |  0     0   a~3~*|

    where C is a constant (2 * π^2^ for U and 0.25 for B), a~i~* is the
    length of the respective reciprocal unit-cell vector, and t represents
    the individual anisotropic values, U^ij^ or B^ij^.
;
    _name.category_id             atom_site_aniso
    _name.object_id               matrix_beta
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With a as atom_site_aniso

        label = a.label

        If (a.ADP_type == 'betaani')
        {
            a.matrix_beta =  [[ a.beta_11, a.beta_12, a.beta_13 ],
                              [ a.beta_12, a.beta_22, a.beta_23 ],
                              [ a.beta_13, a.beta_23, a.beta_33 ]]
        }
        Else
        {
            If (a.ADP_type == 'Uani')
            {
                UIJ = a.matrix_U
            }
            Else If (a.ADP_type == 'Bani')
            {
                UIJ = a.matrix_B / (8 * Pi**2)
            }
            Else {
                If (a.ADP_type == 'Uiso')
                {
                    Loop b as atom_site
                    {
                        If(label == b.label)
                        {
                            U  =  b.U_iso_or_equiv
                            Break
                        }
                    }
                }
                Else If (a.ADP_type == 'Biso')
                {
                    Loop b as atom_site
                    {
                        If(label == b.label)
                        {
                            U  = b.B_iso_or_equiv / (8 * Pi**2)
                            Break
                        }
                    }
                }
                UIJ = U * _cell.convert_Uiso_to_Uij
            }
            CUB = _cell.convert_Uij_to_betaij
            a.matrix_beta =  CUB * UIJ * CUB
        }
;

save_

save_atom_site_aniso.matrix_beta_su

    _definition.id                '_atom_site_aniso.matrix_beta_su'
    _alias.definition_id          '_atom_site.tensor_beta_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_site_aniso.matrix_beta.
;
    _name.category_id             atom_site_aniso
    _name.object_id               matrix_beta_su
    _name.linked_item_id          '_atom_site_aniso.matrix_beta'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   none

save_

save_atom_site_aniso.matrix_u

    _definition.id                '_atom_site_aniso.matrix_U'
    _definition.update            2021-07-07
    _description.text
;
    The symmetric anisotropic atomic displacement matrix U.
;
    _name.category_id             atom_site_aniso
    _name.object_id               matrix_U
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstrom_squared
    _method.purpose               Evaluation
    _method.expression
;
    With a as atom_site_aniso

       a.matrix_U =  [[ a.U_11, a.U_12, a.U_13 ],
                      [ a.U_12, a.U_22, a.U_23 ],
                      [ a.U_13, a.U_23, a.U_33 ]]
;

save_

save_atom_site_aniso.matrix_u_su

    _definition.id                '_atom_site_aniso.matrix_U_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_site_aniso.matrix_U.
;
    _name.category_id             atom_site_aniso
    _name.object_id               matrix_U_su
    _name.linked_item_id          '_atom_site_aniso.matrix_U'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstrom_squared

save_

save_atom_site_aniso.ratio

    _definition.id                '_atom_site_aniso.ratio'

    loop_
      _alias.definition_id
         '_atom_site_aniso_ratio'
         '_atom_site_anisotrop.ratio'
         '_atom_site.aniso_ratio'

    _definition.update            2023-01-16
    _description.text
;
    Ratio of the maximum to minimum eigenvalues of the atomic displacement
    ellipsoids.
;
    _name.category_id             atom_site_aniso
    _name.object_id               ratio
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            1.0:
    _units.code                   none

save_

save_atom_site_aniso.symmform

    _definition.id                '_atom_site_aniso.symmform'
    _alias.definition_id          '_atom_site_aniso_symmform'
    _definition.update            2024-02-20
    _description.text
;
    A symbolic expression that indicates the symmetry-restricted form of the
    components of the anisotropic displacement parameters of an atom, where the
    tensor components are ordered as A11, A22, A33, A23, A13, A12.
;
    _name.category_id             atom_site_aniso
    _name.object_id               symmform
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
      _description_example.detail
         A11,A22,A33,A23,A13,A12
;
             No symmetry restrictions.
;
         A11,A11,A11
;
             Diagonal terms equal, zeros off-diagonal.
;
         A11,A22,A33,0,0,0
;
             Diagonal terms distinct, zeros off-diagonal.
;

save_

save_atom_site_aniso.type_symbol

    _definition.id                '_atom_site_aniso.type_symbol'

    loop_
      _alias.definition_id
         '_atom_site_aniso_type_symbol'
         '_atom_site_anisotrop.type_symbol'

    _definition.update            2023-01-16
    _description.text
;
    This _atom_type.symbol code links the anisotropic atomic displacement
    parameters to the atom type data associated with this site and must match
    one of the _atom_type.symbol codes in this list.
;
    _name.category_id             atom_site_aniso
    _name.object_id               type_symbol
    _name.linked_item_id          '_atom_type.symbol'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word
    _method.purpose               Evaluation
    _method.expression
;
    _atom_site_aniso.type_symbol  =   AtomType ( _atom_site_aniso.label )
;

save_

save_atom_site_aniso.u_11

    _definition.id                '_atom_site_aniso.U_11'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_11'
         '_atom_site.aniso_U[1][1]'
         '_atom_site_anisotrop.U[1][1]'

    _name.category_id             atom_site_aniso
    _name.object_id               U_11

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij}]

save_

save_atom_site_aniso.u_11_su

    _definition.id                '_atom_site_aniso.U_11_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_11_su'
         '_atom_site.aniso_U[1][1]_esd'
         '_atom_site_anisotrop.U[1][1]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               U_11_su
    _name.linked_item_id          '_atom_site_aniso.U_11'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij_su}]

save_

save_atom_site_aniso.u_12

    _definition.id                '_atom_site_aniso.U_12'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_12'
         '_atom_site.aniso_U[1][2]'
         '_atom_site_anisotrop.U[1][2]'

    _name.category_id             atom_site_aniso
    _name.object_id               U_12

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij}]

save_

save_atom_site_aniso.u_12_su

    _definition.id                '_atom_site_aniso.U_12_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_12_su'
         '_atom_site.aniso_U[1][2]_esd'
         '_atom_site_anisotrop.U[1][2]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               U_12_su
    _name.linked_item_id          '_atom_site_aniso.U_12'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij_su}]

save_

save_atom_site_aniso.u_13

    _definition.id                '_atom_site_aniso.U_13'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_13'
         '_atom_site.aniso_U[1][3]'
         '_atom_site_anisotrop.U[1][3]'

    _name.category_id             atom_site_aniso
    _name.object_id               U_13

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij}]

save_

save_atom_site_aniso.u_13_su

    _definition.id                '_atom_site_aniso.U_13_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_13_su'
         '_atom_site.aniso_U[1][3]_esd'
         '_atom_site_anisotrop.U[1][3]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               U_13_su
    _name.linked_item_id          '_atom_site_aniso.U_13'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij_su}]

save_

save_atom_site_aniso.u_22

    _definition.id                '_atom_site_aniso.U_22'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_22'
         '_atom_site.aniso_U[2][2]'
         '_atom_site_anisotrop.U[2][2]'

    _name.category_id             atom_site_aniso
    _name.object_id               U_22

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij}]

save_

save_atom_site_aniso.u_22_su

    _definition.id                '_atom_site_aniso.U_22_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_22_su'
         '_atom_site.aniso_U[2][2]_esd'
         '_atom_site_anisotrop.U[2][2]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               U_22_su
    _name.linked_item_id          '_atom_site_aniso.U_22'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij_su}]

save_

save_atom_site_aniso.u_23

    _definition.id                '_atom_site_aniso.U_23'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_23'
         '_atom_site.aniso_U[2][3]'
         '_atom_site_anisotrop.U[2][3]'

    _name.category_id             atom_site_aniso
    _name.object_id               U_23

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij}]

save_

save_atom_site_aniso.u_23_su

    _definition.id                '_atom_site_aniso.U_23_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_23_su'
         '_atom_site.aniso_U[2][3]_esd'
         '_atom_site_anisotrop.U[2][3]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               U_23_su
    _name.linked_item_id          '_atom_site_aniso.U_23'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij_su}]

save_

save_atom_site_aniso.u_33

    _definition.id                '_atom_site_aniso.U_33'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_33'
         '_atom_site.aniso_U[3][3]'
         '_atom_site_anisotrop.U[3][3]'

    _name.category_id             atom_site_aniso
    _name.object_id               U_33

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij}]

save_

save_atom_site_aniso.u_33_su

    _definition.id                '_atom_site_aniso.U_33_su'

    loop_
      _alias.definition_id
         '_atom_site_aniso_U_33_su'
         '_atom_site.aniso_U[3][3]_esd'
         '_atom_site_anisotrop.U[3][3]_esd'

    _name.category_id             atom_site_aniso
    _name.object_id               U_33_su
    _name.linked_item_id          '_atom_site_aniso.U_33'

    _import.get                   [{'file':templ_attr.cif  'save':aniso_uij_su}]

save_

save_ATOM_SITES

    _definition.id                ATOM_SITES
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-20
    _description.text
;
    The category of data items used to describe information which applies
    to all atom sites in a crystal structure.
;
    _name.category_id             ATOM
    _name.object_id               ATOM_SITES

save_

save_atom_sites.solution_hydrogens

    _definition.id                '_atom_sites.solution_hydrogens'
    _alias.definition_id          '_atom_sites_solution_hydrogens'
    _definition.update            2012-11-20
    _description.text
;
    Codes which identify the methods used to locate the initial
    atom sites. The *_primary code identifies how the first
    atom sites were determined; the *_secondary code identifies
    how the remaining non-hydrogen sites were located; and the
    *_hydrogens code identifies how the hydrogen sites were located.

    Ref: Oszlányi, G. & Süto, A. (2004). Acta Cryst. A60, 134-141;
         Sheldrick, G. M., Hauptman, H. A., Weeks, C. M.,
         Miller, R. & Usón, I. (2001). Ab initio phasing.
         In International Tables for Crystallography,
         Vol. F. Crystallography of biological macromolecules,
         edited by M. G. Rossmann and E. Arnold, ch. 16.1.
         Dordrecht: Kluwer Academic Publishers.
;
    _name.category_id             atom_sites
    _name.object_id               solution_hydrogens
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         difmap
;
         Difference Fourier map.
;
         vecmap
;
         Real-space vector search.
;
         heavy
;
         Heavy-atom method.
;
         direct
;
         Structure-invariant direct methods.
;
         geom
;
         Inferred from neighbouring sites.
;
         disper
;
         Anomalous-dispersion techniques.
;
         isomor
;
         Isomorphous structure methods.
;
         mixed
;
         A mixture of "geom" and "difmap".
;
         notdet
;
         Coordinates were not determined.
;
         dual
;
         Dual-space method (Sheldrick et al., 2001).
;
         iterative
;
         Iterative e.g. charge flipping (Oszlányi & Süto, 2004).
;
         other
;
         A method not included elsewhere in this list.
;

save_

save_atom_sites.solution_primary

    _definition.id                '_atom_sites.solution_primary'
    _alias.definition_id          '_atom_sites_solution_primary'
    _definition.update            2012-11-20
    _description.text
;
    Codes which identify the methods used to locate the initial
    atom sites. The *_primary code identifies how the first
    atom sites were determined; the *_secondary code identifies
    how the remaining non-hydrogen sites were located; and the
    *_hydrogens code identifies how the hydrogen sites were located.

    Ref: Oszlányi, G. & Süto, A. (2004). Acta Cryst. A60, 134-141;
         Sheldrick, G. M., Hauptman, H. A., Weeks, C. M.,
         Miller, R. and Usón, I. (2001). Ab initio phasing.
         In International Tables for Crystallography,
         Vol. F. Crystallography of biological macromolecules,
         edited by M. G. Rossmann and E. Arnold, ch. 16.1.
         Dordrecht: Kluwer Academic Publishers.
;
    _name.category_id             atom_sites
    _name.object_id               solution_primary
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         difmap
;
         Difference Fourier map.
;
         vecmap
;
         Real-space vector search.
;
         heavy
;
         Heavy-atom method.
;
         direct
;
         Structure-invariant direct methods.
;
         geom
;
         Inferred from neighbouring sites.
;
         disper
;
         Anomalous-dispersion techniques.
;
         isomor
;
         Isomorphous structure methods.
;
         notdet
;
         Coordinates were not determined.
;
         dual
;
         Dual-space method (Sheldrick et al., 2001).
;
         iterative
;
         Iterative e.g. charge flipping (Oszlányi & Süto, 2004).
;
         other
;
         A method not included elsewhere in this list.
;

save_

save_atom_sites.solution_secondary

    _definition.id                '_atom_sites.solution_secondary'
    _alias.definition_id          '_atom_sites_solution_secondary'
    _definition.update            2012-11-20
    _description.text
;
    Codes which identify the methods used to locate the initial
    atom sites. The *_primary code identifies how the first
    atom sites were determined; the *_secondary code identifies
    how the remaining non-hydrogen sites were located; and the
    *_hydrogens code identifies how the hydrogen sites were located.

    Ref: Oszlányi, G. & Süto, A. (2004). Acta Cryst. A60, 134-141;
         Sheldrick, G. M., Hauptman, H. A., Weeks, C. M.,
         Miller, R. and Usón, I. (2001). Ab initio phasing.
         In International Tables for Crystallography,
         Vol. F. Crystallography of biological macromolecules,
         edited by M. G. Rossmann and E. Arnold, ch. 16.1.
         Dordrecht: Kluwer Academic Publishers.
;
    _name.category_id             atom_sites
    _name.object_id               solution_secondary
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         difmap
;
         Difference Fourier map.
;
         vecmap
;
         Real-space vector search.
;
         heavy
;
         Heavy-atom method.
;
         direct
;
         Structure-invariant direct methods.
;
         geom
;
         Inferred from neighbouring sites.
;
         disper
;
         Anomalous-dispersion techniques.
;
         isomor
;
         Isomorphous structure methods.
;
         notdet
;
         Coordinates were not determined.
;
         dual
;
         Dual-space method (Sheldrick et al., 2001).
;
         iterative
;
         Iterative e.g. charge flipping (Oszlányi & Süto, 2004).
;
         other
;
         A method not included elsewhere in this list.
;

save_

save_atom_sites.special_details

    _definition.id                '_atom_sites.special_details'
    _alias.definition_id          '_atom_sites_special_details'
    _definition.update            2012-11-20
    _description.text
;
    Information about atomic coordinates not coded elsewhere in the CIF.
;
    _name.category_id             atom_sites
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_ATOM_SITES_CARTN_TRANSFORM

    _definition.id                ATOM_SITES_CARTN_TRANSFORM
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2021-03-03
    _description.text
;
    The category of data items used to describe the matrix elements
    used to transform fractional coordinates into Cartesian coordinates
    of all atom sites in a crystal structure.
;
    _name.category_id             ATOM_SITES
    _name.object_id               ATOM_SITES_CARTN_TRANSFORM

save_

save_atom_sites_cartn_transform.axes

    _definition.id                '_atom_sites_Cartn_transform.axes'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_transform_axes'
         '_atom_sites.Cartn_transform_axes'

    _definition.update            2012-12-11
    _description.text
;
    Description of the relative alignment of the crystal cell axes to the
    Cartesian orthogonal axes as applied in the transformation matrix
    _atom_sites_Cartn_transform.matrix.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               axes
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'a parallel to x; b in the plane of x & y'

save_

save_atom_sites_cartn_transform.mat_11

    _definition.id                '_atom_sites_Cartn_transform.mat_11'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_matrix_11'
         '_atom_sites.Cartn_transf_matrix[1][1]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_11

    _import.get                   [{'file':templ_attr.cif  'save':cartn_matrix}]

    _method.purpose               Definition
    _method.expression
;
     With c as cell

    _enumeration.default =
    c.length_a*Sind(c.angle_beta)*Sind(c.reciprocal_angle_gamma)
;

save_

save_atom_sites_cartn_transform.mat_11_su

    _definition.id                '_atom_sites_Cartn_transform.mat_11_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.mat_11.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_11_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.mat_11'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.mat_12

    _definition.id                '_atom_sites_Cartn_transform.mat_12'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_matrix_12'
         '_atom_sites.Cartn_transf_matrix[1][2]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_12

    _import.get                   [{'file':templ_attr.cif  'save':cartn_matrix}]

    _method.purpose               Definition
    _method.expression
;
    _enumeration.default =  0.
;

save_

save_atom_sites_cartn_transform.mat_12_su

    _definition.id                '_atom_sites_Cartn_transform.mat_12_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.mat_12.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_12_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.mat_12'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.mat_13

    _definition.id                '_atom_sites_Cartn_transform.mat_13'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_matrix_13'
         '_atom_sites.Cartn_transf_matrix[1][3]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_13

    _import.get                   [{'file':templ_attr.cif  'save':cartn_matrix}]

    _method.purpose               Definition
    _method.expression
;
    _enumeration.default =  0.
;

save_

save_atom_sites_cartn_transform.mat_13_su

    _definition.id                '_atom_sites_Cartn_transform.mat_13_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.mat_13.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_13_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.mat_13'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.mat_21

    _definition.id                '_atom_sites_Cartn_transform.mat_21'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_matrix_21'
         '_atom_sites.Cartn_transf_matrix[2][1]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_21

    _import.get                   [{'file':templ_attr.cif  'save':cartn_matrix}]

    _method.purpose               Definition
    _method.expression
;
     with c as cell

    _enumeration.default =
    -c.length_a*Sind(c.angle_beta)*Cosd(c.reciprocal_angle_gamma)
;

save_

save_atom_sites_cartn_transform.mat_21_su

    _definition.id                '_atom_sites_Cartn_transform.mat_21_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.mat_21.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_21_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.mat_21'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.mat_22

    _definition.id                '_atom_sites_Cartn_transform.mat_22'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_matrix_22'
         '_atom_sites.Cartn_transf_matrix[2][2]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_22

    _import.get                   [{'file':templ_attr.cif  'save':cartn_matrix}]

    _method.purpose               Definition
    _method.expression
;
     With c  as  cell

    _enumeration.default =  c.length_b * Sind(c.angle_alpha)
;

save_

save_atom_sites_cartn_transform.mat_22_su

    _definition.id                '_atom_sites_Cartn_transform.mat_22_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.mat_22.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_22_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.mat_22'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.mat_23

    _definition.id                '_atom_sites_Cartn_transform.mat_23'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_matrix_23'
         '_atom_sites.Cartn_transf_matrix[2][3]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_23

    _import.get                   [{'file':templ_attr.cif  'save':cartn_matrix}]

    _method.purpose               Definition
    _method.expression
;
    _enumeration.default =  0.
;

save_

save_atom_sites_cartn_transform.mat_23_su

    _definition.id                '_atom_sites_Cartn_transform.mat_23_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.mat_23.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_23_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.mat_23'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.mat_31

    _definition.id                '_atom_sites_Cartn_transform.mat_31'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_matrix_31'
         '_atom_sites.Cartn_transf_matrix[3][1]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_31

    _import.get                   [{'file':templ_attr.cif  'save':cartn_matrix}]

    _method.purpose               Definition
    _method.expression
;
     With c  as  cell

    _enumeration.default =  c.length_a * Cosd(c.angle_beta)
;

save_

save_atom_sites_cartn_transform.mat_31_su

    _definition.id                '_atom_sites_Cartn_transform.mat_31_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.mat_31.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_31_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.mat_31'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.mat_32

    _definition.id                '_atom_sites_Cartn_transform.mat_32'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_matrix_32'
         '_atom_sites.Cartn_transf_matrix[3][2]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_32

    _import.get                   [{'file':templ_attr.cif  'save':cartn_matrix}]

    _method.purpose               Definition
    _method.expression
;
     With c  as  cell

    _enumeration.default =  c.length_b * Cosd(c.angle_alpha)
;

save_

save_atom_sites_cartn_transform.mat_32_su

    _definition.id                '_atom_sites_Cartn_transform.mat_32_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.mat_32.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_32_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.mat_32'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.mat_33

    _definition.id                '_atom_sites_Cartn_transform.mat_33'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_matrix_33'
         '_atom_sites.Cartn_transf_matrix[3][3]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_33

    _import.get                   [{'file':templ_attr.cif  'save':cartn_matrix}]

    _method.purpose               Definition
    _method.expression
;
    _enumeration.default =  _cell.length_c
;

save_

save_atom_sites_cartn_transform.mat_33_su

    _definition.id                '_atom_sites_Cartn_transform.mat_33_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.mat_33.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               mat_33_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.mat_33'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.matrix

    _definition.id                '_atom_sites_Cartn_transform.matrix'
    _definition.update            2025-05-12
    _description.text
;
    Matrix used to transform fractional coordinates in the ATOM_SITE
    category to Cartesian coordinates. The axial alignments of this
    transformation are described in _atom_sites_Cartn_transform.axes.
    The 3 x 1 translation is defined in _atom_sites_Cartn_transform.vector.

      x'                      |11 12 13|     x                    | 1 |
    ( y' ) Cartesian   =   mat|21 22 23| * ( y ) fractional  + vec| 2 |
      z'                      |31 32 33|     z                    | 3 |

    The default transformation matrix uses Rollett's axial
    assignments with cell vectors a,b,c aligned with orthogonal
    axes X,Y,Z so that c||Z and b in plane YZ.

    Ref: Rollett, J. S. (1965). Computing Methods in Crystallography, p. 22.
    Oxford: Pergamon Press.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               matrix
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
    With a as atom_sites_Cartn_transform

    _atom_sites_Cartn_transform.matrix = [[a.mat_11, a.mat_12, a.mat_13],
                                          [a.mat_21, a.mat_22, a.mat_23],
                                          [a.mat_31, a.mat_32, a.mat_33]]
;

save_

save_atom_sites_cartn_transform.matrix_su

    _definition.id                '_atom_sites_Cartn_transform.matrix_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.matrix.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               matrix_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.matrix'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_atom_sites_cartn_transform.vec_1

    _definition.id                '_atom_sites_Cartn_transform.vec_1'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_vector_1'
         '_atom_sites.Cartn_transf_vector[1]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               vec_1

    _import.get                   [{'file':templ_attr.cif  'save':cartn_vector}]

save_

save_atom_sites_cartn_transform.vec_1_su

    _definition.id                '_atom_sites_Cartn_transform.vec_1_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.vec_1.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               vec_1_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.vec_1'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.vec_2

    _definition.id                '_atom_sites_Cartn_transform.vec_2'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_vector_2'
         '_atom_sites.Cartn_transf_vector[2]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               vec_2

    _import.get                   [{'file':templ_attr.cif  'save':cartn_vector}]

save_

save_atom_sites_cartn_transform.vec_2_su

    _definition.id                '_atom_sites_Cartn_transform.vec_2_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.vec_2.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               vec_2_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.vec_2'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.vec_3

    _definition.id                '_atom_sites_Cartn_transform.vec_3'

    loop_
      _alias.definition_id
         '_atom_sites_Cartn_tran_vector_3'
         '_atom_sites.Cartn_transf_vector[3]'

    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               vec_3

    _import.get                   [{'file':templ_attr.cif  'save':cartn_vector}]

save_

save_atom_sites_cartn_transform.vec_3_su

    _definition.id                '_atom_sites_Cartn_transform.vec_3_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.vec_3.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               vec_3_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.vec_3'
    _units.code                   angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_cartn_transform.vector

    _definition.id                '_atom_sites_Cartn_transform.vector'
    _definition.update            2021-07-07
    _description.text
;
    The 3x1 translation is used with _atom_sites_Cartn_transform.matrix
    used to transform fractional coordinates to Cartesian coordinates.
    The axial alignments of this transformation are described in
    _atom_sites_Cartn_transform.axes.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               vector
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms
    _method.purpose               Evaluation
    _method.expression
;
     With t as atom_sites_Cartn_transform

    _atom_sites_Cartn_transform.vector =  [ t.vec_1, t.vec_2, t.vec_3 ]
;

save_

save_atom_sites_cartn_transform.vector_su

    _definition.id                '_atom_sites_Cartn_transform.vector_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_Cartn_transform.vector.
;
    _name.category_id             atom_sites_Cartn_transform
    _name.object_id               vector_su
    _name.linked_item_id          '_atom_sites_Cartn_transform.vector'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   angstroms

save_

save_ATOM_SITES_FRACT_TRANSFORM

    _definition.id                ATOM_SITES_FRACT_TRANSFORM
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2021-03-03
    _description.text
;
    The category of data items used to describe the matrix elements
    used to transform Cartesian coordinates into fractional coordinates
    of all atom sites in a crystal structure.
;
    _name.category_id             ATOM_SITES
    _name.object_id               ATOM_SITES_FRACT_TRANSFORM

save_

save_atom_sites_fract_transform.axes

    _definition.id                '_atom_sites_fract_transform.axes'

    loop_
      _alias.definition_id
         '_atom_sites_fract_transform_axes'
         '_atom_sites.fract_transform_axes'

    _definition.update            2012-12-11
    _description.text
;
    Description of the relative alignment of the crystal cell axes to the
    Cartesian orthogonal axes as applied in the transformation matrix
    _atom_sites_fract_transform.matrix.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               axes
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'a parallel to x; b in the plane of x & y'

save_

save_atom_sites_fract_transform.mat_11

    _definition.id                '_atom_sites_fract_transform.mat_11'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_matrix_11'
         '_atom_sites.fract_transf_matrix[1][1]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_11

    _import.get                   [{'file':templ_attr.cif  'save':fract_matrix}]

save_

save_atom_sites_fract_transform.mat_11_su

    _definition.id                '_atom_sites_fract_transform.mat_11_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.mat_11.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_11_su
    _name.linked_item_id          '_atom_sites_fract_transform.mat_11'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.mat_12

    _definition.id                '_atom_sites_fract_transform.mat_12'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_matrix_12'
         '_atom_sites.fract_transf_matrix[1][2]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_12

    _import.get                   [{'file':templ_attr.cif  'save':fract_matrix}]

save_

save_atom_sites_fract_transform.mat_12_su

    _definition.id                '_atom_sites_fract_transform.mat_12_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.mat_12.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_12_su
    _name.linked_item_id          '_atom_sites_fract_transform.mat_12'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.mat_13

    _definition.id                '_atom_sites_fract_transform.mat_13'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_matrix_13'
         '_atom_sites.fract_transf_matrix[1][3]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_13

    _import.get                   [{'file':templ_attr.cif  'save':fract_matrix}]

save_

save_atom_sites_fract_transform.mat_13_su

    _definition.id                '_atom_sites_fract_transform.mat_13_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.mat_13.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_13_su
    _name.linked_item_id          '_atom_sites_fract_transform.mat_13'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.mat_21

    _definition.id                '_atom_sites_fract_transform.mat_21'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_matrix_21'
         '_atom_sites.fract_transf_matrix[2][1]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_21

    _import.get                   [{'file':templ_attr.cif  'save':fract_matrix}]

save_

save_atom_sites_fract_transform.mat_21_su

    _definition.id                '_atom_sites_fract_transform.mat_21_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.mat_21.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_21_su
    _name.linked_item_id          '_atom_sites_fract_transform.mat_21'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.mat_22

    _definition.id                '_atom_sites_fract_transform.mat_22'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_matrix_22'
         '_atom_sites.fract_transf_matrix[2][2]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_22

    _import.get                   [{'file':templ_attr.cif  'save':fract_matrix}]

save_

save_atom_sites_fract_transform.mat_22_su

    _definition.id                '_atom_sites_fract_transform.mat_22_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.mat_22.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_22_su
    _name.linked_item_id          '_atom_sites_fract_transform.mat_22'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.mat_23

    _definition.id                '_atom_sites_fract_transform.mat_23'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_matrix_23'
         '_atom_sites.fract_transf_matrix[2][3]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_23

    _import.get                   [{'file':templ_attr.cif  'save':fract_matrix}]

save_

save_atom_sites_fract_transform.mat_23_su

    _definition.id                '_atom_sites_fract_transform.mat_23_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.mat_23.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_23_su
    _name.linked_item_id          '_atom_sites_fract_transform.mat_23'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.mat_31

    _definition.id                '_atom_sites_fract_transform.mat_31'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_matrix_31'
         '_atom_sites.fract_transf_matrix[3][1]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_31

    _import.get                   [{'file':templ_attr.cif  'save':fract_matrix}]

save_

save_atom_sites_fract_transform.mat_31_su

    _definition.id                '_atom_sites_fract_transform.mat_31_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.mat_31.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_31_su
    _name.linked_item_id          '_atom_sites_fract_transform.mat_31'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.mat_32

    _definition.id                '_atom_sites_fract_transform.mat_32'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_matrix_32'
         '_atom_sites.fract_transf_matrix[3][2]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_32

    _import.get                   [{'file':templ_attr.cif  'save':fract_matrix}]

save_

save_atom_sites_fract_transform.mat_32_su

    _definition.id                '_atom_sites_fract_transform.mat_32_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.mat_32.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_32_su
    _name.linked_item_id          '_atom_sites_fract_transform.mat_32'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.mat_33

    _definition.id                '_atom_sites_fract_transform.mat_33'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_matrix_33'
         '_atom_sites.fract_transf_matrix[3][3]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_33

    _import.get                   [{'file':templ_attr.cif  'save':fract_matrix}]

save_

save_atom_sites_fract_transform.mat_33_su

    _definition.id                '_atom_sites_fract_transform.mat_33_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.mat_33.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               mat_33_su
    _name.linked_item_id          '_atom_sites_fract_transform.mat_33'
    _units.code                   reciprocal_angstroms

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.matrix

    _definition.id                '_atom_sites_fract_transform.matrix'
    _definition.update            2025-05-12
    _description.text
;
    Matrix used to transform Cartesian coordinates in the ATOM_SITE
    category to fractional coordinates. The axial alignments of this
    transformation are described in _atom_sites_fract_transform.axes.
    The 3 x 1 translation is defined in _atom_sites_fract_transform.vector.

      x'                   |11 12 13|     x                  | 1 |
    ( y' )fractional = mat |21 22 23| * ( y ) Cartesian + vec| 2 |
      z'                   |31 32 33|     z                  | 3 |

    The default transformation matrix uses Rollet's axial
    assignments with cell vectors a,b,c aligned with orthogonal
    axes X,Y,Z so that c||Z and b in plane YZ.

    Ref: Rollett, J. S. (1965). Computing Methods in Crystallography, p. 22.
    Oxford: Pergamon Press.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               matrix
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms
    _method.purpose               Evaluation
    _method.expression
;
    With a as atom_sites_fract_transform

    _atom_sites_fract_transform.matrix = [[a.mat_11, a.mat_12, a.mat_13],
                                          [a.mat_21, a.mat_22, a.mat_23],
                                          [a.mat_31, a.mat_32, a.mat_33]]
;

save_

save_atom_sites_fract_transform.matrix_su

    _definition.id                '_atom_sites_fract_transform.matrix_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.matrix.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               matrix_su
    _name.linked_item_id          '_atom_sites_fract_transform.matrix'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3,3]'
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_atom_sites_fract_transform.vec_1

    _definition.id                '_atom_sites_fract_transform.vec_1'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_vector_1'
         '_atom_sites.fract_transf_vector[1]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               vec_1

    _import.get                   [{'file':templ_attr.cif  'save':fract_vector}]

save_

save_atom_sites_fract_transform.vec_1_su

    _definition.id                '_atom_sites_fract_transform.vec_1_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.vec_1.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               vec_1_su
    _name.linked_item_id          '_atom_sites_fract_transform.vec_1'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.vec_2

    _definition.id                '_atom_sites_fract_transform.vec_2'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_vector_2'
         '_atom_sites.fract_transf_vector[2]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               vec_2

    _import.get                   [{'file':templ_attr.cif  'save':fract_vector}]

save_

save_atom_sites_fract_transform.vec_2_su

    _definition.id                '_atom_sites_fract_transform.vec_2_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.vec_2.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               vec_2_su
    _name.linked_item_id          '_atom_sites_fract_transform.vec_2'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.vec_3

    _definition.id                '_atom_sites_fract_transform.vec_3'

    loop_
      _alias.definition_id
         '_atom_sites_fract_tran_vector_3'
         '_atom_sites.fract_transf_vector[3]'

    _name.category_id             atom_sites_fract_transform
    _name.object_id               vec_3

    _import.get                   [{'file':templ_attr.cif  'save':fract_vector}]

save_

save_atom_sites_fract_transform.vec_3_su

    _definition.id                '_atom_sites_fract_transform.vec_3_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.vec_3.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               vec_3_su
    _name.linked_item_id          '_atom_sites_fract_transform.vec_3'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_sites_fract_transform.vector

    _definition.id                '_atom_sites_fract_transform.vector'
    _definition.update            2021-03-01
    _description.text
;
    The 3x1 translation is used with _atom_sites_fract_transform.matrix
    used to transform Cartesian coordinates to fractional coordinates.
    The axial alignments of this transformation are described in
    _atom_sites_fract_transform.axes.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               vector
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
     With t as atom_sites_fract_transform

    _atom_sites_fract_transform.vector =  [ t.vec_1, t.vec_2, t.vec_3 ]
;

save_

save_atom_sites_fract_transform.vector_su

    _definition.id                '_atom_sites_fract_transform.vector_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_sites_fract_transform.vector.
;
    _name.category_id             atom_sites_fract_transform
    _name.object_id               vector_su
    _name.linked_item_id          '_atom_sites_fract_transform.vector'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none

save_

save_ATOM_TYPE

    _definition.id                ATOM_TYPE
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2023-07-13
    _description.text
;
    The category of data items used to describe atomic type information
    used in crystallographic structure studies.
;
    _name.category_id             ATOM
    _name.object_id               ATOM_TYPE
    _category_key.name            '_atom_type.symbol'
    _method.purpose               Evaluation
    _method.expression
;
    typelist  = List()

    Loop  a  as  atom_site  {
       type = a.type_symbol
       If( type not in typelist )  typelist ++= type
     }
     For type in typelist {
                             atom_type(.symbol         = type,
                                       .number_in_cell = '?'   )
     }
;

save_

save_atom_type.analytical_mass_percent

    _definition.id                '_atom_type.analytical_mass_percent'

    loop_
      _alias.definition_id
         '_atom_type_analytical_mass_%'
         '_atom_type.analytical_mass_%'

    _definition.update            2013-04-11
    _description.text
;
    Mass percentage of this atom type derived from chemical analysis.
;
    _name.category_id             atom_type
    _name.object_id               analytical_mass_percent
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:100.0
    _units.code                   none

save_

save_atom_type.analytical_mass_percent_su

    _definition.id                '_atom_type.analytical_mass_percent_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_type.analytical_mass_percent.
;
    _name.category_id             atom_type
    _name.object_id               analytical_mass_percent_su
    _name.linked_item_id          '_atom_type.analytical_mass_percent'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_atom_type.atomic_mass

    _definition.id                '_atom_type.atomic_mass'
    _definition.update            2012-11-20
    _description.text
;
    Mass of this atom type.
;
    _name.category_id             atom_type
    _name.object_id               atomic_mass
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.def_index_id     '_atom_type.symbol'

    _import.get                   [{'file':templ_enum.cif  'save':atomic_mass}]

save_

save_atom_type.atomic_number

    _definition.id                '_atom_type.atomic_number'
    _definition.update            2023-06-01
    _description.text
;
    Atomic number of this atom type.
;
    _name.category_id             atom_type
    _name.object_id               atomic_number
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _enumeration.def_index_id     '_atom_type.element_symbol'

    _import.get
        [{'file':templ_enum.cif  'save':atomic_number}]

save_

save_atom_type.description

    _definition.id                '_atom_type.description'
    _alias.definition_id          '_atom_type_description'
    _definition.update            2023-01-13
    _description.text
;
    A description of the atom(s) designated by this atom type. In
    most cases this will be the element name and oxidation state of
    a single atom species. For disordered or nonstoichiometric
    structures it will describe a combination of atom species.
;
    _name.category_id             atom_type
    _name.object_id               description
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         deuterium
         0.34Fe+0.66Ni

save_

save_atom_type.display_colour

    _definition.id                '_atom_type.display_colour'
    _definition.update            2023-02-06
    _description.text
;
    The display colour assigned to this atom type. Note that the
    possible colours are enumerated in the DISPLAY_COLOUR list
    category of items.
;
    _name.category_id             atom_type
    _name.object_id               display_colour
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _enumeration.def_index_id     '_atom_type.symbol'

    _import.get                   [
                                   {'file':templ_enum.cif  'save':colour_rgb}
                                   {'file':templ_enum.cif  'save':colour_hue}
                                  ]

save_

save_atom_type.electron_count

    _definition.id                '_atom_type.electron_count'
    _definition.update            2021-03-01
    _description.text
;
    Number of electrons in this atom type.
;
    _name.category_id             atom_type
    _name.object_id               electron_count
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _enumeration.def_index_id     '_atom_type.symbol'

    _import.get
        [{'file':templ_enum.cif  'save':electron_count}]

save_

save_atom_type.element_symbol

    _definition.id                '_atom_type.element_symbol'
    _definition.update            2021-10-27
    _description.text
;
    Element symbol for of this atom type. The default value is extracted
    from the ion-to-element enumeration_default list using the index
    value of _atom_type.symbol.
;
    _name.category_id             atom_type
    _name.object_id               element_symbol
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _enumeration.def_index_id     '_atom_type.symbol'

    _import.get
        [
         {'file':templ_enum.cif  'save':element_symbol}
         {'file':templ_enum.cif  'save':ion_to_element}
        ]

save_

save_atom_type.mass_number

    _definition.id                '_atom_type.mass_number'
    _definition.update            2023-05-22
    _description.text
;
    Mass number of this atom type.

    Used to denote a specific isotope. Special value '.' indicates
    that the element is present in natural isotopic abundance.
;
    _name.category_id             atom_type
    _name.object_id               mass_number
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_atom_type.number_in_cell

    _definition.id                '_atom_type.number_in_cell'
    _alias.definition_id          '_atom_type_number_in_cell'
    _definition.update            2013-01-28
    _description.text
;
    Total number of atoms of this atom type in the unit cell.
;
    _name.category_id             atom_type
    _name.object_id               number_in_cell
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With t as atom_type

    cnt =  0.

    Loop a  as  atom_site  {

       if ( a.type_symbol == t.symbol ) {

          cnt +=  a.occupancy * a.site_symmetry_multiplicity
    }  }
    _atom_type.number_in_cell =  cnt
;

save_

save_atom_type.oxidation_number

    _definition.id                '_atom_type.oxidation_number'
    _alias.definition_id          '_atom_type_oxidation_number'
    _definition.update            2021-03-01
    _description.text
;
    Formal oxidation state of this atom type in the structure.
;
    _name.category_id             atom_type
    _name.object_id               oxidation_number
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            -8:8
    _units.code                   none

save_

save_atom_type.radius_bond

    _definition.id                '_atom_type.radius_bond'
    _alias.definition_id          '_atom_type_radius_bond'
    _definition.update            2012-11-20
    _description.text
;
    The effective intra-molecular bonding radius of this atom type.
;
    _name.category_id             atom_type
    _name.object_id               radius_bond
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:5.0
    _enumeration.def_index_id     '_atom_type.symbol'

    _import.get                   [{'file':templ_enum.cif  'save':radius_bond}]

save_

save_atom_type.radius_contact

    _definition.id                '_atom_type.radius_contact'
    _alias.definition_id          '_atom_type_radius_contact'
    _definition.update            2012-11-20
    _description.text
;
    The effective inter-molecular bonding radius of this atom type.
;
    _name.category_id             atom_type
    _name.object_id               radius_contact
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:5.0
    _units.code                   angstroms
    _method.purpose               Definition
    _method.expression
;
    _enumeration.default = _atom_type.radius_bond + 1.25
;

save_

save_atom_type.symbol

    _definition.id                '_atom_type.symbol'
    _alias.definition_id          '_atom_type_symbol'
    _definition.update            2021-10-27
    _description.text
;
    The identity of the atom specie(s) representing this atom type.
    Normally this code is the element symbol followed by the charge
    if there is one. The symbol may be composed of any character except
    an underline or a blank, with the proviso that digits designate an
    oxidation state and must be followed by a + or - character.
;
    _name.category_id             atom_type
    _name.object_id               symbol
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

    loop_
      _description_example.case
         Mg
         Cu2+
         dummy
         FeNi

save_

save_ATOM_TYPE_SCAT

    _definition.id                ATOM_TYPE_SCAT
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to describe atomic scattering
    information used in crystallographic structure studies.
;
    _name.category_id             ATOM_TYPE
    _name.object_id               ATOM_TYPE_SCAT
    _category_key.name            '_atom_type_scat.symbol'

save_

save_atom_type_scat.cromer_mann_a1

    _definition.id                '_atom_type_scat.Cromer_Mann_a1'

    loop_
      _alias.definition_id
         '_atom_type_scat_Cromer_Mann_a1'
         '_atom_type.scat_Cromer_Mann_a1'

    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_a1

    _import.get
        [
         {'file':templ_attr.cif  'save':cromer_mann_coeff}
         {'file':templ_enum.cif  'save':cromer_mann_a1}
        ]

save_

save_atom_type_scat.cromer_mann_a2

    _definition.id                '_atom_type_scat.Cromer_Mann_a2'

    loop_
      _alias.definition_id
         '_atom_type_scat_Cromer_Mann_a2'
         '_atom_type.scat_Cromer_Mann_a2'

    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_a2

    _import.get
        [
         {'file':templ_attr.cif  'save':cromer_mann_coeff}
         {'file':templ_enum.cif  'save':cromer_mann_a2}
        ]

save_

save_atom_type_scat.cromer_mann_a3

    _definition.id                '_atom_type_scat.Cromer_Mann_a3'

    loop_
      _alias.definition_id
         '_atom_type_scat_Cromer_Mann_a3'
         '_atom_type.scat_Cromer_Mann_a3'

    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_a3

    _import.get
        [
         {'file':templ_attr.cif  'save':cromer_mann_coeff}
         {'file':templ_enum.cif  'save':cromer_mann_a3}
        ]

save_

save_atom_type_scat.cromer_mann_a4

    _definition.id                '_atom_type_scat.Cromer_Mann_a4'

    loop_
      _alias.definition_id
         '_atom_type_scat_Cromer_Mann_a4'
         '_atom_type.scat_Cromer_Mann_a4'

    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_a4

    _import.get
        [
         {'file':templ_attr.cif  'save':cromer_mann_coeff}
         {'file':templ_enum.cif  'save':cromer_mann_a4}
        ]

save_

save_atom_type_scat.cromer_mann_b1

    _definition.id                '_atom_type_scat.Cromer_Mann_b1'

    loop_
      _alias.definition_id
         '_atom_type_scat_Cromer_Mann_b1'
         '_atom_type.scat_Cromer_Mann_b1'

    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_b1

    _import.get
        [
         {'file':templ_attr.cif  'save':cromer_mann_coeff}
         {'file':templ_enum.cif  'save':cromer_mann_b1}
        ]

save_

save_atom_type_scat.cromer_mann_b2

    _definition.id                '_atom_type_scat.Cromer_Mann_b2'

    loop_
      _alias.definition_id
         '_atom_type_scat_Cromer_Mann_b2'
         '_atom_type.scat_Cromer_Mann_b2'

    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_b2

    _import.get
        [
         {'file':templ_attr.cif  'save':cromer_mann_coeff}
         {'file':templ_enum.cif  'save':cromer_mann_b2}
        ]

save_

save_atom_type_scat.cromer_mann_b3

    _definition.id                '_atom_type_scat.Cromer_Mann_b3'

    loop_
      _alias.definition_id
         '_atom_type_scat_Cromer_Mann_b3'
         '_atom_type.scat_Cromer_Mann_b3'

    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_b3

    _import.get
        [
         {'file':templ_attr.cif  'save':cromer_mann_coeff}
         {'file':templ_enum.cif  'save':cromer_mann_b3}
        ]

save_

save_atom_type_scat.cromer_mann_b4

    _definition.id                '_atom_type_scat.Cromer_Mann_b4'

    loop_
      _alias.definition_id
         '_atom_type_scat_Cromer_Mann_b4'
         '_atom_type.scat_Cromer_Mann_b4'

    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_b4

    _import.get
        [
         {'file':templ_attr.cif  'save':cromer_mann_coeff}
         {'file':templ_enum.cif  'save':cromer_mann_b4}
        ]

save_

save_atom_type_scat.cromer_mann_c

    _definition.id                '_atom_type_scat.Cromer_Mann_c'

    loop_
      _alias.definition_id
         '_atom_type_scat_Cromer_Mann_c'
         '_atom_type.scat_Cromer_Mann_c'

    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_c

    _import.get
        [
         {'file':templ_attr.cif  'save':cromer_mann_coeff}
         {'file':templ_enum.cif  'save':cromer_mann_c}
        ]

save_

save_atom_type_scat.cromer_mann_coeffs

    _definition.id                '_atom_type_scat.Cromer_Mann_coeffs'
    _definition.update            2023-06-16
    _description.text
;
    The set of Cromer-Mann coefficients for generating X-ray scattering
    factors:
    [ c, a1, b1, a2, b2, a3, b3, a4, b4 ].
    Ref: International Tables for Crystallography (2004). Vol. C, Table 6.1.1.4.
;
    _name.category_id             atom_type_scat
    _name.object_id               Cromer_Mann_coeffs
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               List
    _type.dimension               '[9]'
    _type.contents                Real
    _units.code                   unspecified
    _method.purpose               Evaluation
    _method.expression
;
    With t  as  atom_type_scat

     _atom_type_scat.Cromer_Mann_coeffs  =          [ t.Cromer_Mann_c,
                                    t.Cromer_Mann_a1, t.Cromer_Mann_b1,
                                    t.Cromer_Mann_a2, t.Cromer_Mann_b2,
                                    t.Cromer_Mann_a3, t.Cromer_Mann_b3,
                                    t.Cromer_Mann_a4, t.Cromer_Mann_b4 ]
;

save_

save_atom_type_scat.dispersion

    _definition.id                '_atom_type_scat.dispersion'
    _definition.update            2013-04-28
    _description.text
;
    The anomalous dispersion scattering factor in its complex form
    for this atom type and radiation by _diffrn_radiation_wavelength.value
;
    _name.category_id             atom_type_scat
    _name.object_id               dispersion
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Complex
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With s as atom_type_scat

            d = Complex( s.dispersion_real, s.dispersion_imag )

       if(_reflns.apply_dispersion_to_Fcalc == 'no')   d = 0.

                _atom_type_scat.dispersion = d
;

save_

save_atom_type_scat.dispersion_imag

    _definition.id                '_atom_type_scat.dispersion_imag'

    loop_
      _alias.definition_id
         '_atom_type_scat_dispersion_imag'
         '_atom_type.scat_dispersion_imag'

    _definition.update            2021-09-24
    _description.text
;
    The imaginary component of the anomalous dispersion scattering factors
    for this atom type and radiation by _diffrn_radiation_wavelength.value
;
    _name.category_id             atom_type_scat
    _name.object_id               dispersion_imag
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With q as atom_type_scat

     If ( _diffrn_radiation.type[0:2] == 'Cu' ) a = q.dispersion_imag_Cu
     If ( _diffrn_radiation.type[0:2] == 'Mo' ) a = q.dispersion_imag_Mo

             _atom_type_scat.dispersion_imag = a
;

save_

save_atom_type_scat.dispersion_imag_cu

    _definition.id                '_atom_type_scat.dispersion_imag_Cu'
    _definition.update            2023-06-01
    _description.text
;
    The imaginary component of the anomalous dispersion scattering factors
    for this atom type and Cu Kα radiation.
;
    _name.category_id             atom_type_scat
    _name.object_id               dispersion_imag_Cu
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.def_index_id     '_atom_type.element_symbol'

    _import.get
        [{'file':templ_enum.cif  'save':dispersion_imag_cu}]

save_

save_atom_type_scat.dispersion_imag_mo

    _definition.id                '_atom_type_scat.dispersion_imag_Mo'
    _definition.update            2023-06-01
    _description.text
;
    The imaginary component of the anomalous dispersion scattering factors
    for this atom type and Mo Kα radiation.
;
    _name.category_id             atom_type_scat
    _name.object_id               dispersion_imag_Mo
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.def_index_id     '_atom_type.element_symbol'

    _import.get
        [{'file':templ_enum.cif  'save':dispersion_imag_mo}]

save_

save_atom_type_scat.dispersion_real

    _definition.id                '_atom_type_scat.dispersion_real'

    loop_
      _alias.definition_id
         '_atom_type_scat_dispersion_real'
         '_atom_type.scat_dispersion_real'

    _definition.update            2012-11-20
    _description.text
;
    The real component of the anomalous dispersion scattering factors
    for this atom type and radiation by _diffrn_radiation_wavelength.value
;
    _name.category_id             atom_type_scat
    _name.object_id               dispersion_real
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    With q as atom_type_scat

     If ( _diffrn_radiation.type[0:2] == 'Cu' ) a = q.dispersion_real_Cu
     If ( _diffrn_radiation.type[0:2] == 'Mo' ) a = q.dispersion_real_Mo

             _atom_type_scat.dispersion_real = a
;

save_

save_atom_type_scat.dispersion_real_cu

    _definition.id                '_atom_type_scat.dispersion_real_Cu'
    _definition.update            2023-06-01
    _description.text
;
    The real component of the anomalous dispersion scattering factors
    for this atom type and Cu Kα radiation.
;
    _name.category_id             atom_type_scat
    _name.object_id               dispersion_real_Cu
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.def_index_id     '_atom_type.element_symbol'

    _import.get
        [{'file':templ_enum.cif  'save':dispersion_real_cu}]

save_

save_atom_type_scat.dispersion_real_mo

    _definition.id                '_atom_type_scat.dispersion_real_Mo'
    _definition.update            2023-06-01
    _description.text
;
    The real component of the anomalous dispersion scattering factors
    for this atom type and Mo Kα radiation.
;
    _name.category_id             atom_type_scat
    _name.object_id               dispersion_real_Mo
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _enumeration.def_index_id     '_atom_type.element_symbol'

    _import.get
        [{'file':templ_enum.cif  'save':dispersion_real_mo}]

save_

save_atom_type_scat.dispersion_source

    _definition.id                '_atom_type_scat.dispersion_source'

    loop_
      _alias.definition_id
         '_atom_type_scat_dispersion_source'
         '_atom_type.scat_dispersion_source'

    _definition.update            2012-11-20
    _description.text
;
    Reference to source of real and imaginary dispersion
    corrections for scattering factors used for this atom type.
;
    _name.category_id             atom_type_scat
    _name.object_id               dispersion_source
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'International Tables Vol. IV Table 2.3.1'

save_

save_atom_type_scat.exponential_polynomial_coefs

    _definition.id                '_atom_type_scat.exponential_polynomial_coefs'
    _definition.update            2023-06-16
    _description.text
;
    The set of polynomial coefficients for generating X-ray scattering factors:
    [ a_0, a_1, ... , a_N ].

    f(s; Z) = exp[Sum(a~i~ * s^i^), i=0:N]

    where s = sin(θ)/λ, θ is the diffraction angle and λ is the wavelength
    of the incident radiation in angstroms.
;
    _name.category_id             atom_type_scat
    _name.object_id               exponential_polynomial_coefs
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               List
    _type.dimension               '[]'
    _type.contents                Real
    _units.code                   unspecified

save_

save_atom_type_scat.exponential_polynomial_coefs_su

    _definition.id
        '_atom_type_scat.exponential_polynomial_coefs_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_type_scat.exponential_polynomial_coefs.
;
    _name.category_id             atom_type_scat
    _name.object_id               exponential_polynomial_coefs_su
    _name.linked_item_id          '_atom_type_scat.exponential_polynomial_coefs'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               List
    _type.dimension               '[]'
    _type.contents                Real
    _units.code                   unspecified

save_

save_atom_type_scat.exponential_polynomial_lower_limit

    _definition.id
        '_atom_type_scat.exponential_polynomial_lower_limit'
    _definition.update            2023-04-09
    _description.text
;
    The inclusive lower limit of s for which the corresponding exponential
    polynomial coefficients are valid.

    See _atom_type_scat.exponential_polynomial_coefs.
;
    _name.category_id             atom_type_scat
    _name.object_id               exponential_polynomial_lower_limit
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_atom_type_scat.exponential_polynomial_upper_limit

    _definition.id
        '_atom_type_scat.exponential_polynomial_upper_limit'
    _definition.update            2023-04-09
    _description.text
;
    The exclusive upper limit of s for which the corresponding exponential
    polynomial coefficients are valid.

    See _atom_type_scat.exponential_polynomial_coefs.
;
    _name.category_id             atom_type_scat
    _name.object_id               exponential_polynomial_upper_limit
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_atom_type_scat.gaussian_coefs

    _definition.id                '_atom_type_scat.Gaussian_coefs'
    _definition.update            2023-06-16
    _description.text
;
    The set of Gaussian coefficients for generating X-ray scattering factors:
    [ c, a_1, b_1, a_2, b_2, ... , a_N, b_N ].

    f(s; Z) = c + Sum[a~i~ * exp(-b~i~ * s^2^), i=1:N]

    where s = sin(θ)/λ, θ is the diffraction angle and λ is the wavelength
    of the incident radiation in angstroms.
;
    _name.category_id             atom_type_scat
    _name.object_id               Gaussian_coefs
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               List
    _type.dimension               '[]'
    _type.contents                Real
    _units.code                   unspecified

save_

save_atom_type_scat.gaussian_coefs_su

    _definition.id                '_atom_type_scat.Gaussian_coefs_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_type_scat.Gaussian_coefs.
;
    _name.category_id             atom_type_scat
    _name.object_id               Gaussian_coefs_su
    _name.linked_item_id          '_atom_type_scat.Gaussian_coefs'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               List
    _type.dimension               '[]'
    _type.contents                Real
    _units.code                   unspecified

save_

save_atom_type_scat.gaussian_lower_limit

    _definition.id                '_atom_type_scat.Gaussian_lower_limit'
    _definition.update            2023-04-09
    _description.text
;
    The inclusive lower limit of s for which the corresponding Gaussian
    coefficients are valid.

    See _atom_type_scat.Gaussian_coefs.
;
    _name.category_id             atom_type_scat
    _name.object_id               Gaussian_lower_limit
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_atom_type_scat.gaussian_upper_limit

    _definition.id                '_atom_type_scat.Gaussian_upper_limit'
    _definition.update            2023-04-09
    _description.text
;
    The exclusive upper limit of s for which the corresponding Gaussian
    coefficients are valid.

    See _atom_type_scat.Gaussian_coefs.
;
    _name.category_id             atom_type_scat
    _name.object_id               Gaussian_upper_limit
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_atom_type_scat.hi_ang_fox_c0

    _definition.id                '_atom_type_scat.hi_ang_Fox_c0'
    _name.category_id             atom_type_scat
    _name.object_id               hi_ang_Fox_c0

    _import.get
        [
         {'file':templ_attr.cif  'save':hi_ang_fox_coeffs}
         {'file':templ_enum.cif  'save':hi_ang_fox_c0}
        ]

save_

save_atom_type_scat.hi_ang_fox_c1

    _definition.id                '_atom_type_scat.hi_ang_Fox_c1'
    _name.category_id             atom_type_scat
    _name.object_id               hi_ang_Fox_c1

    _import.get
        [
         {'file':templ_attr.cif  'save':hi_ang_fox_coeffs}
         {'file':templ_enum.cif  'save':hi_ang_fox_c1}
        ]

save_

save_atom_type_scat.hi_ang_fox_c2

    _definition.id                '_atom_type_scat.hi_ang_Fox_c2'
    _name.category_id             atom_type_scat
    _name.object_id               hi_ang_Fox_c2

    _import.get
        [
         {'file':templ_attr.cif  'save':hi_ang_fox_coeffs}
         {'file':templ_enum.cif  'save':hi_ang_fox_c2}
        ]

save_

save_atom_type_scat.hi_ang_fox_c3

    _definition.id                '_atom_type_scat.hi_ang_Fox_c3'
    _name.category_id             atom_type_scat
    _name.object_id               hi_ang_Fox_c3

    _import.get
        [
         {'file':templ_attr.cif  'save':hi_ang_fox_coeffs}
         {'file':templ_enum.cif  'save':hi_ang_fox_c3}
        ]

save_

save_atom_type_scat.hi_ang_fox_coeffs

    _definition.id                '_atom_type_scat.hi_ang_Fox_coeffs'
    _definition.update            2023-06-16
    _description.text
;
    The set of Fox et al. coefficients for generating high-angle
    X-ray scattering factors: [ c0, c1, c2, c3 ]

    Ref: International Tables for Crystallography (2004). Vol. C,
         Table 6.1.1.5
;
    _name.category_id             atom_type_scat
    _name.object_id               hi_ang_Fox_coeffs
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               List
    _type.dimension               '[4]'
    _type.contents                Real
    _units.code                   unspecified
    _method.purpose               Evaluation
    _method.expression
;
     With t  as  atom_type_scat

    _atom_type_scat.hi_ang_Fox_coeffs  =
    [t.hi_ang_Fox_c0,t.hi_ang_Fox_c1,t.hi_ang_Fox_c2,t.hi_ang_Fox_c3]
;

save_

save_atom_type_scat.inv_mott_bethe_coefs

    _definition.id                '_atom_type_scat.inv_Mott_Bethe_coefs'
    _definition.update            2025-05-16
    _description.text
;
    The set of Gaussian coefficients for use in the inverse Mott-Bethe
    relationship for generating X-ray scattering factors:
    [ e, c_1, d_1, c_2, d_2, ... , c_N, d_N ].

    f(s; Z) =
    Z - 8π * a~0~ * s^2^ * {e + Sum[ c~i~ * exp(-d~i~ * s^2^), i=1:N]}

    where s = sin(θ)/λ, a~0~ is the Bohr radius, and Z is the atomic number.
    θ is the diffraction angle and λ is the wavelength of the incident
    radiation in angstroms.

    Ref: Thorkildsen, G. (2023). Acta Cryst. A79, 318–330.
         Mott, N. F. & Bragg, W. L. (1930). Proc. R. Soc. Lond. Ser. A,
         127, 658–665.
         Bethe, H. (1930). Ann. Phys. 397, 325–400.
;
    _name.category_id             atom_type_scat
    _name.object_id               inv_Mott_Bethe_coefs
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               List
    _type.dimension               '[]'
    _type.contents                Real
    _units.code                   unspecified

save_

save_atom_type_scat.inv_mott_bethe_coefs_su

    _definition.id                '_atom_type_scat.inv_Mott_Bethe_coefs_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _atom_type_scat.inv_Mott_Bethe_coefs.
;
    _name.category_id             atom_type_scat
    _name.object_id               inv_Mott_Bethe_coefs_su
    _name.linked_item_id          '_atom_type_scat.inv_Mott_Bethe_coefs'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               List
    _type.dimension               '[]'
    _type.contents                Real
    _units.code                   unspecified

save_

save_atom_type_scat.inv_mott_bethe_lower_limit

    _definition.id                '_atom_type_scat.inv_Mott_Bethe_lower_limit'
    _definition.update            2023-04-09
    _description.text
;
    The inclusive lower limit of s for which the corresponding Gaussian
    coefficients are valid.

    See _atom_type_scat.inv_Mott_Bethe_coefs.
;
    _name.category_id             atom_type_scat
    _name.object_id               inv_Mott_Bethe_lower_limit
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_atom_type_scat.inv_mott_bethe_upper_limit

    _definition.id                '_atom_type_scat.inv_Mott_Bethe_upper_limit'
    _definition.update            2023-04-09
    _description.text
;
    The exclusive upper limit of s for which the corresponding Gaussian
    coefficients are valid.

    See _atom_type_scat.inv_Mott_Bethe_coefs.
;
    _name.category_id             atom_type_scat
    _name.object_id               inv_Mott_Bethe_upper_limit
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   reciprocal_angstroms

save_

save_atom_type_scat.length_neutron

    _definition.id                '_atom_type_scat.length_neutron'

    loop_
      _alias.definition_id
         '_atom_type_scat_length_neutron'
         '_atom_type.scat_length_neutron'

    _definition.update            2012-11-20
    _description.text
;
    The bound coherent scattering length for the atom type at the
    isotopic composition used for the diffraction experiment.
;
    _name.category_id             atom_type_scat
    _name.object_id               length_neutron
    _type.purpose                 Number
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Real
    _units.code                   femtometres

save_

save_atom_type_scat.source

    _definition.id                '_atom_type_scat.source'

    loop_
      _alias.definition_id
         '_atom_type_scat_source'
         '_atom_type.scat_source'

    _definition.update            2012-11-20
    _description.text
;
    Reference to source of scattering factors used for this atom type.
;
    _name.category_id             atom_type_scat
    _name.object_id               source
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'International Tables Vol. IV Table 2.4.6B'

save_

save_atom_type_scat.symbol

    _definition.id                '_atom_type_scat.symbol'
    _alias.definition_id          '_atom_type_scat_symbol'
    _definition.update            2021-10-27
    _description.text
;
    The identity of the atom specie(s) representing this atom type.
    See _atom_type.symbol for further details.
;
    _name.category_id             atom_type_scat
    _name.object_id               symbol
    _name.linked_item_id          '_atom_type.symbol'
    _type.purpose                 Link
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word

save_

save_atom_type_scat.versus_stol_list

    _definition.id                '_atom_type_scat.versus_stol_list'

    loop_
      _definition_replaced.id
      _definition_replaced.by
         1                        '_atom_scat_versus_stol.atom_type'
         2                        '_atom_scat_versus_stol.stol_value'
         3                        '_atom_scat_versus_stol.scat_value'

    loop_
      _alias.definition_id
         '_atom_type_scat_versus_stol_list'
         '_atom_type.scat_versus_stol_list'

    _definition.update            2023-07-05
    _description.text
;
    Deprecated. Data items from the ATOM_SCAT_VERSUS_STOL category should be
    used instead of this item.

    A table of scattering factors as a function of sin(θ)/λ (sin theta over
    lambda, stol). This table should be well-commented to indicate the items
    present. Regularly formatted lists are strongly recommended.
;
    _name.category_id             atom_type_scat
    _name.object_id               versus_stol_list
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_REFINE

    _definition.id                REFINE
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-20
    _description.text
;
    The category of data items used to specify information about the
    refinement of the structural model.
;
    _name.category_id             STRUCTURE
    _name.object_id               REFINE

save_

save_refine.diffraction_theory

    _definition.id                '_refine.diffraction_theory'
    _definition.update            2024-05-15
    _description.text
;
    A code describing the approach to the calculation of the
    diffracted intensities. In the kinematical approximation,
    interactions of diffracted waves with matter are neglected, and
    integrated intensities of the Bragg reflections are proportional
    to the square of the modulus of the structure factor. In the
    dynamical calculation, interactions between diffracted waves are
    taken into account, and the proportionality of the intensities and
    the structure factors is not preserved.
;
    _name.category_id             refine
    _name.object_id               diffraction_theory
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Code
    loop_
      _enumeration_set.state
      _enumeration_set.detail
         dynamical
;
         Interactions between diffracted waves and matter are taken into
         account when calculating the amplitudes of the diffracted beams.
;
         kinematical
;
         Interactions between diffracted waves and matter are ignored
         when calculating the amplitudes of diffracted beams.
;

save_

save_refine.diffraction_theory_details

    _definition.id                '_refine.diffraction_theory_details'
    _definition.update            2024-12-02
    _description.text
;
    Details needed to characterize the approach to the calculation of the
    diffracted intensities, such as a description of the parameters that
    were refined dynamically.
;
    _name.category_id             refine
    _name.object_id               diffraction_theory_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_refine.special_details

    _definition.id                '_refine.special_details'

    loop_
      _alias.definition_id
         '_refine_special_details'
         '_refine.details'

    _definition.update            2012-11-20
    _description.text
;
    Details of the refinement not specified by other data items.
;
    _name.category_id             refine
    _name.object_id               special_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_REFINE_DIFF

    _definition.id                REFINE_DIFF
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2023-01-12
    _description.text
;
    The category of data items which specify the scattering density limits
    in a difference Fourier map after the structure has been refined. The
    RMS value is with respect to the arithmetic mean density, and is derived
    from summations over each grid point in the asymmetric unit of the cell.
;
    _name.category_id             REFINE
    _name.object_id               REFINE_DIFF

save_

save_refine_diff.density_max

    _definition.id                '_refine_diff.density_max'

    loop_
      _alias.definition_id
         '_refine_diff_density_max'
         '_refine.diff_density_max'

    _definition.update            2023-01-12
    _description.text
;
    Maximum density value in a difference Fourier map.
;
    _name.category_id             refine_diff
    _name.object_id               density_max
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            -100.0:
    _method.purpose               Definition
    _method.expression
;
    # Default units. Applicable to x-ray, electron and gamma radiation.
    _units.code = "electrons_per_angstrom_cubed"

    If (_diffrn_radiation.probe == "neutron")
        _units.code = "femtometres_per_angstrom_cubed"
;

save_

save_refine_diff.density_max_su

    _definition.id                '_refine_diff.density_max_su'

    loop_
      _alias.definition_id
         '_refine_diff_density_max_su'
         '_refine.diff_density_max_esd'

    _definition.update            2023-01-12
    _description.text
;
    Standard uncertainty of _refine_diff.density_max.
;
    _name.category_id             refine_diff
    _name.object_id               density_max_su
    _name.linked_item_id          '_refine_diff.density_max'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
    # Default units. Applicable to x-ray, electron and gamma radiation.
    _units.code = "electrons_per_angstrom_cubed"

    If (_diffrn_radiation.probe == "neutron")
        _units.code = "femtometres_per_angstrom_cubed"
;

save_

save_refine_diff.density_min

    _definition.id                '_refine_diff.density_min'

    loop_
      _alias.definition_id
         '_refine_diff_density_min'
         '_refine.diff_density_min'

    _definition.update            2023-01-12
    _description.text
;
    Minimum density value in a difference Fourier map.
;
    _name.category_id             refine_diff
    _name.object_id               density_min
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            :100.0
    _method.purpose               Definition
    _method.expression
;
    # Default units. Applicable to x-ray, electron and gamma radiation.
    _units.code = "electrons_per_angstrom_cubed"

    If (_diffrn_radiation.probe == "neutron")
        _units.code = "femtometres_per_angstrom_cubed"
;

save_

save_refine_diff.density_min_su

    _definition.id                '_refine_diff.density_min_su'

    loop_
      _alias.definition_id
         '_refine_diff_density_min_su'
         '_refine.diff_density_min_esd'

    _definition.update            2023-01-12
    _description.text
;
    Standard uncertainty of _refine_diff.density_min.
;
    _name.category_id             refine_diff
    _name.object_id               density_min_su
    _name.linked_item_id          '_refine_diff.density_min'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
    # Default units. Applicable to x-ray, electron and gamma radiation.
    _units.code = "electrons_per_angstrom_cubed"

    If (_diffrn_radiation.probe == "neutron")
        _units.code = "femtometres_per_angstrom_cubed"
;

save_

save_refine_diff.density_rms

    _definition.id                '_refine_diff.density_RMS'

    loop_
      _alias.definition_id
         '_refine_diff_density_RMS'
         '_refine.diff_density_RMS'

    _definition.update            2023-01-12
    _description.text
;
    Root mean square density value in a difference Fourier map.
    This value is measured with respect to the arithmetic mean
    density and is derived from summations over each grid point
    in the asymmetric unit of the cell. This quantity is useful
    for assessing the significance of *_min and *_max values,
    and also for defining suitable contour levels.
;
    _name.category_id             refine_diff
    _name.object_id               density_RMS
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            -100.0:100.0
    _method.purpose               Definition
    _method.expression
;
    # Default units. Applicable to x-ray, electron and gamma radiation.
    _units.code = "electrons_per_angstrom_cubed"

    If (_diffrn_radiation.probe == "neutron")
        _units.code = "femtometres_per_angstrom_cubed"
;

save_

save_refine_diff.density_rms_su

    _definition.id                '_refine_diff.density_RMS_su'

    loop_
      _alias.definition_id
         '_refine_diff_density_RMS_su'
         '_refine.diff_density_RMS_esd'

    _definition.update            2023-01-12
    _description.text
;
    Standard uncertainty of _refine_diff.density_RMS.
;
    _name.category_id             refine_diff
    _name.object_id               density_RMS_su
    _name.linked_item_id          '_refine_diff.density_RMS'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
    # Default units. Applicable to x-ray, electron and gamma radiation.
    _units.code = "electrons_per_angstrom_cubed"

    If (_diffrn_radiation.probe == "neutron")
        _units.code = "femtometres_per_angstrom_cubed"
;

save_

save_refine_diff.potential_max

    _definition.id                '_refine_diff.potential_max'
    _definition.update            2024-12-06
    _description.text
;
    Maximum electrostatic potential value in a difference Fourier map.
;
    _name.category_id             refine_diff
    _name.object_id               potential_max
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   electrons_per_angstrom

save_

save_refine_diff.potential_max_su

    _definition.id                '_refine_diff.potential_max_su'
    _definition.update            2024-12-06
    _description.text
;
    Standard uncertainty of _refine_diff.potential_max.
;
    _name.category_id             refine_diff
    _name.object_id               potential_max_su
    _name.linked_item_id          '_refine_diff.potential_max'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Single
    _type.contents                Real
    _units.code                   electrons_per_angstrom

save_

save_refine_diff.potential_min

    _definition.id                '_refine_diff.potential_min'
    _definition.update            2024-12-06
    _description.text
;
    Minimum electrostatic potential value in a difference Fourier map.
;
    _name.category_id             refine_diff
    _name.object_id               potential_min
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   electrons_per_angstrom

save_

save_refine_diff.potential_min_su

    _definition.id                '_refine_diff.potential_min_su'
    _definition.update            2024-12-06
    _description.text
;
    Standard uncertainty of _refine_diff.potential_min.
;
    _name.category_id             refine_diff
    _name.object_id               potential_min_su
    _name.linked_item_id          '_refine_diff.potential_min'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Single
    _type.contents                Real
    _units.code                   electrons_per_angstrom

save_

save_refine_diff.potential_rms

    _definition.id                '_refine_diff.potential_RMS'
    _definition.update            2024-12-06
    _description.text
;
    Root mean square electrostatic potential value in a difference Fourier map.
    This value is measured with respect to the arithmetic mean
    potential and is derived from summations over each grid point
    in the asymmetric unit of the cell. This quantity is useful
    for assessing the significance of *_min and *_max values,
    and also for defining suitable contour levels.
;
    _name.category_id             refine_diff
    _name.object_id               potential_RMS
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   electrons_per_angstrom

save_

save_refine_diff.potential_rms_su

    _definition.id                '_refine_diff.potential_RMS_su'
    _definition.update            2024-12-06
    _description.text
;
    Standard uncertainty of _refine_diff.potential_RMS.
;
    _name.category_id             refine_diff
    _name.object_id               potential_RMS_su
    _name.linked_item_id          '_refine_diff.potential_RMS'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Single
    _type.contents                Real
    _units.code                   electrons_per_angstrom

save_

save_REFINE_LS

    _definition.id                REFINE_LS
    _definition.scope             Category
    _definition.class             Set
    _definition.update            2012-11-20
    _description.text
;
    The category of data items used to specify information about the
    refinement of the structural model.
;
    _name.category_id             REFINE
    _name.object_id               REFINE_LS

save_

save_refine_ls.abs_structure_details

    _definition.id                '_refine_ls.abs_structure_details'

    loop_
      _alias.definition_id
         '_refine_ls_abs_structure_details'
         '_refine.ls_abs_structure_details'

    _definition.update            2012-11-20
    _description.text
;
    Details on the absolute structure and how it was determined.
;
    _name.category_id             refine_ls
    _name.object_id               abs_structure_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_refine_ls.abs_structure_flack

    _definition.id                '_refine_ls.abs_structure_Flack'

    loop_
      _alias.definition_id
         '_refine_ls_abs_structure_Flack'
         '_refine.ls_abs_structure_Flack'

    _definition.update            2021-08-18
    _description.text
;
    The measure of absolute structure as defined by Flack (1983).
    For centrosymmetric structures, the only permitted value, if
    the data item is present, is 'inapplicable', represented by '.' .
    For noncentrosymmetric structures, the value must lie in the
    99.97% Gaussian confidence interval  -3u =< x =< 1 + 3u and a
    standard uncertainty (e.s.d.) u must be supplied. The
    _enumeration.range of 0.0:1.0 is correctly interpreted as
    meaning (0.0 - 3u) =< x =< (1.0 + 3u).
    Ref: Flack, H. D. (1983). Acta Cryst. A39, 876-881.
;
    _name.category_id             refine_ls
    _name.object_id               abs_structure_Flack
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:1.0
    _units.code                   none

save_

save_refine_ls.abs_structure_flack_su

    _definition.id                '_refine_ls.abs_structure_Flack_su'

    loop_
      _alias.definition_id
         '_refine_ls_abs_structure_Flack_su'
         '_refine.ls_abs_structure_Flack_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _refine_ls.abs_structure_Flack.
;
    _name.category_id             refine_ls
    _name.object_id               abs_structure_Flack_su
    _name.linked_item_id          '_refine_ls.abs_structure_Flack'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refine_ls.abs_structure_rogers

    _definition.id                '_refine_ls.abs_structure_Rogers'

    loop_
      _alias.definition_id
         '_refine_ls_abs_structure_Rogers'
         '_refine.ls_abs_structure_Rogers'

    _definition.update            2012-11-20
    _description.text
;
    The measure of absolute structure as defined by Rogers (1981).
    The value must lie in the 99.97% Gaussian confidence interval
    -1 -3u =< η =< 1 + 3u and a standard uncertainty (e.s.d.) u must
    be supplied. The _enumeration.range of -1.0:1.0 is correctly
    interpreted as meaning (-1.0 - 3u) =< η =< (1.0 + 3u).
    Ref: Rogers, D. (1981). Acta Cryst. A37, 734-741.
;
    _name.category_id             refine_ls
    _name.object_id               abs_structure_Rogers
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            -1.0:1.0
    _units.code                   none

save_

save_refine_ls.abs_structure_rogers_su

    _definition.id                '_refine_ls.abs_structure_Rogers_su'

    loop_
      _alias.definition_id
         '_refine_ls_abs_structure_Rogers_su'
         '_refine.ls_abs_structure_Rogers_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _refine_ls.abs_structure_Rogers.
;
    _name.category_id             refine_ls
    _name.object_id               abs_structure_Rogers_su
    _name.linked_item_id          '_refine_ls.abs_structure_Rogers'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refine_ls.abs_structure_z-score

    _definition.id                '_refine_ls.abs_structure_z-score'

    _definition.update            2024-05-03
    _description.text
;
    The z-score is a measure of confidence in an absolute structure
    determination as described by Klar et al. (2023), based on the
    method of Le Page et al. (1990). For centrosymmetric structures,
    the only permitted value, if the data item is present, is
    'inapplicable', represented by '.' .
    Ref:  Klar, P. B. et al. (2023). Nature Chem. 15, 848-855.
          Le Page, Y., Gabe, E. J. & Gainsford, G. J. (1990). J. Appl. Cryst.
          23, 406-411.
;
    _name.category_id             refine_ls
    _name.object_id               abs_structure_z_score
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _units.code                   none

save_

save_refine_ls.d_res_high

    _definition.id                '_refine_ls.d_res_high'

    loop_
      _alias.definition_id
         '_refine_ls_d_res_high'
         '_refine.ls_d_res_high'

    _definition.update            2021-03-03
    _description.text
;
    Highest resolution for the reflections used in refinement.
    This corresponds to the smallest interplanar d value.
;
    _name.category_id             refine_ls
    _name.object_id               d_res_high
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_refine_ls.d_res_low

    _definition.id                '_refine_ls.d_res_low'

    loop_
      _alias.definition_id
         '_refine_ls_d_res_low'
         '_refine.ls_d_res_low'

    _definition.update            2021-03-03
    _description.text
;
    Lowest resolution for the reflections used in refinement.
    This corresponds to the largest interplanar d value.
;
    _name.category_id             refine_ls
    _name.object_id               d_res_low
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_refine_ls.extinction_coef

    _definition.id                '_refine_ls.extinction_coef'

    loop_
      _alias.definition_id
         '_refine_ls_extinction_coef'
         '_refine.ls_extinction_coef'

    _definition.update            2012-11-20
    _description.text
;
    The extinction coefficient used to calculate the correction
    factor applied to the structure-factor data. The nature of the
    extinction coefficient is given in the definitions of
    _refine_ls.extinction_expression and _refine_ls.extinction_method.
    For the 'Zachariasen' method it is the r* value; for the
    'Becker-Coppens type 1 isotropic' method it is the 'g' value.
    For 'Becker-Coppens type 2 isotropic' corrections it is
    the 'rho' value. Note that the magnitude of these values is
    usually of the order of 10000.
    Ref:  Becker, P. J. & Coppens, P. (1974). Acta Cryst. A30,
          129-147, 148-153.
          Zachariasen, W. H. (1967). Acta Cryst. 23, 558-564.
          Larson, A. C. (1967). Acta Cryst. 23, 664-665.
;
    _name.category_id             refine_ls
    _name.object_id               extinction_coef
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none
    _description_example.case     3472(52)
    _description_example.detail   'Zachariasen coefficient r* = 0.347(5)e+04.'

save_

save_refine_ls.extinction_coef_su

    _definition.id                '_refine_ls.extinction_coef_su'

    loop_
      _alias.definition_id
         '_refine_ls_extinction_coef_su'
         '_refine.ls_extinction_coef_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _refine_ls.extinction_coef.
;
    _name.category_id             refine_ls
    _name.object_id               extinction_coef_su
    _name.linked_item_id          '_refine_ls.extinction_coef'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refine_ls.extinction_expression

    _definition.id                '_refine_ls.extinction_expression'

    loop_
      _alias.definition_id
         '_refine_ls_extinction_expression'
         '_refine.ls_extinction_expression'

    _definition.update            2023-01-13
    _description.text
;
    Description of or reference to the extinction-correction equation
    used to apply the data item  _refine_ls.extinction_coef. This
    information should be sufficient to reproduce the extinction-correction
    factors applied to the structure factors.
;
    _name.category_id             refine_ls
    _name.object_id               extinction_expression
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case     'Larson approach'
    _description_example.detail
;
    Larson, A. C. (1970). "Crystallographic Computing", edited by
    F. R. Ahmed. Eq. (22) p. 292.  Copenhagen: Munksgaard.
;

save_

save_refine_ls.extinction_method

    _definition.id                '_refine_ls.extinction_method'

    loop_
      _alias.definition_id
         '_refine_ls_extinction_method'
         '_refine.ls_extinction_method'

    _definition.update            2019-01-09
    _description.text
;
    Description of the extinction correction method applied with the
    data item _refine_ls.extinction_coef. This description should
    include information about the correction method, either 'Becker-
    Coppens' or 'Zachariasen'. The latter is sometimes referred to as
    the 'Larson' method even though it employs Zachariasen's formula.

    The Becker-Coppens procedure is referred to as 'type 1' when
    correcting secondary extinction dominated by the mosaic spread;
    as 'type 2' when secondary extinction is dominated by particle
    size and includes a primary extinction component; and as 'mixed'
    when there are types 1 and 2.

    For the Becker-Coppens method it is also necessary to set the
    mosaic distribution as either 'Gaussian' or 'Lorentzian'; and the
    nature of the extinction as 'isotropic' or 'anisotropic'. Note
    that if either the 'mixed' or 'anisotropic' corrections are applied
    the multiple coefficients cannot be contained in the
    _refine_ls.extinction_coef and must be listed in _refine.special_details.

    Ref:  Becker, P. J. & Coppens, P. (1974). Acta Cryst. A30, 129-153.
          Zachariasen, W. H. (1967). Acta Cryst. 23, 558-564.
          Larson, A. C. (1967). Acta Cryst. 23, 664-665.
;
    _name.category_id             refine_ls
    _name.object_id               extinction_method
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
         'Zachariasen'
         'B-C type 2 Gaussian isotropic'

save_

save_refine_ls.f_calc_details

    _definition.id                '_refine_ls.F_calc_details'
    _alias.definition_id          '_refine_ls_F_calc_details'
    _definition.update            2023-01-13
    _description.text
;
    Details concerning the evaluation of the structure factors
    using the expression given in _refine_ls.F_calc_formula.
;
    _name.category_id             refine_ls
    _name.object_id               F_calc_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

    loop_
      _description_example.case
;
       Gaussian integration using 16 points
;
;
       Bessel functions expansion up to 5th order. Estimated
       accuracy of Bessel function better than 0.001 electrons
;

save_

save_refine_ls.f_calc_formula

    _definition.id                '_refine_ls.F_calc_formula'
    _alias.definition_id          '_refine_ls_F_calc_formula'
    _definition.update            2013-01-23
    _description.text
;
    Analytical expression used to calculate the structure factors.
;
    _name.category_id             refine_ls
    _name.object_id               F_calc_formula
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_refine_ls.f_calc_precision

    _definition.id                '_refine_ls.F_calc_precision'
    _alias.definition_id          '_refine_ls_F_calc_precision'
    _definition.update            2023-05-14
    _description.text
;
    Estimate of the precision resulting from the numerical
    approximations made during the evaluation of the structure
    factors using the expression _refine_ls.F_calc_formula
    following the method outlined in _refine_ls.F_calc_details.
;
    _name.category_id             refine_ls
    _name.object_id               F_calc_precision
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refine_ls.f_calc_precision_su

    _definition.id                '_refine_ls.F_calc_precision_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refine_ls.F_calc_precision.
;
    _name.category_id             refine_ls
    _name.object_id               F_calc_precision_su
    _name.linked_item_id          '_refine_ls.F_calc_precision'

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

    _method.purpose               Definition
    _method.expression
;
         If (_diffrn_radiation.probe == "neutron")  _units.code =  "femtometres"
    Else If (_diffrn_radiation.probe == "electron") _units.code =  "volts"
    Else                                            _units.code =  "electrons"
;

save_

save_refine_ls.goodness_of_fit_all

    _definition.id                '_refine_ls.goodness_of_fit_all'

    loop_
      _alias.definition_id
         '_refine_ls_goodness_of_fit_all'
         '_refine.ls_goodness_of_fit_all'

    _definition.update            2012-11-20
    _description.text
;
    Least-squares goodness-of-fit parameter S for all reflections after
    the final cycle of refinement. Ideally, account should be taken of
    parameters restrained in the least squares.

             {  sum { w [ Y(meas) - Y(calc) ]^2^ }  }^1/2^
         S = { ------------------------------------ }
             {            Nref - Nparam             }

         Y(meas) = the measured coefficients
                   (see _refine_ls.structure_factor_coef)
         Y(calc) = the calculated coefficients
                   (see _refine_ls.structure_factor_coef)
         w       = the least-squares reflection weight
                   [1/(u^2^), where u = the standard uncertainty]
         Nref   = the number of reflections used in the refinement
         Nparam = the number of refined parameters
         and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               goodness_of_fit_all
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.goodness_of_fit_all_su

    _definition.id                '_refine_ls.goodness_of_fit_all_su'

    loop_
      _alias.definition_id
         '_refine_ls_goodness_of_fit_all_su'
         '_refine.ls_goodness_of_fit_all_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _refine_ls.goodness_of_fit_all.
;
    _name.category_id             refine_ls
    _name.object_id               goodness_of_fit_all_su
    _name.linked_item_id          '_refine_ls.goodness_of_fit_all'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refine_ls.goodness_of_fit_gt

    _definition.id                '_refine_ls.goodness_of_fit_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_refine_ls_goodness_of_fit_gt'                             .
         '_refine_ls_goodness_of_fit_obs'                            1999-03-24
         '_refine.ls_goodness_of_fit_obs'                            .
         '_refine.ls_goodness_of_fit_gt'                             .

    _definition.update            2024-02-14
    _description.text
;
    Least-squares goodness-of-fit parameter S for significantly
    intense reflections, (i.e. 'observed' reflections with values
    greater than the threshold set in _reflns.threshold_expression),
    after the final cycle. Ideally, account should be taken of
    parameters restrained in the least-squares refinement.

             {  sum { w [ Y(meas_gt) - Y(calc) ]^2^ }  }^1/2^
         S = { --------------------------------------- }
             {           Nref - Nparam                 }

         Y(meas_gt)  = the 'observed' coefficients
                   (see _refine_ls.structure_factor_coef)
         Y(calc)     = the calculated coefficients
                   (see _refine_ls.structure_factor_coef)
         w       = the least-squares reflection weight
                   [1/(u^2^), where u = the standard uncertainty]
         Nref   = the number of reflections used in the refinement
         Nparam = the number of refined parameters
         and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               goodness_of_fit_gt
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.goodness_of_fit_gt_su

    _definition.id                '_refine_ls.goodness_of_fit_gt_su'

    loop_
      _alias.definition_id
         '_refine_ls_goodness_of_fit_gt_su'
         '_refine.ls_goodness_of_fit_gt_esd'
         '_refine.ls_goodness_of_fit_obs_esd'

    _definition.update            2021-03-03
    _description.text
;
    Standard uncertainty of _refine_ls.goodness_of_fit_gt.
;
    _name.category_id             refine_ls
    _name.object_id               goodness_of_fit_gt_su
    _name.linked_item_id          '_refine_ls.goodness_of_fit_gt'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refine_ls.goodness_of_fit_ref

    _definition.id                '_refine_ls.goodness_of_fit_ref'

    loop_
      _alias.definition_id
         '_refine_ls_goodness_of_fit_ref'
         '_refine.ls_goodness_of_fit_ref'

    _definition.update            2012-11-20
    _description.text
;
    Least-squares goodness-of-fit parameter S for those reflections
    included in the final cycle of refinement. Account should be
    taken of restrained parameters.

             {  sum { w [ Y(meas) - Y(calc) ]^2^ }  }^1/2^
         S = { ------------------------------------ }
             {            Nref - Nparam             }

         Y(meas) = the measured coefficients
                   (see _refine_ls.structure_factor_coef)
         Y(calc) = the calculated coefficients
                   (see _refine_ls.structure_factor_coef)
         w       = the least-squares reflection weight
                   [1/(u^2^), where u = the standard uncertainty]
         Nref   = the number of reflections used in the refinement
         Nparam = the number of refined parameters
         and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               goodness_of_fit_ref
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.goodness_of_fit_ref_su

    _definition.id                '_refine_ls.goodness_of_fit_ref_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refine_ls.goodness_of_fit_ref.
;
    _name.category_id             refine_ls
    _name.object_id               goodness_of_fit_ref_su
    _name.linked_item_id          '_refine_ls.goodness_of_fit_ref'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refine_ls.hydrogen_treatment

    _definition.id                '_refine_ls.hydrogen_treatment'

    loop_
      _alias.definition_id
         '_refine_ls_hydrogen_treatment'
         '_refine.ls_hydrogen_treatment'

    _definition.update            2012-11-20
    _description.text
;
    Code identifying how hydrogen atoms were treated in the refinement.
;
    _name.category_id             refine_ls
    _name.object_id               hydrogen_treatment
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         refall
;
         Refined all H-atom parameters.
;
         refxyz
;
         Refined H-atom coordinates only.
;
         refU
;
         Refined H-atom Us only.
;
         noref
;
         No refinement of H-atom parameters.
;
         constr
;
         H-atom parameters constrained.
;
         hetero
;
         H-atom parameters constrained for H on C, all H-atom parameters
         refined for H on heteroatoms.
;
         heteroxyz
;
         H-atom parameters constrained for H on C, refined H-atom coordinates
         only for H on heteroatoms.
;
         heteroU
;
         H-atom parameters constrained for H on C, refined H-atom U's only for
         H on heteroatoms.
;
         heteronoref
;
         H-atom parameters constrained for H on C, no refinement of H-atom
         parameters for H on heteroatoms.
;
         hetero-mixed
;
         H-atom parameters constrained for H on C and some heteroatoms, all
         H-atom parameters refined for H on remaining heteroatoms.
;
         heteroxyz-mixed
;
         H-atom parameters constrained for H on C and some heteroatoms, refined
         H-atom coordinates only for H on remaining heteroatoms.
;
         heteroU-mixed
;
         H-atom parameters constrained for H on C and some heteroatoms, refined
         H-atom U's only for H on remaining heteroatoms.
;
         heteronoref-mixed
;
         H-atom parameters constrained for H on C and some heteroatoms, no
         refinement of H-atom parameters for H on remaining heteroatoms.
;
         mixed
;
         Some constrained, some independent.
;
         undef
;
         H-atom parameters not defined.
;

save_

save_refine_ls.matrix_type

    _definition.id                '_refine_ls.matrix_type'

    loop_
      _alias.definition_id
         '_refine_ls_matrix_type'
         '_refine.ls_matrix_type'

    _definition.update            2012-11-20
    _description.text
;
    Code identifying the matrix type used for least-squares derivatives.
;
    _name.category_id             refine_ls
    _name.object_id               matrix_type
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         full                     'Full.'
         fullcycle                'Full with fixed elements per cycle.'
         atomblock                'Block diagonal per atom.'
         userblock                'User-defined blocks.'
         diagonal                 'Diagonal elements only.'
         sparse                   'Selected elements only.'

save_

save_refine_ls.number_constraints

    _definition.id                '_refine_ls.number_constraints'

    loop_
      _alias.definition_id
         '_refine_ls_number_constraints'
         '_refine.ls_number_constraints'

    _definition.update            2023-01-13
    _description.text
;
    Number of constrained (non-refined or dependent) parameters
    in the least-squares process. These may be due to symmetry or any
    other constraint process (e.g. rigid-body refinement). See also
    _atom_site.constraints and _atom_site.refinement_flags_*. A general
    description of constraints may appear in _refine.special_details.
;
    _name.category_id             refine_ls
    _name.object_id               number_constraints
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_refine_ls.number_parameters

    _definition.id                '_refine_ls.number_parameters'

    loop_
      _alias.definition_id
         '_refine_ls_number_parameters'
         '_refine.ls_number_parameters'

    _definition.update            2021-03-01
    _description.text
;
    Number of parameters refined in the least-squares process. If
    possible this number should include the restrained parameters.
    The restrained parameters are distinct from the constrained
    parameters (where one or more parameters are linearly dependent
    on the refined value of another).  Least-squares restraints
    often depend on geometry or energy considerations and this
    makes their direct contribution to this number, and to the
    goodness-of-fit calculation, difficult to assess.
;
    _name.category_id             refine_ls
    _name.object_id               number_parameters
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_refine_ls.number_reflns

    _definition.id                '_refine_ls.number_reflns'

    loop_
      _alias.definition_id
         '_refine_ls_number_reflns'
         '_refine.ls_number_reflns_all'

    _definition.update            2021-03-01
    _description.text
;
    Number of unique reflections used in the least-squares refinement.
;
    _name.category_id             refine_ls
    _name.object_id               number_reflns
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_refine_ls.number_reflns_gt

    _definition.id                '_refine_ls.number_reflns_gt'

    loop_
      _alias.definition_id
         '_refine_ls_number_reflns_gt'
         '_refine.ls_number_reflns_obs'

    _definition.update            2021-03-01
    _description.text
;
    The number of reflections that satisfy the resolution limits
    established by _refine_ls.d_res_high and _refine_ls.d_res_low
    and the observation limit established by _reflns.threshold_expression.
;
    _name.category_id             refine_ls
    _name.object_id               number_reflns_gt
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:
    _units.code                   none

save_

save_refine_ls.number_restraints

    _definition.id                '_refine_ls.number_restraints'

    loop_
      _alias.definition_id
         '_refine_ls_number_restraints'
         '_refine.ls_number_restraints'

    _definition.update            2023-01-13
    _description.text
;
    Number of restrained parameters in the least-squares refinement. These
    parameters do not directly dependent on another refined parameter. Often
    restrained parameters involve geometry or energy dependencies. See also
    _atom_site.constraints and _atom_site.refinement_flags_*. A description
    of refinement constraints may appear in _refine.special_details.
;
    _name.category_id             refine_ls
    _name.object_id               number_restraints
    _type.purpose                 Number
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            0:
    _units.code                   none

save_

save_refine_ls.r_factor_all

    _definition.id                '_refine_ls.R_factor_all'

    loop_
      _alias.definition_id
         '_refine_ls_R_factor_all'
         '_refine.ls_R_factor_all'

    _definition.update            2014-04-17
    _description.text
;
    Residual factor for all reflections satisfying the resolution limits
    specified by _refine_ls.d_res_high and _refine_ls.d_res_low. This is
    the conventional R factor. See also wR factor definitions.

                  sum | F(meas) - F(calc) |
              R = ------------------------
                        sum | F(meas) |

              F(meas) = the measured structure-factor amplitudes
              F(calc) = the calculated structure-factor amplitudes
              and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               R_factor_all
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    sumFdiff  =   0.
    sumFmeas  =   0.
    Loop r  as  refln  {
                  sumFdiff  +=   Abs(r.F_calc - r.F_meas)
                  sumFmeas  +=   Abs(r.F_meas)
                       }
        _refine_ls.R_factor_all  =   sumFdiff / sumFmeas
;

save_

save_refine_ls.r_factor_gt

    _definition.id                '_refine_ls.R_factor_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_refine_ls_R_factor_obs'                                   1999-03-24
         '_refine_ls_R_factor_gt'                                    .
         '_refine.ls_R_factor_obs'                                   .
         '_refine.ls_R_factor_gt'                                    .

    _definition.update            2024-02-14
    _description.text
;
    Residual factor for the reflections judged significantly intense
    (see _reflns.number_gt and _reflns.threshold_expression) and included
    in the refinement. The reflections also satisfy the resolution limits
    specified by _refine_ls.d_res_high and _refine_ls.d_res_low. This is
    the conventional R factor.

                  sum | F(meas_gt) - F(calc) |
              R = -----------------------------
                        sum | F(meas_gt) |

              F(meas_gt) = the 'observed' structure-factor amplitudes
              F(calc)    = the calculated structure-factor amplitudes
              and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               R_factor_gt
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.r_fsqd_factor

    _definition.id                '_refine_ls.R_Fsqd_factor'

    loop_
      _alias.definition_id
         '_refine_ls_R_Fsqd_factor'
         '_refine.ls_R_Fsqd_factor_obs'

    _definition.update            2025-06-18
    _description.text
;
    Residual factor R(Fsqd), calculated on the squared amplitudes of the
    measured and calculated structure factors, for significantly intense
    reflections (satisfying _reflns.threshold_expression) and included in
    the refinement. The reflections also satisfy the resolution limits
    specified by _refine_ls.d_res_high and _refine_ls.d_res_low.

                         sum | F(meas_gt)^2^ - F(calc)^2^ |
              R(Fsqd) = ------------------------------------
                                 sum F(meas_gt)^2^

              F(meas_gt)^2^ = squares of the 'observed' structure-factor
                              amplitudes
              F(calc)^2^    = squares of the calculated structure-factor
                              amplitudes
              and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               R_Fsqd_factor
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.r_i_factor

    _definition.id                '_refine_ls.R_I_factor'

    loop_
      _alias.definition_id
         '_refine_ls_R_I_factor'
         '_refine.ls_R_I_factor_obs'

    _definition.update            2012-11-20
    _description.text
;
    Residual factor R(I) for significantly intense reflections (satisfying
    _reflns.threshold_expression) and included in the refinement. This is
    most often calculated in Rietveld refinements of powder data, where it
    is referred to as R~B~ or R~Bragg~.

                      sum | I(meas_gt) - I(calc) |
              R(I) =  -----------------------------
                             sum | I(meas_gt) |

              I(meas_gt) = the net 'observed' intensities
              I(calc)    = the net calculated intensities
              and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               R_I_factor
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.restrained_s_all

    _definition.id                '_refine_ls.restrained_S_all'

    loop_
      _alias.definition_id
         '_refine_ls_restrained_S_all'
         '_refine.ls_restrained_S_all'

    _definition.update            2012-11-20
    _description.text
;
    Least-squares goodness-of-fit parameter S' for all reflections after
    the final cycle of least squares. This parameter explicitly includes
    the restraints applied in the least-squares process. See also
    _refine_ls.goodness_of_fit_all definition.

           {sum { w [ Y(meas) - Y(calc) ]^2^ }                  }^1/2^
           {         + sum~r~ { w~r~ [ P(calc) - P(targ) ]^2^ } }
      S' = { -------------------------------------------------- }
           {            N~ref~ + N~restr~ - N~param~            }

              Y(meas)  = the measured coefficients
                         (see _refine_ls.structure_factor_coef)
              Y(calc)  = the calculated coefficients
                         (see _refine_ls.structure_factor_coef)
              w        = the least-squares reflection weight
                         [1/square of standard uncertainty (e.s.d.)]
              P(calc)  = the calculated restraint values
              P(targ)  = the target restraint values
              w~r~     = the restraint weight

              N~ref~   = the number of reflections used in the refinement
                       (see _refine_ls.number_reflns)
              N~restr~ = the number of restraints
                       (see _refine_ls.number_restraints)
              N~param~ = the number of refined parameters
                       (see _refine_ls.number_parameters)

              sum     is taken over the specified reflections
              sum~r~  is taken over the restraints.
;
    _name.category_id             refine_ls
    _name.object_id               restrained_S_all
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.restrained_s_all_su

    _definition.id                '_refine_ls.restrained_S_all_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refine_ls.restrained_S_all.
;
    _name.category_id             refine_ls
    _name.object_id               restrained_S_all_su
    _name.linked_item_id          '_refine_ls.restrained_S_all'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refine_ls.restrained_s_gt

    _definition.id                '_refine_ls.restrained_S_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_refine_ls_restrained_S_obs'                               1999-03-24
         '_refine_ls_restrained_S_gt'                                .
         '_refine.ls_restrained_S_obs'                               .

    _definition.update            2024-02-14
    _description.text
;
    Least-squares goodness-of-fit parameter S' for significantly intense
    reflections (satisfying _reflns.threshold_expression) after the final
    cycle of least squares. This parameter explicitly includes the restraints
    applied. The expression for S' is given in _refine_ls.restrained_S_all.

           {sum { w [ Y(meas_gt) - Y(calc) ]^2^ }               }^1/2^
           {         + sum~r~ { w~r~ [ P(calc) - P(targ) ]^2^ } }
      S' = { -------------------------------------------------- }
           {            N~ref~ + N~restr~ - N~param~            }

              Y(meas_gt) = the 'observed' coefficients
                         (see _refine_ls.structure_factor_coef)
              Y(calc)    = the calculated coefficients
                         (see _refine_ls.structure_factor_coef)
              w        = the least-squares reflection weight
                         [1/square of standard uncertainty (e.s.d.)]
              P(calc)  = the calculated restraint values
              P(targ)  = the target restraint values
              w~r~     = the restraint weight

              N~ref~   = the number of reflections used in the refinement
                       (see _refine_ls.number_reflns)
              N~restr~ = the number of restraints
                       (see _refine_ls.number_restraints)
              N~param~ = the number of refined parameters
                       (see _refine_ls.number_parameters)

              sum     is taken over the specified reflections
              sum~r~  is taken over the restraints.
;
    _name.category_id             refine_ls
    _name.object_id               restrained_S_gt
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.restrained_s_gt_su

    _definition.id                '_refine_ls.restrained_S_gt_su'
    _definition.update            2023-07-01
    _description.text
;
    Standard uncertainty of _refine_ls.restrained_S_gt.
;
    _name.category_id             refine_ls
    _name.object_id               restrained_S_gt_su
    _name.linked_item_id          '_refine_ls.restrained_S_gt'
    _units.code                   none

    _import.get                   [{'file':templ_attr.cif  'save':general_su}]

save_

save_refine_ls.sample_shape_details

    _definition.id                '_refine_ls.sample_shape_details'
    _definition.update            2024-07-25
    _description.text
;
    Additional details describing the sample thickness when calculated
    during dynamical refinement where this cannot be defined completely by
    the formula given in _refine_ls.sample_shape_expression.
    Ref: Palatinus, L., Petricek, V. & Correa, C. A. (2015). Acta
         Cryst. A71, 235-244.
;
    _name.category_id             refine_ls
    _name.object_id               sample_shape_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text

save_

save_refine_ls.sample_shape_expression

    _definition.id                '_refine_ls.sample_shape_expression'
    _definition.update            2024-07-25
    _description.text
;
    Formula for the sample thickness distribution when the sample
    thickness is considered during dynamical refinement.
    Ref: Palatinus, L., Petricek, V. & Correa, C. A. (2015). Acta
         Cryst. A71, 235-244.
;
    _name.category_id             refine_ls
    _name.object_id               sample_shape_expression
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
;
    F(𝜏) = 1 - ( 1 - 𝜏^2^)^1/2^
;
    _description_example.detail
;
    The cumulative distribution function in terms of the reduced thickness 𝜏
    of a sample treated as a cylinder. 𝜏 = t/t~m~, where t is the thickness
    at the point illuminated and t~m~ the maximum thickness of the cylinder
    (i.e. its diameter).
;

save_

save_refine_ls.sample_thickness

    _definition.id                '_refine_ls.sample_thickness'
    _definition.update            2024-07-08
    _description.text
;
    The refined sample thickness as determined by dynamical refinement.
    Ref: Palatinus, L., Petricek, V. & Correa, C. A. (2015). Acta
         Cryst. A71, 235-244.
;
    _name.category_id             refine_ls
    _name.object_id               sample_thickness
    _type.purpose                 Measurand
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.:
    _units.code                   nanometres
    _description_example.case     35(2)

save_

save_refine_ls.sample_thickness_su

    _definition.id                '_refine_ls.sample_thickness_su'
    _definition.update            2024-07-08
    _description.text
;
    Standard uncertainty of _refine_ls.sample_thickness.
;
    _name.category_id             refine_ls
    _name.object_id               sample_thickness_su
    _name.linked_item_id          '_refine_ls.sample_thickness'
    _type.purpose                 SU
    _type.source                  Related
    _type.container               Single
    _type.contents                Real
    _units.code                   nanometres

save_

save_refine_ls.shift_over_su_max

    _definition.id                '_refine_ls.shift_over_su_max'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_refine_ls_shift_over_su_max'                              .
         '_refine.ls_shift_over_esd_max'                             .
         '_refine.ls_shift_over_su_max'                              .
         '_refine_ls_shift/su_max'                                   .
         '_refine_ls_shift/esd_max'                                  1999-03-24

    _definition.update            2024-02-14
    _description.text
;
    The largest ratio of the final least-squares parameter shift
    to the final standard uncertainty (s.u., formerly described
    as estimated standard deviation, e.s.d.).
;
    _name.category_id             refine_ls
    _name.object_id               shift_over_su_max
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.shift_over_su_max_lt

    _definition.id                '_refine_ls.shift_over_su_max_lt'

    loop_
      _alias.definition_id
         '_refine_ls_shift/su_max_lt'
         '_refine.ls_shift_over_su_max_lt'

    _definition.update            2012-12-11
    _description.text
;
    Upper limit for the largest ratio of the final l-s parameter
    shift divided by the final standard uncertainty. This item is
    used when the largest value of the shift divided by the final
    standard uncertainty is too small to measure.
;
    _name.category_id             refine_ls
    _name.object_id               shift_over_su_max_lt
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.shift_over_su_mean

    _definition.id                '_refine_ls.shift_over_su_mean'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_refine_ls_shift_over_su_mean'                             .
         '_refine.ls_shift_over_esd_mean'                            .
         '_refine.ls_shift_over_su_mean'                             .
         '_refine_ls_shift/su_mean'                                  .
         '_refine_ls_shift/esd_mean'                                 1999-03-24

    _definition.update            2024-02-14
    _description.text
;
    The average ratio of the final least-squares parameter shift
    to the final standard uncertainty (s.u., formerly described
    as estimated standard deviation, e.s.d.).
;
    _name.category_id             refine_ls
    _name.object_id               shift_over_su_mean
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.shift_over_su_mean_lt

    _definition.id                '_refine_ls.shift_over_su_mean_lt'

    loop_
      _alias.definition_id
         '_refine_ls_shift/su_mean_lt'
         '_refine.ls_shift_over_su_mean_lt'

    _definition.update            2012-12-11
    _description.text
;
    Upper limit for the average ratio of the final l-s parameter
    shift divided by the final standard uncertainty. This item is
    used when the average value of the shift divided by the final
    standard uncertainty is too small to measure.
;
    _name.category_id             refine_ls
    _name.object_id               shift_over_su_mean_lt
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.structure_factor_coef

    _definition.id                '_refine_ls.structure_factor_coef'

    loop_
      _alias.definition_id
         '_refine_ls_structure_factor_coef'
         '_refine.ls_structure_factor_coef'

    _definition.update            2012-11-20
    _description.text
;
    Structure-factor coefficient used in the least-squares process.
;
    _name.category_id             refine_ls
    _name.object_id               structure_factor_coef
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         F                        'Structure factor magnitude.'
         Fsqd                     'Structure factor squared.'
         Inet                     'Net intensity.'

save_

save_refine_ls.weighting_details

    _definition.id                '_refine_ls.weighting_details'

    loop_
      _alias.definition_id
         '_refine_ls_weighting_details'
         '_refine.ls_weighting_details'

    _definition.update            2012-11-20
    _description.text
;
    Description of special aspects of the weighting scheme used in the
    least-squares refinement. Used to describe the weighting when the
    value of _refine_ls.weighting_scheme is specified as 'calc'.
;
    _name.category_id             refine_ls
    _name.object_id               weighting_details
    _type.purpose                 Describe
    _type.source                  Recorded
    _type.container               Single
    _type.contents                Text
    _description_example.case
;
    Sigdel model of Konnert-Hendrickson:
      Sigdel = Afsig +  Bfsig*(sin(θ)/λ - 1/6)
      Afsig  = 22.0, Bfsig = 150.0 at the beginning of refinement.
      Afsig  = 16.0, Bfsig =  60.0 at the end of refinement.
;

save_

save_refine_ls.weighting_scheme

    _definition.id                '_refine_ls.weighting_scheme'

    loop_
      _alias.definition_id
         '_refine_ls_weighting_scheme'
         '_refine.ls_weighting_scheme'

    _definition.update            2012-11-20
    _description.text
;
    General description of the weighting scheme used in the least-squares.
    An enumerated code should be contained in this description.
;
    _name.category_id             refine_ls
    _name.object_id               weighting_scheme
    _type.purpose                 State
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Text

    loop_
      _enumeration_set.state
      _enumeration_set.detail
         sigma                    "Based on measured s.u.'s."
         unit                     "Unit or no weights applied."
         calc                     "Calculated weights applied."

save_

save_refine_ls.wr_factor_all

    _definition.id                '_refine_ls.wR_factor_all'

    loop_
      _alias.definition_id
         '_refine_ls_wR_factor_all'
         '_refine.ls_wR_factor_all'

    _definition.update            2012-11-20
    _description.text
;
    Weighted residual factors for all reflections satisfying the resolution
    limits specified by _refine_ls.d_res_high and _refine_ls.d_res_low.
    See also the _refine_ls.R_factor_all definition.

           ( sum w [ Y(meas) - Y(calc) ]^2^ )^1/2^
      wR = ( ------------------------------ )
           (         sum w Y(meas)^2^       )

      Y(meas) = the measured   amplitude _refine_ls.structure_factor_coef
      Y(calc) = the calculated amplitude _refine_ls.structure_factor_coef
      w       = the least-squares weight
      and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               wR_factor_all
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.wr_factor_gt

    _definition.id                '_refine_ls.wR_factor_gt'

    loop_
      _alias.definition_id
      _alias.deprecation_date
         '_refine_ls_wR_factor_obs'                                  1999-03-24
         '_refine.ls_wR_factor_obs'                                  .
         '_refine_ls_wR_factor_gt'                                   .

    _definition.update            2024-02-14
    _description.text
;
    Weighted residual factors for significantly intense reflections
    (satisfying _reflns.threshold_expression) included in the refinement.
    The reflections must also satisfy the resolution limits established by
    _refine_ls.d_res_high and _refine_ls.d_res_low.

           ( sum w [ Y(meas_gt) - Y(calc) ]^2^  )^1/2^
      wR = ( ---------------------------------- )
           (         sum w Y(meas_gt)^2^        )

    Y(meas_gt) = the 'observed' amplitude _refine_ls.structure_factor_coef
    Y(calc)    = the calculated amplitude _refine_ls.structure_factor_coef
      w        = the least-squares weight
      and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               wR_factor_gt
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls.wr_factor_ref

    _definition.id                '_refine_ls.wR_factor_ref'
    _alias.definition_id          '_refine_ls_wR_factor_ref'
    _definition.update            2012-11-20
    _description.text
;
    Weighted residual factors for reflections included in the refinement
    which satisfy the limits specified by _refine_ls.d_res_high and
    _refine_ls.d_res_low.

           ( sum w [ Y(meas) - Y(calc) ]^2^ )^1/2^
      wR = ( ------------------------------ )
           (         sum w Y(meas)^2^       )

      Y(meas) = the measured   amplitude _refine_ls.structure_factor_coef
      Y(calc) = the calculated amplitude _refine_ls.structure_factor_coef
      w       = the least-squares weight
      and the sum is taken over the specified reflections.
;
    _name.category_id             refine_ls
    _name.object_id               wR_factor_ref
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_REFINE_LS_CLASS

    _definition.id                REFINE_LS_CLASS
    _definition.scope             Category
    _definition.class             Loop
    _definition.update            2021-06-29
    _description.text
;
    The category of data items used to specify information about the
    refinement of the structural model.
;
    _name.category_id             REFINE_LS
    _name.object_id               REFINE_LS_CLASS
    _category_key.name            '_refine_ls_class.code'

save_

save_refine_ls_class.code

    _definition.id                '_refine_ls_class.code'
    _alias.definition_id          '_refine_ls_class_code'
    _definition.update            2021-10-27
    _description.text
;
    Code identifying a certain reflection class.
;
    _name.category_id             refine_ls_class
    _name.object_id               code
    _name.linked_item_id          '_reflns_class.code'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Word

    loop_
      _description_example.case
         1
         m1
         s2

save_

save_refine_ls_class.d_res_high

    _definition.id                '_refine_ls_class.d_res_high'
    _alias.definition_id          '_refine_ls_class_d_res_high'
    _definition.update            2021-03-03
    _description.text
;
    Highest resolution for the reflections in this class.
    This corresponds to the smallest interplanar d value.
;
    _name.category_id             refine_ls_class
    _name.object_id               d_res_high
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_refine_ls_class.d_res_low

    _definition.id                '_refine_ls_class.d_res_low'
    _alias.definition_id          '_refine_ls_class_d_res_low'
    _definition.update            2021-03-03
    _description.text
;
    Lowest resolution for the reflections in this class.
    This corresponds to the largest interplanar d value.
;
    _name.category_id             refine_ls_class
    _name.object_id               d_res_low
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   angstroms

save_

save_refine_ls_class.r_factor_all

    _definition.id                '_refine_ls_class.R_factor_all'
    _alias.definition_id          '_refine_ls_class_R_factor_all'
    _definition.update            2012-11-20
    _description.text
;
    Residual factor for reflections in this class included in the
    refinement.  See _refine_ls.R_factor_all definition for details.
;
    _name.category_id             refine_ls_class
    _name.object_id               R_factor_all
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls_class.r_factor_gt

    _definition.id                '_refine_ls_class.R_factor_gt'

    loop_
      _alias.definition_id
         '_refine_ls_class_R_factor_gt'
         '_refine_ls_class_R_factor_obs'

    _definition.update            2012-11-20
    _description.text
;
    Residual factor for the reflections in this class judged
    significantly intense (see _reflns.threshold_expression) and
    included in refinement. See _refine_ls.R_factor_gt for details.
;
    _name.category_id             refine_ls_class
    _name.object_id               R_factor_gt
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls_class.r_fsqd_factor

    _definition.id                '_refine_ls_class.R_Fsqd_factor'
    _alias.definition_id          '_refine_ls_class_R_Fsqd_factor'
    _definition.update            2012-11-20
    _description.text
;
    Residual factor R(F^2^) for reflections in this class judged
    significantly intense (see _reflns.threshold_expression) and
    included in refinement. See _refine_ls.R_Fsqd_factor for details.
;
    _name.category_id             refine_ls_class
    _name.object_id               R_Fsqd_factor
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls_class.r_i_factor

    _definition.id                '_refine_ls_class.R_I_factor'
    _alias.definition_id          '_refine_ls_class_R_I_factor'
    _definition.update            2012-11-20
    _description.text
;
    Residual factor R(I) for reflections in this class judged
    significantly intense (see _reflns.threshold_expression) and
    included in refinement. See _refine_ls.R_I_factor for details.
;
    _name.category_id             refine_ls_class
    _name.object_id               R_I_factor
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_refine_ls_class.wr_factor_all

    _definition.id                '_refine_ls_class.wR_factor_all'
    _alias.definition_id          '_refine_ls_class_wR_factor_all'
    _definition.update            2012-11-20
    _description.text
;
    Weight residual for all reflections in this class judged
    significantly intense (see _reflns.threshold_expression) and
    included in refinement. See _refine_ls.wR_factor_all for details.
;
    _name.category_id             refine_ls_class
    _name.object_id               wR_factor_all
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Real
    _enumeration.range            0.0:
    _units.code                   none

save_

save_FUNCTION

    _definition.id                FUNCTION
    _definition.scope             Category
    _definition.class             Functions
    _definition.update            2024-05-15
    _description.text
;
    The crystallographic functions the invoked in the definition
    methods of core structure data items defined and used within
    the Crystallographic Information Framework (CIF).
;
    _name.category_id             CIF_CORE_HEAD
    _name.object_id               FUNCTION

save_

save_function.atomtype

    _definition.id                '_function.AtomType'
    _definition.update            2021-10-27
    _description.text
;
    The function
                  r  =  AtomType( s )

    returns an atom type symbol (element name) from the atom site label.
;
    _name.category_id             function
    _name.object_id               AtomType
    _type.purpose                 Encode
    _type.source                  Assigned
    _type.container               Single
    _type.contents                Word
    _method.purpose               Evaluation
    _method.expression
;
    Function AtomType( s :[Single, Word])  {  # atom label

       m = Len(s)
       f = ""
       if (m > 0) f += Upper(s[0])
       If (m > 1 and s[1] not in '0123456789') f += Lower(s[1])
       If (m > 2 and s[2]     in '+-'        ) f += s[2]
       If (m > 3 and s[3]     in '+-'        ) f += s[3]

                AtomType =  f
    }
;

save_

save_function.closest

    _definition.id                '_function.Closest'
    _definition.update            2021-03-03
    _description.text
;
    The function
                  d  =  Closest( v, w )

    returns the cell translation vector required to obtain the
    closest cell-translated occurrence of the vector V to the vector
    W.
;
    _name.category_id             function
    _name.object_id               Closest
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    Function Closest( v :[Matrix, Real],   # coord vector to be cell translated
                      w :[Matrix, Real]) { # target vector

           d  =  v - w
           Closest  =  Int( Mod( 99.5 + d, 1.0 ) - d )
    }
;

save_

save_function.seitzfromjones

    _definition.id                '_function.SeitzFromJones'
    _definition.update            2021-03-01
    _description.text
;
    The function
                  s  =  SeitzFromJones( j )

    returns a 4x4 Seitz matrix from the Jones faithful representation of
    the equivalent position which is a character string e.g. 1/2+x,-x,z.
;
    _name.category_id             function
    _name.object_id               SeitzFromJones
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[4,4]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
     Function SeitzFromJones( j :[Single, Text])  { # Jones symmetry notation

      joneschrs = "123456xyz/,+- "
      s         = Matrix([[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,1]])
      axis      = 0
      sign      = 1
      inum      = 0

      do i=0,Len(j)-1    {
          c = j[i]
          If (c not in joneschrs) dummy = print('illegal char in symmetry xyz')

          If      (c == ' ') Next
          If      (c == ',') {
                             axis     += 1
                             inum      = 0
                             sign      = 1
          }
          Else If (c == '+') sign      = +1
          Else If (c == '-') sign      = -1
          Else If (c == 'x') s[axis,0] = sign
          Else If (c == 'y') s[axis,1] = sign
          Else If (c == 'z') s[axis,2] = sign
          Else   {
               If (inum == 0)   m  = AtoI(c)
               If (inum == 1 and c != '/')
                   dummy = print('illegal num in symmetry xyz')
               If (inum == 2)
               {
                     n  = AtoI(c)
                     If(n == 5)
                        dummy = print('illegal translation in symmetry xyz')
                     s[axis,3] = Mod(10.+ Float(sign*m)/Float(n), 1.)
                     sign      = 1
               }
               inum += 1
       }  }
                          SeitzFromJones = s
    }
;

save_

save_function.symequiv

    _definition.id                '_function.SymEquiv'
    _definition.update            2021-03-01
    _description.text
;
    The function
                    xyz' =  SymEquiv( symop, xyz )

    returns a fractional coordinate vector xyz' which is input vector
    xyz transformed by the input symop 'n_pqr' applied to the
    symmetry-equivalent matrix extracted from the category SPACE_GROUP_SYMOP.
;
    _name.category_id             function
    _name.object_id               SymEquiv
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Real
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    Function SymEquiv( c :[Single, Symop],    # symop string n_pqr
                       x :[Matrix, Real]   ){  # fract coordinate vector

            s = space_group_symop [ SymKey( c ) ]
            SymEquiv = s.R * x + s.T + SymLat( c )
    }
;

save_

save_function.symkey

    _definition.id                '_function.SymKey'
    _definition.update            2021-03-01
    _description.text
;
    The function
                  m  =  SymKey( s )

    returns an integer index to the Seitz matrices from the character
    string of the form 'n_pqr'.
;
    _name.category_id             function
    _name.object_id               SymKey
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Single
    _type.contents                Integer
    _enumeration.range            1:192
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    Function SymKey( s :[Single, Symop])  {  # symop string

           If (s == '.')   n = 1
           Else            n = AtoI(s[0])

                SymKey =  n       # index from 1
    }
;

save_

save_function.symlat

    _definition.id                '_function.SymLat'
    _definition.update            2021-03-01
    _description.text
;
    The function
                  v  =  SymLat( s )

    returns a vector of the cell translations applied to the coordinates
    from the character string of the form 'n_pqr'. i.e. p-5, q-5, r-5.
;
    _name.category_id             function
    _name.object_id               SymLat
    _type.purpose                 Number
    _type.source                  Derived
    _type.container               Matrix
    _type.dimension               '[3]'
    _type.contents                Integer
    _units.code                   none
    _method.purpose               Evaluation
    _method.expression
;
    Function SymLat( s :[Single, Symop])  {  # symop string

           If (s[0] == ' ')  v = [ 5, 5, 5 ]
           Else              v = [ AtoI(s[2]), AtoI(s[3]), AtoI(s[4]) ]

                 SymLat  =  v - 5
    }
;

save_

save_function.symop

    _definition.id                '_function.Symop'
    _definition.update            2006-06-30
    _description.text
;
    The function
                  s  =  Symop( n, t )

    returns a character string of the form 'n_pqr' where n is the
    symmetry equivalent site number and [p,q,r] is the cell translation
    vector PLUS [5,5,5].
;
    _name.category_id             function
    _name.object_id               Symop
    _type.purpose                 Composite
    _type.source                  Derived
    _type.container               Single
    _type.contents                Symop
    _method.purpose               Evaluation
    _method.expression
;
    Function Symop( n  :[Single, Integer],   # symmetry equivalent site number
                    t  :[List  , Integer]) { # cell translation vector

           d  =  t + 5
        Symop =  repr(n) + '_' + repr(d[0]) + repr(d[1]) + repr(d[2])
    }
;

save_

    loop_
      _dictionary_audit.version
      _dictionary_audit.date
      _dictionary_audit.revision
         3.0.5                    2016-05-13
;
       Merged in most symmetry dictionary definitions (James Hester)
;
         3.0.6                    2016-09-13
;
       Adjusted and removed keys for changes in dREL operation.
       _citation_id added to key list of citation_author (James Hester).
       _diffrn.crystal_id removed as diffrn is Set category. Changed
       EXPTL_CRYSTAL to Set type in keeping with current use patterns.
       Removed all child keys of exptl_crystal_id.
;
         3.0.7                    2017-06-10
;
       Added and deprecated symmetry.cell_setting. Removed rhombohedral
       option from dREL method for space_group.crystal_system. (James Hester)
;
         3.0.8                    2017-09-23
;
       Added missing items from DDL1 version: _citation.doi, _audit.block_doi
       _citation.publisher, _database.dataset_doi,
       _publ_contact_author.id_orcid, _publ_author.id_orcid (James Hester)
;
         3.0.9                    2018-04-10
;
       Rewrote CITATION category description to cover all relevant uses rather
       than only publication-related uses (James Hester).
;
         3.0.10                   2019-01-08
;
       Added DATABASE_RELATED category (James Hester).
;
         3.0.11                   2019-09-25
;
       Removed the _chemical_conn_bond.distance_su data item.
       Changed the purpose of the diffrn_radiation_wavelength.value data item
       from 'Number' to 'Measurand'. Added the
       diffrn_radiation_wavelength.value_su data item.

       Replaced all instances of the _definition.replaced_by data item with
       data items from the DEFINITION_REPLACED category.

       Marked the _atom_site.refinement_flags data item as deprecated and
       replaced by the _atom_site.refinement_flags_posn,
       _atom_site.refinement_flags_adp and _atom_site.refinement_flags_occupancy
       data items.

       Changed the _type.purpose from 'Encode' to 'Link' in the definitions of
       the _geom_angle.atom_site_label_2, _valence_param_atom_1,
       _valence_param_atom_2, _valence_param_ref_id, _atom_site_aniso.label
       and _atom_type_scat.symbol data items. Removed the _name.linked_item_id
       data item from the definitions of the _diffrn_scale_group.code and
       diffrn_standard_refln.code data items.

       Updated the definitions of the _geom_hbond.angle_DHA and
       _geom_hbond.angle_DHA_su data items.

       Corrected the definitions of the _cell_measurement.temperature_su and
       _cell_measurement.pressure_su data items.

       Corrected a typo in the definitions of the _geom_contact.distance and
       _geom_torsion.angle and data items.

       Changed the content type of multiple data items from 'Index' or 'Count'
       to 'Integer' and assigned the appropriate enumeration range if needed.
;
         3.0.12                   2020-03-13
;
       Adjusted the ranges of _geom_bond.angle and _geom_hbond.angle_DHA to
       be 0:180 degrees.

       Changed dREL methods for Cartesian transformation matrix elements
       to calculate default values rather than required values.
;
         3.0.13                   2020-03-16
;
       Changed all synthetic identifiers ('id') to be Text, and removed dREL.
       Validation method for _space_group.crystal_system removed as it contained
       undefined dREL functions "throw" and "alert".
;
         3.0.14                   2021-06-29
;
       Added opaque author identifiers to AUDIT_AUTHOR and PUBL_AUTHOR as well
       as relevant linking identifiers to AUDIT_CONTACT_AUTHOR and
       PUBL_CONTACT_AUTHOR.

       Added _diffrn_measurement.specimen_attachment_type.

       Changed to DDL version 4.

       Removed all instances of the _category.key_id attribute since it is no
       longer defined in the DDLm reference dictionary.

       Miscellaneous corrections to dREL and fixing typos.
;
         3.1.0                    2021-12-01
;
       Replaced _model_site.adp_eigen_system with _model_site.adp_eigenvectors
       and _model_site.adp_eigenvalues.

       Added additional enumeration values to the _journal_index.type data item
       definition.

       Numerous corrections to measurement units.

       Numerous improvements to types and harmonisation of spelling.
;
         3.2.0                    2023-04-04
;
       Added data names to allow multi-data-block expression of data sets.

       Deprecated and replaced _diffrn_radiation.type and
       _diffrn_radiation.xray_symbol.

       Added _diffrn_refln.intensity* data items.

       Added the _exptl_absorpt.special_details data item.

       Added categories and data names to allow for the elemental composition
       of specimens to be recorded.

       Corrections and additions for conformance with DDL1.

       Explicitly added _diffrn_source.details to the list items that replaced
       _diffrn_source.description.

       Added the _citation.URL and _journal.paper_URL data items.

       Added the _journal.paper_number and _journal.paper_pages data items.

       Reparented CELL to DIFFRN category and added key data names to allow
       multiple cells for different diffraction conditions. Deprecated
       _cell_measurement.temperature,pressure data names.

       Changed the purpose of the _diffrn_radiation_wavelength.id data item
       from 'Encode' to 'Key'.
;
         3.3.0                    2025-06-18
;
       # Please update the date above and describe the change below until
       # ready for the next release

       Added _atom_type_scat.exponential_polynomial_coefs, Gaussian_coefs, and
       inv_Mott_Bethe_coefs to allow for an arbitrary number of coefficients in
       the definition of form factors.

       Added a dREL definition method for the _citation.id data item.

       Rewrote the _atom_type.radius_contact evaluation method as a definition
       method.

       Added _atom_type.mass_number to record specific isotope identities.

       Changed enumeration of _atom_type.atomic_number,
       _atom_type_scat.dispersion_real_Cu, _atom_type_scat.dispersion_imag_Cu,
       _atom_type_scat.dispersion_real_Mo, _atom_type_scat.dispersion_imag_Mo
       to be defaulted on _atom_type.element_symbol.

       Expanded AUDIT_AUTHOR to include email, phone, and fax contact details.

       Corrected the content type of the _refln.F_complex_su attribute.

       Updated description of _space_group_wyckoff.letter.

       Added a dREL definition method that determines the units of measure to
       the definition of the _refln.form_factor_table data item. Changed the
       units of several data items to 'unspecified'.

       Added the default value of '1_555' to the site symmetry data items.

       Redefined _exptl_absorpt.coefficient_mu as a derived measurand item.

       Added the _exptl_absorpt.coefficient_mu_su data item.

       Renamed _atom_site.tensor_beta to _atom_site_aniso.matrix_beta and
       updated the associated dREL evaluation methods. The old data name was
       retained as an alias. Added the _atom_site_aniso.beta_* data items.

       Reverted _atom_type_scat.versus_stol_list to a text-type to regain
       compatibility with DDL1 dictionary.

       Added ATOM_SCAT_VERSUS_STOL to allow for the explicit listing of
       scattering factor values with respect to sin theta over lambda.
       Deprecated the _atom_type_scat.versus_stol_list data item.

       Changed the _type.source attribute of all SU data items to 'Related'.

       Updated dREL evaluation method of the ATOM_TYPE category.

       Changed the purpose of _space_group_Wyckoff.id and _valence_ref.id
       from 'Encode' to 'Key'.

       Corrected examples of the _chemical.identifier_InChI and
       _chemical.identifier_InChI_key data items.

       Updated description of DIFFRN_RADIATION to remove looping reference.

       Updated the definitions of _diffrn_refln.scale_group_code and
       _diffrn_scale_group.code definitions to better reflect that
       _diffrn_scale_group.code is the main data item.

       Added the deprecation date for multiple aliases that were originally
       deprecated in the DDL1 version of the dictionary.

       Added the _atom_site_fract.symmform and _atom_site_aniso.symmform
       data items.

       Added _database_code.BIncStrDB (bm).

       Changed the title of the dictionary to 'CIF_CORE'.

       Renamed the Head category from 'CIF_CORE' to 'CIF_CORE_HEAD'.

       Updated the dictionary description.

       Redefined the _cell_measurement.wavelength data item as a measurand.
       Added and immediately deprecated the _cell_measurement.wavelength_su
       data item.

       Moved the definition of _publ_contact_author data name into a
       separate data item definition and deprecated it in favour of the
       _publ_contact_author.name and _publ_contact_author.address data items.

       Added the _audit_support.funding_organization_url and
       _audit_support.special_details data items.

       Added opaque identifiers for diffrn_refln and refln categories.

       Added definitions and updated some existing ones with material
       relating to electron diffraction (bm, on behalf of NanED group):
         Added 'dyn' to _chemical.absolute_configuration.
         Added two examples to _diffrn_source.size for NBED and SAED.
         New items:
           _computing.sample_tracking
           _diffrn.precession_semi_angle (and *_su)
           _diffrn_measurement.method_precession
           _diffrn_measurement.rotation_mode
           _diffrn_measurement.sample_tracking
           _diffrn_measurement.sample_tracking_method
           _diffrn_radiation.illumination_mode
           _diffrn_source.convergence_angle
           _diffrn_source.ed_diffracting_area_selection
           _exptl_crystal.mosaic_block_size (and *_su)
           _exptl_crystal.mosaic_method
           _exptl_crystal.mosaicity (and *_su)
           _refine_diff.potential_max, *_min, *_rms (all with *_su)
           _refine.diffraction_theory and _refine.diffraction_theory_details
           _refine_ls.abs_structure_z-score
           _refine_ls.sample_shape_details
           _refine_ls.sample_shape_expression
           _refine_ls.sample_thickness (and *_su)

       Added _diffrn.flux_density, _diffrn.total_dose and
       _diffrn.total_exposure_time as first step towards characterizing
       radiation damage (bm).

       Made _journal.data_validation_number a proper alias of
       _journal.validation_number and deleted save frame for the former (bm).

       Removed the _atom_type.key data item. Renamed _space_group_generator.key
       to _space_group_generator.id for consistency. (av)

       Added reference to _atom_sites_cartn_transform.matrix,
       _atom_sites_fract_transform.matrix, _cell.orthogonal_matrix
       and _atom_type_scat.inv_mott_bethe_coefs; also minor editorial
       changes to many definitions in the style of International Tables (bm).

       Updated _refln.symmetry_multiplicity (reference to newer version
       of ITC) and _reflns_class.r_factor_gt (fixed the formula notation),
       plus many minor editorial changes to International Tables style (bm).

       Updated _refln.symmetry_multiplicity and other references to
       International Tables Volume A to latest edition (bm).
;
