|
1 | 1 | # [Coordination numbers](@id Tools)
|
2 | 2 |
|
3 |
| -- [Coordination numbers](@ref coordination_number) |
4 |
| -- [Overview of the solvent and solute properties](@ref overview) |
5 | 3 | - [Computing radial distribution functions](@ref radial_distribution)
|
| 4 | +- [Overview of the solvent and solute properties](@ref overview) |
6 | 5 |
|
7 | 6 | ```@meta
|
8 | 7 | CollapsedDocStrings = true
|
9 | 8 | ```
|
10 | 9 |
|
11 |
| -## [Coordination numbers](@id coordination_number) |
12 |
| - |
13 |
| -The coordination number is the numerical count of how many molecules of a solvent is within a certain distance |
14 |
| -from the solute. The following function provides the functionality of retrieving coordination numbers and atom |
15 |
| -groups contributions to these numbers, given a `Result` data structure: |
16 |
| - |
17 |
| -```@autodocs |
18 |
| -Modules = [ComplexMixtures] |
19 |
| -Pages = ["coordination_number.jl"] |
20 |
| -``` |
21 |
| - |
22 |
| -The function can be called without any argument besides the `Result` data structure, in which case the coordination number of the complete solute will |
23 |
| -be returned, as a function of the distance. |
24 |
| - |
25 |
| -Alternatively, subgroups of the solute or the solvent can be selected, by providing `SoluteGroup` or `SolventGroup` objects as second arguments, |
26 |
| -initialized with the atoms of the subgroup, as a list of indices or a list of atoms generated by `PDBTools`. Note that, if a `SolventGroup` |
27 |
| -is defined we obtain the contributions of those solvent atoms to the coordination number *of the solute* (for instance, the sum of the |
28 |
| -contributions of all solvent atoms is the coordination number of the solute). |
29 |
| - |
30 |
| -### Example |
31 |
| - |
32 |
| -In the following example we compute the coordination number of the atoms of `residue 50` (which belongs to the solute - a protein) with the solvent atoms of TMAO, as a function of the distance. The plot produced will show side by side the residue contribution to the MDDF and the corresponding coordination number. |
33 |
| - |
34 |
| -```julia |
35 |
| -# Load necessary packages |
36 |
| -using ComplexMixtures, PDBTools |
37 |
| -# Load data structure and previously computed results from a mddf calculation |
38 |
| -pdb = read_pdb("test/data/NAMD/structure.pdb") |
39 |
| -R = load("test/data/NAMD/protein_tmao.json") |
40 |
| -# Define which is the solute |
41 |
| -solute = AtomSelection(PDBTools.select(pdb, "protein"), nmols=1) |
42 |
| -# We intend to compute the contributions of residue 50 only |
43 |
| -residue50 = PDBTools.select(pdb, "residue 50") |
44 |
| -# Compute the group contribution to the MDDF |
45 |
| -residue50_contribution = contributions(R, SoluteGroup(residue50)) |
46 |
| -# Now compute the coordination number |
47 |
| -residue50_coordination = coordination_number(R, SoluteGroup(residue50)) |
48 |
| -# |
49 |
| -# Plot with twin y-axis |
50 |
| -# |
51 |
| -using Plots |
52 |
| -plot(R.d, residue50_contribution, |
53 |
| - xaxis="distance / Å", |
54 |
| - yaxis="MDDF contribution", |
55 |
| - linewidth=2, label=nothing, color=1 |
56 |
| -) |
57 |
| -plot!(twinx(),R.d, residue50_coordination, |
58 |
| - yaxis="Coordination number", |
59 |
| - linewidth=2, label=nothing, color=2 |
60 |
| -) |
61 |
| -plot!(title="Residue 50", framestyle=:box, subplot=1) |
62 |
| -``` |
63 |
| - |
64 |
| -With appropriate input data, this code produces: |
65 |
| - |
66 |
| -```@raw html |
67 |
| -<center> |
68 |
| -<img width=60% src="../figures/coordination.png" width=80%> |
69 |
| -</center> |
70 |
| -``` |
71 |
| -!!! tip |
72 |
| - There are some systems for which the normalization of the distributions is not |
73 |
| - necessary or possible. It is still possible to compute the coordination numbers, |
74 |
| - by running, instead of `mddf`, the `coordination_number` function: |
75 |
| - ``` |
76 |
| - coordination_number(trajectory_file, solute, solvent, options::Options) |
77 |
| - ``` |
78 |
| - This call will return a `Result` data structure but with all fields requiring |
79 |
| - normalization with zeros. In summary, this result |
80 |
| - data structure can be used to compute the coordination numbers, but not the MDDF, RDF, or KB integrals. |
81 |
| - |
82 |
| -!!! compat |
83 |
| - The independent computation of coordination numbers was introduced in version 1.1. |
84 |
| - |
85 | 10 | ## [Computing radial distribution functions](@id radial_distribution)
|
86 | 11 |
|
87 | 12 | The distributions returned by the `mddf` function (the `mddf` and
|
|
0 commit comments