TorchCor

TorchCor hero image

TorchCor is a Python library for simulating how electrical signals travel through the heart. These signals coordinate each heartbeat, and when they go wrong, dangerous rhythm disorders called arrhythmias can result. Simulating this process helps researchers and clinicians understand what causes these disorders and how to treat them — but traditionally, it has required access to expensive supercomputing clusters with many processors.

TorchCor removes this barrier by running simulations on GPUs (graphics processing units), the same type of hardware used in gaming and artificial intelligence. Built on top of PyTorch, a widely used machine learning framework, it can perform large-scale heart simulations on a single desktop workstation significantly faster than conventional CPU-based tools. This also makes it straightforward to combine traditional physics-based models with newer AI-driven approaches within a single environment. TorchCor has been rigorously verified against established solvers and benchmark problems and is freely available for academic and commercial use.

Getting Started

TorchCor can be installed via pip:

python -m pip install torchcor

For more information, visit the TorchCor GitHub repository or read the accompanying paper on arXiv.