PyMOLVisualizeCryoEMDensity.py - Visualize cryo-EM density
PyMOLVisualizeCryoEMDensity.py [--allowEmptyObjects <yes or no>] [--BFactorChainCartoonPutty <yes or no>] [--BFactorColorPalette <text> ] [--chainIDs <First, All or ID1,ID2...>] [--densityMapFile <text>] [--ligandIDs <Largest, All or ID1,ID2...>] [--labelFontID <number>] [--meshCarveRadius <number>] [--meshComplex <yes or no>] [--meshChainComplex <yes, no, or auto>] [--meshColor <text>] [--meshLevel <number>] [--meshWidth <number>] [--PMLOut <yes or no>] [--pocketContactsLigandColor <text>] [--pocketContactsSolventColor <text>] [--pocketContactsInorganicColor <text>] [--pocketDistanceCutoff <number>] [--pocketLabelColor <text>] [--pocketSurface <yes or no>] [--surfaceComplex <yes or no>] [--surfaceChainComplex <yes, no or auto>] [--surfaceTransparency <number>] [--overwrite] [-w <dir>] -i <infile> -o <outfile>
PyMOLVisualizeCryoEMDensity.py -h | --help | -e | --examples
Generate PyMOL visualization files for viewing electron microscopy (EM) or cryo-EM density around chains, ligands, and ligand binding pockets in macromolecules including proteins and nucleic acids.
The supported input file formats are: Macromolecule - PDB (.pdb) or CIF(.cif), Cryo-EM Density - Collaborative Computational Project Number 4 (CCP4) ( .map)
The supported output file formats are: PyMOL script file (.pml), PyMOL session file (.pse)
The cryo-EM density and header files along with PDB files may be downloaded from appropriate servers using DownloadPDBFiles.pl script.
A variety of PyMOL groups and objects may be created for visualization of cryo-EM density present in map files. These groups and objects correspond to maps, meshes, surfaces,chains, ligands, inorganics, ligand binding pockets, pocket, polar interactions, and pocket hydrophobic surfaces. A complete hierarchy of all possible PyMOL groups and objects is shown below:
The meshes and surfaces are not created for complete complex in input file by default. A word to the wise: The creation of these surface and mesh objects may slow down loading of PML file and generation of PSE file, based on the size of input complex and map files. The generation of PSE file may also fail. In addition, you may want to interactively manipulate the contour level for meshes and surfaces. The recommended value for contour level is automatically retrieved from the header file available from EM density server. The recommended value may not always work.
Allow creation of empty PyMOL objects corresponding to solvent and inorganic atom selections across chains, ligands, and ligand binding pockets in input file.
A cartoon putty around individual chains colored by B factors. The minimum and maximum values for B factors are automatically detected. These values indicate spread of cryo-EM density around atoms. The 'blue_white_red' color palette is deployed for coloring the cartoon putty.
Color palette for coloring cartoon putty around chains generated using B factors. An valid PyMOL color palette name is allowed. No validation is performed. The complete list of valid color palette names is a available at: pymolwiki.org/index.php/Spectrum. Examples: blue_white_red, blue_white_magenta, blue_red, green_white_red, green_red.
List of chain IDs to use for visualizing cryo-EM density. Possible values: First, All, or a comma delimited list of chain IDs. The default is to use the chain ID for the first chain in input file.
CryoEM density map file name. The EMDB ID is retrieved from PDB and CIF file to set the cryo-EM density file name during automatic detection of density file. The format of the file name is as follows:
The density file must be present in the working directory.
Print this help message.
Input file name.
List of ligand IDs present in chains for visualizing cryo-EM density across ligands and ligand binding pockets. Possible values: Largest, All, or a comma delimited list of ligand IDs. The default is to use the largest ligand present in all or specified chains in input file.
Ligands are identified using organic selection operator available in PyMOL. It'll also identify buffer molecules as ligands. The largest ligand contains the highest number of heavy atoms.
Font ID for drawing labels. Default: 7 (Sans Bold). Valid values: 5 to 16. The specified value must be a valid PyMOL font ID. No validation is performed. The complete lists of valid font IDs is available at: pymolwiki.org/index.php/Label_font_id. Examples: 5 - Sans; 7 - Sans Bold; 9 - Serif; 10 - Serif Bold.
Radius in Angstroms around atoms for including cryo-EM density.
Create meshes for complete complex in input file corresponding to density map.
Create meshes for individual chain complex in input file corresponding to density map. By default, the meshes are automatically created for chain complexes without any ligands.
Line color for mesh corresponding to density map. The specified value must be valid color. No validation is performed.
Contour level in sigma units for generating mesh corresponding to density map. The default is to automatically retrieve the recommended contour level. The header file emd-<EMDBID>.xml must be present in the working directory to automatically retrieve recommended value for mesh contour level. Otherwise, the default contour level is set to 1.
You may want to interactively manipulate the contour level for meshes and surfaces. The default recommended value may not always work.
Line width for mesh lines corresponding to density map.
Output file name.
Save PML file during generation of PSE file.
Color for drawing polar contacts between ligand and pocket residues. The specified value must be valid color. No validation is performed.
Color for drawing polar contacts between solvent and pocket residues.. The specified value must be valid color. No validation is performed.
Color for drawing polar contacts between inorganic and pocket residues. The specified value must be valid color. No validation is performed.
Distance in Angstroms for identifying pocket residues around ligands.
Color for drawing residue or atom level labels for a pocket. The specified value must be valid color. No validation is performed.
Hydrophobic surface around pocket. The pocket surface is colored by hydrophobicity. It is only valid for proteins. The color of amino acids is set using the Eisenberg hydrophobicity scale. The color varies from red to white, red being the most hydrophobic amino acid.
Create surfaces for complete complex in input file corresponding to density map.
Create surfaces for individual chain complexes in input file corresponding to density map. By default, the surfaces are automatically created for chain complexes without any ligands.
Surface transparency for molecular and cryo-EM density surfaces.
Overwrite existing files.
Location of working directory which defaults to the current directory.
To visualize cryo-EM density at recommended contour level for the first chain complex in a PDB file using corresponding density map and header file, and generate a PML file type:
To visualize electron density for the largest ligand in chain K, and ligand binding pocket to highlight ligand interactions with pockect residues, solvents and inorganics, in a PDB and using corresponding map files, and generate a PML file, type:
To visualize electron density for all chains along with any solvents in a PDB file and using corresponding map files, and generate a PML file, type:
To visualize cryo-EM density at a specific contour level for the first chain complex along with a mesh surface in a PDB file using corresponding to a specific density map file, and generate a PML file, type:
DownloadPDBFiles.pl, PyMOLVisualizeElectronDensity.py, PyMOLVisualizeMacromolecules.py
Copyright (C) 2018 Manish Sud. All rights reserved.
The functionality available in this script is implemented using PyMOL, a molecular visualization system on an open source foundation originally developed by Warren DeLano.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.