structure
categories
atom_sites
default
Atom site category.
Defines :class:AtomSite items and :class:AtomSites collection used
in crystallographic structures.
AtomSite
Bases: CategoryItem
Single atom site with fractional coordinates and ADP.
Attributes are represented by descriptors to support validation and CIF serialization.
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/default.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
__init__()
Initialise the atom site with default descriptor values.
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/default.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
adp_type
property
writable
ADP type used (e.g., Biso, Uiso, Uani, Bani).
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
b_iso
property
writable
Isotropic ADP for the atom site (Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
fract_x
property
writable
Fractional x-coordinate of the atom site within the unit cell.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
fract_y
property
writable
Fractional y-coordinate of the atom site within the unit cell.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
fract_z
property
writable
Fractional z-coordinate of the atom site within the unit cell.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
label
property
writable
Unique identifier for the atom site.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
occupancy
property
writable
Occupancy fraction of the atom type at this site.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
type_symbol
property
writable
Chemical symbol of the atom at this site.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
wyckoff_letter
property
writable
Wyckoff letter for the atom site symmetry position.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
AtomSites
Bases: CategoryCollection
Collection of :class:AtomSite instances.
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/default.py
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | |
__init__()
Initialise an empty atom-sites collection.
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/default.py
326 327 328 | |
factory
Atom-sites factory — delegates entirely to FactoryBase.
AtomSitesFactory
Bases: FactoryBase
Create atom-sites collections by tag.
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/factory.py
10 11 12 13 14 15 | |
cell
default
Unit cell parameters category for structures.
Cell
Bases: CategoryItem
Unit cell with lengths a, b, c and angles alpha, beta, gamma.
All six lattice parameters are exposed as :class:Parameter
descriptors supporting validation, fitting and CIF serialization.
Source code in src/easydiffraction/datablocks/structure/categories/cell/default.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | |
__init__()
Initialise the unit cell with default parameter values.
Source code in src/easydiffraction/datablocks/structure/categories/cell/default.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
angle_alpha
property
writable
Angle between edges b and c (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
angle_beta
property
writable
Angle between edges a and c (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
angle_gamma
property
writable
Angle between edges a and b (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
length_a
property
writable
Length of the a axis of the unit cell (Ã…).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
length_b
property
writable
Length of the b axis of the unit cell (Ã…).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
length_c
property
writable
Length of the c axis of the unit cell (Ã…).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
factory
Cell factory — delegates entirely to FactoryBase.
CellFactory
Bases: FactoryBase
Create unit-cell categories by tag.
Source code in src/easydiffraction/datablocks/structure/categories/cell/factory.py
10 11 12 13 14 15 | |
space_group
default
Space group category for crystallographic structures.
SpaceGroup
Bases: CategoryItem
Space group with H-M symbol and IT coordinate system code.
Holds the space-group symbol (name_h_m) and the International
Tables coordinate-system qualifier (it_coordinate_system_code).
Changing the symbol automatically resets the coordinate-system code
to the first allowed value for the new group.
Source code in src/easydiffraction/datablocks/structure/categories/space_group/default.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
__init__()
Initialise the space group with default values.
Source code in src/easydiffraction/datablocks/structure/categories/space_group/default.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
it_coordinate_system_code
property
writable
A qualifier identifying which setting in IT is used.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
name_h_m
property
writable
Hermann-Mauguin symbol of the space group.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
factory
Space-group factory — delegates entirely to FactoryBase.
SpaceGroupFactory
Bases: FactoryBase
Create space-group categories by tag.
Source code in src/easydiffraction/datablocks/structure/categories/space_group/factory.py
10 11 12 13 14 15 | |
collection
Collection of structure data blocks.
Structures
Bases: DatablockCollection
Ordered collection of :class:Structure instances.
Provides convenience add_from_* methods that mirror the
:class:StructureFactory classmethods plus a bare :meth:add for
inserting pre-built structures.
Source code in src/easydiffraction/datablocks/structure/collection.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
__init__()
Initialise an empty structures collection.
Source code in src/easydiffraction/datablocks/structure/collection.py
22 23 24 | |
add_from_cif_path(cif_path)
Create a structure from a CIF file and add it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_path
|
str
|
Filesystem path to a CIF file. |
required |
Source code in src/easydiffraction/datablocks/structure/collection.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
add_from_cif_str(cif_str)
Create a structure from CIF content and add it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_str
|
str
|
CIF file content as a string. |
required |
Source code in src/easydiffraction/datablocks/structure/collection.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
create(*, name)
Create a minimal structure and add it to the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identifier for the new structure. |
required |
Source code in src/easydiffraction/datablocks/structure/collection.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
show_names()
List all structure names in the collection.
Source code in src/easydiffraction/datablocks/structure/collection.py
83 84 85 86 | |
show_params()
Show parameters of all structures in the collection.
Source code in src/easydiffraction/datablocks/structure/collection.py
89 90 91 92 | |
item
base
Structure datablock item.
Structure
Bases: DatablockItem
Structure datablock item.
Source code in src/easydiffraction/datablocks/structure/item/base.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
atom_sites
property
writable
Atom-sites collection for this structure.
atom_sites_type
property
writable
Tag of the active atom-sites collection type.
cell
property
writable
Unit-cell category for this structure.
cell_type
property
writable
Tag of the active unit-cell type.
name
property
writable
Name identifier for this structure.
Returns:
| Type | Description |
|---|---|
str
|
The structure's name. |
show()
Display an ASCII projection of the structure in 2D.
Source code in src/easydiffraction/datablocks/structure/item/base.py
247 248 249 250 | |
show_as_cif()
Render the CIF text for this structure in the terminal.
Source code in src/easydiffraction/datablocks/structure/item/base.py
252 253 254 255 | |
show_current_atom_sites_type()
Print the currently used atom-sites collection type.
Source code in src/easydiffraction/datablocks/structure/item/base.py
238 239 240 241 | |
show_current_cell_type()
Print the currently used unit-cell type.
Source code in src/easydiffraction/datablocks/structure/item/base.py
120 121 122 123 | |
show_current_space_group_type()
Print the currently used space-group type.
Source code in src/easydiffraction/datablocks/structure/item/base.py
179 180 181 182 | |
show_supported_atom_sites_types()
Print a table of supported atom-sites collection types.
Source code in src/easydiffraction/datablocks/structure/item/base.py
234 235 236 | |
show_supported_cell_types()
Print a table of supported unit-cell types.
Source code in src/easydiffraction/datablocks/structure/item/base.py
116 117 118 | |
show_supported_space_group_types()
Print a table of supported space-group types.
Source code in src/easydiffraction/datablocks/structure/item/base.py
175 176 177 | |
space_group
property
writable
Space-group category for this structure.
space_group_type
property
writable
Tag of the active space-group type.
factory
Factory for creating structure instances from various inputs.
Provides individual class methods for each creation pathway:
from_scratch, from_cif_path, or from_cif_str.
StructureFactory
Create :class:Structure instances from supported inputs.
Source code in src/easydiffraction/datablocks/structure/item/factory.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
from_cif_path(cif_path)
classmethod
Create a structure by reading and parsing a CIF file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_path
|
str
|
Filesystem path to a CIF file. |
required |
Returns:
| Type | Description |
|---|---|
Structure
|
A populated structure instance. |
Source code in src/easydiffraction/datablocks/structure/item/factory.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
from_cif_str(cif_str)
classmethod
Create a structure by parsing a CIF string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_str
|
str
|
Raw CIF content. |
required |
Returns:
| Type | Description |
|---|---|
Structure
|
A populated structure instance. |
Source code in src/easydiffraction/datablocks/structure/item/factory.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
from_scratch(*, name)
classmethod
Create a minimal default structure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identifier for the new structure. |
required |
Returns:
| Type | Description |
|---|---|
Structure
|
An empty structure with default categories. |
Source code in src/easydiffraction/datablocks/structure/item/factory.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |