Skip to content

get_code

get_code(lang="cpp")

Returns the rate expression as a code string in the target language.

Parameters

lang : str, optional
Target language: "python", "c", "cxx", "fortran", "rust", "julia", "r". Default "cpp".

Returns

str
Rate expression code. Photo-reactions return "photorates($IDX$, ...)".