Functions¶
-
moldynplot.dssp_cmap(z=None, vmin=None, vmax=None)¶ Generates colormap for Dictionary of Secondary Structure Prediction (DSSP) figures.
Parameters: - z (float, optional) – Position along color axis
- vmin (float, optional) – Lower bound of color axis
- vmax (float, optional) – Upper bound of color axis
Returns: LinearSegmentedColormap – DSSP color map; if z, vmin, and vmax are provided, provides the color at position z along the axis between vmin and vmax
-
moldynplot.ff99SB_cmap(z=None, vmin=None, vmax=None)¶ Generates purple->yellow->black colormap.
- Generates colormap in style of:
- Hornak, Viktor, Abel, Robert, Okur, Asim, Stockbine, Bentley, Roitberg, Adrian, Simmerling, Carlos, Comparison of Multiple Amber Force Fields and Development of Improved Protein Backbone Parameters. Proteins: Structure, Function, and Bioinformatics. 2006. 65. 712-725.
Parameters: - z (float, optional) – Position along color axis
- vmin (float, optional) – Lower bound of color axis
- vmax (float, optional) – Upper bound of color axis
Returns: LinearSegmentedColormap – ff99SB-style color map; if z, vmin, and vmax are provided, provides the color at position z along the axis between vmin and vmax
-
moldynplot.three_one(three)¶ Converts three-letter amino acid codes to one-letter.
Parameters: three (str) – Three letter amino acid code; AMBER and CHARMM nomenclature for alternative protonation states is supported, but lost by conversion. Returns: str – Corresponding one-letter amino acid code
-
moldynplot.multiprocess_map(function, arguments, n_processes=1)¶ Runs a function with arguments using n_processes.
Meant as a replacement for
multiproccessing.Pool.imap_unordered(), which can only accept module-level functions.Parameters: - function (function) – Function to run
- arguments (list) – Iterable of arguments to pass to function
- n_processes (int) – Number of processes to use
Returns: list – results returned from function