# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import mdtraj as md
from nglview import datafiles
import nglview as nv

traj0 = md.load('../data/tz2.pdb')
# 
traj1 = md.load(datafiles.XTC, top=datafiles.PDB)

trajlist = [nv.MDTrajTrajectory(traj) for traj in [traj0, traj1]]

trajlist

view = nv.NGLWidget(trajlist)
view
# -

# clear repr: trpcage
view._clear_repr(component=1)

# clear repr: trpzip2
view._clear_repr(component=0)

# try back: trpcage
view.add_line(component=1)

# +
# try back: trpzip2

view.add_cartoon(color='residueindex')

StarcoderdataJupyterScriptsDedupFiltered