Skip to content

structure

Modules:

Name Description
categories
collection

Collection of structure data blocks.

item

Modules

categories

Modules:

Name Description
atom_site_aniso
atom_sites
cell
geom
space_group
space_group_wyckoff

Modules

atom_site_aniso

Modules:

Name Description
default

Anisotropic ADP category.

factory

Atom-site-aniso factory — delegates entirely to FactoryBase.

Classes
Modules
default

Anisotropic ADP category.

Defines :class:AtomSiteAniso items and :class:AtomSiteAnisoCollection used alongside :class:AtomSites to hold anisotropic displacement parameters.

Classes:

Name Description
AtomSiteAniso

Single atom site anisotropic ADP entry.

AtomSiteAnisoCollection

Collection of :class:AtomSiteAniso instances.

Classes
AtomSiteAniso()

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.

Methods:

Name Description
__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print parameters, other properties, and methods.

from_cif

Populate this item from a CIF block.

Attributes:

Name Type Description
label StringDescriptor

Label matching the parent atom_site entry.

adp_11 Parameter

Anisotropic ADP tensor component (1,1) in Ų.

adp_22 Parameter

Anisotropic ADP tensor component (2,2) in Ų.

adp_33 Parameter

Anisotropic ADP tensor component (3,3) in Ų.

adp_12 Parameter

Anisotropic ADP tensor component (1,2) in Ų.

adp_13 Parameter

Anisotropic ADP tensor component (1,3) in Ų.

adp_23 Parameter

Anisotropic ADP tensor component (2,3) in Ų.

unique_name str

Fully qualified name: datablock, category, entry.

parameters list

All GenericDescriptorBase instances on this item.

as_cif str

Return CIF representation of this object.

Attributes
label property writable

Label matching the parent atom_site entry.

adp_11 property writable

Anisotropic ADP tensor component (1,1) in Ų.

adp_22 property writable

Anisotropic ADP tensor component (2,2) in Ų.

adp_33 property writable

Anisotropic ADP tensor component (3,3) in Ų.

adp_12 property writable

Anisotropic ADP tensor component (1,2) in Ų.

adp_13 property writable

Anisotropic ADP tensor component (1,3) in Ų.

adp_23 property writable

Anisotropic ADP tensor component (2,3) in Ų.

unique_name property

Fully qualified name: datablock, category, entry.

parameters property

All GenericDescriptorBase instances on this item.

as_cif property

Return CIF representation of this object.

Functions
__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print parameters, other properties, and methods.

from_cif(block, idx=0)

Populate this item from a CIF block.

AtomSiteAnisoCollection()

Collection of :class:AtomSiteAniso instances.

Methods:

Name Description
__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print a summary of public attributes and contained items.

__getitem__

Return an item by name or positional index.

__setitem__

Insert or replace an item under the given identity key.

__delitem__

Delete an item by key or raise KeyError if missing.

__contains__

Check whether an item with the given key exists.

__iter__

Iterate over items in insertion order.

__len__

Return the number of items in the collection.

remove

Remove an item by its key.

keys

Yield keys for all items in insertion order.

values

Yield items in insertion order.

items

Yield (key, item) pairs in insertion order.

from_cif

Populate this collection from a CIF block.

add

Insert or replace a pre-built item into the collection.

create

Create a new item with the given attributes and add it.

Attributes:

Name Type Description
unique_name str | None

Return None; collections have no unique name.

parameters list

All parameters from all items in this collection.

as_cif str

Return CIF representation of this object.

names list[str | None]

List of all item keys in the collection.

scalar_descriptors list

Collection-level descriptors serialized outside the loop.

Attributes
unique_name property

Return None; collections have no unique name.

parameters property

All parameters from all items in this collection.

as_cif property

Return CIF representation of this object.

names property

List of all item keys in the collection.

scalar_descriptors property

Collection-level descriptors serialized outside the loop.

Functions
__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print a summary of public attributes and contained items.

__getitem__(key)

Return an item by name or positional index.

Parameters:

Name Type Description Default
key str | int

Identity key (str) or zero-based positional index (int).

required

Returns:

Type Description
GuardedBase

The item matching the given key or index.

Raises:

Type Description
TypeError

If key is neither str nor int.

__setitem__(name, item)

Insert or replace an item under the given identity key.

__delitem__(name)

Delete an item by key or raise KeyError if missing.

__contains__(name)

Check whether an item with the given key exists.

__iter__()

Iterate over items in insertion order.

__len__()

Return the number of items in the collection.

remove(name)

Remove an item by its key.

Parameters:

Name Type Description Default
name str

Identity key of the item to remove.

required
keys()

Yield keys for all items in insertion order.

values()

Yield items in insertion order.

items()

Yield (key, item) pairs in insertion order.

from_cif(block)

Populate this collection from a CIF block.

add(item)

Insert or replace a pre-built item into the collection.

Parameters:

Name Type Description Default
item object

A CategoryItem instance to add.

required
create(**kwargs)

Create a new item with the given attributes and add it.

A default instance of the collection's item type is created, then each keyword argument is applied via setattr.

