Viewing stuff in chemview is fairly easy. But since it deals only with visualization we will use another program (mdtraj) to pull data from the web. This is a protein.
In [1]:
import mdtraj as md
traj = md.load_pdb('2M6K.pdb')
print traj
Chemview provides a class MolecularViewer and helpers to let you easily display the protein using a cylinder and strand representation.
In [4]:
from chemview import MolecularViewer, enable_notebook
from chemview.contrib import topology_mdtraj
enable_notebook()
mv = MolecularViewer(traj.xyz[0], topology_mdtraj(traj))
mv.cylinder_and_strand()
mv
In [5]:
from chemview.export import display_static
display_static(mv)
In [ ]: