Skip to content

Commit ea96780

Browse files
committed
Described optional parameters for data featurization in tutorial
1 parent 889bce6 commit ea96780

1 file changed

Lines changed: 30 additions & 11 deletions

File tree

examples/diffnet_tutorial.ipynb

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 4,
5+
"execution_count": 1,
66
"metadata": {
77
"collapsed": true
88
},
@@ -28,7 +28,9 @@
2828
{
2929
"cell_type": "code",
3030
"execution_count": 12,
31-
"metadata": {},
31+
"metadata": {
32+
"collapsed": true
33+
},
3234
"outputs": [],
3335
"source": [
3436
"practice_dir\n",
@@ -66,7 +68,7 @@
6668
"|\n",
6769
"|\n",
6870
" ----->data\n",
69-
" |----->traj1\n",
71+
" |----->var1\n",
7072
" ------beta-peptide1.xtc\n",
7173
" |----->var2\n",
7274
" ------beta-peptide2.xtc\n",
@@ -111,11 +113,13 @@
111113
{
112114
"cell_type": "code",
113115
"execution_count": 7,
114-
"metadata": {},
116+
"metadata": {
117+
"collapsed": true
118+
},
115119
"outputs": [],
116120
"source": [
117-
"sim_dirs = np.array([\"./data/traj1/\",\n",
118-
" \"./data/traj2/\"])\n",
121+
"sim_dirs = np.array([\"./data/var1/\",\n",
122+
" \"./data/var2/\"])\n",
119123
"np.save(\"./traj_dirs.npy\",sim_dirs)\n",
120124
"\n",
121125
"pdb_fns = np.array([\"./data/beta-peptide1.pdb\",\n",
@@ -151,7 +155,7 @@
151155
" |traj_dirs.npy\n",
152156
" |\n",
153157
" ----->data\n",
154-
" |----->traj1\n",
158+
" |----->var1\n",
155159
" ------beta-peptide1.xtc\n",
156160
" |----->var2\n",
157161
" ------beta-peptide2.xtc\n",
@@ -168,6 +172,21 @@
168172
"**python /path/to/diffnets/diffnets/cli/main.py process ./traj_dirs.npy ./pdb_fns.npy ./whitened_data**"
169173
]
170174
},
175+
{
176+
"cell_type": "markdown",
177+
"metadata": {},
178+
"source": [
179+
"--Optional parameters to add: \n",
180+
"\n",
181+
" -a is an option specify an atom selection. The default will choose the C, CA, CB, and N atoms from both supplied PDB files. However, if your data requires a special atom selection, you must provide a numpy file that is a list of lists where each inner list contains the indices to select from each PDB file that you supplied. If your atom selection file is name \"atom_sel.npy\" then you should add the following to the above python command:\n",
182+
" \n",
183+
" -aatom_sel.npy (No space between the -a and the file name)\n",
184+
" \n",
185+
" -s is an option to set the stride for each dataset. This is useful if you have an excess of data (you typically only need tens to hundreds of thousance of simulation frames), OR if your datasets are unbalanced. For example, if var1 has 1 million structures, and var2 has 500,000 structures, you would want to set the stride to something like [10, 5] which will leave you with 100,000 structures from each variant. Save a numpy file called \"stride.npy\" that contains a list of integers where each integer designates the stride for a given variant. The order must follow the order that you supplied the PDBs.\n",
186+
" \n",
187+
" -sstride.npy (No space between the -s and the file names)"
188+
]
189+
},
171190
{
172191
"cell_type": "markdown",
173192
"metadata": {},
@@ -188,7 +207,7 @@
188207
" |traj_dirs.npy\n",
189208
" |\n",
190209
" ----->data\n",
191-
" ----->traj1\n",
210+
" ----->var1\n",
192211
" |beta-peptide1.xtc\n",
193212
" ----->var2\n",
194213
" |beta-peptide2.xtc\n",
@@ -261,7 +280,7 @@
261280
" \n",
262281
"**python /path/to/diffnets/diffnets/cli/main.py train config.yml**\n",
263282
"\n",
264-
"take a look at an example config.yml file at docs/train_sample.yml, but I will also display it here.\n",
283+
"take a look at an example config.yml file at docs/train_sample.yml, but I will also display it here. Pay attention to the comments in the cell below.\n",
265284
"\n",
266285
"Remember, we are still cd'd into practice_dir"
267286
]
@@ -333,7 +352,7 @@
333352
" |traj_dirs.npy\n",
334353
" |\n",
335354
" ----->data\n",
336-
" ----->traj1\n",
355+
" ----->var1\n",
337356
" |beta-peptide1.xtc\n",
338357
" ----->var2\n",
339358
" |beta-peptide2.xtc\n",
@@ -411,7 +430,7 @@
411430
" |traj_dirs.npy\n",
412431
" |\n",
413432
" ----->data\n",
414-
" ----->traj1\n",
433+
" ----->var1\n",
415434
" |beta-peptide1.xtc\n",
416435
" ----->var2\n",
417436
" |beta-peptide2.xtc\n",

0 commit comments

Comments
 (0)