Closed johnnytam100 closed 2 years ago
Try to avoid colab for now, using traditional notebook or lab. I filed the case several months ago: https://github.com/googlecolab/colabtools/issues/2853#issuecomment-1171699299
Close this issue since there is nothing we can do now.
I made a quick workaround. You can turn off the default representation and then add the representation for your molecules.
u = mda.Universe(pdb_filename, traj_filename)
u.transfer_to_memory(step=10)
view = nv.show_mdanalysis(u, defaultRepresentation=False)
view.add_cartoon("protein")
view
I made a quick workaround. You can turn off the default representation and then add the representation for your molecules.
u = mda.Universe(pdb_filename, traj_filename)
u.transfer_to_memory(step=10)
view = nv.show_mdanalysis(u, defaultRepresentation=False)
view.add_cartoon("protein")
view
@kimjc95 You might also want to add view.center()
too because the default representation is not used.
@hainm You are right! I missed that part. By the way, how do I recreate the default representation of nucleic acids? I tried add_cartoon("nucleic"), and it did show the phosphate backbone as ribbons, but did not show the bases as sticks.
@hainm You are right! I missed that part. By the way, how do I recreate the default representation of nucleic acids? I tried add_cartoon("nucleic"), and it did show the phosphate backbone as ribbons, but did not show the bases as sticks.
@kimjc95 I admit I don't know the answer, but here is the code in NGL
(which nglview is using under the hood) for default one: https://github.com/nglviewer/ngl/blob/417581fa92971fe98560b2d0e1ac9d00046b7ba6/src/stage/stage.ts#L291-L418
@hainm Thanks for the link. It came out to be add_simplified_base("nucleic") .
I'm sorry for raising a question again.
As I make a movie from a trajectory, the movie also includes the reference backbone (the topology?).
Is there any way to remove the reference backbone?
My script is like this:
then