|
1226 | 1226 | "ax_mol.set_axis_off()\n", |
1227 | 1227 | "ax_mol.imshow(plt.imread('static/pentapeptide-structure.png'))\n", |
1228 | 1228 | "\n", |
1229 | | - "ax_feat = fig.add_subplot(gs[2000:3150, 400:1800])\n", |
1230 | | - "ax_feat.bar(\n", |
1231 | | - " vamp_bars_plot['labels'],\n", |
1232 | | - " vamp_bars_plot['scores'],\n", |
1233 | | - " yerr=vamp_bars_plot['errors'],\n", |
1234 | | - " color=['C0', 'C1', 'C2'])\n", |
1235 | | - "ax_feat.tick_params(axis='x', labelrotation=20)\n", |
1236 | | - "ax_feat.set_ylabel('VAMP2 score')\n", |
1237 | | - "ax_feat.set_title(r'lag time $\\tau$ = {:.1f} ns'.format(vamp_bars_plot['lag'] * 0.1))\n", |
| 1229 | + "ax_feat_label = fig.add_subplot(gs[2000:3150, 180:1800])\n", |
| 1230 | + "ax_feat_upper = fig.add_subplot(gs[2000:2720, 400:1800])\n", |
| 1231 | + "ax_feat_lower = fig.add_subplot(gs[2790:3150, 400:1800])\n", |
| 1232 | + "for ax in (ax_feat_upper, ax_feat_lower):\n", |
| 1233 | + " ax.bar(\n", |
| 1234 | + " vamp_bars_plot['labels'],\n", |
| 1235 | + " vamp_bars_plot['scores'],\n", |
| 1236 | + " yerr=vamp_bars_plot['errors'],\n", |
| 1237 | + " color=['C0', 'C1', 'C2'])\n", |
| 1238 | + "for key in ('top', 'bottom', 'left', 'right'):\n", |
| 1239 | + " ax_feat_label.spines[key].set_visible(False)\n", |
| 1240 | + "ax_feat_label.set_ylabel('VAMP2 score')\n", |
| 1241 | + "ax_feat_label.set_xticks([])\n", |
| 1242 | + "ax_feat_label.set_yticks([])\n", |
| 1243 | + "ax_feat_upper.set_title(r'lag time $\\tau$ = {:.1f} ns'.format(vamp_bars_plot['lag'] * 0.1))\n", |
| 1244 | + "ax_feat_upper.spines['bottom'].set_visible(False)\n", |
| 1245 | + "ax_feat_upper.set_xticks([])\n", |
| 1246 | + "ax_feat_upper.set_ylim(2.8, 3.6)\n", |
| 1247 | + "ax_feat_lower.spines['top'].set_visible(False)\n", |
| 1248 | + "ax_feat_lower.tick_params(axis='x', labelrotation=20)\n", |
| 1249 | + "ax_feat_lower.set_ylim(0.0, 0.4)\n", |
1238 | 1250 | "\n", |
1239 | 1251 | "ax_density = fig.add_subplot(gs[2000:3150, 2200:3350])\n", |
1240 | 1252 | "_, _, misc = pyemma.plots.plot_density(\n", |
|
1300 | 1312 | "metadata": {}, |
1301 | 1313 | "outputs": [], |
1302 | 1314 | "source": [ |
1303 | | - "fig = plt.figure(figsize=(3.47, 5.85))\n", |
| 1315 | + "fig = plt.figure(figsize=(3.47, 3.95))\n", |
1304 | 1316 | "gw = int(np.floor(0.5 + 1000 * fig.get_figwidth()))\n", |
1305 | 1317 | "gh = int(np.floor(0.5 + 1000 * fig.get_figheight()))\n", |
1306 | 1318 | "gs = plt.GridSpec(gh, gw)\n", |
|
1309 | 1321 | "ax_box = fig.add_subplot(gs[:, :])\n", |
1310 | 1322 | "ax_box.set_axis_off()\n", |
1311 | 1323 | "ax_box.text(0.03, 0.97, '(a)', size=10)\n", |
1312 | | - "ax_box.text(0.55, 0.97, '(b)', size=10)\n", |
1313 | | - "ax_box.text(0.03, 0.66, '(c)', size=10)\n", |
1314 | | - "ax_box.text(0.55, 0.66, '(d)', size=10)\n", |
1315 | | - "ax_box.text(0.03, 0.30, '(e)', size=10)\n", |
| 1324 | + "ax_box.text(0.53, 0.97, '(b)', size=10)\n", |
| 1325 | + "ax_box.text(0.03, 0.50, '(c)', size=10)\n", |
| 1326 | + "ax_box.text(0.53, 0.50, '(d)', size=10)\n", |
1316 | 1327 | "\n", |
1317 | 1328 | "ax_fe = fig.add_subplot(gs[400:1750, 400:1750])\n", |
1318 | 1329 | "_, _, misc = pyemma.plots.plot_free_energy(\n", |
|
1343 | 1354 | " for i in range(nstates)])\n", |
1344 | 1355 | "ax_state.set_xticklabels([])\n", |
1345 | 1356 | "ax_state.set_yticklabels([])\n", |
| 1357 | + "ax_state.text(0.70, 6.30, '$\\mathcal{S}_1$', size=10)\n", |
| 1358 | + "ax_state.text(3.00, 4.00, '$\\mathcal{S}_2$', size=10)\n", |
| 1359 | + "ax_state.text(2.50, 2.00, '$\\mathcal{S}_3$', size=10)\n", |
| 1360 | + "ax_state.text(5.20, -0.50, '$\\mathcal{S}_4$', size=10)\n", |
| 1361 | + "ax_state.text(-0.20, 0.00, '$\\mathcal{S}_5$', size=10)\n", |
1346 | 1362 | "\n", |
1347 | 1363 | "evec_idx = 1\n", |
1348 | 1364 | "ax_eig = fig.add_subplot(gs[2300:3650, 400:1750])\n", |
|
1358 | 1374 | "misc['cbar'].set_ticks(np.linspace(*misc['cbar'].get_clim(), 3))\n", |
1359 | 1375 | "misc['cbar'].ax.xaxis.set_ticks_position('top')\n", |
1360 | 1376 | "misc['cbar'].ax.xaxis.set_label_position('top')\n", |
1361 | | - "ax_eig.set_xticklabels([])\n", |
1362 | 1377 | "ax_eig.set_xlabel('IC 1')\n", |
1363 | 1378 | "ax_eig.set_ylabel('IC 2')\n", |
1364 | 1379 | "\n", |
|
1380 | 1395 | "ax_flux.set_xlabel('IC 1')\n", |
1381 | 1396 | "ax_flux.set_yticklabels([])\n", |
1382 | 1397 | "\n", |
1383 | | - "ax_acf = fig.add_subplot(gs[4100:4825, 400:3350])\n", |
1384 | | - "ax_acf.set_title('Trp-1 SASA')\n", |
1385 | | - "ax_acf.plot(eq_time_ml, eq_acf_ml, '-', color='C1', label='ML MSM')\n", |
1386 | | - "ax_acf.plot(\n", |
1387 | | - " eq_time_bayes,\n", |
1388 | | - " eq_acf_bayes,\n", |
1389 | | - " '--',\n", |
1390 | | - " color='C0',\n", |
1391 | | - " label='Bayesian MSM')\n", |
1392 | | - "ax_acf.fill_between(\n", |
1393 | | - " eq_time_bayes,\n", |
1394 | | - " eq_acf_bayes_ci_l[1],\n", |
1395 | | - " eq_acf_bayes_ci_u[1],\n", |
1396 | | - " facecolor='C0',\n", |
1397 | | - " alpha=0.3)\n", |
1398 | | - "ax_acf.semilogx()\n", |
1399 | | - "ax_acf.set_xlim((eq_time_ml[1], eq_time_ml[-1]))\n", |
1400 | | - "ax_acf.set_xticks([])\n", |
1401 | | - "ax_acf.set_ylabel(r'ACF / nm$^4$')\n", |
1402 | | - "ax_acf.legend()\n", |
1403 | | - "\n", |
1404 | | - "ax_rlx = fig.add_subplot(gs[4825:5550, 400:3350])\n", |
1405 | | - "ax_rlx.plot(eq_time_ml, eq_relax_ml, '-', color='C1', label='ML MSM')\n", |
1406 | | - "ax_rlx.plot(\n", |
1407 | | - " eq_time_bayes,\n", |
1408 | | - " eq_relax_bayes,\n", |
1409 | | - " '--',\n", |
1410 | | - " color='C0',\n", |
1411 | | - " label='Bayesian MSM')\n", |
1412 | | - "ax_rlx.fill_between(\n", |
1413 | | - " eq_time_bayes,\n", |
1414 | | - " eq_relax_bayes_CI_l[1],\n", |
1415 | | - " eq_relax_bayes_CI_u[1],\n", |
1416 | | - " facecolor='C0',\n", |
1417 | | - " alpha=0.3)\n", |
1418 | | - "ax_rlx.semilogx()\n", |
1419 | | - "ax_rlx.set_ylabel(r'Average / nm$^2$')\n", |
1420 | | - "ax_rlx.set_xlim((eq_time_ml[1], eq_time_ml[-1]))\n", |
1421 | | - "ax_rlx.set_xlabel(r'time / ns')\n", |
1422 | | - "\n", |
1423 | 1398 | "fig.savefig('data/figure_3.pdf', dpi=300)" |
1424 | 1399 | ] |
1425 | 1400 | }, |
|
1469 | 1444 | "fig.savefig('data/figure_4.pdf', dpi=300)" |
1470 | 1445 | ] |
1471 | 1446 | }, |
| 1447 | + { |
| 1448 | + "cell_type": "code", |
| 1449 | + "execution_count": null, |
| 1450 | + "metadata": {}, |
| 1451 | + "outputs": [], |
| 1452 | + "source": [ |
| 1453 | + "fig = plt.figure(figsize=(3.47, 2.5))\n", |
| 1454 | + "gw = int(np.floor(0.5 + 1000 * fig.get_figwidth()))\n", |
| 1455 | + "gh = int(np.floor(0.5 + 1000 * fig.get_figheight()))\n", |
| 1456 | + "gs = plt.GridSpec(gh, gw)\n", |
| 1457 | + "gs.update(hspace=0.0, wspace=0.0, left=0.0, right=1.0, bottom=0.0, top=1.0)\n", |
| 1458 | + "\n", |
| 1459 | + "ax_box = fig.add_subplot(gs[:, :])\n", |
| 1460 | + "ax_box.set_axis_off()\n", |
| 1461 | + "ax_box.text(0.01, 0.95, '(a)', size=10)\n", |
| 1462 | + "ax_box.text(0.01, 0.50, '(b)', size=10)\n", |
| 1463 | + "\n", |
| 1464 | + "ax_acf = fig.add_subplot(gs[50:1075, 500:3400])\n", |
| 1465 | + "ax_acf.plot(eq_time_ml, eq_acf_ml, '-', color='C1', label='ML MSM')\n", |
| 1466 | + "ax_acf.plot(\n", |
| 1467 | + " eq_time_bayes,\n", |
| 1468 | + " eq_acf_bayes,\n", |
| 1469 | + " '--',\n", |
| 1470 | + " color='C0',\n", |
| 1471 | + " label='Bayesian MSM')\n", |
| 1472 | + "ax_acf.fill_between(\n", |
| 1473 | + " eq_time_bayes,\n", |
| 1474 | + " eq_acf_bayes_ci_l[1],\n", |
| 1475 | + " eq_acf_bayes_ci_u[1],\n", |
| 1476 | + " facecolor='C0',\n", |
| 1477 | + " alpha=0.3)\n", |
| 1478 | + "ax_acf.semilogx()\n", |
| 1479 | + "ax_acf.set_xlim((eq_time_ml[1], eq_time_ml[-1]))\n", |
| 1480 | + "ax_acf.set_xticks([])\n", |
| 1481 | + "ax_acf.set_ylabel(r'ACF / nm$^4$')\n", |
| 1482 | + "ax_acf.legend()\n", |
| 1483 | + "\n", |
| 1484 | + "ax_rlx = fig.add_subplot(gs[1125:2150, 500:3400])\n", |
| 1485 | + "ax_rlx.plot(eq_time_ml, eq_relax_ml, '-', color='C1', label='ML MSM')\n", |
| 1486 | + "ax_rlx.plot(\n", |
| 1487 | + " eq_time_bayes,\n", |
| 1488 | + " eq_relax_bayes,\n", |
| 1489 | + " '--',\n", |
| 1490 | + " color='C0',\n", |
| 1491 | + " label='Bayesian MSM')\n", |
| 1492 | + "ax_rlx.fill_between(\n", |
| 1493 | + " eq_time_bayes,\n", |
| 1494 | + " eq_relax_bayes_CI_l[1],\n", |
| 1495 | + " eq_relax_bayes_CI_u[1],\n", |
| 1496 | + " facecolor='C0',\n", |
| 1497 | + " alpha=0.3)\n", |
| 1498 | + "ax_rlx.semilogx()\n", |
| 1499 | + "ax_rlx.set_ylabel(r'Average / nm$^2$')\n", |
| 1500 | + "ax_rlx.set_xlim((eq_time_ml[1], eq_time_ml[-1]))\n", |
| 1501 | + "ax_rlx.set_xlabel(r'time / ns')\n", |
| 1502 | + "\n", |
| 1503 | + "fig.savefig('data/figure_5.pdf', dpi=300)" |
| 1504 | + ] |
| 1505 | + }, |
1472 | 1506 | { |
1473 | 1507 | "cell_type": "markdown", |
1474 | 1508 | "metadata": {}, |
|
1521 | 1555 | "<a id=\"cite-hmm-baum-welch-alg\"/><sup><a href=#ref-14>[^]</a></sup>Leonard E. Baum and Ted Petrie and George Soules and Norman Weiss. 1970. _A Maximization Technique Occurring in the Statistical Analysis of Probabilistic Functions of Markov Chains_. [URL](http://www.jstor.org/stable/2239727)\n", |
1522 | 1556 | "\n" |
1523 | 1557 | ] |
1524 | | - }, |
1525 | | - { |
1526 | | - "cell_type": "code", |
1527 | | - "execution_count": null, |
1528 | | - "metadata": {}, |
1529 | | - "outputs": [], |
1530 | | - "source": [] |
1531 | 1558 | } |
1532 | 1559 | ], |
1533 | 1560 | "metadata": { |
|
0 commit comments