In [1]:
import molpx
%matplotlib ipympl
In [2]:
top = molpx._molpxdir(join='notebooks/data/ala2.pdb')
MD_trajfiles = [molpx._molpxdir(join='notebooks/data/ala2.mini.xtc')] #short trajectory
rama_files = [molpx._molpxdir(join='notebooks/data/ala2.mini.phi.psi.dat')]
Execute the following cell and click either on the FES or on the slidebar. Once you get familiar with it, try uncommenting these options and see what happens:
proj_idxs=[1]
n_overlays=5
sticky=True
color_list='random'
With sticky option is True
, you can see the effect of a right-click on the dots of the FES
In [3]:
mpx_wdg_box = molpx.visualize.FES(MD_trajfiles,
top,
rama_files,
nbins=50,
proj_labels=['$\phi$',
'$\psi$'],
atom_selection="symbol != H",
#proj_idxs=[1],
#n_overlays=5,
#sticky=True,
#color_list='random'
)
mpx_wdg_box
In [4]:
from molpx import visualize, _linkutils
from imp import reload
reload(visualize)
reload(_linkutils)
from matplotlib import pyplot as plt
plt.close('all')
mpx_wdg_box = molpx.visualize.traj(MD_trajfiles,
top,
rama_files,
plot_FES = True,
proj_labels=['$\phi$', '$\psi$']
)
mpx_wdg_box
In [5]:
import numpy as np
import mdtraj as md
MD_trajs = [md.load(fname, top=top) for fname in MD_trajfiles]
phi_psi = [np.loadtxt(fname) for fname in rama_files]
In [6]:
mpx_wdg_box = molpx.visualize.FES(MD_trajs,
top,
phi_psi,
nbins=50,
proj_labels=['$\phi$',
'$\psi$'],
atom_selection="symbol != H",
#proj_idxs=[1],
#n_overlays=5,
#sticky=True,
#color_list='random'
)
mpx_wdg_box
In [12]:
for attr in dir(mpx_wdg_box):
if attr.startswith('linked_'):
print(attr)