Add contacts#
Adding contact distance cylinders and representations to NGLView widgets.
The function molsysmt.third_party.nglview.add_contacts() identifies and draws 3D cylinders between interacting atom pairs that satisfy a spatial distance threshold.
Added in version 1.0.0.
API documentation
Follow this link for a detailed description of the input arguments, raised errors, and returned objects: molsysmt.third_party.nglview.add_contacts().
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.add_contacts(view, atom_pairs=[[10, 50], [20, 80], [30, 100]], color='#3498DB', radius='0.3 angstroms')
Evaluating the view object displays the interactive visualization:
view
See also
View: Interactive 3D visualization gateway with
molsysmt.basic.view().NGLWidget: Form adapter for NGLView widget instances.