transition#

Find allowed transitions between an initial and final state.

class SolvingMode(value)[source]#

Bases: Enum

Types of modes for solving.

FAST = 1#

Find β€œlikeliest” solutions only.

FULL = 2#

Find all possible solutions.

class ExecutionInfo(not_executed_node_rules: Dict[int, Set[str]] = _Nothing.NOTHING, violated_node_rules: Dict[int, Set[str]] = _Nothing.NOTHING, not_executed_edge_rules: Dict[int, Set[str]] = _Nothing.NOTHING, violated_edge_rules: Dict[int, Set[str]] = _Nothing.NOTHING)[source]#

Bases: object

not_executed_node_rules: Dict[int, Set[str]]#
violated_node_rules: Dict[int, Set[str]]#
not_executed_edge_rules: Dict[int, Set[str]]#
violated_edge_rules: Dict[int, Set[str]]#
extend(other_result: ExecutionInfo, intersect_violations: bool = False) β†’ None[source]#
clear() β†’ None[source]#
class ProblemSet(topology: Topology, initial_facts: InitialFacts, solving_settings: GraphSettings)[source]#

Bases: object

Particle reaction problem set, defined as a graph like data structure.

Parameters:
  • topology – Topology that contains the structure of the reaction.

  • initial_facts – InitialFacts that contain the info of initial and final state in connection with the topology.

  • solving_settings – Solving related settings such as the conservation rules and the quantum number domains.

topology: Topology#
initial_facts: InitialFacts#
solving_settings: GraphSettings#
to_qn_problem_set() β†’ QNProblemSet[source]#
class StateTransitionManager(initial_state: Sequence[Union[str, Tuple[str, Sequence[float]]]], final_state: Sequence[Union[str, Tuple[str, Sequence[float]]]], particle_db: Optional[ParticleCollection] = None, allowed_intermediate_particles: Optional[List[str]] = None, interaction_type_settings: Optional[Dict[InteractionType, Tuple[EdgeSettings, NodeSettings]]] = None, formalism: str = 'helicity', topology_building: str = 'isobar', solving_mode: SolvingMode = SolvingMode.FAST, reload_pdg: bool = False, mass_conservation_factor: Optional[float] = 3.0, max_angular_momentum: int = 1, max_spin_magnitude: float = 2.0, number_of_threads: Optional[int] = None)[source]#

Bases: object

Main handler for decay topologies.

interaction_determinators: List[InteractionDeterminator]#

Checks that are executed over selected conservation rules.

See also

{ref}`usage/reaction:Select interaction types`

topologies: Tuple[Topology, ...]#

Topology instances over which the STM propagates quantum numbers.

set_allowed_intermediate_particles(name_patterns: Union[Iterable[str], str], regex: bool = False) β†’ None[source]#
property formalism: str#
add_final_state_grouping(fs_group: Union[List[str], List[List[str]]]) β†’ None[source]#
get_allowed_interaction_types() β†’ Union[List[InteractionType], Dict[int, List[InteractionType]]][source]#
get_allowed_interaction_types(node_id: int) β†’ List[InteractionType]
set_allowed_interaction_types(allowed_interaction_types: Iterable[InteractionType], node_id: Optional[int] = None) β†’ None[source]#
create_problem_sets() β†’ Dict[float, List[ProblemSet]][source]#
find_solutions(problem_sets: Dict[float, List[ProblemSet]]) β†’ ReactionInfo[source]#

Check for solutions for a specific set of interaction settings.

class State(particle: Particle, spin_projection: SupportsFloat)[source]#

Bases: object

particle: Particle#
spin_projection: float#
class StateTransition(topology: Topology, states, interactions)[source]#

Bases: object

Frozen instance of a StateTransitionGraph of a particle with spin.

topology: Topology#
states: FrozenDict[int, State]#
interactions: FrozenDict[int, InteractionProperties]#
static from_graph(graph: StateTransitionGraph[Tuple[Particle, float]]) β†’ StateTransition[source]#
to_graph() β†’ StateTransitionGraph[Tuple[Particle, float]][source]#
property initial_states: Dict[int, State]#
property final_states: Dict[int, State]#
property intermediate_states: Dict[int, State]#
filter_states(edge_ids: Iterable[int]) β†’ Dict[int, State][source]#
property particles: Dict[int, Particle]#
class StateTransitionCollection(transitions: Iterable[StateTransition])[source]#

Bases: Sequence

StateTransition instances with the same Topology and edge IDs.

transitions: Tuple[StateTransition, ...]#
topology: Topology#
initial_state: FrozenDict[int, Particle]#
final_state: FrozenDict[int, Particle]#
__getitem__(idx: int) β†’ StateTransition[source]#
__getitem__(idx: slice) β†’ Tuple[StateTransition]
static from_graphs(graphs: Iterable[StateTransitionGraph[Tuple[Particle, float]]]) β†’ StateTransitionCollection[source]#
to_graphs() β†’ List[StateTransitionGraph[Tuple[Particle, float]]][source]#
get_intermediate_particles() β†’ ParticleCollection[source]#

Extract the particle names of the intermediate states.

class ReactionInfo(transition_groups: Iterable[StateTransitionCollection], formalism: str)[source]#

Bases: object

StateTransitionCollection instances, grouped by Topology.

transition_groups: Tuple[StateTransitionCollection, ...]#
transitions: Tuple[StateTransition, ...]#
initial_state: FrozenDict[int, Particle]#
final_state: FrozenDict[int, Particle]#
formalism: str#
get_intermediate_particles() β†’ ParticleCollection[source]#

Extract the names of the intermediate state particles.

static from_graphs(graphs: Iterable[StateTransitionGraph[Tuple[Particle, float]]], formalism: str) β†’ ReactionInfo[source]#
to_graphs() β†’ List[StateTransitionGraph[Tuple[Particle, float]]][source]#