|
1396 | 1396 | "ax_mol.set_axis_off()\n", |
1397 | 1397 | "ax_mol.imshow(plt.imread('static/pentapeptide-structure.png'))\n", |
1398 | 1398 | "\n", |
1399 | | - "ax_feat_label = fig.add_subplot(gs[2000:3150, 180:1800])\n", |
1400 | | - "ax_feat_upper = fig.add_subplot(gs[2000:2720, 400:1800])\n", |
1401 | | - "ax_feat_lower = fig.add_subplot(gs[2790:3150, 400:1800])\n", |
1402 | | - "for ax in (ax_feat_upper, ax_feat_lower):\n", |
1403 | | - " ax.bar(\n", |
1404 | | - " vamp_bars_plot['labels'],\n", |
1405 | | - " vamp_bars_plot['scores'],\n", |
1406 | | - " yerr=vamp_bars_plot['errors'],\n", |
1407 | | - " color=['C0', 'C1', 'C2'])\n", |
1408 | | - "for key in ('top', 'bottom', 'left', 'right'):\n", |
1409 | | - " ax_feat_label.spines[key].set_visible(False)\n", |
1410 | | - "ax_feat_label.set_ylabel('VAMP2 score')\n", |
1411 | | - "ax_feat_label.set_xticks([])\n", |
1412 | | - "ax_feat_label.set_yticks([])\n", |
1413 | | - "ax_feat_upper.set_title(r'lag time $\\tau$ = {:.1f} ns'.format(vamp_bars_plot['lag'] * 0.1))\n", |
1414 | | - "ax_feat_upper.spines['bottom'].set_visible(False)\n", |
1415 | | - "ax_feat_upper.set_xticks([])\n", |
1416 | | - "ax_feat_upper.set_ylim(2.85, 3.65)\n", |
1417 | | - "ax_feat_lower.spines['top'].set_visible(False)\n", |
1418 | | - "ax_feat_lower.tick_params(axis='x', labelrotation=20)\n", |
1419 | | - "ax_feat_lower.set_ylim(0.0, 0.4)\n", |
1420 | | - "\n", |
1421 | | - "ax_density = fig.add_subplot(gs[2000:3150, 2200:3350])\n", |
1422 | | - "_, _, misc = pyemma.plots.plot_density(\n", |
| 1399 | + "ax_feat = fig.add_subplot(gs[2000:3150, 400:1800])\n", |
| 1400 | + "ax_feat.bar(\n", |
| 1401 | + " vamp_bars_plot['labels'],\n", |
| 1402 | + " vamp_bars_plot['scores'],\n", |
| 1403 | + " yerr=vamp_bars_plot['errors'],\n", |
| 1404 | + " color=['C0', 'C1', 'C2'])\n", |
| 1405 | + "ax_feat.set_ylabel('VAMP2 score')\n", |
| 1406 | + "ax_feat.set_title(r'lag time $\\tau$ = {:.1f} ns'.format(vamp_bars_plot['lag'] * 0.1))\n", |
| 1407 | + "ax_feat.set_ylim(2.75, 3.65)\n", |
| 1408 | + "ax_feat.tick_params(axis='x', labelrotation=20)\n", |
| 1409 | + "\n", |
| 1410 | + "ax_sample_free_energy = fig.add_subplot(gs[2000:3150, 2200:3350])\n", |
| 1411 | + "_, _, misc = pyemma.plots.plot_free_energy(\n", |
1423 | 1412 | " *tica_concatenated.T[:2],\n", |
1424 | | - " ax=ax_density,\n", |
| 1413 | + " ax=ax_sample_free_energy,\n", |
1425 | 1414 | " cax=fig.add_subplot(gs[1900:1950, 2200:3350]),\n", |
1426 | 1415 | " cbar_orientation='horizontal',\n", |
1427 | | - " logscale=True)\n", |
1428 | | - "misc['cbar'].set_ticks(LogLocator(base=10.0))\n", |
| 1416 | + " legacy=False)\n", |
| 1417 | + "misc['cbar'].set_label('sample free energy / kT')\n", |
| 1418 | + "misc['cbar'].set_ticks(np.arange(9))\n", |
1429 | 1419 | "misc['cbar'].ax.xaxis.set_ticks_position('top')\n", |
1430 | 1420 | "misc['cbar'].ax.xaxis.set_label_position('top')\n", |
1431 | | - "ax_density.set_xlabel('IC 1')\n", |
1432 | | - "ax_density.set_ylabel('IC 2')\n", |
| 1421 | + "ax_sample_free_energy.set_xlabel('IC 1')\n", |
| 1422 | + "ax_sample_free_energy.set_ylabel('IC 2')\n", |
1433 | 1423 | "\n", |
1434 | 1424 | "x = 0.1 * np.arange(tica_output[0].shape[0])\n", |
1435 | 1425 | "ax_tic1 = fig.add_subplot(gs[3650:4000, 400:3350])\n", |
1436 | 1426 | "ax_tic2 = fig.add_subplot(gs[4000:4350, 400:3350])\n", |
1437 | 1427 | "\n", |
1438 | | - "ax_tic1.plot(x, tica_output[0][:, 0])\n", |
1439 | | - "ax_tic2.plot(x, tica_output[0][:, 1])\n", |
| 1428 | + "ax_tic1.plot(x, tica_output[0][:, 0], linewidth=0.25)\n", |
| 1429 | + "ax_tic2.plot(x, tica_output[0][:, 1], linewidth=0.25)\n", |
1440 | 1430 | "ax_tic1.set_ylabel('IC 1')\n", |
1441 | 1431 | "ax_tic2.set_ylabel('IC 2')\n", |
1442 | 1432 | "ax_tic2.set_xlabel('time / ns')\n", |
|
0 commit comments