Parameters:

Name Type Description Default
**kwargs object

Attribute names and values for the new item.

{}
factory

Atom-site-aniso factory — delegates entirely to FactoryBase.

Classes:

Name Description
AtomSiteAnisoFactory

Create atom-site-aniso collections by tag.

Classes
AtomSiteAnisoFactory

Create atom-site-aniso collections by tag.

Methods:

Name Description
__init_subclass__

Give each subclass its own independent registry and rules.

register

Class decorator to register a concrete class.

supported_tags

Return list of all supported tags.

default_tag

Resolve the default tag for a given experimental context.

create

Instantiate a registered class by tag.

create_default_for

Instantiate the default class for a given context.

supported_for

Return classes matching conditions and/or calculator.

show_supported

Pretty-print a table of supported types.

Functions
__init_subclass__(**kwargs)

Give each subclass its own independent registry and rules.

register(klass) classmethod

Class decorator to register a concrete class.

Usage::

@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)

Returns the class unmodified.

supported_tags() classmethod

Return list of all supported tags.

default_tag(**conditions) classmethod

Resolve the default tag for a given experimental context.

Uses largest-subset matching: the rule whose key is the biggest subset of the given conditions wins. A rule with an empty key (frozenset()) acts as a universal fallback.

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values, e.g. scattering_type=ScatteringTypeEnum.BRAGG.

{}

Returns:

Type Description
str

The resolved default tag string.

Raises:

Type Description
ValueError

If no rule matches the given conditions.

create(tag, **kwargs) classmethod

Instantiate a registered class by tag.

Parameters:

Name Type Description Default
tag str

type_info.tag value.

required
**kwargs object

Forwarded to the class constructor.

{}

Returns:

Type Description
object

A new instance of the registered class.

Raises:

Type Description
ValueError

If tag is not in the registry.

create_default_for(**conditions) classmethod

Instantiate the default class for a given context.

Combines default_tag(**conditions) with create(tag).

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values.

{}

Returns:

Type Description
object

A new instance of the default class.

supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Return classes matching conditions and/or calculator.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum value.

None
sample_form object

Optional SampleFormEnum value.

None
scattering_type object

Optional ScatteringTypeEnum value.

None
beam_mode object

Optional BeamModeEnum value.

None
radiation_probe object

Optional RadiationProbeEnum value.

None

Returns:

Type Description
list[type]

Classes matching the given conditions.

show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Pretty-print a table of supported types.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum filter.

None
sample_form object

Optional SampleFormEnum filter.

None
scattering_type object

Optional ScatteringTypeEnum filter.

None
beam_mode object

Optional BeamModeEnum filter.

None
radiation_probe object

Optional RadiationProbeEnum filter.

None
atom_sites

Modules:

Name Description
default

Atom site category.

enums

Enumeration for ADP type values.

factory

Atom-sites factory — delegates entirely to FactoryBase.

Classes
Modules
default

Atom site category.

Defines :class:AtomSite items and :class:AtomSites collection used in crystallographic structures.

Classes:

Name Description
AtomSite

Single atom site with fractional coordinates and ADP.

AtomSites

Collection of :class:AtomSite instances.

Classes
AtomSite()

Single atom site with fractional coordinates and ADP.

Attributes are represented by descriptors to support validation and CIF serialization.

Methods:

Name Description
__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print parameters, other properties, and methods.

from_cif

Populate this item from a CIF block.

Attributes:

Name Type Description
label StringDescriptor

Unique identifier for the atom site.

type_symbol StringDescriptor

Chemical symbol of the atom at this site.

adp_type EnumDescriptor

ADP type used (e.g., Biso, Uiso, Uani, Bani).

wyckoff_letter StringDescriptor

Wyckoff letter for the atom site symmetry position.

multiplicity IntegerDescriptor

Read-only site multiplicity derived from the Wyckoff position.

fract_x Parameter

Fractional x-coordinate of the atom site within the unit cell.

fract_y Parameter

Fractional y-coordinate of the atom site within the unit cell.

fract_z Parameter

Fractional z-coordinate of the atom site within the unit cell.

occupancy Parameter

Occupancy fraction of the atom type at this site.

adp_iso Parameter

Isotropic ADP for the atom site (Ų).

adp_iso_as_b float

Return the isotropic ADP as a B-factor value.

unique_name str

Fully qualified name: datablock, category, entry.

parameters list

All GenericDescriptorBase instances on this item.

as_cif str

Return CIF representation of this object.

Attributes
label property writable

Unique identifier for the atom site.

Reading this property returns the underlying StringDescriptor 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.

adp_type property writable

ADP type used (e.g., Biso, Uiso, Uani, Bani).

Reading this property returns the underlying EnumDescriptor 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.

multiplicity property

Read-only site multiplicity derived from the Wyckoff position.

Populated by Wyckoff detection; value is None when the space group is untabulated. There is no public setter.

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.

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.

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.

unique_name property

Fully qualified name: datablock, category, entry.

parameters property

All GenericDescriptorBase instances on this item.

as_cif property

Return CIF representation of this object.

