Molecular Fingerprints 2D: Morgan/ECFP Circular Hashing
Interactive 2D molecular-fingerprint simulator: a live spring-mass force-directed layout draws two skeletal molecular graphs, the real Morgan/ECFP algorithm hashes each atom's growing bonded neighborhood by graph hop-distance into a fixed-length bit vector, and the two molecules are compared live by Tanimoto similarity.
Before a neural network or a similarity search can compare two molecules, each one first has to become a fixed-length vector of numbers — and the dominant way to do that in cheminformatics is the Morgan / Extended-Connectivity Fingerprint (ECFP) algorithm. This 2D simulator lays out two randomly generated molecular graphs with a live spring-mass force-directed physics simulation — every atom repels every other atom, every bond behaves as a damped spring toward its rest length — the same class of algorithm used to draw real 2D skeletal structures, then runs the real circular-substructure hashing procedure on each: every atom's identifier is folded together with its neighbors' identifiers, radius by radius, and every identifier produced along the way is hashed into a bit of a fixed-length fingerprint vector. Click any atom on molecule A to run a real breadth-first search over the bond graph and shade every atom by its exact hop-distance from the click — the same atoms whose hashes were combined to produce that identifier — and watch the two bit vectors and their Tanimoto similarity update live as you change the radius, the fingerprint length, or regenerate either molecule.
Watch a live 2D spring-mass force-directed layout draw two molecular graphs, then run the real Morgan/ECFP algorithm to hash each atom's growing bonded neighborhood into a fixed-length bit vector, click an atom to shade its exact bond hop-distance neighborhood, and compare the two molecules live by Tanimoto similarity.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install