structure
categories
atom_site_aniso
default
Anisotropic ADP category.
Defines :class:AtomSiteAniso items and
:class:AtomSiteAnisoCollection used alongside :class:AtomSites to
hold anisotropic displacement parameters.
AtomSiteAniso
Bases: CategoryItem
Single atom site anisotropic ADP entry.
Each entry mirrors an :class:AtomSite by label and holds six
tensor components whose physical meaning (B or U) is determined by
atom_site.adp_type.
Source code in src/easydiffraction/datablocks/structure/categories/atom_site_aniso/default.py
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 | |
__init__()
Initialise with default zero-valued tensor components.
Source code in src/easydiffraction/datablocks/structure/categories/atom_site_aniso/default.py
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 | |
adp_11
property
writable
Anisotropic ADP tensor component (1,1) in Ų.
adp_12
property
writable
Anisotropic ADP tensor component (1,2) in Ų.
adp_13
property
writable
Anisotropic ADP tensor component (1,3) in Ų.
adp_22
property
writable
Anisotropic ADP tensor component (2,2) in Ų.
adp_23
property
writable
Anisotropic ADP tensor component (2,3) in Ų.
adp_33
property
writable
Anisotropic ADP tensor component (3,3) in Ų.
label
property
writable
Label matching the parent atom_site entry.
AtomSiteAnisoCollection
Bases: CategoryCollection
Collection of :class:AtomSiteAniso instances.
Source code in src/easydiffraction/datablocks/structure/categories/atom_site_aniso/default.py
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 | |
__init__()
Initialise an empty aniso-ADP collection.
Source code in src/easydiffraction/datablocks/structure/categories/atom_site_aniso/default.py
217 218 219 | |
factory
Atom-site-aniso factory — delegates entirely to FactoryBase.
AtomSiteAnisoFactory
Bases: FactoryBase
Create atom-site-aniso collections by tag.
Source code in src/easydiffraction/datablocks/structure/categories/atom_site_aniso/factory.py
12 13 14 15 16 17 | |
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
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 315 316 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 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | |
__init__()
Initialise the atom site with default descriptor values.
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/default.py
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 | |
adp_iso
property
writable
Isotropic ADP for the atom site (Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
adp_iso_as_b
property
Return the isotropic ADP as a B-factor value.
When adp_type is Uiso or Uani the stored U value is
converted to B via B = 8π²U. Otherwise the stored value is
returned unchanged.
Returns:
| Type | Description |
|---|---|
float
|
Equivalent B_iso value. |
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.
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
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 | |
__init__()
Initialise an empty atom-sites collection.
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/default.py
510 511 512 | |
enums
Enumeration for ADP type values.
AdpTypeEnum
Bases: StrEnum
Atomic displacement parameter type.
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/enums.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
default()
classmethod
Return the default ADP type (BISO).
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/enums.py
18 19 20 21 | |
description()
Return a human-readable description of this ADP type.
Source code in src/easydiffraction/datablocks/structure/categories/atom_sites/enums.py
23 24 25 26 27 28 29 30 31 | |
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
12 13 14 15 16 17 | |
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 236 | |
__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
12 13 14 15 16 17 | |
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
12 13 14 15 16 17 | |
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
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 | |
atom_site_aniso
property
writable
Anisotropic-ADP collection for this structure.
atom_sites
property
writable
Atom-sites collection for this structure.
cell
property
writable
Unit-cell category for this structure.
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
215 216 217 218 | |
show_as_cif()
Render the CIF text for this structure in the terminal.
Source code in src/easydiffraction/datablocks/structure/item/base.py
220 221 222 223 | |
space_group
property
writable
Space-group category for this structure.
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 | |