Functions
__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print parameters, other properties, and methods.

from_cif(block, idx=0)

Populate this item from a CIF block.

AtomSites()

Collection of :class:AtomSite instances.

Methods:

Name Description
__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print a summary of public attributes and contained items.

__getitem__

Return an item by name or positional index.

__setitem__

Insert or replace an item under the given identity key.

__delitem__

Delete an item by key or raise KeyError if missing.

__contains__

Check whether an item with the given key exists.

__iter__

Iterate over items in insertion order.

__len__

Return the number of items in the collection.

remove

Remove an item by its key.

keys

Yield keys for all items in insertion order.

values

Yield items in insertion order.

items

Yield (key, item) pairs in insertion order.

from_cif

Populate this collection from a CIF block.

add

Insert or replace a pre-built item into the collection.

create

Create a new item with the given attributes and add it.

Attributes:

Name Type Description
unique_name str | None

Return None; collections have no unique name.

parameters list

All parameters from all items in this collection.

as_cif str

Return CIF representation of this object.

names list[str | None]

List of all item keys in the collection.

scalar_descriptors list

Collection-level descriptors serialized outside the loop.

Attributes
unique_name property

Return None; collections have no unique name.

parameters property

All parameters from all items in this collection.

as_cif property

Return CIF representation of this object.

names property

List of all item keys in the collection.

scalar_descriptors property

Collection-level descriptors serialized outside the loop.

Functions
__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print a summary of public attributes and contained items.

__getitem__(key)

Return an item by name or positional index.

Parameters:

Name Type Description Default
key str | int

Identity key (str) or zero-based positional index (int).

required

Returns:

Type Description
GuardedBase

The item matching the given key or index.

Raises:

Type Description
TypeError

If key is neither str nor int.

__setitem__(name, item)

Insert or replace an item under the given identity key.

__delitem__(name)

Delete an item by key or raise KeyError if missing.

__contains__(name)

Check whether an item with the given key exists.

__iter__()

Iterate over items in insertion order.

__len__()

Return the number of items in the collection.

remove(name)

Remove an item by its key.

Parameters:

Name Type Description Default
name str

Identity key of the item to remove.

required
keys()

Yield keys for all items in insertion order.

values()

Yield items in insertion order.

items()

Yield (key, item) pairs in insertion order.

from_cif(block)

Populate this collection from a CIF block.

add(item)

Insert or replace a pre-built item into the collection.

Parameters:

Name Type Description Default
item object

A CategoryItem instance to add.

required
create(**kwargs)

Create a new item with the given attributes and add it.

A default instance of the collection's item type is created, then each keyword argument is applied via setattr.

Parameters:

Name Type Description Default
**kwargs object

Attribute names and values for the new item.

{}
Modules
enums

Enumeration for ADP type values.

Classes:

Name Description
AdpTypeEnum

Atomic displacement parameter type.

Classes
AdpTypeEnum

Atomic displacement parameter type.

Methods:

Name Description
default

Return the default ADP type (BISO).

description

Return a human-readable description of this ADP type.

Functions
default() classmethod

Return the default ADP type (BISO).

description()

Return a human-readable description of this ADP type.

factory

Atom-sites factory — delegates entirely to FactoryBase.

Classes:

Name Description
AtomSitesFactory

Create atom-sites collections by tag.

Classes
AtomSitesFactory

Create atom-sites collections by tag.

Methods:

Name Description
__init_subclass__

Give each subclass its own independent registry and rules.

register

Class decorator to register a concrete class.

supported_tags

Return list of all supported tags.

default_tag

Resolve the default tag for a given experimental context.

create

Instantiate a registered class by tag.

create_default_for

Instantiate the default class for a given context.

supported_for

Return classes matching conditions and/or calculator.

show_supported

Pretty-print a table of supported types.

Functions
__init_subclass__(**kwargs)

Give each subclass its own independent registry and rules.

register(klass) classmethod

Class decorator to register a concrete class.

Usage::

@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)

Returns the class unmodified.

supported_tags() classmethod

Return list of all supported tags.

default_tag(**conditions) classmethod

Resolve the default tag for a given experimental context.

Uses largest-subset matching: the rule whose key is the biggest subset of the given conditions wins. A rule with an empty key (frozenset()) acts as a universal fallback.

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values, e.g. scattering_type=ScatteringTypeEnum.BRAGG.

{}

Returns:

Type Description
str

The resolved default tag string.

Raises:

Type Description
ValueError

If no rule matches the given conditions.

create(tag, **kwargs) classmethod

Instantiate a registered class by tag.

Parameters:

Name Type Description Default
tag str

type_info.tag value.

required
**kwargs object

Forwarded to the class constructor.

{}

Returns:

Type Description
object

A new instance of the registered class.

Raises:

Type Description
ValueError

If tag is not in the registry.

create_default_for(**conditions) classmethod

Instantiate the default class for a given context.

Combines default_tag(**conditions) with create(tag).

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values.

{}

Returns:

Type Description
object

A new instance of the default class.

supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Return classes matching conditions and/or calculator.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum value.

None
sample_form object

