AlloViz.Delta.view#

Delta.view(pkg, metric, filtering='All', element='edges', num=20, colors=['orange', 'turquoise'], nv=None)[source]#

Visualize the analyzed delta-networks on the protein structure.

Visualize the delta-network corresponding to the selected package/network construction method, filtering scheme, network element and network metric or metrics, all of which must be already present in the delta-network object by having been previously calculated and analyzed in the respective Protein objects, and then correctly processed during the Delta object creation. Structure of the reference protein is used for displaying by default. The number of (each of the) elements to show and the color used for each Protein can be specified (first color will be used for negative values and thus for the second Protein, while the second color will be used for positive values and thus the reference Protein).

Parameters:
pkgstr, default: “all”

Package/Network construction method for which to show the delta-network.

metricstr, default: “all”

Network metric for which to show the delta-network.

filteringstr

Filtering scheme for which to show the delta-network.

elementstr or list, {“edges”, “nodes”}

Delta-network element or elements to show on the protein structure representing the chosen package, filtering scheme and metric.

numint, default: 20

Number of (each of the) delta-network elements to show on the structure.

colorslist, default: [“orange”, “turquoise”]

List of two colors to assign to the minimum and maximum values of the delta-network to be represented, respectively. Abstractly, the first color will be used for negative values and thus for elements that have higher value in the second Protein, while the second color will be used for positive values, and thus for the reference Protein. Dela-network values are interpolated setting 0 as the middle value, which is assigned “white”.

nvnglview.NGLWidget, optional

A structure representation into which the shapes representing the chosen delta-network elements will be added.

Returns:
nglview.NGLWidget

Examples

>>> activeB2AR = AlloViz.Protein(GPCR=117, name="Active B2AR")
>>> inactiveB2AR = AlloViz.Protein(GPCR=160, name="Inactive B2AR")
>>> for protein in [activeB2AR, inactiveB2AR]:
>>>     protein.calculate("pytraj_CA")
>>>     protein.analyze(metrics="btw")
>>> delta = AlloViz.Delta(activeB2AR, inactiveB2AR)
>>> delta.view("pytraj_CA", "btw")
NGLWidget()