drawVectors.py

drawVectors represents dipole and hydrophobicity vectors over a protein’s structure. Opens a ChimeraX GUI.

Usage:

$ chimera –script “drawVectors.py 1abc.pdb”

drawVectors.main(proteinfile)

Reads protein file to create structure. Visualizes protein structure, dipole vector and hydrophobic vector in Chimera X.

Parameters

proteinfile (str) – PDB File

drawVectors.generateStructure(proteinfile)

Creates protein structure from Builder from metrics module.

Parameters

proteinfile (Path) – File path to PDB file.

Returns

Protein structure

drawVectors.createcoordinates(proteinfile)

Creates coordinates for the center of mass, the dipole vector and th hydrophobic vector.

Parameters

proteinfile (Path) – File path to PDB file.

Returns

Coordinates of the center of mass, dipole vector and hydrophobic vector

Return type

tuple

drawVectors.generateVectorFile(proteinfile)

Creates vector files for dipole and hydrophobic vector.

Parameters

proteinfile (Path) – File path to PDB file.

Returns

Vectorfiles for dipole and hydrophobic vector.

Return type

str

drawVectors.drawProtein(session, proteinfile)

Displays protein structure in ChimeraX session.

Parameters
  • session – Global variable pointing to program instance, known to Chimera environment.

  • proteinfile – File path to PDB file.

drawVectors.drawVectors(session, *vectorfiles)

Consume as many files as fed.

Parameters
  • session – Global variable pointing to program instance, known to Chimera environment.

  • vectorfile – File to create vector in Chimera X.

drawVectors.angles(session, proteinfile)

Defines markers for the center of mass and the tip of the hydrophobic and dipole vector. Calculates the angle between the both vectors. Based on: https://rbvi.github.io/chimerax-recipes/mark_blobs/mark_blobs.html

Parameters
  • session – Global variable pointing to program instance, known to Chimera environment.

  • proteinfile (Path) – File path to PDB file.

drawVectors.drawArc(session, proteinfile)

Draws arc between both vectors.

Parameters
  • session – Global variable pointing to program instance, known to Chimera environment.

  • proteinfile (Path) – File path to PDB file.

drawVectors.labels(session, proteinfile)

Creates labels for hydrophobic vector, dipole vector and protein name.

Parameters
  • session – Global variable pointing to program instance, known to Chimera environment.

  • proteinfile (Path) – File path to PDB file.