How to view this notebook?

  • click Cell then Run All

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]:
pytraj.Trajectory, 38 frames: 
Size: 0.000258 (GB)
<Topology: 304 atoms, 20 residues, 1 mols, PBC with box type = ortho>
           

In [5]:
tv = to_chemview(traj)
tv.lines()
# click play button to play the movie
tv

Load a Trajectory from disk


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