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.5.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

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

duello-0.1.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

duello-0.1.5-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.5.tar.gz.

File metadata

  • Download URL: duello-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 1aae5dc47ac85683ecd8f4282033c9d282ffededcc396fb9956b6afa37983a73
MD5 377dea6aa4b4ad768052b2caa06cbf52
BLAKE2b-256 76c4005ddeefb184afe8d7a2ebb312f990d1b548c03b8be2ee8c31b9269299f3

See more details on using hashes here.

File details

Details for the file duello-0.1.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for duello-0.1.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 55639a081cd62caededa63fd0b6ece3c0e2bff1dd678a802068134dc8fb95503
MD5 1c838a4cc7a61a5b0d19f5886c0f929c
BLAKE2b-256 c10ceb862f8ca569a9a0013b826e0405cc9805695ecd156e55c3837d01bf96e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for duello-0.1.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3e871205999edbc3149b155b7b2313cb68d208088f1694d1a596d09f53001546
MD5 4e2dbfaf68a338fef2ca6081ba9f8d7a
BLAKE2b-256 40a159d8e497bdf66c41bead2929c861380143fabbb8161c44ea63472689bc9e

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