Skip to content
Open to SDE roles · full-time and internships +91 90504 57303
Work/03
Jan – May 2026 · B.Tech thesis, computational physics

Taylor-Line microswimmers

My B.Tech thesis: a 2D molecular-dynamics engine in C++ for tiny swimmers squeezed into a shrinking space. A spatial-hashing grid made collision checks about 61 times faster.

C++PythonVelocity-VerletSpatial hashingBaadal cloudThesis
~61×faster collisions with spatial hashing
70+configurations in a resumable sweep
2,195lines of C++ and Python
O(N²) → O(N)pair checks per step
  • A hand-written Velocity-Verlet integrator and Andersen thermostat model active swimmers in a shrinking confinement.
  • A spatial-hashing grid replaced the naive all-pairs check: each particle only tests its own and neighbouring cells.
  • A resumable parameter sweep ran 70+ configurations on IIT Delhi's Baadal cloud and picked up wherever a job stopped.
How it works

The story, in chapters.

Chapter 1

Physics by hand

I wrote the integrator myself: Velocity-Verlet for motion and an Andersen thermostat to hold temperature, so active swimmers behave correctly over long runs.

Chapter 2

The slow part, and the fix

Checking every pair of particles is O(N²). I replaced it with a spatial hash: the box is cut into cells and each particle only checks its own and neighbouring cells. Measured speedup: about 61×.

The demo below is a small JavaScript sketch of the same idea. Switch modes and watch the pair-check count.

Chapter 3

Seventy-plus runs, none lost

A resumable parameter sweep ran 70+ configurations on IIT Delhi's Baadal academic cloud. If a job died, it picked up where it stopped.

Try it

Run it yourself.

Sketch · the spatial-hashing idea in JavaScript
Swimmers:

The real engine is C++ with Velocity-Verlet integration and a thermostat. This sketch only shows why hashing wins: watch the pair-check count.

The real program, recorded.The real program. Scroll to play it, scroll back to rewind.
Root-mean-square displacement from the real runs
Root-mean-square displacement from the real runs
Velocity autocorrelation from the real runs
Velocity autocorrelation from the real runs
Next project
SimpleRISC interpreter
Keep going
CV Contact