Spatial transformations (dockerasmus.spatial)

dockerasmus.spatial.TranslationMatrix(dx=0, dy=0, dz=0)[source]

Return a translation matrix.

dockerasmus.spatial.RotationMatrix(theta_x=0, theta_y=0, theta_z=0)[source]

Return a rotation matrix.

dockerasmus.spatial.transform_cartesian(protein, x=0, y=0, z=0, sigma=0, rho=0)[source]

Rotate and translate the protein.

Parameters:

protein (dockerasmus.pdb.Protein) – a protein to move and rotate in the worldspace.

Keyword Arguments:
 
  • x (int) – the x cartesian coordinate to move the protein to
  • y (int) – the y cartesian coordinate to move the protein to
  • z (int) – the z cartesian coordinate to move the protein to
  • sigma (int) – the angle to rotate the protein along the x axis, in radians
  • rho (int) – the angle to rotate the protein along the y axis, in radians
dockerasmus.spatial.transform_spherical(protein, r=0, phi=0, theta=0, sigma=0, rho=0)[source]

Rotate and translate the protein.

Parameters:

protein (dockerasmus.pdb.Protein) – a protein to move and rotate in the worldspace.

Keyword Arguments:
 
  • r (int) – the radial distance to move the protein to.
  • phi (int) – the inclination to move the protein to.
  • theta (int) – the azimuth to move the protein to.
  • sigma (int) – the angle to rotate the protein along the x axis, in radians.
  • rho (int) – the angle to rotate the protein along the y axis, in radians.
dockerasmus.spatial.apply_transformation_matrix(protein, matrix)[source]

Apply a 4x4 transformation matrix to a protein model.