duello 0.1.6__py3-none-macosx_11_0_arm64.whl → 0.2.1__py3-none-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- duello-0.2.1.data/scripts/duello +0 -0
- {duello-0.1.6.dist-info → duello-0.2.1.dist-info}/METADATA +66 -16
- duello-0.2.1.dist-info/RECORD +5 -0
- duello-0.1.6.data/scripts/duello +0 -0
- duello-0.1.6.dist-info/RECORD +0 -5
- {duello-0.1.6.dist-info → duello-0.2.1.dist-info}/WHEEL +0 -0
- {duello-0.1.6.dist-info → duello-0.2.1.dist-info}/licenses/LICENSE +0 -0
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: duello
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Requires-Dist: pdb2xyz>=0.1.2
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Summary: 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.
|
|
@@ -15,6 +15,9 @@ Project-URL: Source Code, https://github.com/mlund/duello
|
|
|
15
15
|
<img src="assets/duello-logo.png" alt="crates.io", height="300">
|
|
16
16
|
</p>
|
|
17
17
|
<p align="center">
|
|
18
|
+
<a href="https://doi.org/10/p5d4">
|
|
19
|
+
<img src="https://img.shields.io/badge/doi-10.26434%2Fchemrxiv--2025--0bfhd-lightgrey" alt="DOI:10.26434/chemrxiv-2025-0bfhd">
|
|
20
|
+
</a>
|
|
18
21
|
<a href="https://doi.org/10.5281/zenodo.15772003">
|
|
19
22
|
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.15772003.svg" alt="Zenodo">
|
|
20
23
|
</a>
|
|
@@ -95,8 +98,6 @@ you may alternatively build and install directly from the source code:
|
|
|
95
98
|
cargo install --git https://github.com/mlund/duello
|
|
96
99
|
```
|
|
97
100
|
|
|
98
|
-
If you have compilation issues, try updating Rust with `rustup toolchain update`.
|
|
99
|
-
|
|
100
101
|
# Usage
|
|
101
102
|
|
|
102
103
|
The command-line tool `duello` does the 6D scanning and calculates
|
|
@@ -104,10 +105,9 @@ the angularly averaged potential of mean force, _A(R)_ which
|
|
|
104
105
|
is used to derive the 2nd virial coefficient and twobody dissociation constant, $K_d$.
|
|
105
106
|
The two input structures should be in `.xyz` format and all particle names must
|
|
106
107
|
be defined in the topology file under `atoms`.
|
|
107
|
-
The topology also defines the particular pair-potential to use.
|
|
108
|
+
The topology also defines the particular pair-potential to use, see below.
|
|
108
109
|
Note that currently, a coulomb potential is automatically added and should
|
|
109
110
|
hence _not_ be specified in the topology.
|
|
110
|
-
The program is written in Rust and attempts to use all available CPU cores.
|
|
111
111
|
|
|
112
112
|
```sh
|
|
113
113
|
duello scan \
|
|
@@ -118,9 +118,57 @@ duello scan \
|
|
|
118
118
|
--resolution 0.8 \
|
|
119
119
|
--cutoff 1000 \
|
|
120
120
|
--molarity 0.05 \
|
|
121
|
-
--temperature 298.15
|
|
121
|
+
--temperature 298.15 \
|
|
122
|
+
--backend auto \
|
|
123
|
+
--grid "type=powerlaw2,size=2000,shift=true"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Spline Grid Options
|
|
127
|
+
|
|
128
|
+
The `--grid` option controls interpolation of pair potentials:
|
|
129
|
+
|
|
130
|
+
| Key | Values | Default | Description |
|
|
131
|
+
|---------|----------------------|-------------|------------------------------------------|
|
|
132
|
+
| `type` | `powerlaw2`, `invr2` | `powerlaw2` | Grid spacing (invr2 avoids sqrt in eval) |
|
|
133
|
+
| `size` | integer | `2000` | Number of grid points |
|
|
134
|
+
| `shift` | `true`, `false` | `true` | Shift energy to zero at cutoff |
|
|
135
|
+
|
|
136
|
+
Example: `--grid "type=invr2,size=1500,shift=false"`
|
|
137
|
+
|
|
138
|
+
## Backend Performance
|
|
139
|
+
|
|
140
|
+
The program is written in Rust and attempts to use either GPU or all available CPU cores.
|
|
141
|
+
The following backends are available, with performance measured on the Calvados3 lysozyme example
|
|
142
|
+
(2.4M poses, 128 atoms per molecule, Apple M4):
|
|
143
|
+
|
|
144
|
+
| Backend | Description | Poses/ms | Speedup |
|
|
145
|
+
|-------------|--------------------------------|----------|---------|
|
|
146
|
+
| `reference` | Exact potentials (validation) | 48 | 1.0x |
|
|
147
|
+
| `cpu` | Splined potentials | 102 | 2.1x |
|
|
148
|
+
| `simd` | NEON (aarch64) / AVX2 (x86) | 131 | 2.7x |
|
|
149
|
+
| `gpu` | wgpu compute shaders | 1065 | 22x |
|
|
150
|
+
|
|
151
|
+
The `auto` backend (default) selects GPU if available, otherwise SIMD.
|
|
152
|
+
All but `reference` use Cubic Hermite splines for pair potentials.
|
|
153
|
+
|
|
154
|
+
## Preparing PDB files
|
|
155
|
+
|
|
156
|
+
The following uses `pdb2xyz` to create a coarse grained XYZ file and Calvados topology for Duello:
|
|
157
|
+
|
|
158
|
+
```sh
|
|
159
|
+
pip install pdb2xyz
|
|
160
|
+
pdb2xyz -i 4lzt.pdb -o 4lzt.xyz --pH 7.0 --sidechains
|
|
161
|
+
duello scan \
|
|
162
|
+
-1 4lzt.xyz -2 4lzt.xyz \
|
|
163
|
+
--rmin 24 --rmax 80 --dr 0.5 \
|
|
164
|
+
--resolution 0.6 \
|
|
165
|
+
--top topology.yaml \
|
|
166
|
+
--molarity 0.05
|
|
122
167
|
```
|
|
123
168
|
|
|
169
|
+
If `pdb2xyz` give errors, you may be able to correct your PDB file with
|
|
170
|
+
[pdbfixer](https://github.com/openmm/pdbfixer?tab=readme-ov-file).
|
|
171
|
+
|
|
124
172
|
## Examples
|
|
125
173
|
|
|
126
174
|
Ready run scripts examples are provided in the `scripts/` directory:
|
|
@@ -130,12 +178,6 @@ Command | Description
|
|
|
130
178
|
`scripts/cppm.sh` | Spherical, multipolar particles using the CPPM model
|
|
131
179
|
`scripts/calvados3.sh` | Two coarse grained lysozyme molecules w. Calvados3 interactions
|
|
132
180
|
|
|
133
|
-
## Converting PDB files
|
|
134
|
-
|
|
135
|
-
A simple script to convert protein structure files to coarse grained, one bead
|
|
136
|
-
per amino acid XYZ files is provided in `pdb2xyz` which can be installed with
|
|
137
|
-
`pip install pdb2xyz`. This can also generate a corresponding `atomfile.yaml`
|
|
138
|
-
with atom properties.
|
|
139
181
|
|
|
140
182
|
## Interaction models
|
|
141
183
|
|
|
@@ -152,7 +194,7 @@ The provided examples illustrate the following schemes:
|
|
|
152
194
|
- Screened `Coulomb` + `WeeksChandlerAndersen` for the CPPM model.
|
|
153
195
|
|
|
154
196
|
Many more pair-potentials are available through the
|
|
155
|
-
[`interatomic`](https://
|
|
197
|
+
[`interatomic`](https://docs.rs/interatomic/latest/interatomic/twobody/index.html) library,
|
|
156
198
|
_e.g._ `LennardJones`, `HardSphere` etc.
|
|
157
199
|
|
|
158
200
|
__Warning:__ The electrostatic term, `Coulomb` is
|
|
@@ -165,19 +207,27 @@ binary package on pipy.org.
|
|
|
165
207
|
|
|
166
208
|
## Create `pip` package using Maturin via a Docker image:
|
|
167
209
|
|
|
210
|
+
Run this on MacOS, linux (x86 and arm) to get all architectures:
|
|
211
|
+
|
|
168
212
|
```sh
|
|
169
|
-
docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin publish -u __token__ -p
|
|
213
|
+
docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin::v1.11.5 publish -u __token__ -p PYPI_TOKEN
|
|
170
214
|
```
|
|
171
215
|
|
|
216
|
+
|
|
172
217
|
For local Maturin installs, follow the steps below.
|
|
173
218
|
|
|
174
219
|
```sh
|
|
175
220
|
pip install ziglang pipx
|
|
176
221
|
pipx install maturin # on ubuntu; then restart shell
|
|
177
|
-
maturin publish -u __token__ --target=x86_64-unknown-linux-gnu --zig
|
|
222
|
+
maturin publish -u __token__ -p PYPI_TOKEN --target=x86_64-unknown-linux-gnu --zig
|
|
178
223
|
```
|
|
179
224
|
|
|
180
225
|
MacOS targets can be generated without `--zig` using the targets
|
|
181
226
|
`x86_64-apple-darwin` and `aarch64-apple-darwin`.
|
|
182
|
-
|
|
227
|
+
|
|
228
|
+
```sh
|
|
229
|
+
rustup target list
|
|
230
|
+
rustup target add x86_64-apple-darwin
|
|
231
|
+
```
|
|
232
|
+
|
|
183
233
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
duello-0.2.1.data/scripts/duello,sha256=p_qBz9x5sM34eGcD1LXcSTh393CjHwjI-K3aDPMH7Fo,8707072
|
|
2
|
+
duello-0.2.1.dist-info/METADATA,sha256=4E1lqeGoFAd6eO_RncpeYri63WKl31gKj0oz47fUkVY,8766
|
|
3
|
+
duello-0.2.1.dist-info/WHEEL,sha256=xXrZFUZdUx5dZHQRUyNYMU2_RR2PioJ5KlyzYJq5nRk,101
|
|
4
|
+
duello-0.2.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
5
|
+
duello-0.2.1.dist-info/RECORD,,
|
duello-0.1.6.data/scripts/duello
DELETED
|
Binary file
|
duello-0.1.6.dist-info/RECORD
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
duello-0.1.6.data/scripts/duello,sha256=rUkqI9IGuQ0b_Mc0AarG86kHfCLrHo1ZzpIUqnJ1kSo,5690208
|
|
2
|
-
duello-0.1.6.dist-info/METADATA,sha256=7ZWIaH1XA-2zG9fOwADVPilgG1BgXSpD9mVtJNHEDow,6882
|
|
3
|
-
duello-0.1.6.dist-info/WHEEL,sha256=xXrZFUZdUx5dZHQRUyNYMU2_RR2PioJ5KlyzYJq5nRk,101
|
|
4
|
-
duello-0.1.6.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
5
|
-
duello-0.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|