Version: dev

add_reaction

Stable function · Editing

Tier: stable · Kind: function · Topic: Editing

JuliaTypeScriptPythonRustGo
add_reactionaddReactionadd_reaction, add_reaction_to_systemadd_reactionAddReaction

Note: spelling differs from the §2 rule: python=add_reaction_to_system (expected add_reaction); multiple spellings exported by: python

Julia

add_reaction(system::ReactionSystem, reaction::Reaction)
add_reaction(system::ReactionSystem, reaction::Reaction) -> ReactionSystem

Add a new reaction to a reaction system.

Source

TypeScript

function addReaction(system: ReactionSystem, reaction: Reaction): ReactionSystem

Add a new reaction to a reaction system

Parameters

  • system — ReactionSystem to add reaction to
  • reaction — Reaction to add

Returns

New reaction system with reaction added

Source

Python

Exported as add_reaction and add_reaction_to_system. Both names refer to the same operation.

add_reaction

add_reaction(reaction_system: ReactionSystem, reaction: Reaction, validate_after_edit: bool = True) -> EditResult

Add a reaction to a reaction system.

Source

add_reaction_to_system

add_reaction_to_system(reaction_system: ReactionSystem, reaction: Reaction, validate_after_edit: bool = True) -> EditResult

Deprecated alias for add_reaction . Add a reaction to a reaction system.

Source

Rust

pub fn add_reaction(system: &ReactionSystem, reaction: Reaction) -> EditResult<ReactionSystem>

Add a reaction to a reaction system

Arguments

  • system - The reaction system to modify
  • reaction - The reaction to add

Returns

  • EditResult<ReactionSystem> - New reaction system with the added reaction

Source · Rust docs

Go

func AddReaction(system ReactionSystem, reaction Reaction) ReactionSystem

AddReaction returns a copy of system with reaction appended.

Source · Go docs