Running MDPath-Tools
This page details the methods for postprocessing files generated by MDPath using MDPath-Tools.
mdpath_gpcr_image
For simulations of G-protein coupled receptors (GPCRs), this tool provides a 2D visualization based on genetic numbering. Please ensure stable internet access, as the genetic numbering is computed using GPCRdb.
- -top
Path to the topology file for your analysis.
- -clust
Path to cluster_pathways_dict.pkl, containing main analysis information.
- -cut
Percentage of correlated movements in top paths to consider for plotting.
- -num
(Optional) Path for the output of the genetic numbered PDB file.
Below is an example of a command line input:
mdpath_gpcr_image -top PATH/topology.pdb -clust PATH/cluster_pathways_dict.pkl -cut 1
For each cluster, a separate picture is generated with the prefix: GPCR_2D_pathways_cluster.
mdpath_compare
This function compares different analyses performed on the same or similar topology files. It generates an output that morphs the results of one analysis onto the backbone of another topology file. Inputs:
- -atop
Path to residue_coordinates.pkl from the analysis to visualize the paths on.
-bcluster Path to cluster_pathways_dict.pkl from the other analysis, whose paths will be plotted on the topology specified by -atop.
Keep in mind that the initial topologies must have the same residue numbering; otherwise, the analysis will fail. Below is an example of a command line input:
mdpath_compare -atop PATH/residue_coordinates.pkl -bcluster PATH/cluster_pathways_dict.pkl
The generated output file, morphed_clusters_paths.json, can now be visualized using the topology file specified for -atop.
mdpath_multitraj
This module is useful for comparing multiple trajectories by reclustering the outcomes from all of them. Below is a quick outline of the inputs:
- -top
Path to the topology file for your analysis.
- -multitraj
Path to all of your top_pathways.pkl files, containing main analysis pathway information.
- -cpu
(Optional) Number of virtual cores to use.
- -closedist
(Optional) Minimal distance between residue heavy atoms to consider them overlapping.
An example input might look like this:
mdpath_multitraj -top PATH/topology.pdb -multitraj PATH/top_pathways1.pkl PATH/top_pathways2.pkl -cpu 16
The outputs are prefixed with multitraj and can be handled in the same way as the initial MDPath analysis outputs. Rescaling may be advisable, especially if there is significant overlap between trajectories.
mdpath_json_editor
Of the various functions, this one is the most flexible. It requires no additional data computation, only changes in the representation of the data for 3D visualization.
Recoloring
This option allows for quick recoloring of paths by parsing a JSON file with the corresponding color format. When setting up the JSON file, provide a list of colors as normalized RGB values. After calling the function, each cluster will be recolored according to the provided colors. These are the necessary inputs:
- -json
Path to quick_precomputed_clusters_paths.json or precomputed_clusters_paths.json for which you want to change the color.
- -recolor
Path to your new color palette.json file.
An example input might look like this:
mdpath_json_editor -recolor PATH/easy_read_colors.json -json PATH/quick_precomputed_clusters_paths.json
The output will have the _recolor_ identifier.
Scaling
MDPath’s main script scales correlated movements, rendering more frequently recurring paths as thicker, while less frequent paths are plotted thinner.
The mdpath_json_editor allows you to customize this behavior. The -scale flag lets you adjust the radius of paths based on your input. Values greater than 1 will increase the size of the outputs, while values less than 1 will decrease them, as the flag’s value is multiplied by the original radius.
The -flat flag sets every radius in your visualization to the specified value, resulting in all paths appearing with the same thickness.
The -clusterscale flag adjusts the thickness of each cluster based on its content. Larger clusters are plotted thicker, while smaller clusters are displayed with reduced thickness. The largest cluster corresponds to the value specified for -clusterscale.
Those are the possible inputs:
- -json
Path to quick_precomputed_clusters_paths.json or precomputed_clusters_paths.json for which you want to change the color.
- -scale
Value each radius is multiplied by.
- -flat
Value each radius is set to.
- -clusterscale
Value of the radius within the greatest cluster.
Ensure that you use only one of these flags at a time. Flag-specific named output files are generated, allowing you to apply multiple options sequentially.
mdpath_gpcr_image
Create a rudimentray 2D visualization of GPCR pathways. This function is useful for quick visualization of GPCR pathways. Each TM is represented as a column with pathway residues being represented as circular nodes conected by scaled paths between them. The output is a .png file with the prefix GPCR_2D_vis. Careful: It queries gpcrdb.org for the Ballesteros-Weinstein-System numbering and assigns generic numbers to the protein residues and also only works for GPCRs.
- Inputs:
-top (str): Topology file of your MD simulation
-clust (str): Pickle file with cluster pathways dictionary
-cut (float): Percentage of the top paths to visualize (default is 0 = all paths are drawn)
-num (str): Path to write the numbered structure file to (default is “./numbered_structure.pdb”)
- Example usage:
$ mdpath_gpcr_image -top <path_to_topology_file> -clust <path_to_cluster_pathways.pickl> -cut <cutoff_float> -num <path_where_to_save_numberd_structure>
mdpath_spline
Create a 3D Visualization of Paths through a protein using accurate spline representations. This function provides a command-line interface (CLI) for creating a 3D visualization of paths through a protein. It uses the pre-calculated cluster paths and recalculates them using accurate spline intrapolation. The output meshfiles can be used directly in Blender to accurately capture paths.
- Command-line inputs:
-json (str): Json file of the MDPath analysis -> “quick_precomputed_clusters_paths”
- Example usage:
$ mdpath_spline -json <path_to_json>