Optional SampleFormEnum value.

None
scattering_type object

Optional ScatteringTypeEnum value.

None
beam_mode object

Optional BeamModeEnum value.

None
radiation_probe object

Optional RadiationProbeEnum value.

None

Returns:

Type Description
list[type]

Classes matching the given conditions.

show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Pretty-print a table of supported types.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum filter.

None
sample_form object

Optional SampleFormEnum filter.

None
scattering_type object

Optional ScatteringTypeEnum filter.

None
beam_mode object

Optional BeamModeEnum filter.

None
radiation_probe object

Optional RadiationProbeEnum filter.

None
cell

Modules:

Name Description
default

Unit cell parameters category for structures.

factory

Cell factory — delegates entirely to FactoryBase.

Classes
Modules
default

Unit cell parameters category for structures.

Classes:

Name Description
Cell

Unit cell with lengths a, b, c and angles alpha, beta, gamma.

Classes
Cell()

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.

Methods:

Name Description
__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print parameters, other properties, and methods.

from_cif

Populate this item from a CIF block.

Attributes:

Name Type Description
length_a Parameter

Length of the a axis of the unit cell (Å).

length_b Parameter

Length of the b axis of the unit cell (Å).

length_c Parameter

Length of the c axis of the unit cell (Å).

angle_alpha Parameter

Angle between edges b and c (deg).

angle_beta Parameter

Angle between edges a and c (deg).

angle_gamma Parameter

Angle between edges a and b (deg).

unique_name str

Fully qualified name: datablock, category, entry.

parameters list

All GenericDescriptorBase instances on this item.

as_cif str

Return CIF representation of this object.

Attributes
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.

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.

unique_name property

Fully qualified name: datablock, category, entry.

parameters property

All GenericDescriptorBase instances on this item.

as_cif property

Return CIF representation of this object.

Functions
__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print parameters, other properties, and methods.

from_cif(block, idx=0)

Populate this item from a CIF block.

Modules
factory

Cell factory — delegates entirely to FactoryBase.

Classes:

Name Description
CellFactory

Create unit-cell categories by tag.

Classes
CellFactory

Create unit-cell categories by tag.

Methods:

Name Description
__init_subclass__

Give each subclass its own independent registry and rules.

register

Class decorator to register a concrete class.

supported_tags

Return list of all supported tags.

default_tag

Resolve the default tag for a given experimental context.

create

Instantiate a registered class by tag.

create_default_for

Instantiate the default class for a given context.

supported_for

Return classes matching conditions and/or calculator.

show_supported

Pretty-print a table of supported types.

Functions
__init_subclass__(**kwargs)

Give each subclass its own independent registry and rules.

register(klass) classmethod

Class decorator to register a concrete class.

Usage::

@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)

Returns the class unmodified.

supported_tags() classmethod

Return list of all supported tags.

default_tag(**conditions) classmethod

Resolve the default tag for a given experimental context.

Uses largest-subset matching: the rule whose key is the biggest subset of the given conditions wins. A rule with an empty key (frozenset()) acts as a universal fallback.

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values, e.g. scattering_type=ScatteringTypeEnum.BRAGG.

{}

Returns:

Type Description
str

The resolved default tag string.

Raises:

Type Description
ValueError

If no rule matches the given conditions.

create(tag, **kwargs) classmethod

Instantiate a registered class by tag.

Parameters:

Name Type Description Default
tag str

type_info.tag value.

required
**kwargs object

Forwarded to the class constructor.

{}

Returns:

Type Description
object

A new instance of the registered class.

Raises:

Type Description
ValueError

If tag is not in the registry.

create_default_for(**conditions) classmethod

Instantiate the default class for a given context.

Combines default_tag(**conditions) with create(tag).

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values.

{}

Returns:

Type Description
object

A new instance of the default class.

supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Return classes matching conditions and/or calculator.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum value.

None
sample_form object

Optional SampleFormEnum value.

None
scattering_type object

Optional ScatteringTypeEnum value.

None
beam_mode object

Optional BeamModeEnum value.

None
radiation_probe object

Optional RadiationProbeEnum value.

None

Returns:

Type Description
list[type]

Classes matching the given conditions.

show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Pretty-print a table of supported types.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum filter.

None
sample_form object

Optional SampleFormEnum filter.

None
scattering_type object

Optional ScatteringTypeEnum filter.

None
beam_mode object

Optional BeamModeEnum filter.

None
radiation_probe object

Optional RadiationProbeEnum filter.

None
geom

Modules:

Name Description
default

Per-structure bond-generation cutoffs (standard cif_core _geom).

factory

Geom factory — delegates entirely to FactoryBase.

Classes
Modules
default

Per-structure bond-generation cutoffs (standard cif_core _geom).

Classes:

Name Description
Geom

Bond-generation cutoffs for a structure (cif_core _geom).

Classes
Geom()

Bond-generation cutoffs for a structure (cif_core _geom).

Methods:

Name Description
__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print parameters, other properties, and methods.

from_cif

Populate this item from a CIF block.

Attributes:

Name Type Description
min_bond_distance_cutoff NumericDescriptor

