Prody is an open-source Python package for protein structural dynamics analysis with expansive and well-written API.

In [1]:
import prody
prot = prody.parsePDB('3UB5')
@> PDB file is found in the local folder (/Users/dkoes/.../3ub5.pdb.gz).
@> 4055 atoms and 1 coordinate set(s) were parsed in 0.04s.

The default visualization in ProDy uses matplotlib.

In [2]:
%matplotlib inline
prody.showProtein(prot)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
Out[2]:
<mpl_toolkits.mplot3d.axes3d.Axes3D at 0x10c93dbd0>

With the latest version of ProDy, py3Dmol will be used if it has been imported.

In [3]:
prody.checkUpdates()
@> You are using the latest ProDy release (v1.8.2).
In [4]:
import py3Dmol
prody.showProtein(prot)
Out[4]:

Configuration

A number of keyword arguments are supported.

The background color is configurable.

In [5]:
prody.showProtein(prot,backgroundColor="black")
Out[5]:

The height and width of the viewer can be changed.

In [6]:
prody.showProtein(prot, height=400, width=200,backgroundcolor='gray')
Out[6]: