Duello
Virial Coefficient and Dissociation Constant Estimation for Rigid Macromolecules
Table of Contents
- Quick Start
- Installation
- Overview
- Commands
- Input Formats
- Tuning and Options
- Interaction Models
- Theory
- Examples
- Development
Quick Start
Install via pip:
pip install duello
Run a two-body scan between two lysozyme molecules, starting directly from a PDB file:
duello scan \
--mol1 4lzt.pdb \
--mol2 4lzt.pdb \
--rmin 24 --rmax 80 --dr 0.5 \
--ionic-strength 0.05
This computes the potential of mean force w(R) and reports the second virial coefficient B2 and dissociation constant Kd.
The output is written to pmf.dat by default.
Duello automatically coarse-grains PDB/CIF structures using the Calvados 3 force field at pH 7.0. To override these defaults:
duello scan \
--mol1 4lzt.pdb --mol2 4lzt.pdb \
--rmin 24 --rmax 80 --dr 0.5 \
--ionic-strength 0.05 \
--ph 4.5 --model calvados3 --cg multi
Installation
Binary packages are available through PyPI:
pip install duello
Alternatively, build from source with a Rust toolchain:
cargo install --git https://github.com/mlund/duello
Overview
Duello calculates the potential of mean force (PMF) between two rigid bodies by explicitly evaluating the partition function over inter-molecular orientations on a subdivided icosphere mesh.
For each mass center separation R, the angular partition function is:
$$ \mathcal{Z}(R) = \sum_{\mathbf{\Omega}} e^{-V(R,\mathbf{\Omega})/k_BT} $$
yielding the potential of mean force:
$$ w(R) = -k_BT \ln \mathcal{Z}(R) $$
and the thermally averaged energy:
$$ U(R) = \frac{\sum V(R,\mathbf{\Omega}) e^{-V(R,\mathbf{\Omega})/k_BT}} {\mathcal{Z}(R)} $$
where $V(R,\mathbf{\Omega})$ is the total inter-body interaction energy and $\mathbf{\Omega}$ represents the 5D angular space (two spherical coordinates per body plus a dihedral angle around the inter-molecular axis).
From w(R), duello derives the osmotic second virial coefficient B2 and, for net-attractive systems, the dissociation constant Kd. See Theory for the full expressions.
Commands
Main subcommands:
| Command | Purpose |
|---|---|
duello scan |
6D scan between two rigid bodies; computes w(R), B2, Kd |
duello atom-scan |
3D scan between a rigid body and a single atom type |
duello nbody |
Monte Carlo of N rigid proteins on a saved scan; I(q), S(q), g(r) |
duello nbody-expand |
Convert an nbody trajectory to bead XTC for viewers |
duello modes |
The poses that carry B2, grouped into binding modes |
duello diffusion |
Rotational diffusion analysis from a saved 6D energy table |
duello scan -- Two-Body Scan
The primary command. Scans all inter-molecular orientations at each mass center separation to compute w(R), B2, and Kd.
From PDB/CIF (simplest):
duello scan \
--mol1 4lzt.pdb --mol2 4lzt.pdb \
--rmin 24 --rmax 80 --dr 0.5 \
--ionic-strength 0.05
From pre-generated XYZ (full control):
duello scan \
--mol1 cppm-p18.xyz --mol2 cppm-p18.xyz \
--rmin 37 --rmax 50 --dr 0.5 \
--top topology.yaml \
--max-ndiv 3 \
--ionic-strength 0.05 \
--temperature 298.15 \
--backend auto \
--grid "type=powerlaw2,size=200"
Key Options
| Flag | Default | Description |
|---|---|---|
-1, --mol1 |
(required) | First structure (PDB, CIF, or XYZ) |
-2, --mol2 |
(required) | Second structure (PDB, CIF, or XYZ) |
--rmin, --rmax, --dr |
(required) | Radial scan range and step size (angstrom) |
-a, --top |
-- | Topology YAML (required for XYZ, auto-generated for PDB/CIF) |
-M, --ionic-strength |
0.1 | Ionic strength (mol/L) for titration, pair energy and HSY; alias --molarity |
-T, --temperature |
298.15 | Temperature (K) |
--max-ndiv |
3 | Icosphere subdivision level (see Angular Resolution) |
--gradient-threshold |
0.5 | Adaptive resolution threshold (1/rad) |
--backend |
auto | Compute backend: auto, gpu, grid, simd, reference |
--grid-spacing |
1.0 | Map spacing for --backend grid (angstrom) |
--grid-cap |
1000 | Cap on large repulsive energies, --backend grid (kJ/mol) |
--coulomb-cutoff |
-- | Truncate Yukawa (angstrom), see Coulomb Cutoff |
--grid |
(see below) | Spline grid settings (see Spline Grid) |
--pmf |
pmf.dat | Output PMF file |
--savetable |
-- | Save 6D binary table (.bin.gz for compression) |
--savescan |
-- | Save a self-contained session (.duello.zip: table, bodies, PMF) for duello-web or duello nbody |
--locator |
geodesic | Angular mesh: geodesic (near-uniform, search) or lattice (closed-form lookup) |
--xtcfile |
-- | Export all table poses as an XTC trajectory (see Trajectory Output) |
--fixed-dielectric |
-- | Override dielectric constant |
--contact |
-- | Also tabulate contact areas for a cosolute term; needs --savescan |
--contact-selection |
hydrophobic | Beads that carry the term (atom-kind selection) |
--contact-probe |
1.4 | Probe radius for the contact tessellation (angstrom) |
--contact-ndiv |
2 | Finest icosphere level for contact areas; finer scan levels interpolate |
--contact-skip-above |
20 | Poses above this pair energy (kT) get no contact area |
PDB/CIF-only options:
| Flag | Default | Description |
|---|---|---|
--ph |
7.0 | pH for coarse-graining |
--model |
calvados3 | Force field model |
--cg |
single | Coarse-graining policy: single or multi |
--scale-hydrophobic |
-- | Hydrophobic scaling, e.g. lambda:1.2 or epsilon:0.8 |
--chain |
(all) | Keep only these chain IDs (repeatable: --chain A --chain B) |
--pka |
-- | Override a pKa, NAME=PKA for a side chain, NTR or CTR (repeatable) |
Default pKa values follow Thurlkill et al. 2006 (cgkitten ≥ 0.3).
Trajectory Output
--xtcfile traj.xtc writes every pose stored in the 6D table, for inspection in VMD, PyMOL or MDAnalysis:
| File | Contents |
|---|---|
traj.xtc |
One frame per pose: molecule A at the origin, B rotated and translated |
traj.energy.csv.gz |
frame,r_angstrom,omega_rad,n_div,vi,vj,resolution,energy_kjmol |
traj.xyz |
Atom names, which XTC does not store -- load it first, then the trajectory |
The frame column is the XTC frame index, so a frame in a viewer resolves to exactly one pose and one
energy. Key on step rather than time: time is a 32-bit float and stops being unique past ~16.8M frames.
Energies are the ones stored in the table, i.e. the same coarse-grained values the PMF and B2 are derived from (see Adaptive Resolution). Hence:
resolution=scalarmarks an isotropic slab, whose single energy is repeated across every vertex pair at that (R, ω).- Radial bins whose slabs are all scalar or repulsive store no orientations and so produce no frames. The count is logged.
vi/vjidentify a direction only together withn_div, because adaptive coarsening changes the mesh level with R.
Size. Output is uncapped. The benchmark settings
--rmin 26 --rmax 60 --dr 0.5 --max-ndiv 3give roughly 41 million frames, on the order of 100 GB. The frame count and estimated size are logged before writing begins, so a run can be aborted early.
duello atom-scan -- Atom Scan
Computes a 3D energy table (R, theta, phi) between a rigid body and a single test atom type. Useful for rigid body + mobile ion simulations where the full 6D scan is unnecessary.
duello atom-scan \
--mol1 4lzt.xyz \
--atom Na \
--rmin 2.0 --rmax 60 --dr 0.5 \
--top topology.yaml \
--ionic-strength 0.02
The output is a flat binary table (Table3DFlat) with barycentric interpolation on the icosphere mesh.
| Flag | Default | Description |
|---|---|---|
--mol1 |
(required) | Rigid body structure |
--atom |
(required) | Atom type name (from topology) |
-o, --output |
atom_table.bin.gz | Output binary table |
--pmf |
pmf.dat | Output PMF file |
All other radial, topology, backend, and PDB/CIF flags are shared with duello scan.
duello nbody -- Many-Body Monte Carlo
Metropolis Monte Carlo of N rigid copies of a protein in a periodic box, using the pair energies of a homo-dimer scan. It gives the scattering intensity I(q), the structure factor S(q) and the mass-centre g(r) at a chosen protein concentration, where B2 alone describes only the dilute limit.
Save the scan as a session, then run on it:
duello scan \
--mol1 4lzt.pdb --mol2 4lzt.pdb \
--rmin 24 --rmax 80 --dr 0.5 \
--ionic-strength 0.05 \
--savescan lys.duello.zip
duello nbody --scan lys.duello.zip --bodies 200 --protein-molarity 0.001
Scattering needs a form factor for every bead kind; these exist for amino-acid residues, so start
from PDB/CIF input (or an XYZ with residue beads). Salt, temperature and the force field come from
the scan; the box follows from --bodies and
--protein-molarity. Each copy equilibrates (tuning its move steps) and then runs --sweeps
production sweeps. The copies are independent runs, which the error columns compare.
| Flag | Default | Description |
|---|---|---|
--scan |
(required) | Homo-dimer session from duello scan --savescan |
-n, --bodies |
(required) | Number of proteins |
--protein-molarity |
(required) | Protein concentration (mol/L) |
--copies |
4 | Independent copies, for error bars |
--sweeps |
10000 | Production sweeps per copy |
--frame-interval |
50 | Sweeps between I(q) frames (10 with --centres-only) |
--qmax |
0.5 | Largest q (Å⁻¹) |
--vectors-per-bin |
16 | Lattice q-vectors per |q| bin; more give smoother I(q) at more cost |
--centres-only |
-- | Mass-centre S(q) only, far cheaper per frame |
--translation, --rotation |
3 Å, 0.2 rad | Starting move steps |
--fixed-steps |
-- | Keep the move steps instead of tuning them |
--msa-diameter, --msa-debye-length |
from the scan | Charged-sphere (MSA) reference for S_HSY |
--contact-epsilon, --contact-molarity |
-- | Cosolute term ε (kJ·mol⁻¹·Å⁻²·M⁻¹) and C₃ (mol/L); needs a scan made with --contact |
--seed |
1 | Random seed |
-o, --output |
nbody | Output prefix |
| File | Contents |
|---|---|
PREFIX.csv |
# lines with run and move statistics, then q/Å⁻¹,I,P,S_eff,S_eff_error,S_com,S_com_error,S_HSY |
PREFIX.rdf.csv |
# lines with the Kirkwood–Buff G22 and S(0), then r/Å,g,g_error,w/kT,h·r²/Ų,N,G22_raw/ų,G22_V/ų (method) |
PREFIX.traj |
Poses of all copies (compact; see nbody-expand) |
I and the form factor P are per molecule and averaged over frames; S_eff = I/P is the
effective structure factor an experiment measures, S_com the mass-centre structure factor, and
S_HSY the charged-sphere reference. Errors are jackknife estimates over copies (NaN with one copy).
The .duello.zip format may change between releases; sessions from older versions are refused.
duello nbody-expand -- Bead Trajectory
Expands an nbody trajectory to bead coordinates: an XTC file plus an XYZ topology written next to it.
duello nbody-expand nbody.traj -o nbody.xtc # copy 0; also writes nbody.xyz
vmd nbody.xyz nbody.xtc
| Flag | Default | Description |
|---|---|---|
<TRAJECTORY> |
(required) | Trajectory from duello nbody |
-o, --output |
nbody.xtc | Bead XTC; must end in .xtc and differ from the input |
--copy |
0 | Copy to keep; copies are independent runs |
--all-copies |
-- | Keep every copy (frames interleave), e.g. for averaging |
duello modes -- Binding Modes
Ranks a saved scan's poses by how much each adds to B2, rather than by energy alone. Each tabulated pose at $R \ge \sigma$ contributes
$$ c = -2\pi \Delta R, R^2, \frac{w_i w_j}{n_\omega n_v^2} \left( e^{-U/k_BT} - 1 \right), $$
with $w_i, w_j$ the Voronoi weights of its two mesh directions, so that $B_2 = 2\pi\sigma^3/3 + \sum c$. Attractive poses ($c < 0$) are grouped greedily, strongest first, into modes whose B beads lie within an RMSD of the mode's strongest pose; for homodimers the A↔B swap counts as the same complex. A mode's share is its $\sum c$ over the table's total attraction, so isotropic long-range attraction and the weakest poses belong to no mode.
duello scan -1 protein.cif -2 protein.cif --rmax 60 --savescan pair.duello.zip
duello modes pair.duello.zip -1 protein.cif -o modes/
| Flag | Default | Description |
|---|---|---|
<SESSION> |
(required) | Session with a two-body scan |
-1, -2 |
-- | Structures (PDB/mmCIF) as scanned, for all-atom models; -2 defaults to -1. Without them, the session's own (saved by the web tool) |
--chain |
all | Chains kept in the scan; repeatable |
--rmsd |
4 | Poses within this B-bead RMSD (Å) are one mode |
-n, --modes |
10 | Modes to keep |
-o, --output |
modes | Output directory |
It writes modes.csv (shares of the attraction and of K_a's B2 − _B2_ʳᵉᶠ, B2 term, pose count, U, R, ω and vertex directions; K_a shares may sum past 100 % as soft repulsion offsets attraction, and are empty without association), modeNN_cg.xyz with both bodies' beads and, given structures, modes_allatom.pdb with one model per mode, the molecules as chains A and B. Scans of XYZ input have no atoms, so only CG files. Sessions also carry these files under twobody/modes/.
Given structures, each mode's dimer also gets its infinite-dilution diffusion: modes.csv gains D_t/(Ų/ns), D_r/(1/ns) and D_t/D_t1, the dimer's D_t over molecule 1's monomer (about 0.7–0.8 for two similar proteins), and the printed table ends with each monomer's _D_t_⁰. They come from hydrocrab's residue-bead model (6.1 Å, as Dynamic MC uses) in water at the scan's temperature, on the very atoms of modes_allatom.pdb. DLS, NMR or FCS see a population average of monomer and dimer, weighted by association, not the dimer alone. Without structures the columns are left out, and the reason is printed. Session extracts don't compute D, so their modes.csv has no D columns.
duello diffusion -- Rotational Diffusion
Note: This subcommand is experimental. Output format and methods may change in future releases.
Estimates the normalized rotational diffusion coefficient D_r / D_r^0 from a previously saved 6D energy table, without re-scanning. Two methods are used:
- Zwanzig formula -- transport coefficient from energy landscape roughness
- Spectral gap -- slowest relaxation rate from sparse Lanczos eigendecomposition
duello diffusion table.bin.gz \
-T 300 \
-o diffusion.csv \
-j 4
The temperature can differ from the scan temperature since energies are stored in absolute units (kJ/mol).
| Flag | Default | Description |
|---|---|---|
<TABLE> |
(required) | Path to 6D binary table (.bin or .bin.gz) |
-T |
298.15 | Temperature (K) |
-o |
diffusion.csv | Output CSV |
-j |
0 (all cores) | Thread count (fewer = less memory) |
--cmin/--cmax |
-- | Concentration scan range (mol/L) |
--cn |
20 | Number of concentration points |
--cell-output |
cell_diffusion.csv | Output CSV for cell-model D(c) |
--export-matrices |
-- | Export generator matrices (Matrix Market) |
Output Columns
| Column | Description |
|---|---|
R |
Mass center separation (angstrom) |
D/D^0 |
Normalized rotational diffusion (Zwanzig, full 5D). 1 = free, 0 = locked |
D_A/D_A^0 |
Per-molecule-A Zwanzig (marginalized over B and dihedral) |
D_B/D_B^0 |
Per-molecule-B Zwanzig (marginalized over A and dihedral) |
D_w/D_w^0 |
Per-dihedral Zwanzig (marginalized over both molecules) |
separability |
D/D^0 / (D_A x D_B x D_w). 1 = independent, 0 = coupled |
lambda_k |
Eigenvalue magnitude of mode k |
f_Ak, f_Bk, f_wk |
Coordinate fractions for mode k (mol A / mol B / dihedral) |
n_active |
Number of finite-energy grid points at this R |
Interpretation: D/D^0 near 1 means nearly free rotation; values near 0 indicate a rugged energy landscape that locks orientations. The separability column reveals whether molecular rotations are independent or coupled. For homo-dimers, D_A ~ D_B by symmetry.
Input Formats
PDB / mmCIF (recommended)
Pass PDB or CIF files directly. Duello coarse-grains them on the fly using cgkitten, generating .xyz and _topology.yaml files alongside the input. Charges are computed using Monte Carlo titration. Two different structures share one generated topology so every bead pair gets a pair potential; for the same reason, XYZ and PDB/CIF input can't be mixed.
If your PDB has missing atoms or residues, pre-process with pdbfixer:
pip install pdbfixer
pdbfixer 4lzt.pdb --add-atoms=all --add-residues
Pre-generated XYZ
For XYZ input, a topology file (--top) must be provided. You can generate XYZ and topology files from PDB using cgkitten:
cargo install cgkitten
cgkitten 4lzt.pdb convert --ph 7.0
Topology File
The topology is a YAML file defining atom properties and the pair potential. Example:
atoms:
- {name: ALA, charge: 0.0, mass: 71.07, σ: 5.04, ε: 0.8368, hydrophobicity: !Lambda 0.34}
- {name: LYS, charge: 1.0, mass: 128.17, σ: 6.36, ε: 0.8368, hydrophobicity: !Lambda 0.14}
# ... one entry per bead type
system:
energy:
- !Nonbonded
# Coulomb/Yukawa is always added automatically -- do NOT specify it here
default:
- !AshbaughHatch {mixing: arithmetic, cutoff: 20.0}
Each atom entry defines charge, mass, Lennard-Jones-like size (sigma) and well depth (epsilon), and model-specific properties.
The !Nonbonded term specifies the short-range pair potential; different potentials can be assigned to specific atom pairs if needed.
Warning: The electrostatic Coulomb/Yukawa term is always added automatically. Do not include it in the topology.
Tuning and Options
Angular Resolution
The --max-ndiv flag sets the icosphere subdivision level, controlling angular mesh density:
--max-ndiv |
Vertices | Approx. angular spacing |
|---|---|---|
| 0 | 12 | 1.0 rad |
| 1 | 42 | 0.55 rad |
| 2 | 92 | 0.37 rad |
| 3 (default) | 162 | 0.28 rad |
Higher levels give more accurate angular integration at the cost of more energy evaluations per radial slice.
Adaptive Resolution
Duello automatically classifies each radial slab into tiers based on the angular energy gradient:
| Tier | Description |
|---|---|
| Repulsive | All Boltzmann weights negligible; zero storage, returns infinity |
| Scalar | Nearly isotropic surface; collapsed to a single value |
| Nearest-vertex | Smooth surface; nearest-vertex lookup, no interpolation |
| Interpolated | Full barycentric interpolation on icosphere faces |
The --gradient-threshold flag (default: 0.5 1/rad) controls when resolution is reduced. A summary is printed after table generation.
Interaction Range
The topology sets each short-range pair's range, so every backend evaluates the
same model: splines are tabulated over each pair's own range, unshifted, and are
zero beyond it. Every pair must therefore be bounded, and the topology must not
contain Coulomb terms, since duello adds Yukawa electrostatics from the medium.
For Lennard-Jones cut and shifted at rc, use
!AshbaughHatch {mixing: …, cutoff: rc} with hydrophobicity: !Lambda 1.0 atoms.
Coulomb Cutoff
Yukawa is untruncated by default. To compare with a simulation that cuts it,
--coulomb-cutoff rc shifts each pair's Yukawa to vanish at rc and drops it
beyond, on every backend. The pair then has a finite reach, the longest pair
range plus both molecular radii. --rmax must cover it, and the table gets no
long-range tail.
For example, the lipase many-body reference of
Pasquier et al. 2023 cuts every
interaction at 5 Debye lengths. Use a topology with
!AshbaughHatch {mixing: LorentzBerthelot, cutoff: 46.9} and
hydrophobicity: !Lambda 1.0 atoms, and scan with --coulomb-cutoff 46.9.
Cosolute Contact Term
An osmolyte or ion that is excluded from, or accumulates at, the protein surface changes the free energy of burying that surface. Proteins in contact bury surface, so a cosolute adds
$$ \Delta G_c(R,\mathbf{\Omega}) = -\varepsilon, C_3, A(R,\mathbf{\Omega}) $$
to each pose. Here $A$ is the contact area (Ų) between selected beads of the two proteins, $C_3$ the cosolute molarity, and $\varepsilon$ a transfer free energy per area and molarity (kJ·mol⁻¹·Å⁻²·M⁻¹). An excluded cosolute has $\varepsilon > 0$, and the term attracts, as in salting out; an accumulated one has $\varepsilon < 0$ and repels. The term is added to the pair energy of each pose before the Boltzmann average, so $w(R)$ and $B_2$ follow from $V(R,\mathbf{\Omega}) + \Delta G_c(R,\mathbf{\Omega})$. $\varepsilon = 0$, the default, turns it off.
$A$ is the Voronoi contact area between the beads, with the scan's bead radii and a solvent probe
(voronota-lt). Every bead shapes the contact
faces, but only faces between two selected beads count, and a selection must pick beads of
both proteins. Because $A$ depends on geometry alone,
duello scan --contact tabulates it once, in a second pass after the energy scan. The pass runs
on the GPU when one is available, in the browser too, and otherwise on the CPU.
duello-web then recomputes $w(R)$, $B_2$ and $K_d$ as
$\varepsilon$ and $C_3$ change, so both can be fitted to experiment. duello nbody takes fixed
values, which also apply to --dynamic runs.
Two approximations keep the second pass short:
- $A$ varies smoothly with orientation, so it is evaluated on a coarser icosphere
(
--contact-ndiv, default 2) and interpolated onto finer scan levels. Each level up costs about 16 times more. - Poses with $V$ above
--contact-skip-above(default $20,k_BT$) are skipped. Their Boltzmann weight is below $10^{-8}$, and a $\Delta G_c$ of a few $k_BT$ can't bring them back. If $\varepsilon C_3$ times the largest tabulated area exceeds half the threshold, duello and duello-web warn that attraction is underestimated; rescan with a higher threshold.
Contacts can extend to $R = R_a + R_b + 2(r_\text{max} + r_\text{probe})$, where $R_a$, $R_b$
are the protein radii and $r_\text{max}$ the largest bead radius. If that exceeds --rmax, the
scan warns and the term is missing beyond --rmax; raise --rmax to include it. Binding modes
are ranked by $V$ alone.
Spline Grid
The --grid flag controls spline interpolation of short-range potentials (GPU/SIMD backends):
| Key | Values | Default | Description |
|---|---|---|---|
type |
powerlaw2, invr2 |
powerlaw2 |
Grid spacing (invr2 avoids sqrt in lookup) |
size |
integer | 200 |
Number of grid points |
energy_cap |
float or none |
none |
Cap repulsive wall (kJ/mol) for f32 precision |
Example: --grid "type=invr2,size=1000,energy_cap=50"
Compute Backends
Duello automatically selects the best available backend. Performance on the Calvados3 lysozyme benchmark (2.4M poses, 128 atoms/molecule, Apple M4):
| Backend | Description | Poses/ms | Speedup |
|---|---|---|---|
reference |
Exact potentials (validation) | 48 | 1.0x |
simd |
NEON (aarch64) / AVX2 (x86) | 131 | 2.7x |
gpu |
wgpu compute shaders | 1065 | 22x |
auto (default) selects the grid backend at 1.0 Å if a GPU is available, otherwise SIMD; --backend gpu gives the exact-pair GPU kernel.
GPU and SIMD backends use cubic Hermite splines for short-range potentials and evaluate Coulomb/Yukawa analytically.
Grid backend
The grid backend accelerates repeated pose evaluations by combining direct calculations of nearby bead interactions with precomputed maps of smoother interactions. Screened electrostatics are evaluated directly.
--grid-spacing controls the map resolution. Smaller spacing generally improves accuracy and increases memory use; halving the spacing increases map memory by approximately eightfold. The default is 1 Å.
Check convergence for your system by reducing the spacing and comparing B₂ with --backend gpu, particularly when attraction dominates or B₂ is close to zero, or with short pair ranges. The GPU backend evaluates every bead pair using the configured radial splines.
--grid-cap limits large repulsive energies. Keep the default unless you have checked that changing it leaves your results unchanged.
On the lysozyme benchmark the grid at 1 Å is about 9× faster than --backend gpu; see BENCHMARKS.md for accuracy comparisons and docs/grid-backend.md for the method.
Interaction Models
Each macromolecule is represented by a rigid constellation of beads with properties defined in the topology. The inter-molecular energy $V(R,\Omega)$ is the sum of all pairwise bead-bead interactions.
Provided examples use:
- Calvados 3: Screened Coulomb + AshbaughHatch
- CPPM: Screened Coulomb + WeeksChandlerAndersen
Many additional pair potentials are available through the interatomic library (LennardJones, HardSphere, etc.).
Different pair potentials can be assigned to specific atom pairs in the topology.
Theory
The osmotic second virial coefficient reports on two-body interactions:
$$ \begin{align} B_2 & = -\frac{1}{16\pi^2} \int_{\mathbf{\Omega}} \int_0^{\infty} \left ( e^{-V(R,\mathbf{\Omega})/k_BT} - 1 \right ) R^2 dR d\mathbf{\Omega}\ & = -2\pi \int_0^{\infty} \left ( e^{-w(R)/k_BT} -1 \right )R^2 dR \ & = B_2^{hs} -2\pi \int_{\sigma}^{\infty} \left ( e^{-w(R)/k_BT} -1 \right )R^2 dR\ \end{align} $$
where $B_2^{hs} = 2\pi\sigma^3/3$ is the hard-sphere contribution and $\sigma$ is the distance of closest approach where $w(R\lt \sigma)=\infty$.
For systems with net attractive interactions, the dissociation constant is estimated by:
$$ K_d^{-1} = 2 N_A\left (B_2^{hs} - B_2\right ) $$
The rotational diffusion coefficient is estimated via the Zwanzig formula:
$$ D_r / D_r^0 = \frac{1}{\langle e^{\beta U} \rangle \cdot \langle e^{-\beta U} \rangle} $$
where the averages are over the 5D angular grid.
Examples
Ready-to-run examples are provided in scripts/ and examples/:
| Path | Description |
|---|---|
scripts/cppm.sh |
Spherical, multipolar particles using the CPPM model |
scripts/calvados3.sh |
Two coarse-grained lysozyme molecules with Calvados 3 |
A Google Colab notebook is also available:
Development
Release instructions for maintainers are in CONTRIBUTING.md; backend validation is in BENCHMARKS.md.
Metadata
Release files for duello 0.16.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| duello-0.16.0.tar.gz | 1.6 MB | With provenance | Details for duello-0.16.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| duello-0.16.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for duello-0.16.0-py3-none-win_amd64.whl |
| duello-0.16.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for duello-0.16.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| duello-0.16.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details for duello-0.16.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| duello-0.16.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for duello-0.16.0-py3-none-macosx_11_0_arm64.whl |
| duello-0.16.0-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details for duello-0.16.0-py3-none-macosx_10_12_x86_64.whl |
Total release size: 34.4 MB
Release files / duello-0.16.0.tar.gz
| Download URL | duello-0.16.0.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f85948e88162471b8d56c19d4623613f0d2982e584f41131bf566c8d97d265b7
|
|
BLAKE2b-256 checksum How to use checksums |
3ffbd9117306bd590114b396a1bec4cc461365ff71ea899047470633ab6ea640
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / duello-0.16.0-py3-none-win_amd64.whl
| Download URL | duello-0.16.0-py3-none-win_amd64.whl |
|---|---|
| Size | 7.3 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c5d07a636f30e1c1977a758f18cd55a89105a1555d1cb7693c8434e7f20499f4
|
|
BLAKE2b-256 checksum How to use checksums |
928c77950e61590208f11dd3602349f71e5b8314981c34abfc574aba72dfa35c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / duello-0.16.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | duello-0.16.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 7.1 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
59990e6b42cc148094519b5d34e9c300b1933f01aa100ed203a8eae71d32a4e8
|
|
BLAKE2b-256 checksum How to use checksums |
964c34e3d8909a2659566dbc620b49e1f231f18e41e659bb5b56754e56779f8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / duello-0.16.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | duello-0.16.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
c79e33fbddff410e67e538f1db10a575508e5bc4e5276f24162c4f6af2425ce5
|
|
BLAKE2b-256 checksum How to use checksums |
a210eb2caf8d5421c375f8097bbe07e02834d5c500d30e1cecffc8e080192f2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / duello-0.16.0-py3-none-macosx_11_0_arm64.whl
| Download URL | duello-0.16.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.8 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c12bf58034bd22346966ea1b7a7e0aad361a876ec1b4c034a54ddc9f4a586d91
|
|
BLAKE2b-256 checksum How to use checksums |
f770ae8f46c9d93d93e7cb794672b0c1162eccfee3fe6face289236c976da5ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / duello-0.16.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | duello-0.16.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
68718a0cfff4aaf68f54b789c1246147cb59b1c8cbc68ee0550ff90760ebc98e
|
|
BLAKE2b-256 checksum How to use checksums |
e9d87899d1a7967adc2f2ce3c01e500512ccd293165613d6a3361669aab1fdfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logSecurity for duello 0.16.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for duello-0.16.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.