Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions | Variables
PyMOL-RosettaServer Namespace Reference

Classes

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

Functions

def add_vectors
 
def scalar_multiply
 
def normalize
 
def rotation_matrix_radians
 
def multiply_matrix
 
def rotate_vector
 
def compute_plane_positions
 
def draw_membrane_planes
 
def make_axis
 Graphing methods. More...
 
def scale_axes
 
def get_ends
 
def extract_coords
 
def make_data
 
def add_point
 
def rescale_cartesian
 
def connect_points
 
def plot3d
 
def set_spectrum
 PyMOL spectrum coloring. More...
 
def main
 Main PyMOLPyRosettaServer.py routines. More...
 
def start_rosetta_server
 

Variables

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

Function Documentation

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().

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

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().

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(), basic::options::OptionKeys::relax::range.range, and rotate_vector().

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

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

References plot3d(), and basic::options::OptionKeys::relax::range.range.

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

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().

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().

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().

def PyMOL-RosettaServer.main (   ip,
  port 
)

Main PyMOLPyRosettaServer.py routines.

References fmt.print().

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

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 basic::options::OptionKeys::relax::range.range, and scale_axes().

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

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

References add_point(), ObjexxFCL.len(), and basic::options::OptionKeys::relax::range.range.

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

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

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

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().

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__(), connect_points(), and PyMOL-RosettaServer.PR_PyMOLServer.process_packet().

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(), and make_axis().

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

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().

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().

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

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

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().

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

PyMOL spectrum coloring.

Sets the energy coloring spectrum using the above COLOR_LIB dictionary.

References fmt.print(), basic::options::OptionKeys::relax::range.range, and numeric::crick_equations.x().

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

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

Variable Documentation

PyMOL-RosettaServer._terminate_ = False
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.

dictionary PyMOL-RosettaServer.X11_COLORS