CodeEntropy.entropy.orientational module¶
Orientational entropy calculations.
This module defines OrientationalEntropy, which computes orientational entropy from a neighbor count and symmetry information.
- class CodeEntropy.entropy.orientational.OrientationalEntropy(gas_constant: float = 8.3144598484848)[source]¶
Bases:
objectCompute orientational entropy from neighbor counts.
This class is intentionally small and focused: it provides a single public method that converts a mapping of neighbor species to neighbor counts into an orientational entropy value.
Notes
The manager-like constructor signature is kept for compatibility with the rest of the codebase, but the calculation itself does not depend on those objects.
- calculate(neighbor_count: float, symmetry_number: int, linear: bool) OrientationalEntropyResult[source]¶
Calculate orientational entropy from neighbor counts.
- The number of orientations is estimated as:
Ω = sqrt(N_av^3 * π)/symmetry_number for non-linear molecules Ω = N_av / symmetry_number for linear molecules
and the entropy contribution is:
S = R * ln(Ω)
where N_av is the average number of neighbors and R is the gas constant.
- Parameters:
neighbors – average number of neighbors
symmetry_number – symmetry number of molecule of interest
linear – True if molecule of interest is linear
- Returns:
OrientationalEntropyResult containing the total entropy in J/mol/K.
- Raises:
ValueError if number of neighbors is negative. –