carmm.analyse.meshgrid package¶
Submodules¶
carmm.analyse.meshgrid.meshgrid_functions module¶
- carmm.analyse.meshgrid.meshgrid_functions.atom_mesh_build_mask(meshobject, atoms)¶
Defines meshgrid of based on a radius set by atomic_radius. Uses np.nan as a junk value. :type meshobject: :param meshobject: Mesh Object
Object storing meshgrid and PBC conditions
- Parameters:
atoms – Atoms object Contains information (atomic symbols and positions)
- Returns:
- 3D numpy array
Value of x coordinate on {nx,ny,nz} grid.
- mol_yy: 3D numpy array
Value of y coordinate on {nx,ny,nz} grid.
- mol_yy: 3D numpy array
Value of z coordinate on {nx,ny,nz} grid.
- Return type:
mol_xx
- carmm.analyse.meshgrid.meshgrid_functions.distance_meshgrid2point(a_xx, a_yy, a_zz, meshobject)¶
Function finds the distance between a point (defined in cartesian co-ordinates a_xx, a_yy, a_zz) relative to all points on a Numpy meshgrid (defined in the unit_cell_object). :type a_xx: :param a_xx: float
x coordinate of input point.
- Parameters:
a_yy – float y coordinate of input point.
a_zz – float z coordinate of input point.
meshobject – Mesh object Object storing meshgrid and PBC conditions
- Returns:
Numpy meshgrid of distances from point [a_xx, a_yy, a_zz].
- Return type:
mesh_distances
- carmm.analyse.meshgrid.meshgrid_functions.distance_point2point(x_1, y_1, z_1, x_2, y_2, z_2, meshobject)¶
Function finds the distance between two points (defined in cartesian co-ordinates). :type x_1: :param x_1: float
x coordinate of point 1.
- Parameters:
y_1 – float y coordinate of point 1.
z_1 – float z coordinate of point 1.
x_2 – float x coordinate of point 2.
y_2 – float y coordinate of point 2.
z_2 – float2 z coordinate of point 2.
meshobject – Mesh object Object storing meshgrid and PBC conditions
- Returns:
Distance between points 1 and 2.
- Return type:
o_distance
- carmm.analyse.meshgrid.meshgrid_functions.midpoint_points(x_1, y_1, z_1, x_2, y_2, z_2, meshobject)¶
Function finds the distance between two points (defined in cartesian co-ordinates). :type x_1: :param x_1: float
x coordinate of point 1.
- Parameters:
y_1 – float y coordinate of point 1.
z_1 – float z coordinate of point 1.
x_2 – float x coordinate of point 2.
y_2 – float y coordinate of point 2.
z_2 – float2 z coordinate of point 2.
meshobject – Mesh object Object storing meshgrid and PBC conditions
- Returns:
- numpy array (,3)
x, y and z coordinates of the midpoint between points 1 and 2.
- Return type:
midpoint
- carmm.analyse.meshgrid.meshgrid_functions.mol_mesh_pbc_check(mesh_pbc, atoms_pbc)¶
Checks whether the mesh and mol pbc values match, and prints a warning if not. :type mesh_pbc: :param mesh_pbc: Object storing meshgrid and PBC conditions :type atoms_pbc: :param atoms_pbc: Contains information (atomic symbols and positions)
carmm.analyse.meshgrid.meshgrid_mesh module¶
- class carmm.analyse.meshgrid.meshgrid_mesh.Mesh(cell_dims, nx=50, ny=50, nz=50, pbc=[True, True, True], pbc_strict_mode=True)¶
Bases:
object
Object which stores and defines the unit cell parameters (number of points and dimensions) and the mesh grid of the underlying unit cell. Primarily used to reduce the number of variables which need to be passed to associated meshgrid functions.
- read_cube_file(cube_name)¶
carmm.analyse.meshgrid.meshgrid_void module¶
- carmm.analyse.meshgrid.meshgrid_void.void_analysis(meshobject, void_centres, void_radii, void_xx)¶
Prints basic volumentric information of the void. :type meshobject: :param meshobject: Mesh object.
Meshgrid and unit cell information.
- Parameters:
void_centres – numpy array Coordinates of the void centres.
void_radii – numpy array Radius of the void sphere.
void_xx – meshgrid numpy array x coordinates of void mesh grid.
- Returns:
- float
The total volume of the volume accessible to the probe (Ang**3).
- Return type:
void_volume
- carmm.analyse.meshgrid.meshgrid_void.void_build_mask(meshobject, void_centres, void_radii, min_void=1.0)¶
Defines meshgrid of voids given by list of void centres and their radii. Uses np.nan as a junk value. :type meshobject: :param meshobject: Mesh object.
Meshgrid and unit cell information.
- Parameters:
void_centres – numpy array Coordinates of the void centres.
void_radii – numpy array Radius of the void sphere.
min_void – float Defines the minimum size of void to plot.
- Returns:
- numpy array
Contains values of (x, y, z) coordinates for each point on axis occupied by atom van der Waals volume. Set to junk value otherwise.
- Return type:
void_xx, void_yy, void_zz
- carmm.analyse.meshgrid.meshgrid_void.void_find(meshobject, atoms, coarseness=1)¶
Defines the maximum spherical radius of probes in unoccupied space. Scans through the distance between the probe point and all atoms in the system, and defines the maximum radius of the probe as the smallest value of (probe_position - atom_position - vdw_radii). Coarseness factor reduces number of probe points by skipping over points in the grid. :type meshobject: :param meshobject: Mesh object
Contains meshgrid and associated unit cell information.
- Parameters:
atoms – Atoms object Supplies coordinates and atomic information.
coarseness – integer Skips over an integer number of points
- Returns:
- numpy array
Atomic coordiantes of the void centres.
- void_radii: numpy array
Radius of the void centres
- Return type:
void_centres