|
Topological Material Analysis 0.5
Analyse the structures of materials using tools from TDA
|
Functions | |
| row_reduce_matrix (A, GF) | |
| solve_linear_system_with_boundary (B, v, A, A_red, V, GF) | |
| solve_linear_system (B, v) | |
| cut_path_from_bottom (path, h, grid, axis=-1) | |
| cut_path_from_top (path, h, grid, axis=-1) | |
| get_cmap (n, name='hsv') | |
| get_box_from_cell (cell_file) | |
| out_to_atoms (inputfile, backbone_atoms, flow_atoms) | |
| DEPRECATED? | |
| clean_Li (Li, m, M) | |
| make_geodesics (grid, r, M, m, axes, dim, D_=None, D_force_graph_=None, verbose=False) | |
| find_geod (idx0, idx1, geodesics, pts, D, maxiter=np.inf) | |
| dist_periodic_boundaries (grid_, M, m, axes, dim=3) | |
| dist_from_pts_periodic_boundaries (pts_, grid_, M, m, axes, dim=3) | |
| append_tr (ITRIS, B, edge_idxs, ia, ib, ic) | |
| check_tr (p0, p1, p2, res_grid, grid, cubic_to_res, ITRIS, B, edge_idxs) | |
| r_squared (px, py, pz, balls_centres, balls_radii) | |
| aux_fn (px, py, pz, xc, yc, zc, r, eps, p=4) | |
| grad_r2 (pt, balls_centres, balls_radii, p=2, eps=1) | |
| sample_path (idx, N, res_grid, z_1, maxiter=100000) | |
| smooth_path (path, geod, res_grid, D) | |
| close_paths (p_0, p_1, grid, geod, D) | |
| homological_simplification_of_path_pts (idx0, idx1, path, grid, geod, V, rank, GF, D, N, edge_idxs, r_graph) | |
| homological_simplification_of_path (path, grid, geod, V, rank, GF, D, N, edge_idxs, r_graph) | |
| close_paths_A_0_A_1 (p_0, p_1, D, A_0, A_1, res_to_A_0, res_to_A_1, A_0_to_res, A_1_to_res, geod_A_0, geod_A_1) | |
| join_points_boundary_conditions (p_, q_, M, m, axes, dim, n=20) | |
| close_paths_boundary_conditions (p_0, p_1, res_grid, geod, M, m, D, axes, dim) | |
| close_deadlocks (p_0, p_1, res_grid, geod, res_to_A_0, A_0_to_res, geod_A_0, A_0) | |
| simplify_path (path_) | |
| path_to_vec (path, D, N_1, edge_idxs, r_graph, verbose=False) | |
| equivalence (A, v_path, rank) | |
| project_path (path_coords, grid) | |
| project_path_periodic (path_coords, grid, M, m, axes, dim=3, D_=None) | |
| project_timeseries_array (A, grid, M, m, axes, dim=3) | |
| cluster_deadlocks (PATHS, res_grid, geod, res_to_A_0, geod_A_0, A_0) | |
| save_paths (LIST, name, folder_path) | |
| compute_all (LIST) | |
| compute_penalties (LIST) | |
| compute_direction (LIST) | |
| compute_repulsion (LIST) | |
| find_geod_wrap (LIST) | |
| rank_mod_p (LIST) | |
| diffusion_utils.append_tr | ( | ITRIS, | |
| B, | |||
| edge_idxs, | |||
| ia, | |||
| ib, | |||
| ic ) |
N.B. ia<ib<ic
| diffusion_utils.aux_fn | ( | px, | |
| py, | |||
| pz, | |||
| xc, | |||
| yc, | |||
| zc, | |||
| r, | |||
| eps, | |||
| p = 4 ) |
| diffusion_utils.check_tr | ( | p0, | |
| p1, | |||
| p2, | |||
| res_grid, | |||
| grid, | |||
| cubic_to_res, | |||
| ITRIS, | |||
| B, | |||
| edge_idxs ) |
| diffusion_utils.clean_Li | ( | Li, | |
| m, | |||
| M ) |
Remove Lithium Atoms Outside the Box
| diffusion_utils.close_deadlocks | ( | p_0, | |
| p_1, | |||
| res_grid, | |||
| geod, | |||
| res_to_A_0, | |||
| A_0_to_res, | |||
| geod_A_0, | |||
| A_0 ) |
| diffusion_utils.close_paths | ( | p_0, | |
| p_1, | |||
| grid, | |||
| geod, | |||
| D ) |
| diffusion_utils.close_paths_A_0_A_1 | ( | p_0, | |
| p_1, | |||
| D, | |||
| A_0, | |||
| A_1, | |||
| res_to_A_0, | |||
| res_to_A_1, | |||
| A_0_to_res, | |||
| A_1_to_res, | |||
| geod_A_0, | |||
| geod_A_1 ) |
| diffusion_utils.close_paths_boundary_conditions | ( | p_0, | |
| p_1, | |||
| res_grid, | |||
| geod, | |||
| M, | |||
| m, | |||
| D, | |||
| axes, | |||
| dim ) |
| diffusion_utils.cluster_deadlocks | ( | PATHS, | |
| res_grid, | |||
| geod, | |||
| res_to_A_0, | |||
| geod_A_0, | |||
| A_0 ) |
| diffusion_utils.compute_all | ( | LIST | ) |
| diffusion_utils.compute_direction | ( | LIST | ) |
| diffusion_utils.compute_penalties | ( | LIST | ) |
| diffusion_utils.compute_repulsion | ( | LIST | ) |
| diffusion_utils.cut_path_from_bottom | ( | path, | |
| h, | |||
| grid, | |||
| axis = -1 ) |
| diffusion_utils.cut_path_from_top | ( | path, | |
| h, | |||
| grid, | |||
| axis = -1 ) |
| diffusion_utils.dist_from_pts_periodic_boundaries | ( | pts_, | |
| grid_, | |||
| M, | |||
| m, | |||
| axes, | |||
| dim = 3 ) |
pts -> punti da proiettare grid -> array of pts (npts,dim) M -> array with upper bounds of the box (dim,) m -> array with lower bound of the box (dim,) axes -> array with the axes in which the boundary condition is applied dim -> dimension of the dataset
| diffusion_utils.dist_periodic_boundaries | ( | grid_, | |
| M, | |||
| m, | |||
| axes, | |||
| dim = 3 ) |
Makes a grid -> array of pts (npts,dim) M -> array with upper bounds of the box (dim,) m -> array with lower bound of the box (dim,) axes -> array with the axes in which the boundary condition is applied dim -> dimension of the dataset
| diffusion_utils.equivalence | ( | A, | |
| v_path, | |||
| rank ) |
Broken!
| diffusion_utils.find_geod | ( | idx0, | |
| idx1, | |||
| geodesics, | |||
| pts, | |||
| D, | |||
| maxiter = np.inf ) |
| diffusion_utils.find_geod_wrap | ( | LIST | ) |
| diffusion_utils.get_box_from_cell | ( | cell_file | ) |
| diffusion_utils.get_cmap | ( | n, | |
| name = 'hsv' ) |
Returns a function that maps each index in 0, 1, ..., n-1 to a distinct RGB color; the keyword argument name must be a standard mpl colormap name.
| diffusion_utils.grad_r2 | ( | pt, | |
| balls_centres, | |||
| balls_radii, | |||
| p = 2, | |||
| eps = 1 ) |
| diffusion_utils.homological_simplification_of_path | ( | path, | |
| grid, | |||
| geod, | |||
| V, | |||
| rank, | |||
| GF, | |||
| D, | |||
| N, | |||
| edge_idxs, | |||
| r_graph ) |
| diffusion_utils.homological_simplification_of_path_pts | ( | idx0, | |
| idx1, | |||
| path, | |||
| grid, | |||
| geod, | |||
| V, | |||
| rank, | |||
| GF, | |||
| D, | |||
| N, | |||
| edge_idxs, | |||
| r_graph ) |
idx0,idx1 (p0,p1) -> are indexes to sample from the path q0,q1 -> are the indexes sampled from the paths and refer to pts in the grid
| diffusion_utils.join_points_boundary_conditions | ( | p_, | |
| q_, | |||
| M, | |||
| m, | |||
| axes, | |||
| dim, | |||
| n = 20 ) |
| diffusion_utils.make_geodesics | ( | grid, | |
| r, | |||
| M, | |||
| m, | |||
| axes, | |||
| dim, | |||
| D_ = None, | |||
| D_force_graph_ = None, | |||
| verbose = False ) |
| diffusion_utils.out_to_atoms | ( | inputfile, | |
| backbone_atoms, | |||
| flow_atoms ) |
DEPRECATED?
def read_data(path, backbone_atoms, flow_atoms): """ Read an xyz file and extract the molecule's geometry.
Read the .xyz file and returns atoms coordinates by type, cardinalities and box boundaries
| diffusion_utils.path_to_vec | ( | path, | |
| D, | |||
| N_1, | |||
| edge_idxs, | |||
| r_graph, | |||
| verbose = False ) |
| diffusion_utils.project_path | ( | path_coords, | |
| grid ) |
| diffusion_utils.project_path_periodic | ( | path_coords, | |
| grid, | |||
| M, | |||
| m, | |||
| axes, | |||
| dim = 3, | |||
| D_ = None ) |
path_coords -> coordinates of the points of the path grid -> array of pts to project the path on (npts,dim) M -> array with upper bounds of the box (dim,) m -> array with lower bound of the box (dim,) axes -> array with the axes in which the boundary condition is applied dim -> dimension of the dataset D_ -> distance matrix if already computed
| diffusion_utils.project_timeseries_array | ( | A, | |
| grid, | |||
| M, | |||
| m, | |||
| axes, | |||
| dim = 3 ) |
| diffusion_utils.r_squared | ( | px, | |
| py, | |||
| pz, | |||
| balls_centres, | |||
| balls_radii ) |
| diffusion_utils.rank_mod_p | ( | LIST | ) |
| diffusion_utils.row_reduce_matrix | ( | A, | |
| GF ) |
| diffusion_utils.sample_path | ( | idx, | |
| N, | |||
| res_grid, | |||
| z_1, | |||
| maxiter = 100000 ) |
| diffusion_utils.save_paths | ( | LIST, | |
| name, | |||
| folder_path ) |
| diffusion_utils.simplify_path | ( | path_ | ) |
| diffusion_utils.smooth_path | ( | path, | |
| geod, | |||
| res_grid, | |||
| D ) |
| diffusion_utils.solve_linear_system | ( | B, | |
| v ) |
Finds a solution - if it exists - of B*x = v B is row-reduced form
| diffusion_utils.solve_linear_system_with_boundary | ( | B, | |
| v, | |||
| A, | |||
| A_red, | |||
| V, | |||
| GF ) |
Finds a solution - if it exists - of B*x = v + A*mu B is row-reduced form A generates the boundary subspace A_red is A[rank(B):,:] in row reduced form via the matrix V tmp tells if the solution is exact