A class representing all information from a density map file. NOTE: Currently it can only read the CCP4/MRC format.
Return a new Map instance with changed origin.
Arguments:
NOTE: UNDER CONSTRUCTION
Return a Map instance of the density map filtered to specific resolution.
Arguments:
- resolution
- highest frequency value to allow into filtered map
Return an array of float values representing a line of density values between two points on the map.
Arguments:
- p1, p2
- Vector instances of the end points co-ordinates of the line.
Return maximum density value.
Given minimum threshold value, will calculate upper bound density value which gives specified number of points with density values between the two. Uses recursive algorithm.
Arguments:
- min_thr
- minimum threshold, normally given by get_min_threshold method.
- noOfPoints
- Number of points to use in the normal vector score - try first with 10% (maybe 5%better) of the number of points in the map ( round((self.map_size())*0.1)
- low, high
minimum and maximum values between which the threshold will be taken. Initial values should be given by min_thr parameter and maximum density values in map.
- err_percent
- default value of 1. Allowed to find a max threshold that include a 1% error.
Return minimum density value. Volume of pixels with greater density than output is equivalent to volume given by molecular weight of protein. Uses recursive algorithm.
Arguments:
- molWeight
- molecular weight of protein; use get_prot_mass_from_atoms() if your structure contains HETATOMS else use get_prot_mass_from_res().
- low, high
minimum and maximum values between which the threshold will be taken. Initial values should be given by minimum and maximum density values in map.
- vol_factor
- in cubic Angstroms per Dalton. This is the approximate value for globular proteins used in Chimera (Petterson et al, 2004) from Harpaz 1994. Other recommended volume factor are 1.5 (1.1-1.9) cubic Angstroms per Dalton
Return normal vector at point specified.
Point calculated using 3SOM algorithm used by Ceulemans H. & Russell R.B. (2004).
Arguments:
Returns array of 3-ples of points in the map with values between those chosen.
Arguments:
- minDens
- minimum density value to include in array.
- maxDens
- maximum density value to include in array.
Return an array of tuples of the map co-ordinates and density values of all points with a density greater than the mean + standard deviation.
Return an array of all non-zero density points in the form of Vector instances.
Returns k-dimensional tree of points in the map with values between those chosen.
Arguments:
- minDens
- minimum density value to include in k-dimensional tree.
- maxDens
- maximum density value to include in k-dimensional tree.
Return a new Map instance that has been binarised. All densities above the cutoff take a value of ‘1’, else ‘0’.
Arguments:
- cutoff
- cutoff density value
NOTE: NEEED TO BE CHECKED.
Return an empty Map instance with set Angstrom per pixel sampling (default is 1)
Randomise the position of the map instance and return the modified map.
Arguments:
ARUN need to add it
Return a new Map instance rotated around its centre.
Arguments:
- angle
- angle (in radians if rad == True, else in degrees) to rotate map.
- x,y,z
- axis to rotate about, ie. x,y,z = 0,0,1 rotates the Map round the xy-plane.
- CoM
- centre of mass around which map will be rotated.
Apply affine transform to the map.
Arguments:
- mat
- affine transform 3x3 matrix.
- x, y, z
- translation in angstroms.
Return a new Map instance with normalised density values using x_new = x - mean / standard_deviation
Return a new Map instance with origin changed accordingly to Reference Map (MapRef)
Returns a Map instance sized and centered based on the atomic structure.
Arguments:
- struct
- the Structure instance.
- apix
- Angstroms per pixel for the output Map.
- resolution
- the resolution, in Angstroms, to blur the protein to.
- box_size_x
- x dimension of map box in Angstroms.
- box_size_y
- y dimension of map box in Angstroms.
- box_size_z
- z dimension of map box in Angstroms.
- filename
- output name of the map file.
Randomise the position of this Structure instance.
Return Structure instance representing normal vectors of density points specified.
Arguments:
- min_threshold, max_threshold
- minimum/maximum values to include in normal vector representation.
Return a Map instance instance resampled based on new_box_size.
Return a Map instance resized.
Arguments:
- new_size
3-ple (x,y,z) giving the box size.
- centre
- default False
Return a new Map instance rotated around its centre.
Arguments:
- angle
- angle (in radians if rad == True, else in degrees) to rotate map.
- x,y,z
- axis to rotate about, ie. x,y,z = 0,0,1 rotates the Map round the xy-plane.
- CoM
- centre of mass around which map will be rotated.
Return a new Map instance rotated around pivot given by CoM.
Arguments:
- x,y,z
- Euler angles (in radians if rad == True, else in degrees) used to rotate map.
- CoM
- centre of mass around which map will be rotated.
- x, y, z
- translation in angstroms.
Return a new Map instance rotated around pivot given by CoM.
Return a new Map instance with changed origin.
Arguments:
Return a new Map instance containing only density values between the specified min and max.
Arguments:
- minDens
- minimum density threshold
maxDens maximum density threshold
Return a new Map instance shifted by changing origin.