4Here, PathMap is used to find paths to all other points
5on a grid around an attachment site. Grid points (voxels)
6that are occupied by the structure are obstacles in the
35sel.set_residue_index(132)
37sel_particles = sel.get_selected_particles()
39path_origin = labeled_p.get_coordinates()
55path_map_header_parameter = {
56 "max_path_length": 20.0,
59 "obstacle_threshold": 1e-5
62path_map_header.set_path_origin(path_origin)
74path_map.set_particles(ps)
75path_map.sample_obstacles(extra_radius=0.0)
76path_map.update_tiles()
91start_idx = path_map.get_voxel_by_location(path_origin)
92path_map.find_path_dijkstra(start_idx, -1)
96t = path_map.get_tiles()
98path_1 = t[end_idx_1].backtrack_to_path()
102path_2 = t[end_idx_2].backtrack_to_path()
108paths = [t[e].backtrack_to_path()
for e
in range(path_map.get_number_of_voxels())]
109path_length = [len(p)
for p
in paths]
110plt.hist(path_length, 27)
111plt.savefig(
'plot1.png')
114no_paths = [i
for i, p
in enumerate(paths)
if len(p) <= 1]
126BFF_TILE_PENALTY = path_map.get_tile_values(IMP.bff.PM_TILE_PENALTY, (0, 1))
127PM_TILE_COST = path_map.get_tile_values(IMP.bff.PM_TILE_COST, bounds)
128PM_TILE_COST_DENSITY = path_map.get_tile_values(IMP.bff.PM_TILE_COST_DENSITY, bounds)
132plt.imshow(PM_TILE_COST_DENSITY[16])
133plt.savefig(
'plot2.png')
138fig, axs = plt.subplots(1, 3, sharex=
True)
139axs[0].imshow(BFF_TILE_PENALTY[16])
140axs[1].imshow(PM_TILE_COST[16])
141axs[2].imshow(PM_TILE_COST_DENSITY[16])
142plt.savefig(
'plot3.png')
Class for storing model, its restraints, constraints, and particles.
Select hierarchy particles identified by the biological name.
Class to search path on grids.
A decorator for a particle with x,y,z coordinates.
Functionality for loading, creating, manipulating and scoring atomic structures.
Hierarchy read_pdb(TextInput input, Model *model, PDBSelector *selector=get_default_pdb_selector(), bool select_first_model=true)
Read all the molecules in the first model of the PDB file.
Hierarchies get_leaves(const Selection &h)
Bayesian Fluorescence Framework.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
Basic functionality that is expected to be used by a wide variety of IMP users.
Basic utilities for handling cryo-electron microscopy 3D density maps.