Numerical and AI4S methods, written for agents.
A curated index of classical and recent methods, each built as an agent skill: what it solves, when it applies and when it does not, how to use it in your code, and how to check that your implementation is correct.
Connect your agent
claude mcp add --transport http fhat https://fhat.dev/mcpAdds fhat to your agent as an MCP server. Start a new chat to use it.
codex mcp add fhat --url https://fhat.dev/mcpAdds fhat to your agent as an MCP server. Start a new chat to use it.
Read https://fhat.dev/llms.txt and use the fhat method that fits my problem.No setup: paste it into any agent that reads web pages.
How it works
-
“Can you improve my current integrator? The energy drifts over long runs.”
1 Describe
You describe the problem in your own words.
-
Time integration
- Conservative
- yes
- Long run
- yes
- Constraints
- no
- Stiff
- asks
“Does your step resolve every vibration?” Yes.
2 Narrow down
Your agent answers the category's questions and asks you only those that change the answer.
-
- Störmer–Verletlong run · not stiff
- RK4energy drifts on long conservative runs
- Backward Eulerdamps the energy
3 Choose
Ranked methods with reasons, and the ones ruled out. If nothing fits, it says so and names the alternative.
-
my_md/integrators.py
- x += dt * v- v += dt * a(x)+ # stormer-verlet v0.1.5+ v += dt/2 * a(x)+ x += dt * v+ v += dt/2 * a(x)method checks pass
4 Port & check
It ports the method into your code, in your own conventions, and proves it right with the method's checks.
Recent methods
- DynGMAZhu and Li 2024
Infer drift and diffusion from timed pairs with a Gaussian-mixture likelihood that accounts for evolution within longer or irregular gaps.
- Family-trained explicit Runge–KuttaGuo et al. 2022
Fit a fixed-step Runge–Kutta tableau to a non-stiff ODE family. Choose the stage count and verify the fitted order on that family.
- Learn a deterministic vector field with an energy balanceYu et al. 2021
Fit a structured vector field to state pairs and verify its forcing, conservative motion and dissipation independently.
- Learning Permutation-invariant Macroscopic DynamicsHan et al. 2026
Learn deterministic or stochastic closure for intensive observables from timed, unordered particle sets.
- Processed-leapfrog MEAL (processed DKD)Jiang et al. 2026
Train a potential for a fixed step. With the exact target, processed leapfrog follows the original trajectory to fourth order. Fitting error can limit accuracy.
- Spectral OnsagerNetLi, Zhu and Li 2026
Infer a field energy and Fourier transport multipliers from time-ordered periodic data and check both dissipation and signed wave propagation.
- Stochastic OnsagerNetChen et al. 2024
Keep a chosen observable, learn closure coordinates from microscopic trajectories and predict conditional means and uncertainty.
- Universal and Identifiable Dissipative DynamicsZhu et al. 2026
Fit a confined diffusion to timed transitions and estimate its stationary density, probability current and entropy production rate.
- Wyckoff Transformer (WyFormer)Kazeev et al. 2025
Generate Wyckoff arrangements for a chemical system or a fixed formula. Reconstruct and relax candidates to obtain 3D structures.
Why fhat? In mathematics, f often stands for a computable approximation of f.