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.6.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.6-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.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

duello-0.1.6-py3-none-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

duello-0.1.6-py3-none-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: duello-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 af07739eedcfcf654085e58dba7e0e8a25248a1940f511566d0ac6963dba4895
MD5 3c9c4eccd5996ef8c8927ade7e222feb
BLAKE2b-256 4deb0ff4876d413c4fb6de96fc01ad16433fd019d198b79d947172cc23cdf89f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for duello-0.1.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e03c8cb2ac3d5e0733a65bbd2bab8e420b1086605523608412df4fc74d0bd9b
MD5 6bd30391f11424cbc657131b93bc5f3a
BLAKE2b-256 1ea86e7174548b798173d5dd340fe03c3b055e3fe80ea40bbec33ac192e0a93f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for duello-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1f2134501f597b90f04c4ce08596219675816fb1ae8822121b1052fb321c31ee
MD5 d5ce94e4fbb50f0d158650f03f22e1f9
BLAKE2b-256 3e05b6953ef16032b58e110c14092e97eea0613be073738967df92556a2b2841

See more details on using hashes here.

File details

Details for the file duello-0.1.6-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for duello-0.1.6-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e24b77ed7f280adbbbe33425b995bfb964fff2e4cca966b5b07103f200205e48
MD5 5e36774d093127957e766c6af5fd7dc5
BLAKE2b-256 c5183973964dfc3f473916248a157804de5e0be70b733f7794637f43ebff75f4

See more details on using hashes here.

File details

Details for the file duello-0.1.6-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for duello-0.1.6-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c7720f52fabf2fab2740146039a22fe86d1de0aecab8b648d4ada9607aff02c6
MD5 d3ada1bf8bc9f7d90f2fa1a23db01bce
BLAKE2b-256 1a01827f4efc3d228f1d58be13df016d7997a3ba48ec71b558ca8b0a93c2c5b3

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