Minimum permitted bonded distance (angstrom).

bond_distance_incr NumericDescriptor

Increment added to the summed bonding radii (angstrom).

as_cif str

Return CIF representation of this geom category.

unique_name str

Fully qualified name: datablock, category, entry.

parameters list

All GenericDescriptorBase instances on this item.

Attributes
min_bond_distance_cutoff property writable

Minimum permitted bonded distance (angstrom).

bond_distance_incr property writable

Increment added to the summed bonding radii (angstrom).

as_cif property

Return CIF representation of this geom category.

unique_name property

Fully qualified name: datablock, category, entry.

parameters property

All GenericDescriptorBase instances on this item.

Functions
__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print parameters, other properties, and methods.

from_cif(block, idx=0)

Populate this item from a CIF block.

factory

Geom factory — delegates entirely to FactoryBase.

Classes:

Name Description
GeomFactory

Create bond-geometry-cutoff categories by tag.

Classes
GeomFactory

Create bond-geometry-cutoff categories by tag.

Methods:

Name Description
__init_subclass__

Give each subclass its own independent registry and rules.

register

Class decorator to register a concrete class.

supported_tags

Return list of all supported tags.

default_tag

Resolve the default tag for a given experimental context.

create

Instantiate a registered class by tag.

create_default_for

Instantiate the default class for a given context.

supported_for

Return classes matching conditions and/or calculator.

show_supported

Pretty-print a table of supported types.

Functions
__init_subclass__(**kwargs)

Give each subclass its own independent registry and rules.

register(klass) classmethod

Class decorator to register a concrete class.

Usage::

@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)

Returns the class unmodified.

supported_tags() classmethod

Return list of all supported tags.

default_tag(**conditions) classmethod

Resolve the default tag for a given experimental context.

Uses largest-subset matching: the rule whose key is the biggest subset of the given conditions wins. A rule with an empty key (frozenset()) acts as a universal fallback.

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values, e.g. scattering_type=ScatteringTypeEnum.BRAGG.

{}

Returns:

Type Description
str

The resolved default tag string.

Raises:

Type Description
ValueError

If no rule matches the given conditions.

create(tag, **kwargs) classmethod

Instantiate a registered class by tag.

Parameters:

Name Type Description Default
tag str

type_info.tag value.

required
**kwargs object

Forwarded to the class constructor.

{}

Returns:

Type Description
object

A new instance of the registered class.

Raises:

Type Description
ValueError

If tag is not in the registry.

create_default_for(**conditions) classmethod

Instantiate the default class for a given context.

Combines default_tag(**conditions) with create(tag).

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values.

{}

Returns:

Type Description
object

A new instance of the default class.

supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Return classes matching conditions and/or calculator.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum value.

None
sample_form object

Optional SampleFormEnum value.

None
scattering_type object

Optional ScatteringTypeEnum value.

None
beam_mode object

Optional BeamModeEnum value.

None
radiation_probe object

Optional RadiationProbeEnum value.

None

Returns:

Type Description
list[type]

Classes matching the given conditions.

show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Pretty-print a table of supported types.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum filter.

None
sample_form object

Optional SampleFormEnum filter.

None
scattering_type object

Optional ScatteringTypeEnum filter.

None
beam_mode object

Optional BeamModeEnum filter.

None
radiation_probe object

Optional RadiationProbeEnum filter.

None
space_group

Modules:

Name Description
default

Space group category for crystallographic structures.

factory

Space-group factory — delegates entirely to FactoryBase.

Classes
Modules
default

Space group category for crystallographic structures.

Classes:

Name Description
SpaceGroup

Space group with H-M symbol and IT coordinate system code.

Classes
SpaceGroup()

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.

Methods:

Name Description
__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print parameters, other properties, and methods.

from_cif

Populate this item from a CIF block.

Attributes:

Name Type Description
name_h_m StringDescriptor

Hermann-Mauguin symbol of the space group.

it_coordinate_system_code StringDescriptor

A qualifier identifying which setting in IT is used.

crystal_system str

Crystal system derived from the H-M symbol.

unique_name str

Fully qualified name: datablock, category, entry.

parameters list

All GenericDescriptorBase instances on this item.

as_cif str

Return CIF representation of this object.

Attributes
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.

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.

crystal_system property

Crystal system derived from the H-M symbol.

unique_name property

Fully qualified name: datablock, category, entry.

parameters property

All GenericDescriptorBase instances on this item.

as_cif property

Return CIF representation of this object.

Functions
__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print parameters, other properties, and methods.

from_cif(block, idx=0)

Populate this item from a CIF block.

factory

Space-group factory — delegates entirely to FactoryBase.

Classes:

Name Description
SpaceGroupFactory

Create space-group categories by tag.

Classes
SpaceGroupFactory

Create space-group categories by tag.

Methods:

Name Description
__init_subclass__

Give each subclass its own independent registry and rules.

register

Class decorator to register a concrete class.

supported_tags

Return list of all supported tags.

default_tag

Resolve the default tag for a given experimental context.

create

Instantiate a registered class by tag.

