Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add structure.id #6

Merged
merged 11 commits into from
Mar 14, 2024
110 changes: 110 additions & 0 deletions examples/example_1.cif
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#\#CIF_2.0
##
# Data blocks 'block_one' and 'block_two' present two structures.
# The 'conditions' data block contains experimental conditions.
#
# In the below example, it is not strictly necessary to explicitly give values
# to _structure.id or _space_group.id, as there is only one present per block.
#
# A representation of the resultant merged data is given in
# example_1_merged.cif.
##


data_conditions
_diffrn.id DIFCON_1
_diffrn.ambient_temperature 900



data_block_one
_structure.id A # Must be unique.
_structure.diffrn_id DIFCON_1

_cell.length_a 5.4469
_cell.length_b 5.4469
_cell.length_c 5.4469
_cell.angle_alpha 90
_cell.angle_beta 90
_cell.angle_gamma 90
_cell.volume 161.61
_cell.formula_units_Z 4

_space_group.id 1 # Must be unique.
# Can be the same if representing the:
# same space group name and number
# same setting
# same symops with the same id values
_space_group.crystal_system cubic
_space_group.name_H-M_alt Fm-3m

loop_
_space_group_symop_id
_space_group_symop_operation_xyz
1 'x, y, z'
2 '-x, -y, z'
#...
191 'x, y+1/2, -z+1/2'
192 '-x, -y+1/2, -z+1/2'

loop_
_atom_site.label
_atom_site.type_symbol
_atom_site.fract_xyz
_atom_site.B_iso_or_equiv
Mn1 Mn+2 [0 0 0] 0.2
Se1 Se [0.5 0.5 0.5] 0.4

loop_
_atom_site_aniso.label
_atom_site_aniso.b_11
_atom_site_aniso.b_12
_atom_site_aniso.b_13
_atom_site_aniso.b_22
_atom_site_aniso.b_23
_atom_site_aniso.b_33
Mn1 0.2 0.05 0.08 0.2 0.03 0.2



data_block_two
_structure.id B # Must be unique.
_structure.diffrn_id DIFCON_1

_cell.length_a 3.0205
_cell.length_b 3.0205
_cell.length_c 3.0205
_cell.angle_alpha 90
_cell.angle_beta 90
_cell.angle_gamma 90
_cell.volume 27.558
_cell.formula_units_Z 2

_space_group.id 2 # Must be unique.
# Can be the same if representing the:
# same space group name and number
# same setting
# same symops with the same id values
_space_group.crystal_system cubic
_space_group.name_H-M_alt Im-3m
loop_
_space_group.symop_id
_space_group.symop_operation_xyz
1 'x, y, z'
2 '-x, -y, z'
#...
95 'x+1/2, y+1/2, -z+1/2'
96 '-x+1/2, -y+1/2, -z+1/2'

loop_
_atom_site.label
_atom_site.type_symbol
_atom_site.fract_xyz
_atom_site.B_iso_or_equiv
V1 V [0 0 0] 0.5

###################################
#
# End of the CIF file
#
###################################
76 changes: 76 additions & 0 deletions examples/example_1_merged.cif
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#\#CIF_2.0
##
# A representation of a merged data block for the data given in example_1.cif.
#
# It should not actually be used this way to construct a CIF file, but this
# maps out how the relational tables would be populated.
##

data_merged
loop_
_diffrn.id
_diffrn.ambient_temperature
DIFCON_1 900

loop_
_structure.id
_structure.space_group_id
_structure.diffrn_id
A 1 DIFCON_1
B 2 DIFCON_1

loop_
_cell.structure_id
_cell.length_a
_cell.length_b
_cell.length_c
_cell.angle_alpha
_cell.angle_beta
_cell.angle_gamma
_cell.volume
_cell.formula_units_Z
A 5.4469 5.4469 5.4469 90 90 90 161.61 4
B 3.0205 3.0205 3.0205 90 90 90 27.558 2

loop_
_space_group.id
_space_group.crystal_system
_space_group.name_H-M_alt
1 cubic Fm-3m
2 cubic Im-3m

loop_
_space_group_symop.space_group_id
_space_group_symop.id
_space_group_symop.operation_xyz
1 1 'x, y, z'
1 2 '-x, -y, z'
#...
1 191 'x, y+1/2, -z+1/2'
1 192 '-x, -y+1/2, -z+1/2'
2 1 'x, y, z'
2 2 '-x, -y, z'
#...
2 95 'x+1/2, y+1/2, -z+1/2'
2 96 '-x+1/2, -y+1/2, -z+1/2'

loop_
_atom_site.structure_id
_atom_site.label
_atom_site.type_symbol
_atom_site.fract_xyz
_atom_site.B_iso_or_equiv
A Mn1 Mn+2 [0 0 0] 0.2
A Se1 Se [0.5 0.5 0.5] 0.4
B V1 V [0 0 0] 0.5

loop_
_atom_site_aniso.structure_id
_atom_site_aniso.label
_atom_site_aniso.b_11
_atom_site_aniso.b_12
_atom_site_aniso.b_13
_atom_site_aniso.b_22
_atom_site_aniso.b_23
_atom_site_aniso.b_33
A Mn1 0.2 0.05 0.08 0.2 0.03 0.2
44 changes: 44 additions & 0 deletions examples/example_2.cif
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#\#CIF_2.0
##
# A pathalogical example of how structure information is disparate data blocks
# can be gathered to form a single structure representation.
#
# The first set of data blocks provides the data, and the final data block gives
# a representation of how the resultant relational tables could be constructed.
#
# It should npt actually be used this way to construct a CIF file, but this
# maps out how the relational tables would be populated.
##

# source data
data_block_1
_structure.id A
_cell.length_a 12.3456
data_block_2
_structure.id A
_cell.length_b 12.3456
data_block_3
_structure.id A
_cell.length_c 12.3456
data_block_4
_structure.id A
_cell.angle_alpha 90
data_block_5
_structure.id A
_cell.angle_beta 90
data_block_6
_structure.id A
_cell.angle_gamma 90


# relational table
data_merged
loop_
_cell.structure_id
_cell.length_a
_cell.length_b
_cell.length_c
_cell.angle_alpha
_cell.angle_beta
_cell.angle_gamma
A 12.3456 12.3456 12.3456 90 90 90
Loading