Skip to main content
Chemistry LibreTexts

5.2.8.4: Using nglview to view molecular structures and trajectories

  • Page ID
    305861
  • The package nglview can be used to generate and render complex molecular visualizations. These can be explored with the mouse by dragging to move the view and scrolling to zoom in/out.

    Because visualizations can quickly become complex, it is recommended to check out the documentation of nglview to get a full grasp of how to use it.

    An example is shown below:

    import nglview as nv
    
    view = nv.show_structure_file(nv.datafiles.PDB)
    view
     

     

    • Was this article helpful?