AlloViz.Protein#

class AlloViz.Protein(pdb='', trajs=[], GPCR=False, name=None, path=None, protein_sel=None, **kwargs)[source]#

Bases: object

AlloViz main class.

Objects of the class process the input structure and trajectory files and allow to calculate() the different networks, which are stored in classes of the AlloViz.Wrappers module and can be filtered, analyzed and visualized with subsequent methods.

Parameters:
pdbstr

Filename of the PDB structure to read, process and use.

trajsstr or list

Filename(s) of the MD trajectory (or trajectories) to read and use. File format must be recognized by MDAnalysis (e.g., xtc).

GPCRbool or int, default: False

Use True if the structure is a GPCR, or pass the ID of a GPCRmd database dynamics entry, without specifying the pdb nor the trajs parameters, to automatically retrieve the files from the database and process them. They will be downloaded to path, which if left undefined will default to the GPCRmd ID.

namestr, default: “protein”

Name string to be used, e.g., for the title of the colorbar shown when representing a network with nglviewer.

pathstr, optional

Path to store results in. It can exist already or not, and a new folder inside it called data will be created to store computation results and other files. If unspecified, it defaults to “.” or the GPCRmd ID in case it is used.

protein_selstr, default: AlloViz.Protein._protein_sel

MDAnalysis atom selection string to select the protein structure from the Universe (e.g., in case simulations in biological conditions are used, to avoid selecting extra chains, water molecules, ions…). It defaults to “(same segid as protein) and (not segid LIG) and (not chainid L)” and it can be extended using, e.g., AlloViz.Protein._protein_sel + ” and {customselection}”.

Other Parameters:
psfstr, optional

Optional kwarg of the filename of the .psf file corresponding to the pdb used. It is required alongside the parameters file to use the gRINN network construction method.

parametersstr, optional

Optional kwarg of the filename of the MD simulation force-field parameters file in NAMD format. It is required alongside the psf file to use the gRINN network construction method.

special_resdict, optional

Optional kwarg of a dictionary containing a mapping of special residue 3/4-letter code(s) present in the structure to the corresponding standard 1-letter code(s).

Raises:
FileNotFoundError

If any of the files passed in the pdb and traj (and psf and parameters if provided) parameters cannot be accessed.

See also

AlloViz.Delta

Class for calculation of the delta-network(s) between two Protein objects.

Examples

>>> opioidGPCR = AlloViz.Protein(GPCR=169)
>>> print(opioidGPCR.u)
<Universe with 88651 atoms>
Attributes:
pdb
trajs
GPCR
proteinUniverse

Universe of the processed pdb with only the selected protein_sel atoms.

uUniverse

Universe of the processed pdb and trajectory files with only the protein_sel atoms.

Methods

analyze([pkgs, filterings, elements, ...])

Analyzed filtered network

calculate([pkgs, cores])

Calculate rwa edge weights of allosteric networks.

filter([pkgs, filterings, ...])

Filter network edges

view(pkg, metric[, filtering, element, num, ...])

Visualize the analyzed networks on the protein structure.