create_default_for

Instantiate the default class for a given context.

supported_for

Return classes matching conditions and/or calculator.

show_supported

Pretty-print a table of supported types.

Functions
__init_subclass__(**kwargs)

Give each subclass its own independent registry and rules.

register(klass) classmethod

Class decorator to register a concrete class.

Usage::

@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)

Returns the class unmodified.

supported_tags() classmethod

Return list of all supported tags.

default_tag(**conditions) classmethod

Resolve the default tag for a given experimental context.

Uses largest-subset matching: the rule whose key is the biggest subset of the given conditions wins. A rule with an empty key (frozenset()) acts as a universal fallback.

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values, e.g. scattering_type=ScatteringTypeEnum.BRAGG.

{}

Returns:

Type Description
str

The resolved default tag string.

Raises:

Type Description
ValueError

If no rule matches the given conditions.

create(tag, **kwargs) classmethod

Instantiate a registered class by tag.

Parameters:

Name Type Description Default
tag str

type_info.tag value.

required
**kwargs object

Forwarded to the class constructor.

{}

Returns:

Type Description
object

A new instance of the registered class.

Raises:

Type Description
ValueError

If tag is not in the registry.

create_default_for(**conditions) classmethod

Instantiate the default class for a given context.

Combines default_tag(**conditions) with create(tag).

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values.

{}

Returns:

Type Description
object

A new instance of the default class.

supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Return classes matching conditions and/or calculator.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum value.

None
sample_form object

Optional SampleFormEnum value.

None
scattering_type object

Optional ScatteringTypeEnum value.

None
beam_mode object

Optional BeamModeEnum value.

None
radiation_probe object

Optional RadiationProbeEnum value.

None

Returns:

Type Description
list[type]

Classes matching the given conditions.

show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Pretty-print a table of supported types.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum filter.

None
sample_form object

Optional SampleFormEnum filter.

None
scattering_type object

Optional ScatteringTypeEnum filter.

None
beam_mode object

Optional BeamModeEnum filter.

None
radiation_probe object

Optional RadiationProbeEnum filter.

None
space_group_wyckoff

Modules:

Name Description
default

Derived space-group Wyckoff category.

factory

Space-group Wyckoff factory — delegates entirely to FactoryBase.

Classes
Modules
default

Derived space-group Wyckoff category.

Defines :class:SpaceGroupWyckoff items and the read-only :class:SpaceGroupWyckoffCollection. Rows are derived from the bundled space-group table for the structure's current space group; they are not user-edited. Structure rebuilds the collection when the space group changes via :meth:SpaceGroupWyckoffCollection._replace_from_space_group.

Classes:

Name Description
SpaceGroupWyckoff

A single Wyckoff position of the space group (all fields read-only).

SpaceGroupWyckoffCollection

Read-only collection of derived Wyckoff positions.

Classes
SpaceGroupWyckoff()

A single Wyckoff position of the space group (all fields read-only).

Methods:

Name Description
__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print parameters, other properties, and methods.

from_cif

Populate this item from a CIF block.

Attributes:

Name Type Description
id StringDescriptor

Read-only Wyckoff-position identifier.

letter StringDescriptor

Read-only Wyckoff letter.

multiplicity IntegerDescriptor

Read-only multiplicity.

site_symmetry StringDescriptor

Read-only site-symmetry symbol.

coords_xyz StringDescriptor

Read-only orbit coordinates.

unique_name str

Fully qualified name: datablock, category, entry.

parameters list

All GenericDescriptorBase instances on this item.

as_cif str

Return CIF representation of this object.

Attributes
id property

Read-only Wyckoff-position identifier.

letter property

Read-only Wyckoff letter.

multiplicity property

Read-only multiplicity.

site_symmetry property

Read-only site-symmetry symbol.

coords_xyz property

Read-only orbit coordinates.

unique_name property

Fully qualified name: datablock, category, entry.

parameters property

All GenericDescriptorBase instances on this item.

as_cif property

Return CIF representation of this object.

Functions
__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print parameters, other properties, and methods.

from_cif(block, idx=0)

Populate this item from a CIF block.

SpaceGroupWyckoffCollection()

Read-only collection of derived Wyckoff positions.

Methods:

Name Description
add

Reject public mutation; the collection is derived (read-only).

create

Reject public mutation; the collection is derived (read-only).

remove

Reject public mutation; the collection is derived (read-only).

__setitem__

Reject item assignment; the collection is derived (read-only).

__delitem__

Reject item deletion; the collection is derived (read-only).

from_cif

Ignore incoming CIF values for this derived category.

__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print a summary of public attributes and contained items.

__getitem__

Return an item by name or positional index.

__contains__

Check whether an item with the given key exists.

__iter__

Iterate over items in insertion order.

__len__

Return the number of items in the collection.

keys

Yield keys for all items in insertion order.

values

Yield items in insertion order.

items

Yield (key, item) pairs in insertion order.

Attributes:

Name Type Description
unique_name str | None

Return None; collections have no unique name.

parameters list

All parameters from all items in this collection.

as_cif str

Return CIF representation of this object.

