Show as licorice#

Rendering molecular selections as licorice bonds in NGLView.

The function molsysmt.third_party.nglview.show_as_licorice() displays target atoms and bonds in licorice representation.

Added in version 1.0.0.

Basic usage#

Let’s demonstrate how to use this function on an interactive NGLView view:

import molsysmt as msm

molsys = msm.convert(msm.systems['T4 lysozyme L99A']['181l.h5msm'], to_form='molsysmt.MolSys')
view = msm.convert(molsys, to_form='nglview.NGLWidget')
msm.third_party.nglview.show_as_licorice(view, selection='group_index==[10, 11, 12]')

Evaluating the view object displays the interactive visualization:

view