packman.utilities.utilities module

This class contains all the utilities that are neccessary for carriying out structural superimposition, sequence matching etc.

packman.utilities.utilities.RMSD(group1, group2, use='calpha', ids=[])
packman.utilities.utilities.WriteOBJ(atoms, faces, fh)

Write the .obj file to visualize the obtain alpha shape tesselations.

Parameters:
  • atoms (packman.molecule.Atom) – Atoms (Just for the node records)
  • faces ([float]) – SelectedTesselations (See the packman.apps.predict_hinge)
  • fh (file) – Output file with .obj extension
packman.utilities.utilities.change_alphabet(AA)

Converts three letter amino acid code to one letter and vise-versa

Parameters:AA (string) – Three or one letter amino acid code.
Returns:Three or one letter amino acid code depending and opposite of the argument provided.
Return type:AA (string)
packman.utilities.utilities.load_hinge(filename)

Load the hinge information neccessary for the hd-ANM and other methods.

About .hng File: - hdANM requires the information about hinges and domains in the .hng format. - Each column in the .hng file is TAB delimited. - Each row in the .hng file follows collowing pattern:

Filename_ChainID Domain/HingeId ResidueStartPosition:ResidueEndPosition

Example of .hng file for PDBID 1EXR:

1EXR_A D1 1:70 1EXR_A H1 70:90 1EXR_A D2 90:148

Above format means that there are two domains (D1 and D2) separated by a hinge (H1). D1 stretches from residue 1 to 70; D2 stretches from 90 to 148 and hinge H1 is in the middle.

Parameters:filename (string) – filepath and name of the .hng file
Returns:residue based hinge and domain information.
Return type:HNGinfo (dictionary)
packman.utilities.utilities.superimporse(reference, target, use='calpha', ids=[], change_target=True)

This function is used to superimpose the Target Chain(coordinates will be changed) on the Reference Chain(coordinates will change).

The superimposition currently is done on the basis of matching Residue ID. If both the proteins have unequal amount of residues, still their matching residues will be used for the superimposition.

It is important to note that sometimes proteins (although same type and chain) have different numbering scheme. In such case, the superimposition will not be carried out. Change the IDs of the taget/reference in such a way that it will match each other.

For more information about how to change ID of the residue, read : packman.molecule.Residue class

Parameters:
  • reference (packman.molecule.Chain) – Chain whose coordinates will remain same and will be used as a reference.
  • target (packman.molecule.Chain) – Chain whose coordinates will be changed according to the reference chain.
  • use (str) – Which atoms to be used for superimposition (Options: calpha, backbone)
  • ids (list) – Use only particular residues to align (Provide IDs) eg… ids=[1,2,5,77] will use only 1,2,5 and 77th residues to align two chains
  • change_target (bool) – Change the coordinates of the target chain based on the reference
Returns:

Rotation matrix for Target Chain w.r.t Reference Chain. t (numpy.array): Translation vector for Target Chain w.r.t Reference Chain.

Return type:

R (numpy.matrix)