Version: dev

add_species

Stable function · Editing

Tier: stable · Kind: function · Topic: Editing

JuliaTypeScriptPythonRustGo
add_speciesaddSpeciesadd_species, add_species_to_systemadd_speciesAddSpecies

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

Julia

add_species(system::ReactionSystem, name::String, species::Species)
add_species(system::ReactionSystem, name::String, species::Species) -> ReactionSystem

Add a new species to a reaction system.

Source

TypeScript

function addSpecies(system: ReactionSystem, name: string, species: Species): ReactionSystem

Add a new species to a reaction system

Parameters

  • system — ReactionSystem to add species to
  • name — Species name
  • species — Species definition

Returns

New reaction system with species added

Source

Python

Exported as add_species and add_species_to_system. Both names refer to the same operation.

add_species

add_species(reaction_system: ReactionSystem, species: Species, validate_after_edit: bool = True) -> EditResult

Add a species to a reaction system.

Source

add_species_to_system

add_species_to_system(reaction_system: ReactionSystem, species: Species, validate_after_edit: bool = True) -> EditResult

Deprecated alias for add_species . Add a species to a reaction system.

Source

Rust

pub fn add_species(system: &ReactionSystem, name: &str, species: Species) -> EditResult<ReactionSystem>

Add a species to a reaction system

Arguments

  • system - The reaction system to modify
  • name - Unique species name (used as the map key)
  • species - The species to add

Returns

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

Source · Rust docs

Go

func AddSpecies(system ReactionSystem, name string, species Species) ReactionSystem

AddSpecies returns a copy of system carrying species under name. An existing species of that name is replaced.

Source · Go docs