Skip to content

Commit e9c6d35

Browse files
committed
Added images to docs.
1 parent a1c37e8 commit e9c6d35

19 files changed

+64
-7
lines changed

docs/create_docs.sh

100644100755
File mode changed.

docs/images/Density.png

520 KB
Loading

docs/images/JSD_pdb.png

266 KB
Loading

docs/images/SSI_pdb.png

261 KB
Loading

docs/images/Torsions.jpg

59.1 KB
Loading

docs/images/WaterFeatures.jpg

289 KB
Loading

docs/images/Waters_and_Density.png

775 KB
Loading

docs/images/bb-clusts.png

20.7 KB
Loading

docs/images/bb-dists.png

286 KB
Loading
Binary file not shown.
Binary file not shown.
17.3 KB
Binary file not shown.
16.5 KB
Binary file not shown.

docs/images/sc-jsd.png

36.4 KB
Loading

docs/images/sc-ssi.png

32.2 KB
Loading

docs/tut-2-preprocessing.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ relatively rigid with sites that are spatially static, for example internal
169169
water cavities in membrane proteins. Here we demonstrate the preprocessing for
170170
water density, however the same procedure would be used for ions.
171171

172+
.. image:: images/Density.png
173+
:height: 300px
174+
:align: center
175+
:alt: Density of protein
172176

173177
Files and Directories
174178
---------------------
@@ -236,7 +240,7 @@ This helps us avoid memory errors with large python arrays.
236240
out_name_water_a+".gro", out_name_water_a+"_aligned.xtc",
237241
out_name_water_b+".gro", out_name_water_b+".xtc",
238242
atomgroup="OH2", write_grid_as="TIP3P",
239-
out_name="traj/water_grid_ab_",
243+
out_name="ab_grid_",
240244
use_memmap=True, memmap='traj/combined.mymemmap'
241245
)
242246

docs/tut-3-featurization.rst

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ Note that all reader functions load the names of the features and
99
their values separately.
1010

1111

12+
.. image:: images/Torsions.jpg
13+
:height: 300px
14+
:align: center
15+
:alt: Torsion angles.
16+
17+
1218
Basic Example
1319
*************
1420

@@ -133,14 +139,20 @@ molecules occupy that are of interest. Water pocket featurization extracts
133139
a distribution that represents whether or not a specific protein cavity is occupied
134140
by a water molecule, and what that water molecule's orientation (polarisation) is.
135141

142+
143+
.. image:: images/WaterFeatures.jpg
144+
:width: 300px
145+
:align: center
146+
:alt: Water features derived from density.
147+
136148
.. code:: python
137149
138150
from pensa.features import read_water_features
139151
140152
For the pdb visualisation, the trajectory needs to be fit to the first frame of the simulation
141153
so that the density and protein align with each other.
142154

143-
Here we featurize the top 3 most probable water sites (top_waters = 3).
155+
Here we featurize the top 2 most probable water sites (top_waters = 2).
144156
Orientation of the waters (water_data - spherical coordinates [radians]) is a
145157
timeseries distribution. When water is not present at the site, the orientation
146158
is recorded as 10000.0 to represent an empty state. If write=True, we can
@@ -161,7 +173,7 @@ water
161173
water_feat, water_data = read_water_features(
162174
structure_input = struc,
163175
xtc_input = xtc,
164-
top_waters = 1,
176+
top_waters = 2,
165177
atomgroup = "OH2",
166178
write = True,
167179
write_grid_as="TIP3P",
@@ -176,11 +188,11 @@ This way, sites are the same across both ensembles and can be compared.
176188
177189
struc = "traj/condition-a_water.gro"
178190
xtc = "traj/condition-a_water_aligned.xtc"
179-
grid = "traj/water_grid_ab_OH2_density.dx"
191+
grid = "ab_grid_OH2_density.dx"
180192
water_feat, water_data = read_water_features(
181193
structure_input = struc,
182194
xtc_input = xtc,
183-
top_waters = 5,
195+
top_waters = 2,
184196
atomgroup = "OH2",
185197
grid_input = grid
186198
)
@@ -206,10 +218,10 @@ written (write=True) using the default density conversion "Angstrom^{-3}" in MDA
206218
atom_feat, atom_data = read_atom_features(
207219
structure_input = struc,
208220
xtc_input = xtc,
209-
top_atoms = 1,
221+
top_atoms = 2,
210222
atomgroup = "SOD",
211223
element = "Na",
212224
write = True,
213225
out_name = "features/11426_dyn_151_sodium"
214226
)
215-
227+

docs/tut-4-comparison.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,19 @@ distance per residue in the "B factor" field of a PDB file.
8787
y_label='max. JS dist. of BB torsions'
8888
)
8989
90+
91+
.. image:: images/JSD_pdb.png
92+
:height: 300px
93+
:align: center
94+
:alt: JSD pbd b-factor visualisaton file.
95+
96+
97+
.. image:: images/sc-jsd.png
98+
:height: 300px
99+
:align: center
100+
:alt: Jensen-Shannon Distance PDF output.
101+
102+
90103
Let's now save the resulting data in CSV files.
91104

92105
.. code:: python
@@ -159,6 +172,18 @@ We can plot the results in the same way as we did for the backbone analysis.
159172
)
160173
161174
175+
.. image:: images/SSI_pdb.png
176+
:height: 300px
177+
:align: center
178+
:alt: SSI pbd b-factor visualisaton file.
179+
180+
.. image:: images/sc-ssi.png
181+
:height: 300px
182+
:align: center
183+
:alt: State-Specific Information PDF output.
184+
185+
186+
162187
Comparing Distances
163188
-------------------
164189

@@ -194,3 +219,11 @@ divergence, Kolmogorov-Smirnov statistic etc. instead).
194219
names_bbdist, jsd_bbdist, "plots/receptor_jsd-bbdist.pdf",
195220
vmin = 0.0, vmax = 1.0, cbar_label='JSD'
196221
)
222+
223+
224+
225+
.. image:: images/bb-dists.png
226+
:height: 300px
227+
:align: center
228+
:alt: JSD distances pbf plot.
229+

docs/tut-5-dimensionality.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ We now perform the actual clustering on the combined data.
199199
)
200200
cidx, cond, oidx, wss, centroids = cc
201201
202+
203+
204+
205+
.. image:: images/bb-clusts.png
206+
:height: 300px
207+
:align: center
208+
:alt: BB torsion cluster pbf plot.
209+
202210
... and save the results to a CSV file.
203211

204212
.. code:: python

0 commit comments

Comments
 (0)