names list[str | None]

List of all item keys in the collection.

scalar_descriptors list

Collection-level descriptors serialized outside the loop.

Attributes
unique_name property

Return None; collections have no unique name.

parameters property

All parameters from all items in this collection.

as_cif property

Return CIF representation of this object.

names property

List of all item keys in the collection.

scalar_descriptors property

Collection-level descriptors serialized outside the loop.

Functions
add(item)

Reject public mutation; the collection is derived (read-only).

create(**kwargs)

Reject public mutation; the collection is derived (read-only).

remove(name)

Reject public mutation; the collection is derived (read-only).

__setitem__(name, item)

Reject item assignment; the collection is derived (read-only).

__delitem__(name)

Reject item deletion; the collection is derived (read-only).

from_cif(block)

Ignore incoming CIF values for this derived category.

The Wyckoff table is derived from the structure's space group and is never read back from a CIF file: any _space_group_Wyckoff.* loop in incoming CIF (for example a hand-edited project file) is discarded and the table is rebuilt from the space group on the next update.

__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print a summary of public attributes and contained items.

__getitem__(key)

Return an item by name or positional index.

Parameters:

Name Type Description Default
key str | int

Identity key (str) or zero-based positional index (int).

required

Returns:

Type Description
GuardedBase

The item matching the given key or index.

Raises:

Type Description
TypeError

If key is neither str nor int.

__contains__(name)

Check whether an item with the given key exists.

__iter__()

Iterate over items in insertion order.

__len__()

Return the number of items in the collection.

keys()

Yield keys for all items in insertion order.

values()

Yield items in insertion order.

items()

Yield (key, item) pairs in insertion order.

Modules
factory

Space-group Wyckoff factory — delegates entirely to FactoryBase.

Classes:

Name Description
SpaceGroupWyckoffFactory

Create space-group Wyckoff collections by tag.

Classes
SpaceGroupWyckoffFactory

Create space-group Wyckoff collections by tag.

Methods:

Name Description
__init_subclass__

Give each subclass its own independent registry and rules.

register

Class decorator to register a concrete class.

supported_tags

Return list of all supported tags.

default_tag

Resolve the default tag for a given experimental context.

create

Instantiate a registered class by tag.

create_default_for

Instantiate the default class for a given context.

supported_for

Return classes matching conditions and/or calculator.

show_supported

Pretty-print a table of supported types.

Functions
__init_subclass__(**kwargs)

Give each subclass its own independent registry and rules.

register(klass) classmethod

Class decorator to register a concrete class.

Usage::

@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)

Returns the class unmodified.

supported_tags() classmethod

Return list of all supported tags.

default_tag(**conditions) classmethod

Resolve the default tag for a given experimental context.

Uses largest-subset matching: the rule whose key is the biggest subset of the given conditions wins. A rule with an empty key (frozenset()) acts as a universal fallback.

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values, e.g. scattering_type=ScatteringTypeEnum.BRAGG.

{}

Returns:

Type Description
str

The resolved default tag string.

Raises:

Type Description
ValueError

If no rule matches the given conditions.

create(tag, **kwargs) classmethod

Instantiate a registered class by tag.

Parameters:

Name Type Description Default
tag str

type_info.tag value.

required
**kwargs object

Forwarded to the class constructor.

{}

Returns:

Type Description
object

A new instance of the registered class.

Raises:

Type Description
ValueError

If tag is not in the registry.

create_default_for(**conditions) classmethod

Instantiate the default class for a given context.

Combines default_tag(**conditions) with create(tag).

Parameters:

Name Type Description Default
**conditions object

Experimental-axis values.

{}

Returns:

Type Description
object

A new instance of the default class.

supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Return classes matching conditions and/or calculator.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum value.

None
sample_form object

Optional SampleFormEnum value.

None
scattering_type object

Optional ScatteringTypeEnum value.

None
beam_mode object

Optional BeamModeEnum value.

None
radiation_probe object

Optional RadiationProbeEnum value.

None

Returns:

Type Description
list[type]

Classes matching the given conditions.

show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None) classmethod

Pretty-print a table of supported types.

Parameters:

Name Type Description Default
calculator object

Optional CalculatorEnum filter.

None
sample_form object

Optional SampleFormEnum filter.

None
scattering_type object

Optional ScatteringTypeEnum filter.

None
beam_mode object

Optional BeamModeEnum filter.

None
radiation_probe object

Optional RadiationProbeEnum filter.

None

collection

Collection of structure data blocks.

Classes:

Name Description
Structures

Ordered collection of :class:Structure instances.

Classes

Structures()

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.

Methods:

Name Description
create

Create a minimal structure and add it to the collection.

add_from_cif_str

Create a structure from CIF content and add it.

add_from_cif_path

Create a structure from a CIF file and add it.

show_names

List all structure names in the collection.

show_params

Show parameters of all structures in the collection.

__str__

Human-readable representation of this component.

__repr__

Return the developer representation of this object.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print a summary of public attributes and contained items.

__getitem__

Return an item by name or positional index.

__setitem__

Insert or replace an item under the given identity key.

