{# page.html — replaces Sphinx's basic/page.html for all content pages. For the index page (pagename == 'index') this renders the full marketing landing page (scikit-learn style), bypassing the standard RST body. For all other pages it falls through to the normal Sphinx body block. #} {% extends "layout.html" %} {# Required: put RST-rendered HTML into the body block for non-index pages. #} {% block body %}{{ body }}{% endblock %} {# ── Suppress right TOC on the landing page ─────────────────── #} {% block docs_toc %} {% if pagename != 'index' %}{{ super() }}{% endif %} {% endblock %} {# ── Main content area ───────────────────────────────────────── #} {% block docs_main %} {% if pagename == 'index' %} {# ═══════════════════════════════════════ LANDING PAGE ═══════════ #}
{# ══════════════════════════════════════════ HERO ═══ #}

Polymer topology toolkit

Topoly

A Python package for polymer topology analysis. Detect knots, links, and lassos; compute polynomial invariants; find minimal surfaces; and visualize complex 3D structures.

Quick install

pip install topoly
Available versions
{% if switcher_versions %} {% endif %}
{# ════════════════════════════════════════ FEATURES ═══ #}

What you can do with Topoly

From simple knot detection to full topological analysis of complex polymer structures. Each tile links to the documentation and to a live code example in our interactive notebook.

Polymer chain closure diagram

Topology Detection

Identify knots, links, lassos, theta-curves, and handcuffs in polymer chains. Supports all major topology types.

📐

Polynomial Invariants

Compute a wide range of topological invariants to uniquely characterize polymer topology.

Alexander Jones Conway HOMFLY-PT Yamada Kauffman BLM/Ho Writhe GLN
Minimal surface spanned on a protein loop

Minimal Surfaces

Find the minimal surface spanning a loop using Seifert surface algorithms, useful for lasso topology analysis.

✨

Structure Simplification

Reduce the complexity of a polymer chain while preserving its topological type — ideal for pre-processing large structures.

Knot fingerprint map

Knot Maps

Generate knot fingerprint maps for protein chains (KnotProt-style), showing topology over chain sub-sequences.

GLN map for spatial graph analysis

Spatial Graphs & Random Structures

Analyse spatial graphs (theta-curves, handcuffs) and generate random polymer structures for statistical topology studies.

{# ── Quick example + platform support ── #}

Quick example

Python — detect knot type
import topoly

# XYZ coordinates of a polymer chain
coords = [[0,0,0], [1,0,0], [1,1,0],
            [0,1,1], [0,0,1]]

# Compute the Alexander polynomial
result = topoly.Alexander(coords)
print(result)

# Generate a knot map for a full chain
matrix = topoly.knot_matrix(coords)

Platform support

🐧 Linux 64-bit 🍎 macOS Intel (x86_64) 🍎 macOS Apple Silicon (arm64) 🪟 Windows 64-bit

Supports Python 3.6 – 3.13. Distributed as pre-compiled binary wheels on PyPI (no compiler needed).
GPU (CUDA) acceleration available for the Alexander polynomial on Linux and Intel-based Mac.

View requirements →
{# ════════════════════════════════════════════ INSTALL ═══ #}

Installation

Install Topoly from PyPI — no compiler or build tools required.

Terminal
$ pip install topoly
  # upgrade pip first if needed
$ pip install --upgrade pip
  # install a specific version
$ pip install topoly=={{ topoly_version|default('') }}

Dependencies

Automatically installed by pip:

  • matplotlib ≥ 3.0
  • numpy ≥ 1.15 (also numpy 2.x since v1.1.0)
  • scipy ≥ 1.0
  • biopython ≥ 1.60
  • argparse ≥ 1.4
Full requirements
{# ══════════════════════════════════════════ VERSIONS ═══ #} {% if switcher_versions %}

All versions

Documentation is available for each released version of Topoly.

{% for v in switcher_versions %}
{{ v.tag }}

Topoly {{ v.tag | replace('v', '') }}{% if v.preferred %} — latest stable release{% endif %}

{{ v.description | default('') }}

{% endfor %}
{% endif %} {# ═══════════════════════════════════════════ CONTACT ═══ #}

Contact & Citation

Topoly is developed at the Interdisciplinary Laboratory of Biological Systems Modelling, University of Warsaw, Warsaw, Poland.

Questions and remarks: jsulkowska@cent.uw.edu.pl

{# end .topoly-landing #} {% else %} {# ══════════════════════════════ NORMAL DOCS PAGES ═══════════════ #} {{ super() }} {% endif %} {% endblock docs_main %}