Skip to main content
Glama

Physics MCP Server

by BlinkZer0
StatMech.md2.13 kB
--- title: Statistical Mechanics Tool kind: reference header_svg: src: "/assets/svg/tool-statmech-hero.svg" static: "/assets/svg/tool-statmech-hero-static.svg" title: "Statistical Mechanics Tool" animate: true theme_variant: "auto" reduced_motion: "auto" --- {% assign header_svg = page.header_svg %} {% include header-svg.html %} # Statistical Mechanics Tool - Name: `statmech_partition` - Description: Calculate partition function and thermodynamic quantities from energy levels - Package: `packages/tools-statmech/` ## Input Schema ```json { "type": "object", "properties": { "energy_levels": { "type": "array", "items": { "type": "number" }, "description": "Energy levels in Joules" }, "temperature": { "type": "number", "description": "Temperature in Kelvin", "default": 300.0 }, "degeneracies": { "type": "array", "items": { "type": "number" }, "description": "Degeneracies for each energy level (optional, defaults to 1)" } }, "required": ["energy_levels"] } ``` ## Computed Quantities - **Partition Function**: Z = Σ g_i * exp(-β E_i) - **Internal Energy**: U = ⟨E⟩ - **Heat Capacity**: C_V = k_B β² (⟨E²⟩ - ⟨E⟩²) - **Helmholtz Free Energy**: F = -k_B T ln(Z) - **Entropy**: S = k_B (ln(Z) + β U) - **Population Probabilities**: P_i = g_i exp(-β E_i) / Z ## Example Requests ### Two-Level System ```json { "jsonrpc": "2.0", "id": "statmech-1", "method": "statmech_partition", "params": { "energy_levels": [0.0, 1.602e-19], "temperature": 300.0, "degeneracies": [1, 1] } } ``` ### Three-Level System with Degeneracy ```json { "jsonrpc": "2.0", "id": "statmech-2", "method": "statmech_partition", "params": { "energy_levels": [0.0, 2.07e-21, 4.14e-21], "temperature": 77.0, "degeneracies": [1, 2, 1] } } ``` ## Notes - Energy levels should be in Joules - Temperature in Kelvin - Uses CODATA 2018 Boltzmann constant: k_B = 1.380649×10⁻²³ J/K - Automatically shifts energies to avoid numerical overflow - Returns most populated energy level index

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BlinkZer0/Phys-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server