QRules 0.9.1
Release 0.9.1
See all documentation for this version here.
⚠️ Interface
StateTransitionCollection ordered has become ordered (#77)
Turn StateTransitionCollection
into an immutable abc.Sequence
, instead of a set
.
🐛 Bug fixes
Allow rendering iterables with graphviz (#78)
Allow converting an iterable (not just a sequence) to DOT. This enables rendering for instance the output of a filter
as DOT:
import graphviz
import qrules
reaction = qrules.generate_transitions(
initial_state="J/psi(1S)",
final_state=["K0", "Sigma+", "p~"],
allowed_interaction_types="strong",
)
transitions = filter(
lambda t: t.states[3].particle.mass > 1.75,
reaction.transitions,
)
dot = qrules.io.asdot(transitions, collapse_graphs=True, render_final_state_id=False)
graphviz.Source(dot)