Represents a chemical reaction with phase information for thermodynamic calculations. Contains stoichiometry, reaction direction, and methods for Gibbs energy calculations.
PhasedReaction
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| IsReversible | 1 | Indicates whether the reaction is reversible |
| .ctor | 1 | Creates a new PhasedReaction |
| FromSparse | 1 | Creates a PhasedReaction from a stoichiometry dictionary with compound IDs |
| Parse | 1 | Parses a reaction formula string and creates a PhasedReaction |
| GetCoefficient | 1 | Gets the coefficient for a specific compound |
| ContainsCompound | 1 | Checks if the reaction contains a specific compound |
| GetAtomBalance | 1 | Gets the net atom balance for this reaction |
| IsBalanced | 1 | Checks if the reaction is atom-balanced |
| GetNetCharge | 1 | Gets the net charge of this reaction |
| GetNetProtons | 1 | Gets the net proton count for this reaction |
| CalculateConcentrationCorrection | 1 | Calculates the concentration correction for Gibbs energy |
| CalculatePhysiologicalCorrection | 1 | Calculates the physiological concentration correction |
| SetCompoundConcentration | 1 | Sets the concentration for a compound in this reaction |
| SetConcentrations | 1 | Sets concentrations for multiple compounds |
| Reverse | 1 | Creates a reversed version of this reaction |
| Scale | 1 | Scales the reaction by a factor |
| Combine | 1 | Combines this reaction with another reaction |
| Serialize | 1 | Serializes this reaction to a list of dictionaries |
| ToString | 1 | Formats this reaction as a formula string |
| Equals | 1 | |
| GetHashCode | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| Sparse | 1 | The stoichiometry of the reaction as a sparse vector. |
| Arrow | 1 | The arrow type used in the reaction formula |
| ReactionId | 1 | The reaction identifier |
| Name | 1 | The reaction name |
| Compounds | 1 | Gets all compounds in this reaction |
| Reactants | 1 | Gets the reactants (compounds with negative coefficients) |
| Products | 1 | Gets the products (compounds with positive coefficients) |
04 Members
Indicates whether the reaction is reversible
Dictionary(Of PhasedCompound, Double), String, String)Creates a new PhasedReaction
| Name | Type | Description |
|---|---|---|
sparse | Dictionary(Of PhasedCompound, Double) | The stoichiometry dictionary |
arrow | String | The arrow type |
rid | String | Optional reaction identifier |
Dictionary(Of String, Double), Func(Of String, PhasedCompound), String, String)Creates a PhasedReaction from a stoichiometry dictionary with compound IDs
| Name | Type | Description |
|---|---|---|
sparse | Dictionary(Of String, Double) | Dictionary mapping compound IDs to coefficients |
compoundLookup | Func(Of String, PhasedCompound) | Function to lookup compounds by ID |
arrow | String | The arrow type |
rid | String | Optional reaction identifier |
String, Func(Of String, PhasedCompound))Parses a reaction formula string and creates a PhasedReaction
| Name | Type | Description |
|---|---|---|
formula | String | The reaction formula |
compoundLookup | Func(Of String, PhasedCompound) | Function to lookup compounds by ID |
A new PhasedReaction
Gets the coefficient for a specific compound
| Name | Type | Description |
|---|---|---|
compound | PhasedCompound | The compound to look up |
The stoichiometric coefficient
Checks if the reaction contains a specific compound
| Name | Type | Description |
|---|---|---|
compound | PhasedCompound | The compound to check |
True if the compound is in the reaction
Gets the net atom balance for this reaction
Dictionary mapping element symbols to net counts
Double)Checks if the reaction is atom-balanced
| Name | Type | Description |
|---|---|---|
tolerance | Double | Tolerance for floating point comparison |
True if the reaction is balanced
Gets the net charge of this reaction
The net charge
Gets the net proton count for this reaction
The net proton count
Calculates the concentration correction for Gibbs energy
The correction in RT units
Calculates the physiological concentration correction
The correction in RT units
Double)Sets the concentration for a compound in this reaction
| Name | Type | Description |
|---|---|---|
compound | PhasedCompound | The compound |
concentration | Double | The concentration in molar |
Dictionary(Of PhasedCompound, Double))Sets concentrations for multiple compounds
| Name | Type | Description |
|---|---|---|
concentrations | Dictionary(Of PhasedCompound, Double) | Dictionary mapping compounds to concentrations |
Creates a reversed version of this reaction
A new PhasedReaction with reversed stoichiometry
Double)Scales the reaction by a factor
| Name | Type | Description |
|---|---|---|
factor | Double | The scaling factor |
A new scaled PhasedReaction
Combines this reaction with another reaction
| Name | Type | Description |
|---|---|---|
other | PhasedReaction | The other reaction |
A new combined PhasedReaction
Serializes this reaction to a list of dictionaries
A list of compound dictionaries with coefficients
Formats this reaction as a formula string
The reaction formula string
The stoichiometry of the reaction as a sparse vector. Negative values indicate reactants, positive values indicate products.
The arrow type used in the reaction formula
The reaction identifier
The reaction name
Gets all compounds in this reaction
Gets the reactants (compounds with negative coefficients)
Gets the products (compounds with positive coefficients)
Object)