Rosetta
Classes | Functions | Variables
PyMOL-RosettaServer Namespace Reference

Classes

class  StartUpError
 Exceptions. More...
 
class  PR_UDPServer
 
class  PR_PyMOLServer
 
class  XYZCoord
 
class  PlanePoints
 
class  Matrix
 

Functions

def add_vectors (v1, v2)
 
def scalar_multiply (v, n)
 
def normalize (normal)
 
def rotation_matrix_radians (axis, theta)
 
def multiply_matrix (matrix, vector)
 
def rotate_vector (vector, theta, axis)
 
def compute_plane_positions (center, normal, thickness, rg, npoints=4)
 
def draw_membrane_planes (plane_points, normal_vector)
 
def make_axis (name, ends, dr, scale=False, axis_color='', num=0)
 Graphing methods. More...
 
def scale_axes (name='x_axis or y_axis or z_axis')
 
def get_ends (data)
 
def extract_coords (name)
 
def make_data (name, x_array, y_array, z_array, data_color='red')
 
def add_point (name, point, connect='', rescale=False, scale=False, axis_color='', num=0, banner='')
 
def rescale_cartesian (data, scale, axis_color, num)
 
def connect_points (name, color='red')
 
def plot3d (name, x_array, y_array, z_array=[], connect='red', scale=True, axis_color='blue', num=0)
 
def set_spectrum (low='blue', high='red')
 PyMOL spectrum coloring. More...
 
def main (ip, port)
 Main PyMOLPyRosettaServer.py routines. More...
 
def start_rosetta_server (ip='', port=65000)
 

Variables

bool _terminate_ = False
 
dictionary COLOR_LIB
 Constants. More...
 
dictionary X11_COLORS
 

Function Documentation

◆ add_point()

def PyMOL-RosettaServer.add_point (   name,
  point,
  connect = '',
  rescale = False,
  scale = False,
  axis_color = '',
  num = 0,
  banner = '' 
)
Adds a point to existing data, reconnecting points optionally.
Adds 'point' to 'name' and connects it with color 'connect' (empty for no
connection).
'rescale' will rescale the axes; 'scale' will label the scales;
'axis_color' determines the axis color; 'num' the intermediate scales,
'banner' is a resn name at 'point'.

References rescale_cartesian(), and str().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and PyMOL-RosettaServer.PR_PyMOLServer.process_packet().

◆ add_vectors()

def PyMOL-RosettaServer.add_vectors (   v1,
  v2 
)
Add a pair of vectors represented as XYZcoord classes (see above)

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and compute_plane_positions().

◆ compute_plane_positions()

def PyMOL-RosettaServer.compute_plane_positions (   center,
  normal,
  thickness,
  rg,
  npoints = 4 
)
Compute the position of the membrane planes based on provided
normal, center, thickness, and radius of gyration

References add_vectors(), ObjexxFCL.len(), range, and rotate_vector().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and PyMOL-RosettaServer.PR_PyMOLServer.process_packet().

◆ connect_points()

def PyMOL-RosettaServer.connect_points (   name,
  color = 'red' 
)
Draws colored lines between consecutive points.

References range, and str().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and plot3d().

◆ draw_membrane_planes()

def PyMOL-RosettaServer.draw_membrane_planes (   plane_points,
  normal_vector 
)
Draw CGO Planes Representing the upper & lower membrane planes
Adapted from Evan Baugh's Draw Object code by Rebecca Alford to work
with the framework

References normalize().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and PyMOL-RosettaServer.PR_PyMOLServer.process_packet().

◆ extract_coords()

def PyMOL-RosettaServer.extract_coords (   name)
Returns the coords of a data container as three arrays.

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and rescale_cartesian().

◆ get_ends()

def PyMOL-RosettaServer.get_ends (   data)
Determines the ends for axes from list.
Defaults to min, max, but if not pos/neg.
Determines based on closest point.

References ObjexxFCL.abs(), max(), and min().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and rescale_cartesian().

◆ main()

def PyMOL-RosettaServer.main (   ip,
  port 
)

Main PyMOLPyRosettaServer.py routines.

References print().

