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 [ ]:
import mdtraj as md
traj = md.load_pdb('../tests/data/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 [ ]:
from chemview import MolecularViewer
from chemview.contrib import topology_mdtraj
mv = MolecularViewer(traj.xyz[0], topology_mdtraj(traj))
# mv.cylinder_and_strand()
mv.cartoon()
mv
In [ ]:
from chemview.export import display_static
display_static(mv)