Research

Maxwell Modernized Program

Maxwell's 1873 Treatise as executable Python — all 866 articles, in the units he actually used.

  • Research
  • Released
  • Python
  • Author
Python NumPy Pytest

What it is

In 1873, James Clerk Maxwell published A Treatise on Electricity and Magnetism. This repo is a computational re-implementation of that book: every one of its 866 articles, translated into modern, executable Python.

The distribution name on PyPI is maxwell-modernized; you still import maxwell. The quiet punchline I wanted as a function call is still there — the ratio of electromagnetic to electrostatic units is the speed of light (Arts. 771–782), in CGS-EMU, the system Maxwell used.

Why it matters

Classical EM libraries are not scarce. A path from the primary source to a result you can reproduce, with a citation you can argue with, is. I did not want a notebook that “does Faraday.” I wanted Art. 528 to be something you can grep.

Two audiences I wrote the README for: scholars who want the theory as executable math, and people who need a tested implementation of classical electromagnetism they can actually call.

How it works

The package layout mirrors the Treatise: Part I electrostatics (Arts. 1–206), Part II electrokinematics (230–370), Part III magnetism (371–474), Part IV electromagnetism (475–866), plus a shared maxwell.core of charges, fields, potentials, and magnets.

Functions carry a @maxwell_cite decorator pointing at article numbers. Constants and unit conversions live in maxwell.config.constants and maxwell.core.units. The README’s own test note is pytest tests/ -v with a large passing suite; I am not restating a wall-clock time or inventing extra coverage claims beyond “the entire work is represented.”

from maxwell.config.constants import C
from maxwell.core.units import verify_speed_of_light_relationship

print(C)  # 2.9979e+10 cm/s
print(verify_speed_of_light_relationship())  # 1.0

Status

Public at antmikinka/MAXWELL-MODERNIZED-PROGRAM. Install from PyPI: pip install maxwell-modernized. I wrote a longer walkthrough in Maxwell’s Treatise, in Python.

Related