__delitem__

Delete an item by key or raise KeyError if missing.

__contains__

Check whether an item with the given key exists.

__iter__

Iterate over items in insertion order.

__len__

Return the number of items in the collection.

remove

Remove an item by its key.

keys

Yield keys for all items in insertion order.

values

Yield items in insertion order.

items

Yield (key, item) pairs in insertion order.

add

Add a pre-built item to the collection.

Attributes:

Name Type Description
unique_name str | None

Return None; collections have no unique name.

parameters list

All parameters from all datablocks in this collection.

as_cif str

Return CIF representation of this object.

names list[str | None]

List of all item keys in the collection.

fittable_parameters list

All Parameters not blocked by constraints or symmetry.

free_parameters list

All fittable parameters that are currently marked as free.

Attributes
unique_name property

Return None; collections have no unique name.

parameters property

All parameters from all datablocks in this collection.

as_cif property

Return CIF representation of this object.

names property

List of all item keys in the collection.

fittable_parameters property

All Parameters not blocked by constraints or symmetry.

free_parameters property

All fittable parameters that are currently marked as free.

Functions
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
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
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
show_names()

List all structure names in the collection.

show_params()

Show parameters of all structures in the collection.

__str__()

Human-readable representation of this component.

__repr__()

Return the developer representation of this object.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print a summary of public attributes and contained items.

__getitem__(key)

Return an item by name or positional index.

Parameters:

Name Type Description Default
key str | int

Identity key (str) or zero-based positional index (int).

required

Returns:

Type Description
GuardedBase

The item matching the given key or index.

Raises:

Type Description
TypeError

If key is neither str nor int.

__setitem__(name, item)

Insert or replace an item under the given identity key.

__delitem__(name)

Delete an item by key or raise KeyError if missing.

__contains__(name)

Check whether an item with the given key exists.

__iter__()

Iterate over items in insertion order.

__len__()

Return the number of items in the collection.

remove(name)

Remove an item by its key.

Parameters:

Name Type Description Default
name str

Identity key of the item to remove.

required
keys()

Yield keys for all items in insertion order.

values()

Yield items in insertion order.

items()

Yield (key, item) pairs in insertion order.

add(item)

Add a pre-built item to the collection.

Parameters:

Name Type Description Default
item object

A DatablockItem instance (e.g. a Structure or ExperimentBase subclass).

required

item

Modules:

Name Description
base

Structure datablock item.

factory

Factory for creating structure instances from various inputs.

Modules

base

Structure datablock item.

Classes:

Name Description
Structure

Structure datablock item.

Classes
Structure(*, name)

Structure datablock item.

Methods:

Name Description
show_as_cif

Render the CIF text for this structure in the terminal.

__str__

Human-readable representation of this component.

__repr__

Developer-oriented representation of this component.

__getattr__

Raise a descriptive error for unknown attribute access.

__setattr__

Set an attribute with access-control diagnostics.

help

Print a summary of public attributes and categories.

Attributes:

Name Type Description
name str

Name identifier for this structure.

cell Cell

Unit-cell category for this structure.

space_group SpaceGroup

Space-group category for this structure.

atom_sites AtomSites

Atom-sites collection for this structure.

atom_site_aniso AtomSiteAnisoCollection

Anisotropic-ADP collection for this structure.

geom Geom

Bond-geometry cutoffs for this structure.

space_group_wyckoff SpaceGroupWyckoffCollection

Read-only Wyckoff table derived from the current space group.

unique_name str | None

Unique name of this datablock item (from identity).

parameters list

All parameters from all owned categories.

as_cif str

Return CIF representation of this object.

categories list

All category objects owned by this object, sorted by priority.

Attributes
name property writable

Name identifier for this structure.

Returns:

Type Description
str

The structure's name.

cell property writable

Unit-cell category for this structure.

space_group property writable

Space-group category for this structure.

atom_sites property writable

Atom-sites collection for this structure.

atom_site_aniso property writable

Anisotropic-ADP collection for this structure.

geom property writable

Bond-geometry cutoffs for this structure.

space_group_wyckoff property

Read-only Wyckoff table derived from the current space group.

unique_name property

Unique name of this datablock item (from identity).

parameters property

All parameters from all owned categories.

as_cif property

Return CIF representation of this object.

categories property

All category objects owned by this object, sorted by priority.

Functions
show_as_cif()

Render the CIF text for this structure in the terminal.

__str__()

Human-readable representation of this component.

__repr__()

Developer-oriented representation of this component.

__getattr__(key)

Raise a descriptive error for unknown attribute access.

__setattr__(key, value)

Set an attribute with access-control diagnostics.

help()

Print a summary of public attributes and categories.

Functions
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.

Classes:

Name Description
StructureFactory

Create :class:Structure instances from supported inputs.

Classes
StructureFactory()

Create :class:Structure instances from supported inputs.

Methods:

Name Description
from_scratch

Create a minimal default structure.

from_cif_str

Create a structure by parsing a CIF string.

from_cif_path

Create a structure by reading and parsing a CIF file.

Functions
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.

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.

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.

Functions