In [1]:
import warnings
warnings.filterwarnings('ignore')
from chemview import TrajectoryViewer
In [2]:
import pytraj as pt
from pytraj.view import to_chemview
# fetch pdb, perform superpose to 1st frame, center structure at origin.
traj = pt.fetch_pdb('1l2y').transform(['rms first', 'center origin'])
traj
Out[2]:
In [5]:
tv = to_chemview(traj)
tv.lines()
# click play button to play the movie
tv
In [7]:
traj = pt.load('data/lysozyme.mdcrd', 'data/lysozyme.prmtop')
traj.strip('@H=').center('origin').superpose('@C,N,O')
tv = to_chemview(traj)
tv.lines()
# click play button to play the movie
tv