pyspinw.exchangegroup#

Groups of exchanges, a neater way of representing multiple, similar exchanges

Classes

AbstractExchangeGroup()

Base class for exchange groups

BiDirectionFilter(direction[, max_dev_angle_deg])

Selects vectors in a given direction

DirectionalityFilter()

Base class for filtering exchanges by direction

ExchangeGroup(name, bond, min_distance, ...)

Class representing the batch creation of exchanges

InDirectionFilter(direction[, max_dev_angle_deg])

Selects vectors in a given direction

InPlaneFilter(direction[, max_dev_angle_deg])

Selects vectors in a given plane (specified by normal)

NoDirectionalityFilter()

Direction filter that always accepts

class pyspinw.exchangegroup.AbstractExchangeGroup#

Bases: object

Base class for exchange groups

exchanges(sites: list[Site], symmetry: SymmetrySettings)#

Get the exchanges defined by this groups given the sites and symmetry provided

class pyspinw.exchangegroup.BiDirectionFilter(direction: ArrayLike, max_dev_angle_deg: float = 0.01)#

Bases: DirectionalityFilter

Selects vectors in a given direction

accept(vector)#

DirectionalityFilter implementation: return True if in a similar direction

class pyspinw.exchangegroup.DirectionalityFilter#

Bases: object

Base class for filtering exchanges by direction

accept(vector: ndarray) → bool#

return True if in an allowed direction

class pyspinw.exchangegroup.ExchangeGroup(name: str, bond: int, min_distance: float, max_distance: float, max_order: int | None, naming_pattern: str | None, exchange_type: type[Exchange], exchange_parameters: dict, direction_filter: DirectionalityFilter | None)#

Bases: object

Class representing the batch creation of exchanges

exchanges(sites: list[Site], unit_cell: UnitCell)#

Get the exchanges defined by this groups given the sites and symmetry provided

class pyspinw.exchangegroup.InDirectionFilter(direction: ArrayLike, max_dev_angle_deg: float = 0.01)#

Bases: DirectionalityFilter

Selects vectors in a given direction

accept(vector)#

DirectionalityFilter implementation: return True if in a similar direction

class pyspinw.exchangegroup.InPlaneFilter(direction: ArrayLike, max_dev_angle_deg: float = 0.01)#

Bases: DirectionalityFilter

Selects vectors in a given plane (specified by normal)

accept(vector)#

DirectionalityFilter implementation: return True if in the plane normal to provided vector

class pyspinw.exchangegroup.NoDirectionalityFilter#

Bases: object

Direction filter that always accepts

accept(vector: ndarray) → bool#

return True if in an allowed direction (in this case, always)