Package lib :: Package structure :: Package represent :: Module cone
[hide private]
[frames] | no frames]

Module cone

source code

Functions [hide private]
 
cone_edge(mol=None, cone_obj=None, res_name='CON', res_num=None, chain_id='', apex=None, axis=None, R=None, scale=None, inc=None, distribution='uniform')
Add a residue to the atomic data representing a cone of the given angle.
source code
 
cone(mol=None, cone_obj=None, start_res=1, apex=None, axis=None, R=None, inc=None, scale=30.0, distribution='regular', axis_flag=True)
Create a structural representation of the given cone object.
source code
Variables [hide private]
  __package__ = 'lib.structure.represent'

Imports: cos, sin, array, dot, eye, float64, zeros, two_vect_to_R, angles_regular, angles_uniform, get_proton_name, generate_vector_dist


Function Details [hide private]

cone_edge(mol=None, cone_obj=None, res_name='CON', res_num=None, chain_id='', apex=None, axis=None, R=None, scale=None, inc=None, distribution='uniform')

source code 

Add a residue to the atomic data representing a cone of the given angle.

A series of vectors totalling the number of increments and starting at the origin are equally spaced around the cone axis. The atoms representing neighbouring vectors will be directly bonded together. This will generate an object representing the outer edge of a cone.

Parameters:
  • mol (MolContainer instance) - The molecule container.
  • cone_obj (class instance) - The cone object. This should provide the limit_check() method with determines the limits of the distribution accepting two arguments, the polar angle phi and the azimuthal angle theta, and return True if the point is in the limits or False if outside. It should also provide the phi_max() method for returning the phi value for the given theta.
  • res_name (str) - The residue name.
  • res_num (int) - The residue number.
  • chain_id (str) - The chain identifier.
  • apex (numpy array, len 3) - The apex of the cone.
  • axis (numpy array, len 3) - The central axis of the cone. If supplied, then this arg will be used to construct the rotation matrix.
  • R (3x3 numpy array) - A 3x3 rotation matrix. If the axis arg supplied, then this matrix will be ignored.
  • scale (float) - The scaling factor to stretch all points by.
  • inc (int) - The number of increments or number of vectors used to generate the outer edge of the cone.
  • distribution (str) - The type of point distribution to use. This can be 'uniform' or 'regular'.

cone(mol=None, cone_obj=None, start_res=1, apex=None, axis=None, R=None, inc=None, scale=30.0, distribution='regular', axis_flag=True)

source code 

Create a structural representation of the given cone object.

Parameters:
  • mol (MolContainer instance) - The molecule container.
  • cone_obj (class instance) - The cone object. This should provide the limit_check() method with determines the limits of the distribution accepting two arguments, the polar angle phi and the azimuthal angle theta, and return True if the point is in the limits or False if outside. It should also provide the theta_max() method for returning the theta value for the given phi, the phi_max() method for returning the phi value for the given theta.
  • start_res (str) - The starting residue number.
  • apex (rank-1, 3D numpy array) - The apex of the cone.
  • axis (rank-1, 3D numpy array) - The central axis of the cone. If not supplied, the z-axis will be used.
  • R (rank-2, 3D numpy array) - The rotation matrix.
  • inc (int) - The increment number used to determine the number of latitude and longitude lines.
  • scale (float) - The scaling factor to stretch the unit cone by.
  • distribution (str) - The type of point distribution to use. This can be 'uniform' or 'regular'.
  • axis_flag (bool) - A flag which if True will create the cone's axis.