libcootapi
 
Loading...
Searching...
No Matches
coot-map-utils.hh
1/* coot-utils/coot-map-utils.hh
2 *
3 * Copyright 2004, 2005, 2006, 2007 The University of York
4 * Copyright 2015 by Medical Research Council
5 * Author: Paul Emsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or (at
10 * your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 */
22
23#ifndef COOT_MAP_UTILS_HH
24#define COOT_MAP_UTILS_HH
25
26#include <map>
27
28#include <clipper/core/coords.h>
29#include <clipper/core/xmap.h>
30#include <clipper/core/hkl_data.h>
31#include <clipper/contrib/sfcalc_obs.h>
32#include "coot-coord-utils.hh"
33#include "coot-density-stats.hh"
34#include <mmdb2/mmdb_manager.h>
35#include "amp-reso.hh"
36
37namespace coot {
38
39 namespace util {
40
41 clipper::RTop_orth make_rtop_orth_from(mmdb::mat44 mat);
42
43 // cubic interpolation
44 float density_at_point(const clipper::Xmap<float> &map_in,
45 const clipper::Coord_orth &co);
46 float density_at_point_by_cubic_interp(const clipper::NXmap<float> &map_in,
47 const clipper::Coord_map &cm);
48 // linear interpolation (faster) use for jiggle-fit of chains and the like
49 float density_at_point_by_linear_interpolation(const clipper::Xmap<float> &map_in,
50 const clipper::Coord_orth &co);
51 // nearest grid point - faster yet
52 float density_at_point_by_nearest_grid(const clipper::Xmap<float> &map_in,
53 const clipper::Coord_orth &co);
54 // NXmap versions
55 float density_at_point_by_nearest_grid(const clipper::NXmap<float> &nxmap,
56 const clipper::Coord_orth &co);
57 float density_at_point_by_linear_interp(const clipper::NXmap<float> &nxmap,
58 const clipper::Coord_orth &co);
59
60 float density_at_map_point(const clipper::Xmap<float> &map_in,
61 const clipper::Coord_map &cg);
62
63 clipper::Grad_orth<double> gradient_at_point(const clipper::Xmap<float> &map_in,
64 const clipper::Coord_orth &co);
65
66 // return a variance of -1 on error.
67 std::pair<float, float> mean_and_variance(const clipper::Xmap<float> &xmap);
68
69 density_stats_info_t density_around_point(const clipper::Coord_orth &point,
70 const clipper::Xmap<float> &xmap,
71 float d);
72
73 // This is a console/testing function. Should not be used in a
74 // real graphics program. Use instead import_map_from() with a
75 // precalculated map.
76 //
77 // return 1 if map is filled, 0 if not (e.g. mtz file not found).
78 //
79 bool map_fill_from_mtz(clipper::Xmap<float> *xmap,
80 std::string mtz_file_name,
81 std::string f_col,
82 std::string phi_col,
83 std::string weight_col,
84 short int use_weights,
85 float sampling_rate=1.5);
86
87 bool map_fill_from_mtz(clipper::Xmap<float> *xmap,
88 std::string mtz_file_name,
89 std::string f_col,
90 std::string phi_col,
91 std::string weight_col,
92 short int use_weights,
93 float reso_limit_high,
94 short int use_reso_limit_high,
95 float sampling_rate=1.5);
96
97 // needed by above:
98 void filter_by_resolution(clipper::HKL_data< clipper::datatypes::F_phi<float> > *fphidata,
99 const float &reso_low,
100 const float &reso_high);
101
102
103 // return the max gridding of the map, e.g. 0.5 for a 1A map.
104 //
105 // return the maximum Angstrom/grid of the given map.
106 //
107 float max_gridding(const clipper::Xmap<float> &xmap);
108
109
110 // The sum of the density at the atom centres, optionally
111 // weighted by atomic number.
112 //
113 float map_score(mmdb::PPAtom atom_selection,
114 int n_selected_atoms,
115 const clipper::Xmap<float> &xmap,
116 short int with_atomic_weighting);
117
118 // The sum of the density at the atom centres, weighted by occupancy
119 //
120 float map_score(std::vector<mmdb::Atom *> atoms, const clipper::Xmap<float> &xmap);
121
122 float map_score_atom(mmdb::Atom *atom, const clipper::Xmap<float> &xmap);
123
124 float map_score_by_residue_specs(mmdb::Manager *mol,
125 const std::vector<residue_spec_t> &res_specs,
126 const clipper::Xmap<float> &xmap,
127 bool main_chain_only_flag = false);
128
129 clipper::Xmap<float> sharpen_blur_map(const clipper::Xmap<float> &xmap_in, float b_factor);
130
131 // sharpen/blur self
132 void sharpen_blur_map(clipper::Xmap<float> *xmap, float b_factor);
133
134 clipper::Xmap<float> sharpen_blur_map_with_resample(const clipper::Xmap<float> &xmap_in, float b_factor,
135 float resample_factor);
136
137 clipper::Xmap<float> sharpen_blur_map_with_reduced_sampling(const clipper::Xmap<float> &xmap_in, float b_factor,
138 float resample_factor);
139
140 // pass a pointer to a vector of maps that has the same size as the number of B-factors
141 //
142 void multi_sharpen_blur_map(const clipper::Xmap<float> &xmap_in,
143 const std::vector<float> &b_factors,
144 std::vector<clipper::Xmap<float> > *maps_p);
145
146 // not sure if this works ATM
147 clipper::Xmap<float> sharpen_map(const clipper::Xmap<float> &xmap_in,
148 float sharpen_factor);
149
151 class map_molecule_centre_info_t {
152 public:
156 clipper::Coord_orth updated_centre;
162 double sum_of_densities; // for scoring origins
163 map_molecule_centre_info_t() {
164 success = false;
165 sum_of_densities = -1;
167 suggested_radius = -1;
168 }
169 };
170
171 map_molecule_centre_info_t map_molecule_centre(const clipper::Xmap<float> &xmap);
172
173 map_molecule_centre_info_t map_molecule_recentre_from_position(const clipper::Xmap<float> &xmap,
174 const clipper::Coord_orth &current_centre);
175
176 // if n_bins is -1, let the function decide how many bins
177 //
178 // actually, we return bins of amplitude squares.
179 std::vector<amplitude_vs_resolution_point>
180 amplitude_vs_resolution(const clipper::Xmap<float> &xmap_in, int n_bins = -1);
181
182 // pass a flag for the resolution limit saying if this limit should be used.
183 // rule of thumb: low resolution limit 0.12
184 float b_factor(const std::vector<amplitude_vs_resolution_point> &fsqrd_data,
185 std::pair<bool, float> reso_low_invresolsq = std::pair<bool, float>(false, -1),
186 std::pair<bool, float> reso_higy_invresolsq = std::pair<bool, float>(false, -1));
187
188 clipper::Xmap<float> transform_map(const clipper::Xmap<float> &xmap_in,
189 const clipper::Spacegroup &new_space_group,
190 const clipper::Cell &new_cell,
191 const clipper::RTop_orth &rtop,
192 const clipper::Coord_orth &about_pt,
193 float box_size);
194
195 clipper::Grid_sampling suggested_grid_sampling(const clipper::Grid_sampling &orig_sampling,
196 const clipper::Cell &orig_cell,
197 const clipper::Spacegroup &new_space_group,
198 const clipper::Cell &new_cell);
199
200 clipper::Xmap<float> laplacian_transform(const clipper::Xmap<float> &xmap_in);
201
202 std::vector<float> density_map_points_in_sphere(clipper::Coord_orth pt, float radius,
203 const clipper::Xmap<float> &xmap_in);
204
205 // pass a negative atom_selection to build an atom map for the whole molecule
206 //
207 clipper::Xmap<float> calc_atom_map(mmdb::Manager *mol,
208 int atom_selection_handle,
209 const clipper::Cell &cell,
210 const clipper::Spacegroup &space_group,
211 const clipper::Grid_sampling &sampling);
212
213 clipper::Xmap<float> mask_map(const clipper::Xmap<float> &xmap_in,
214 const std::vector<mmdb::Residue *> &neighbs);
215
216 clipper::Xmap<float> make_map_mask(const clipper::Spacegroup &space_group,
217 const clipper::Cell &cell,
218 const clipper::Grid_sampling &grid_sampling,
219 mmdb::Manager *mol,
220 int atom_selection_handle,
221 float radius,
222 float smooth);
223
224 // return a number less than -1 on badness
225 // (perhaps this should return the atom map and the mask map)
226 //
227 // 0: all-atoms
228 // 1: main-chain atoms if is standard amino-acid, else all atoms
229 // 2: side-chain atoms if is standard amino-acid, else all atoms
230 // 3: side-chain atoms-exclusing CB if is standard amino-acid, else all atoms
231 //
232 float map_to_model_correlation(mmdb::Manager *mol,
233 const std::vector<residue_spec_t> &specs_for_correl,
234 const std::vector<residue_spec_t> &specs_for_masking_neighbs,
235 unsigned short int atom_mask_mode,
236 float atom_radius, // for masking
237 const clipper::Xmap<float> &xmap_from_sfs);
238
239 density_correlation_stats_info_t
240 map_to_model_correlation_stats(mmdb::Manager *mol,
241 const std::vector<residue_spec_t> &specs_for_correl,
242 const std::vector<residue_spec_t> &specs_for_masking_neighbs,
243 unsigned short int atom_mask_mode,
244 float atom_radius, // for masking
245 const clipper::Xmap<float> &xmap_from_sfs,
246 map_stats_t map_stats_flag);
247
248 // the second of the pair contains the correlation for the given residue spec.
249 //
250 std::vector<std::pair<residue_spec_t, float> >
251 map_to_model_correlation_per_residue(mmdb::Manager *mol,
252 const std::vector<residue_spec_t> &specs,
253 unsigned short int atom_mask_mode,
254 float atom_radius, // for masking
255 const clipper::Xmap<float> &xmap_from_sfs);
256
257 std::map<coot::residue_spec_t, density_stats_info_t>
258 map_to_model_correlation_stats_per_residue(mmdb::Manager *mol,
259 const std::vector<residue_spec_t> &specs,
260 unsigned short int atom_mask_mode,
261 float atom_radius, // for masking
262 const clipper::Xmap<float> &xmap);
263
264 // n_residues_per_run should be an odd number more than 2 (say 11)
265 //
266 std::pair<std::map<coot::residue_spec_t, density_correlation_stats_info_t>, std::map<coot::residue_spec_t, density_correlation_stats_info_t> >
267 map_to_model_correlation_stats_per_residue_run(mmdb::Manager *mol,
268 const std::string &chain_id,
269 const clipper::Xmap<float> &xmap,
270 unsigned int n_residues_per_run,
271 bool exclude_CON,
272 float atom_mask_radius=2.8,
273 float NOC_mask_radius=1.8); // optimized on strepavidin
274
275 // helper
276 std::pair<clipper::Coord_frac, clipper::Coord_frac>
277 find_struct_fragment_coord_fracs_v2(const std::pair<clipper::Coord_orth, clipper::Coord_orth> &selection_extents,
278 const clipper::Cell &cell);
279
280
281 // which uses these for map statistics aggregation
282 class map_stats_holder_helper_t {
283 public:
284 double sum_x;
285 double sum_x_squared;
286 double sum_y;
287 double sum_y_squared;
288 double sum_xy;
289 int n;
290 map_stats_holder_helper_t() {
291 sum_x = 0;
292 sum_x_squared = 0;
293 sum_y = 0;
294 sum_y_squared = 0;
295 sum_xy = 0;
296 n = 0;
297 }
298 void add_xy(const double &x, const double &y) {
299 sum_x += x;
300 sum_y += y;
301 sum_x_squared += x*x;
302 sum_y_squared += y*y;
303 sum_xy += x*y;
304 n++;
305 }
306 };
307
308
309 // should this be here, or is it heavy?
310 std::vector<std::pair<double, double> >
311 qq_plot_for_map_over_model(mmdb::Manager *mol,
312 const std::vector<coot::residue_spec_t> &specs,
313 const std::vector<coot::residue_spec_t> &nb_residues,
314 int atom_mask_mode,
315 const clipper::Xmap<float> &xmap);
316
317 // return a map and its standard deviation. scale is applied to
318 // map_in_2 before substraction.
319 std::pair<clipper::Xmap<float>, float>
320 difference_map(const clipper::Xmap<float> &xmap_in_1,
321 const clipper::Xmap<float> &xmap_in_2,
322 float map_scale);
323
324 // like above, but average
325 clipper::Xmap<float>
326 average_map(const std::vector<std::pair<clipper::Xmap<float>, float> > &maps_and_scales_vec);
327
328
329 // like above, but variance
330 clipper::Xmap<float> variance_map(const std::vector<std::pair<clipper::Xmap<float>, float> > &maps_and_scales_vec);
331
332 // Similar to average_map() but modify the map, don't return a new one
333 // Also this function presumes that the maps have the same gridding (which makes it faster)
334 //
335 void
336 regen_weighted_map(clipper::Xmap<float> *xmap_in,
337 const std::vector<std::pair<clipper::Xmap<float> *, float> > &maps_and_scales_vec);
338
339 // Spin the torsioned atom round the rotatable bond and find the
340 // orientation (in degrees) from the current position that is in
341 // the highest density.
342 //
343 // return a torsion
344 std::pair<float, float> spin_search(const clipper::Xmap<float> &xmap, mmdb::Residue *res, coot::torsion tors);
345
346 // Return a map that is a copy of the given map with interpolation,
347 // with grid spacing at most 0.5A (by generated by integer scaling
348 // factor of the input map)
349 //
350 clipper::Xmap<float> reinterp_map_fine_gridding(const clipper::Xmap<float> &xmap);
351
352 // return a map that is a copy of the given map with interpolation
353 // e.g. a sampling_multiplier of 2 will double the number of grid points (in each direction).
354 //
355 clipper::Xmap<float> reinterp_map(const clipper::Xmap<float> &xmap_in, float sampling_multiplier);
356
357
358 // make a copy of map_in, but in the cell, spacegroup and gridding of reference_map
359 clipper::Xmap<float> reinterp_map(const clipper::Xmap<float> &xmap_in,
360 const clipper::Xmap<float> &reference_xmap);
361
362 // negative becomes positive and positive becomes negative.
363 // Apply an offset so that most of the map is above zero.
364 //
365 void reverse_map(clipper::Xmap<float> *xmap_p);
366
367 class map_fragment_info_t {
368 // sans recentre at origin
369 void init(const clipper::Xmap<float> &xmap,
370 const clipper::Coord_orth &centre,
371 float radius);
372 //
373 void init_making_map_centred_at_origin(const clipper::Xmap<float> &xmap,
374 const clipper::Coord_orth &centre,
375 float radius);
376 float box_radius_a_internal;
377 float box_radius_b_internal;
378 float box_radius_c_internal;
379 public:
380 map_fragment_info_t(const clipper::Xmap<float> &xmap,
381 const clipper::Coord_orth &centre,
382 float radius, bool centre_at_origin = false);
383 clipper::Xmap<float> xmap;
384 clipper::Coord_grid offset;
385 // transfer xmap (small, at origin) into xmap_p (big)
386 void unshift(clipper::Xmap<float> *xmap_p, const clipper::Coord_orth &centre);
387 void simple_origin_shift(const clipper::Xmap<float> &ip_xmap,
388 const clipper::Coord_orth &centre,
389 float radius);
390 clipper::Grid_map make_grid_map(const clipper::Xmap<float> &input_xmap,
391 const clipper::Coord_orth &centre) const;
392 };
393
394
395 //
396 class simple_residue_triple_t {
397 public:
398 mmdb::Residue *this_residue;
399 mmdb::Residue *next_residue;
400 mmdb::Residue *prev_residue;
401 std::string alt_conf;
402 simple_residue_triple_t() {
403 this_residue = 0;
404 prev_residue = 0;
405 next_residue = 0;
406 }
407 simple_residue_triple_t(mmdb::Residue *this_residue_in,
408 mmdb::Residue *prev_residue_in,
409 mmdb::Residue *next_residue_in,
410 const std::string &alt_conf_in) : alt_conf(alt_conf_in) {
411 this_residue = this_residue_in;
412 prev_residue = prev_residue_in;
413 next_residue = next_residue_in;
414 }
415 };
416
417 //
418 class residue_triple_t {
419 public:
420 mmdb::Residue *this_residue;
421 mmdb::Residue *next_residue;
422 mmdb::Residue *prev_residue;
423 std::string alt_conf;
424 residue_triple_t() {
425 this_residue = 0;
426 prev_residue = 0;
427 next_residue = 0;
428 }
429 residue_triple_t(mmdb::Residue *this_residue_in,
430 mmdb::Residue *prev_residue_in,
431 mmdb::Residue *next_residue_in,
432 const std::string &alt_conf_in) : alt_conf(alt_conf_in) {
433 this_residue = this_residue_in;
434 prev_residue = prev_residue_in;
435 next_residue = next_residue_in;
436 }
437 ~residue_triple_t() {
438 delete this_residue;
439 delete next_residue;
440 delete prev_residue;
441 }
442 residue_triple_t deep_copy() {
443 mmdb::Residue *this_residue_cp = deep_copy_this_residue(this_residue);
444 mmdb::Residue *prev_residue_cp = deep_copy_this_residue(this_residue);
445 mmdb::Residue *next_residue_cp = deep_copy_this_residue(this_residue);
446 return residue_triple_t(this_residue_cp,
447 prev_residue_cp,
448 next_residue_cp,
449 alt_conf);
450 }
451 };
452
453 class backrub_residue_triple_t : public residue_triple_t {
454
455 public:
456 // Note to self, the residue copy may need the deep_copy
457 // that does the atom index transfer too.
458
459 backrub_residue_triple_t(mmdb::Residue *this_residue_in,
460 mmdb::Residue *prev_residue_in,
461 mmdb::Residue *next_residue_in,
462 const std::string &alt_conf_in) : residue_triple_t(this_residue_in,
463 prev_residue_in,
464 next_residue_in,
465 alt_conf_in) {
466 trim_this_residue_atoms();
467 trim_prev_residue_atoms();
468 trim_next_residue_atoms();
469 }
470
471 // Delete atoms that don't have this alt conf (or "" alt conf).
472 void trim_this_residue_atoms();
473 // As above, and also delete all atoms that are not C or O
474 void trim_prev_residue_atoms();
475 // As trim_this_residue_atoms, and also delete all atoms that are not N or H.
476 void trim_next_residue_atoms();
477 void trim_residue_atoms_generic(mmdb::Residue *residue_p,
478 std::vector<std::string> keep_atom_vector,
479 bool use_keep_atom_vector);
480
481 };
482
483
484 class map_ref_triple_t {
485 public:
486 double dist_sq;
487 clipper::Xmap<float>::Map_reference_coord iw;
488 float density;
489 map_ref_triple_t(const double &d_in,
490 const clipper::Xmap<float>::Map_reference_coord &iw_in,
491 const float &den_in) {
492 dist_sq = d_in;
493 iw = iw_in;
494 density = den_in;
495 }
496 map_ref_triple_t() {}
497 bool operator<(const map_ref_triple_t &mrt) const {
498 return (mrt.dist_sq < dist_sq);
499 }
500 };
501
502
503 class segment_map {
504 enum {UNASSIGNED = -1, TOO_LOW = -2 };
505 // sorting function used by above
506 static bool compare_density_values_map_refs(const std::pair<clipper::Xmap_base::Map_reference_index, float> &v1,
507 const std::pair<clipper::Xmap_base::Map_reference_index, float> &v2);
508
509 // change values in segmented_map
510 //
511 void flood_fill_segmented_map(clipper::Xmap<std::pair<bool, int> > *segmented_map,
512 const clipper::Xmap<float> &xmap, // for Neighbours
513 const clipper::Coord_grid &seed_point,
514 int from_val, int to_val);
515
516 // return a vector of grid points as we trace the route to the
517 // local peak from start_point by steepest ascent.
518 //
519 std::vector<clipper::Coord_grid> path_to_peak(const clipper::Coord_grid &start_point,
520 const clipper::Xmap<float> &xmap_new);
521 static bool sort_segment_vec(const std::pair<int, int> &a,
522 const std::pair<int, int> &b);
523 int find_biggest_segment(const std::map<int, std::vector<clipper::Coord_grid> > &segment_id_map,
524 const std::map<int, int> &segment_id_counter_map) const;
525 // test function
526 int find_smallest_segment(const std::map<int, std::vector<clipper::Coord_grid> > &segment_id_map,
527 const std::map<int, int> &segment_id_counter_map) const;
528 void resegment_watershed_points(clipper::Xmap<int> *xmap_int,
529 const clipper::Xmap<float> &xmap) const;
530
531 public:
532 segment_map() {};
533 // Return the number of segments and the segmented map.
534 //
535 // -1 means no segment. low_level is the level below which
536 // segmentation should not occur (don't make blobs in the
537 // noise).
538 //
539 // This is Pintilie flooding (with extra watershed remapping)
540 //
541 std::pair<int, clipper::Xmap<int> > segment(const clipper::Xmap<float> &xmap_in, float low_level);
542
543 // This is the flood-down method
544 //
545 std::pair<int, clipper::Xmap<int> > segment_emsley_flood(const clipper::Xmap<float> &xmap_in,
546 float low_level);
547
548 // multi-scale segmentation. Return a segmented map.
549 //
550 std::pair<int, clipper::Xmap<int> > segment(const clipper::Xmap<float> &xmap_in,
551 float low_level,
552 float b_factor_increment, // per round
553 int n_rounds);
554 };
555
556 class soi_variance {
557 const clipper::Xmap<float> &xmap;
558 clipper::Xmap<float> make_variance_map() const;
559 clipper::Xmap<float> solvent_treatment_map() const;
560 clipper::Xmap<float> protein_treatment_map() const;
561 static void apply_variance_values(clipper::Xmap<float> &variance_map,
562 const clipper::Xmap<float> &xmap,
563 const std::vector<clipper::Coord_grid> &soi_gps,
564 const std::vector<clipper::Xmap_base::Map_reference_index> &grid_indices);
565 public:
566 soi_variance(const clipper::Xmap<float> &xmap_in) : xmap(xmap_in) { }
567 void proc(float solvent_content_frac);
568 static bool mri_var_pair_sorter(const std::pair<clipper::Xmap_base::Map_reference_index, float> &p1,
569 const std::pair<clipper::Xmap_base::Map_reference_index, float> &p2);
570 };
571
572 // attach the chain-id to each returned map
573 //
574 // you can set an informative "state" message
575 std::vector<std::pair<std::string, clipper::Xmap<float> > >
576 partition_map_by_chain(const clipper::Xmap<float> &xmap, mmdb::Manager *mol,
577 std::string *state_string_p);
578
579 bool is_EM_map(const clipper::Xmap<float> &xmap);
580
581
582 typedef std::pair<double, double> phitheta;
583
584 std::vector<phitheta> make_phi_thetas(unsigned int n_pts);
585 float average_of_sample_map_at_sphere_points(clipper::Coord_orth &centre,
586 float radius,
587 const std::vector<phitheta> &phi_thetas,
588 clipper::Xmap<float> &xmap);
589
590 std::vector<std::pair<clipper::Resolution, double> >
591 fsc(const clipper::Xmap<float> &xmap_1, const clipper::Xmap<float> &xmap_2);
592
593 // scale map_for_scaling using relion-like resolution binning
594 clipper::Xmap<float>
595 power_scale(const clipper::Xmap<float> &xmap_ref, const clipper::Xmap<float> &xmap_for_scaling);
596
597 void
598 compare_structure_factors(const clipper::Xmap<float> &xmap_1, const clipper::Xmap<float> &xmap_2);
599
600 void flip_hand(clipper::Xmap<float> *xmap_p);
601
602 // input is map and its rmsd
603 clipper::Xmap<float>
604 analyse_map_point_density_change(const std::vector<std::pair<clipper::Xmap<float> *, float> > &xmaps,
605 const clipper::Xmap<float> &xmap_for_mask);
606
607 clipper::Xmap<float> zero_dose_extrapolation(const std::vector<std::pair<clipper::Xmap<float> *, float> > &xmaps,
608 const clipper::Xmap<float> &xmap_for_mask);
609
610 clipper::Xmap<float> real_space_zero_dose_extrapolation(const std::vector<clipper::Xmap<float> *> &xmaps,
611 const clipper::Xmap<float> &xmap_for_mask);
612
613 int split_residue_using_map(mmdb::Residue *residue_p, mmdb::Manager *mol, const clipper::Xmap<float> &xmap);
614
615 std::vector<std::vector<float> >
616 get_density_on_cylinder(const clipper::Coord_orth &pt_1, const clipper::Coord_orth &pt_2,
617 const clipper::Coord_orth &pt_ref, const clipper::Xmap<float> &xmap,
618 double radius, unsigned int n_length, unsigned int n_ring);
619
620 }
621}
622
623#endif // COOT_MAP_UTILS_HH
Definition coot-density-stats.hh:36
float suggested_radius
the suggested radius
Definition coot-map-utils.hh:160
double sum_of_densities
sum of densities - for whatever use that may be.
Definition coot-map-utils.hh:162
float suggested_contour_level
suggested contour level
Definition coot-map-utils.hh:158
clipper::Coord_orth updated_centre
new centre
Definition coot-map-utils.hh:156
bool success
success flag
Definition coot-map-utils.hh:154