Class ChemicalReaction
java.lang.Object
org.episteme.natural.chemistry.ChemicalReaction
- All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named
- Direct Known Subclasses:
BioChemicalReaction
Chemical reaction with equation balancing and stoichiometry.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateRateConstant(Quantity<Temperature> temperature) Calculates the reaction rate constant k using the Arrhenius equation. k = A * exp(-Ea / (R * T))Count atoms of each element on product side.Count atoms of each element on reactant side.getId()Returns the unique identifier of this entity.Returns the traits map for this entity.booleanCheck if the equation is balanced.massToMass(String reactant, Quantity<Mass> massReactant, Quantity<Mass> reactantMW, String product, Quantity<Mass> productMW) Calculate mass of product from mass of reactant.static ChemicalReactionParse a chemical equation string.voidsetEnthalpy(Quantity<Energy> enthalpy) voidsetGibbsFreeEnergy(Quantity<Energy> gibbs) voidsetKinetics(Quantity<Energy> activationEnergy, Quantity<Frequency> preExponentialFactor) stoichiometry(String reactant, Quantity<AmountOfSubstance> molesReactant, String product) Calculate moles of product given moles of a limiting reactant.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Constructor Details
-
ChemicalReaction
-
-
Method Details
-
getId
Description copied from interface:IdentifiedReturns the unique identifier of this entity.- Specified by:
getIdin interfaceIdentified<Identification>- Returns:
- the identifier
-
getTraits
Description copied from interface:ComprehensiveIdentificationReturns the traits map for this entity.- Specified by:
getTraitsin interfaceCommented- Specified by:
getTraitsin interfaceComprehensiveIdentification- Returns:
- the traits map
-
setGibbsFreeEnergy
-
getGibbsFreeEnergy
-
setKinetics
-
calculateRateConstant
Calculates the reaction rate constant k using the Arrhenius equation. k = A * exp(-Ea / (R * T))- Parameters:
temperature- The temperature T.- Returns:
- The rate constant k (in 1/s for first order).
-
parse
Parse a chemical equation string. Format: "2H2 + O2 -> 2H2O" or "CH4 + 2O2 = CO2 + 2H2O" -
countReactantAtoms
-
countProductAtoms
-
isBalanced
public boolean isBalanced()Check if the equation is balanced. -
stoichiometry
public Quantity<AmountOfSubstance> stoichiometry(String reactant, Quantity<AmountOfSubstance> molesReactant, String product) Calculate moles of product given moles of a limiting reactant. -
massToMass
-
setEnthalpy
-
getEnthalpy
-
getReactants
-
getProducts
-
getEquation
-
toString
-