Ionic models

Biophysical cell models live in torchcor.ionic. Each exposes the same minimal interface the simulators use:

  • initialize(n_nodes) – allocate per-node state, return the resting Vm;

  • differentiate(Vm) – one ionic-current update step.

Pass an instance (or a list, one per region) to Monodomain or ReactionEikonal.

Available models

Class

Description

ModifiedMS2v

Modified two-variable Mitchell-Schaeffer model (fast, phenomenological).

MitchellSchaeffer

Mitchell-Schaeffer phenomenological model.

CourtemancheRamirezNattel

Human atrial myocyte model.

TenTusscherPanfilov

Human ventricular myocyte model (cell_type = ENDO / MID / EPI).

Example

from torchcor.ionic import ModifiedMS2v, TenTusscherPanfilov

atrial      = ModifiedMS2v(dt=0.01)                       # phenomenological
ventricular = TenTusscherPanfilov(cell_type="ENDO", dt=0.01)

Note

The cell models are compiled with @torch.jit.script for speed, so they are not introspected by autodoc – the table above is the reference.