Skip to main content

Calculates the osmotic second virial coefficient (B2), and dissociation constant (Kd), for two rigid (macro)molecules, e.g. globular proteins. Done by explicit summation of the partition function in six dimensions (angular space and rigid-body separation). Calvados 3 parameters for use with coarsed grained amino acids are provided, but any pair-wise additivie potential can be used.

Project description

crates.io

Zenodo Open In Colab


Duello
Virial Coefficient and Dissociation Constant Estimation for Rigid Macromolecules


Introduction

Duello is a tool to calculate the potential of mean force (PMF) between two rigid bodies, performing a statistical mechanical average over inter-molecular orientations using subdivided icosahedrons. For each mass center separation, R, the static contribution to the partition function, $\mathcal{Z}(R) = \sum_{\mathbf{\Omega}} e^{-V(R,\mathbf{\Omega})/k_BT}$, is explicitly evaluated to obtain 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 a 5D angular space (e.g. two spherical coordinates for each body plus a dihedral angle around the connection line).

The osmotic second virial coefficient, which has dimensions of volume, reports on exactly 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 a distance of closest approach where $w(R\lt \sigma)=\infty$ is assumed. For systems with net attractive interactions, the dissociation constant, $K_d$, can be estimated by,

$$ K_d^{-1} = 2 N_A\left (B_2^{hs} - B_2\right ) $$

crates.io

Installation

Binary packages are available for Linux and MacOS through PyPI.org:

pip install duello

If you have a Rust toolchain installed, you may alternatively build and install directly from the source code:

cargo install --git https://github.com/mlund/duello

If you have compilation issues, try updating Rust with rustup toolchain update.

Usage

The command-line tool duello does the 6D scanning and calculates the angularly averaged potential of mean force, A(R) which is used to derive the 2nd virial coefficient and twobody dissociation constant, $K_d$. The two input structures should be in .xyz format and all particle names must be defined in the topology file under atoms. The topology also defines the particular pair-potential to use. Note that currently, a coulomb potential is automatically added and should hence not be specified in the topology. The program is written in Rust and attempts to use all available CPU cores.

duello scan \
    --mol1 cppm-p18.xyz \
    --mol2 cppm-p18.xyz \
    --rmin 37 --rmax 50 --dr 0.5 \
    --top topology.yaml \
    --resolution 0.8 \
    --cutoff 1000 \
    --molarity 0.05 \
    --temperature 298.15

Examples

Ready run scripts examples are provided in the scripts/ directory:

Command Description
scripts/cppm.sh Spherical, multipolar particles using the CPPM model
scripts/calvados3.sh Two coarse grained lysozyme molecules w. Calvados3 interactions

Converting PDB files

A simple script to convert protein structure files to coarse grained, one bead per amino acid XYZ files is provided in pdb2xyz which can be installed with pip install pdb2xyz. This can also generate a corresponding atomfile.yaml with atom properties.

Interaction models

Each macromolecule is represented by a rigid constellation of beads with properties defined under atoms in the topology file. The inter-molecular energy, $V(R,\Omega)$ is calculated by summing all pairwise interactions between beads using a customizable pair potential, $u_{ij}$. If needed, different pair-potentials can be explicitly defined for specific atom pairs.

The provided examples illustrate the following schemes:

  • Screened Coulomb + AshbaughHatch, for the Calvados model.
  • Screened Coulomb + WeeksChandlerAndersen for the CPPM model.

Many more pair-potentials are available through the interatomic library, e.g. LennardJones, HardSphere etc.

Warning: The electrostatic term, Coulomb is always automatically added and should therefore not be specified in the topology.

Development

This is for development purposes only and details how to create and publish a binary package on pipy.org.

Create pip package using Maturin via a Docker image:

docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin publish -u __token__ -p ...

For local Maturin installs, follow the steps below.

pip install ziglang pipx
pipx install maturin # on ubuntu; then restart shell
maturin publish -u __token__ --target=x86_64-unknown-linux-gnu --zig

MacOS targets can be generated without --zig using the targets x86_64-apple-darwin and aarch64-apple-darwin. See list of targets with rustup target list.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

duello-0.1.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duello-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

File details

Details for the file duello-0.1.0.tar.gz.

File metadata

  • Download URL: duello-0.1.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for duello-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5787c48fe195e3cfd9d824bbf363fb7073c7f074fd243e091d7fbdce26a1c3b
MD5 467746218858faccae6c9e8107656eed
BLAKE2b-256 1843f7dc8aab58da517c0d57e2468afb08398aaa90be62132aa8d80446ede339

See more details on using hashes here.

File details

Details for the file duello-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for duello-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 98899d103912d45d49cbafd20e3eddd9a40b7f4cf2c31b75573a2fc46fe166ba
MD5 34a7a399178a14573d49776925ee9831
BLAKE2b-256 67484e0c29eeb9647ee2a463259167bd230beae859d3bf64f6559d9473b0c122

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page