Referenced by PyMOL-RosettaServer.Matrix.__init__().

◆ make_axis()

def PyMOL-RosettaServer.make_axis (   name,
  ends,
  dr,
  scale = False,
  axis_color = '',
  num = 0 
)

Graphing methods.

Make an axis 'name' from 'ends[0]' to 'ends[1]' on the 'dr' (direction).
'scale' bool tells to label axis or not; 'axis_color' determines the axis
color; 'num' allows intermediate scale points.

References run_backbone.float, range, scale_axes(), and str().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and rescale_cartesian().

◆ make_data()

def PyMOL-RosettaServer.make_data (   name,
  x_array,
  y_array,
  z_array,
  data_color = 'red' 
)
Generate a data object from three arrays.

References ObjexxFCL.len(), range, and str().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and plot3d().

◆ multiply_matrix()

def PyMOL-RosettaServer.multiply_matrix (   matrix,
  vector 
)
multiply matrix by 3D vector

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and rotate_vector().

◆ normalize()

def PyMOL-RosettaServer.normalize (   normal)
Ensure that the provided normal is a unit normal_vector

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and draw_membrane_planes().

◆ plot3d()

def PyMOL-RosettaServer.plot3d (   name,
  x_array,
  y_array,
  z_array = [],
  connect = 'red',
  scale = True,
  axis_color = 'blue',
  num = 0 
)
Default plotting tool with optional z points, connection, and axis color.

References connect_points(), ObjexxFCL.len(), make_data(), and rescale_cartesian().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and PyMOL-RosettaServer.PR_PyMOLServer.process_packet().

◆ rescale_cartesian()

def PyMOL-RosettaServer.rescale_cartesian (   data,
  scale,
  axis_color,
  num 
)
Rescales the 'data' axes (x, y, z) based on 'data' data:
    'num', 'axis_color', 'scale'

References extract_coords(), get_ends(), make_axis(), and str().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), add_point(), and plot3d().

◆ rotate_vector()

def PyMOL-RosettaServer.rotate_vector (   vector,
  theta,
  axis 
)
Rotate some vector about a specified axis by some angle theta

References multiply_matrix(), and rotation_matrix_radians().

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and compute_plane_positions().

◆ rotation_matrix_radians()

def PyMOL-RosettaServer.rotation_matrix_radians (   axis,
  theta 
)
Compute and return the rotation matrix associated with rotation about
the given axis by theta radians

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and rotate_vector().

◆ scalar_multiply()

def PyMOL-RosettaServer.scalar_multiply (   v,
  n 
)
Multiply a vector by some scalar factor

Referenced by PyMOL-RosettaServer.Matrix.__init__().

◆ scale_axes()

def PyMOL-RosettaServer.scale_axes (   name = 'x_axis or y_axis or z_axis')
Labels the selection name.
Used here for convenience: axis point value str in resn.

Referenced by PyMOL-RosettaServer.Matrix.__init__(), and make_axis().

◆ set_spectrum()

def PyMOL-RosettaServer.set_spectrum (   low = 'blue',
  high = 'red' 
)

PyMOL spectrum coloring.

Sets the energy coloring spectrum using the above COLOR_LIB dictionary.

References print(), range, and x.

Referenced by PyMOL-RosettaServer.Matrix.__init__().

◆ start_rosetta_server()

def PyMOL-RosettaServer.start_rosetta_server (   ip = '',
  port = 65000 
)

References print(), and range.

Referenced by PyMOL-RosettaServer.Matrix.__init__().

Variable Documentation

◆ _terminate_

bool PyMOL-RosettaServer._terminate_ = False
private

◆ COLOR_LIB

dictionary PyMOL-RosettaServer.COLOR_LIB
Initial value:
1 = {
2 'white':[1,1,1],
3 'yellow':[1,1,0],
4 'magenta':[1,0,1],
5 'cyan':[0,1,1],
6 'red':[1,0,0],
7 'blue':[0,0,1],
8 'green':[0,1,0],
9 'black':[0,0,0]}

Constants.

◆ X11_COLORS

dictionary PyMOL-RosettaServer.X11_COLORS