2#ifndef MOLECULES_CONTAINER_HH
3#define MOLECULES_CONTAINER_HH
13#include <ssm/ssm_align.h>
17#include <nanobind/nanobind.h>
20#include "compat/coot-sysdep.h"
22#include "coords/Cartesian.hh"
23#include "coords/ramachandran-container.hh"
24#include "coot-molecule.hh"
25#include "coot-utils/coot-rama.hh"
26#include "coot-utils/coot-coord-extras.hh"
27#include "coot-utils/coot-map-utils.hh"
28#include "utils/coot-utils.hh"
29#include "utils/setup-syminfo.hh"
30#include "ideal/simple-restraint.hh"
31#include "atom-pull.hh"
32#include "validation-information.hh"
33#include "superpose-results.hh"
34#include "lsq-results.hh"
35#include "coot-utils/simple-mesh.hh"
36#include "coot-utils/texture-as-floats.hh"
37#include "phi-psi-prob.hh"
38#include "instancing.hh"
39#include "coot-colour.hh"
40#include "ligand/molecular-replacement.hh"
41#include "saved-strand-info.hh"
42#include "svg-store-key.hh"
43#include "moorhen-h-bonds.hh"
44#include "header-info.hh"
45#include "positioned-atom-spec.hh"
46#include "user-defined-colour-table.hh"
51 std::vector<coot::molecule_t> molecules;
52 coot::protein_geometry geom;
53 coot::rotamer_probability_tables rot_prob_tables;
54 bool ospray_is_initialized;
55 ramachandrans_container_t ramachandrans_container;
56 static std::atomic<bool> on_going_updating_map_lock;
57 bool draw_missing_residue_loops_flag;
61 int model_rail_points_delta;
62 int map_rail_points_delta;
63 float rmsd_of_difference_map;
64 explicit rail_points_t(
float rmsd) {
65 model_rail_points_delta = 0;
66 map_rail_points_delta = 0;
67 rmsd_of_difference_map = rmsd;
69 rail_points_t(
float rmsd_diff_map_current,
const rail_points_t &rail_points_prev) {
70 model_rail_points_delta = 0;
71 rmsd_of_difference_map = rmsd_diff_map_current;
72 map_rail_points_delta = rail_points_delta(rail_points_prev);
74 int rail_points_delta(
const rail_points_t &prev) {
76 return int(100000.0 * fudge * (prev.rmsd_of_difference_map - rmsd_of_difference_map));
78 static int total(
const std::vector<rail_points_t> &rail_point_history) {
80 for (
const auto &item : rail_point_history) {
81 sum += item.map_rail_points_delta;
86 std::vector<rail_points_t> rail_point_history;
88 class updating_maps_info_f {
90 bool maps_need_an_update;
94 int imol_with_data_info_attached;
95 updating_maps_info_f() {
96 maps_need_an_update =
false;
100 imol_with_data_info_attached = -1;
103#ifdef SKIP_FOR_PYTHON_DOXYGEN
110 updating_maps_info_f updating_maps_info;
111 void set_updating_maps_need_an_update(
int imol);
118 void update_updating_maps(
int imol);
139 static clipper::Xmap<float> *dummy_xmap;
141 float geman_mcclure_alpha;
143 bool use_rama_plot_restraints;
144 float rama_plot_restraints_weight;
146 bool use_torsion_restraints;
147 float torsion_restraints_weight;
149 ctpl::thread_pool thread_pool;
152 coot::restraints_container_t *last_restraints;
153 bool continue_threaded_refinement_loop;
154 bool refinement_is_quiet;
155 int cif_dictionary_read_number;
160 std::string adjust_refinement_residue_name(
const std::string &resname)
const;
161#ifdef DOXYGEN_SHOULD_PARSE_THIS
163 bool make_last_restraints(
const std::vector<std::pair<bool,mmdb::Residue *> > &local_residues,
164 const std::vector<mmdb::Link> &links,
165 const coot::protein_geometry &geom,
166 mmdb::Manager *mol_for_residue_selection,
167 const std::vector<coot::atom_spec_t> &fixed_atom_specs,
168 coot::restraint_usage_Flags flags,
170 const clipper::Xmap<float> *xmap_p);
171 coot::refinement_results_t refine_residues_vec(
int imol,
172 const std::vector<mmdb::Residue *> &residues,
173 const std::string &alt_conf,
176 atom_selection_container_t make_moving_atoms_asc(mmdb::Manager *residues_mol,
177 const std::vector<mmdb::Residue *> &residues)
const;
179 int find_serial_number_for_insert(
int seqnum_new,
180 const std::string &ins_code_for_new,
181 mmdb::Chain *chain_p)
const;
187 std::pair<int, std::vector<std::string> >
188 check_dictionary_for_residue_restraints(
int imol, mmdb::PResidue *SelResidues,
int nSelResidues);
190 std::pair<int, std::vector<std::string> >
191 check_dictionary_for_residue_restraints(
int imol,
const std::vector<mmdb::Residue *> &residues);
193 std::pair<mmdb::Manager *, std::vector<mmdb::Residue *> >
194 create_mmdbmanager_from_res_vector(
const std::vector<mmdb::Residue *> &residues,
196 mmdb::Manager *mol_in,
197 std::string alt_conf);
200 coot::refinement_results_t
201 generate_molecule_and_refine(
int imol,
202 const std::vector<mmdb::Residue *> &residues,
203 const std::string &alt_conf,
205 bool use_map_flag=
true);
207 static void thread_for_refinement_loop_threaded();
209 static std::atomic<bool> restraints_lock;
210 static void get_restraints_lock(
const std::string &calling_function_name);
211 static void release_restraints_lock(
const std::string &calling_function_name);
212 static std::string restraints_locking_function_name;
214 bool particles_have_been_shown_already_for_this_round_flag;
216#ifdef DOXYGEN_SHOULD_PARSE_THIS
218 int servalcat_refine_xray_internal(
int imol,
int imol_map,
const std::string &output_prefix,
219 const std::map<std::string, std::string> &key_value_pairs);
223#ifdef SKIP_FOR_PYTHON_DOXYGEN
229 std::pair<short int, clipper::RTop_orth> get_lsq_matrix_internal(
int imol_ref,
int imol_mov,
bool summary_to_screen)
const;
233 get_q_score_validation_information(mmdb::Manager *mol,
int udd_q_score,
bool do_per_atom)
const;
238 bool refinement_immediate_replacement_flag =
true;
239 int imol_moving_atoms;
240 enum moving_atoms_asc_t {
241 NEW_COORDS_UNSET = 0,
243 NEW_COORDS_REPLACE = 2,
244 NEW_COORDS_REPLACE_CHANGE_ALTCONF = 3,
245 NEW_COORDS_INSERT = 4,
246 NEW_COORDS_INSERT_CHANGE_ALTCONF = 5};
247 short int moving_atoms_asc_type;
249#ifdef DOXYGEN_SHOULD_PARSE_THIS
251 static void all_atom_pulls_off();
252 static std::vector<atom_pull_info_t> atom_pulls;
255 static void atom_pulls_off(
const std::vector<coot::atom_spec_t> &specs);
258#ifdef DOXYGEN_SHOULD_PARSE_THIS
260 std::vector<std::pair<mmdb::Residue *, std::vector<coot::dict_torsion_restraint_t> > > make_rotamer_torsions(
const std::vector<std::pair<bool, mmdb::Residue *> > &local_residues)
const;
272#ifdef DOXYGEN_SHOULD_PARSE_THIS
275 int refine_direct(
int imol, std::vector<mmdb::Residue *> rv,
const std::string &alt_loc,
int n_cycles);
278 double phi_psi_probability(
const coot::util::phi_psi_t &phi_psi,
const ramachandrans_container_t &rc)
const;
281#ifdef SKIP_FOR_PYTHON_DOXYGEN
284 void read_standard_residues();
286 std::map<svg_store_key_t, std::string> ligand_svg_store;
288 atom_selection_container_t standard_residues_asc;
291#ifdef DOXYGEN_SHOULD_PARSE_THIS
294 coot::graph_match_info_t overlap_ligands_internal(
int imol_ligand,
int imol_ref,
const std::string &chain_id_ref,
295 int resno_ref,
bool apply_rtop_flag);
300 superpose_with_atom_selection(atom_selection_container_t asc_ref,
301 atom_selection_container_t asc_mov,
303 std::string moving_mol_name,
304 std::string reference_mol_name,
305 bool move_copy_of_imol2_flag);
310 void print_ssm_sequence_alignment(ssm::Align *SSMAlign,
311 atom_selection_container_t asc_ref,
312 atom_selection_container_t asc_mov,
313 mmdb::PAtom *atom_selection1,
314 mmdb::PAtom *atom_selection2,
315 int n_selected_atoms_1,
int n_selected_atoms_2,
316 bool move_copy_of_imol2_flag);
319 make_ssm_sequence_alignment_as_validation_information(ssm::Align *SSMAlign,
320 atom_selection_container_t asc_ref,
321 atom_selection_container_t asc_mov,
322 mmdb::PAtom *atom_selection1, mmdb::PAtom *atom_selection2,
323 int n_selected_atoms_1,
int n_selected_atoms_2,
324 bool move_copy_of_imol2_flag);
326 void make_and_print_horizontal_ssm_sequence_alignment(ssm::Align *SSMAlign,
327 atom_selection_container_t asc_ref,
328 atom_selection_container_t asc_mov,
329 mmdb::PAtom *atom_selection1,
330 mmdb::PAtom *atom_selection2,
331 int n_selected_atoms_1,
int n_selected_atoms_2)
const;
333 void map_secondary_structure_headers(ssm::Align *SSMAlign,
334 atom_selection_container_t asc_ref,
335 atom_selection_container_t asc_mov,
336 mmdb::PAtom *atom_selection1,
337 mmdb::PAtom *atom_selection2,
338 int n_selected_atoms_1,
int n_selected_atoms_2)
const;
340 std::pair<std::string, std::string>
341 get_horizontal_ssm_sequence_alignment(ssm::Align *SSMAlign,
342 atom_selection_container_t asc_ref,
343 atom_selection_container_t asc_mov,
344 mmdb::PAtom *atom_selection1, mmdb::PAtom *atom_selection2,
345 int n_selected_atoms_1,
int n_selected_atoms_2)
const;
348 std::vector<std::pair<coot::residue_validation_information_t, coot::residue_validation_information_t> >
349 get_pairs(ssm::Align *SSMAlign,
350 atom_selection_container_t asc_ref,
351 atom_selection_container_t asc_mov,
352 mmdb::PAtom *atom_selection1, mmdb::PAtom *atom_selection2,
353 int n_selected_atoms_1,
int n_selected_atoms_2)
const;
356 void print_horizontal_ssm_sequence_alignment(std::pair<std::string, std::string> aligned_sequences)
const;
358 std::string generate_horizontal_ssm_sequence_alignment_string(
const std::pair<std::string, std::string> &aligned_sequences)
const;
362#ifdef SKIP_FOR_PYTHON_DOXYGEN
365 int valid_labels(
const std::string &mtz_file_name,
const std::string &f_col,
const std::string &phi_col,
366 const std::string &weight_col,
int use_weights)
const;
369 float ligand_water_to_protein_distance_lim_max;
370 float ligand_water_to_protein_distance_lim_min;
371 float ligand_water_variance_limit;
372 float ligand_water_sigma_cut_off;
375 unsigned int max_number_of_simple_mesh_vertices;
378#ifdef SKIP_FOR_PYTHON_DOXYGEN
383#ifdef SKIP_FOR_PYTHON_DOXYGEN
388 bool map_is_contoured_using_thread_pool_flag;
389 double contouring_time;
599 std::vector<double>
get_eigenvalues(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code);
621#ifdef DOXYGEN_SHOULD_PARSE_THIS
628#ifdef DOXYGEN_SHOULD_PARSE_THIS
631 mmdb::Manager *get_mol(
unsigned int imol)
const;
635#ifdef NB_VERSION_MAJOR
638 clipper::Xmap<float> get_xmap(
int imol)
const;
676#ifdef MAKE_ENHANCED_LIGAND_TOOLS
734 const std::string &trajectory_file_name,
790 std::pair<int, std::string>
get_active_atom(
float x,
float y,
float z,
const std::string &displayed_model_molecules_list)
const;
821 bool copy_dictionary(
const std::string &monomer_name,
int imol_current,
int imol_new);
859 std::map<std::string, std::string>
893 std::string
get_hb_type(
const std::string &compound_id,
int imol_enc,
const std::string &atom_name)
const;
911 std::vector<std::pair<std::string, std::string> >
get_acedrg_atom_types(
const std::string &compound_id,
int imol_enc)
const;
974 void write_png(
const std::string &compound_id,
int imol,
const std::string &file_name)
const;
1008 bool against_a_dark_background,
1009 float bond_width,
float atom_radius_to_bond_width_ratio,
1010 int smoothness_factor);
1030 bool against_a_dark_background,
1031 float bond_width,
float atom_radius_to_bond_width_ratio,
1032 bool show_atoms_as_aniso_flag,
1033 bool show_aniso_atoms_as_ortep_flag,
1034 bool show_aniso_atoms_as_empty,
1035 bool draw_hydrogen_atoms_flag,
1036 int smoothness_factor);
1044 const std::string &mode,
1045 bool against_a_dark_background,
1046 float bond_width,
float atom_radius_to_bond_width_ratio,
1047 bool show_atoms_as_aniso_flag,
1048 bool show_aniso_atoms_as_ortep_flag,
1049 bool show_aniso_atoms_as_empty_flag,
1050 bool draw_hydrogen_atoms_flag,
1051 int smoothness_factor);
1062 float saturation,
float goodselliness);
1076 const std::string &file_name);
1086 const std::string &selection_cid,
1087 const std::string &mode,
1088 bool against_a_dark_background,
1089 float bonds_width,
float atom_radius_to_bond_width_ratio,
int smoothness_factor,
1090 bool draw_hydrogen_atoms_flag,
bool draw_missing_residue_loops,
1091 const std::string &file_name);
1104 const std::string &colour_scheme,
const std::string &style,
1105 int secondary_structure_usage_flag,
1106 const std::string &file_name);
1111 const std::string &file_name)
const;
1206 bool colour_applies_to_non_carbon_atoms_also);
1209 void add_colour_rule(
int imol,
const std::string &selection_cid,
const std::string &colour);
1260 const std::string &colour_scheme,
1261 const std::string &style,
1262 int secondary_structure_usage_flag);
1291 float box_radius,
float grid_scale,
float b_factor)
const;
1307 float sigma,
float contour_level,
1308 float box_radius,
float grid_scale,
1309 float b_factor)
const;
1328 const std::string &cid,
1329 float sigma,
float box_radius,
float fft_b_factor);
1345 float sigma,
float box_radius,
1346 float grid_scale,
float fft_b_factor);
1380#ifdef DOXYGEN_SHOULD_PARSE_THIS
1391 std::pair<bool, coot::Cartesian> get_atom_position(
int imol,
coot::atom_spec_t &atom_spec);
1489 std::string
get_residue_name(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code)
const;
1515#ifdef DOXYGEN_SHOULD_PARSE_THIS
1524 coot::util::missing_atom_info missing_atoms_info_raw(
int imol);
1548 std::vector<coot::atom_distance_t>
1550 float dist_max)
const;
1561 int imol_mov,
const std::string &chain_id_mov);
1573 const std::string &chain_id_mov,
int res_no_mov_start,
int res_no_mov_end,
1585 const std::string &chain_id_mov,
int res_no_mov,
const std::string &atom_name_mov);
1590 std::vector<coot::lsq_range_match_info_t> lsq_matchers;
1619 lsq_results_t
get_lsq_matrix(
int imol_ref,
int imol_mov,
bool summary_to_screen)
const;
1624 coot::symmetry_info_t
1625 get_symmetry(
int imol,
float symmetry_search_radius,
float centre_x,
float centre_y,
float centre_z)
const;
1664 std::pair<int, double>
get_torsion(
int imol,
const std::string &cid,
const std::vector<std::string> &atom_names);
1676#ifdef DOXYGEN_SHOULD_PARSE_THIS
1679 float map_sampling_rate;
1705 int read_mtz(
const std::string &file_name,
const std::string &f,
const std::string &phi,
const std::string &weight,
1716 const std::string &weight,
bool use_weight);
1719 class auto_read_mtz_info_t {
1743 void set_fobs_sigfobs(
const std::string &f,
const std::string &s) {
1772 int write_map(
int imol,
const std::string &file_name)
const;
1871 int make_mask(
int imol_map_ref,
int imol_model,
const std::string &atom_selection_cid,
float radius);
1925 float radius,
float contour_level);
1942 double position_x,
double position_y,
double position_z,
1943 float radius,
float contour_level,
1944 float other_map_for_colouring_min_value,
1945 float other_map_for_colouring_max_value,
1946 bool invert_colour_ramp);
1960 double base_point_x,
double base_point_y,
double base_point_z,
1961 double x_axis_x,
double x_axis_y,
double x_axis_z,
1962 double y_axis_x,
double y_axis_y,
double y_axis_z,
1963 double x_axis_step_size,
double y_axis_step_size,
1964 unsigned int n_x_axis_points,
unsigned int n_y_axis_points);
1971 void set_colour_map_for_map_coloured_by_other_map(std::vector<std::pair<
double, std::vector<double> > > colour_table );
1973 user_defined_colour_table_t colour_map_by_other_map_user_defined_table;
1984 double position_x,
double position_y,
double position_z,
1985 float radius,
float contour_level,
1986 unsigned int n_bins);
1998 float free_r_factor;
1999 int rail_points_total;
2000 int rail_points_new;
2025 int average_map(
const std::string &imol_maps, std::vector<float> &scales);
2037 bool regen_map(
int imol_map,
const std::string &imol_maps,
const std::vector<float> &scales);
2052 int auto_fit_rotamer(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code,
const std::string &alt_conf,
2098 std::pair<int, unsigned int>
delete_using_cid(
int imol,
const std::string &cid,
const std::string &scope);
2110 std::pair<int, unsigned int>
delete_atom(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code,
2111 const std::string &atom_name,
const std::string &alt_conf);
2130 std::pair<int, unsigned int>
delete_residue(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code);
2150 const std::string &ins_code,
const std::string &alt_conf);
2166 std::pair<int, unsigned int>
delete_side_chain(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code);
2251 ligand_water_to_protein_distance_lim_min = d;
2258 ligand_water_to_protein_distance_lim_max = d;
2265 ligand_water_variance_limit = d;
2272 ligand_water_sigma_cut_off = d;
2290 int flood(
int imol_model,
int imol_map,
float n_rmsd);
2348 const std::string &asn_chain_id,
int asn_res_no);
2359 int flip_peptide(
int imol,
const coot::atom_spec_t &atom_spec,
const std::string &alt_conf);
2377 void eigen_flip_ligand(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code);
2392 int mutate(
int imol,
const std::string &cid,
const std::string &new_residue_type);
2409 std::string
jed_flip(
int imol,
const std::string &atom_cid,
bool invert_selection);
2444 struct mr_solution_t {
2474 float x,
float y,
float z,
2475 int n_rotation_solutions = 10,
2476 int n_translation_solutions = 10);
2521 float m00,
float m01,
float m02,
2522 float m10,
float m11,
float m12,
2523 float m20,
float m21,
float m22,
2524 float c0,
float c1,
float c2,
2525 float t0,
float t1,
float t2);
2559 std::pair<int, std::vector<merge_molecule_results_info_t> >
2564#ifdef SKIP_FOR_PYTHON_DOXYGEN
2567 std::pair<int, std::vector<merge_molecule_results_info_t> >
2593 void replace_residue(
int imol,
const std::string &residue_cid,
const std::string &new_residue_type,
int imol_enc);
2626 const std::string &atom_name_1,
2627 const std::string &atom_name_2,
2628 const std::string &atom_name_3,
2629 const std::string &atom_name_4,
2630 double torsion_angle);
2644 const std::string &to_chain_id,
2645 bool use_resno_range,
2646 int start_resno,
int end_resno);
2717 int refine_residues(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code,
2718 const std::string &alt_conf,
const std::string &mode,
int n_cycles);
2746 std::pair<int, coot::instanced_mesh_t>
2749 bool do_rama_plot_restraints,
float rama_plot_weight,
2750 bool do_torsion_restraints,
float torsion_weight,
bool refinement_is_quiet);
2764 minimize(
int imol,
const std::string &atom_selection_cid,
2766 bool do_rama_plot_restraints,
float rama_plot_weight,
2767 bool do_torsion_restraints,
float torsion_weight,
bool refinement_is_quiet);
2864 std::pair<int, coot::instanced_mesh_t>
refine(
int imol,
int n_cycles);
2881 float pos_x,
float pos_y,
float pos_z,
2923 const std::string &chain_id);
2931 const std::string &residue_cids);
2939 const std::string &residue_cid_1,
2940 const std::string &residue_cid_2);
2977 const nanobind::dict &key_value_pairs);
3038 coot::simple::molecule_t
get_simple_molecule(
int imol,
const std::string &residue_cid,
bool draw_hydrogen_atoms_flag);
3055 std::vector<moorhen::h_bond>
get_h_bonds(
int imol,
const std::string &cid_str,
bool mcdonald_and_thornton_mode)
const;
3074 std::vector<coot::geometry_distortion_info_pod_container_t>
3084 std::vector<coot::geometry_distortion_info_pod_container_t>
3096 std::pair<int, double>
get_ligand_distortion(
int imol,
const std::string &ligand_cid,
bool include_non_bonded_contacts);
3176 std::vector <positioned_atom_spec_t>
3202 const std::vector<std::string> &atom_names,
3280 std::vector<coot::molecule_t::interesting_place_t>
difference_map_peaks(
int imol_map,
int imol_protein,
float n_rmsd)
const;
3299 std::vector<coot::molecule_t::interesting_place_t>
unmodelled_blobs(
int imol_model,
int imol_map,
3300 float rmsd_cut_off)
const;
3315 std::vector <coot::atom_spec_t>
3318 float outlier_sigma_level,
3319 float min_dist,
float max_dist,
3320 bool ignore_part_occ_contact_flag,
3321 bool ignore_zero_occ_flag);
3329 float start_pos_x,
float start_pos_y,
float start_pos_z,
3330 float end_pos_x,
float end_pos_y,
float end_pos_z)
const;
3343 std::pair<std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t>,
3344 std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t> >
3345 get_mmrrcc(
int imol,
const std::string &chain_id,
unsigned int n_residue_per_residue_range,
int imol_map)
const;
3354 std::pair<std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t>,
3355 std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t> >
3356 mmrrcc(
int imol,
const std::string &chain_id,
int imol_map)
const;
3363 std::pair<std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t>,
3364 std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t> >
3365 mmrrcc_internal(
const atom_selection_container_t &asc,
3366 const std::string &chain_id,
3367 unsigned int n_residue_per_residue_range,
3368 const clipper::Xmap<float> &xmap)
const;
3420 float get_spherical_variance(
int imol_map,
int imol_model,
const std::string &atom_cid,
float mean_density_other_atoms)
const;
3448 const std::string &f_col,
const std::string &sigf_col,
3449 const std::string &free_r_col);
3472 int imol_map_with_data_attached,
3473 int imol_updating_difference_map);
3492 int imol_updating_difference_map,
3493 int imol_map_with_data_attached);
3526 float screen_centre_x,
3527 float screen_centre_y,
3528 float screen_centre_z)
const;
3555 std::pair<bool, clipper::Coord_orth>
go_to_blob(
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
3556 float contour_level);
3581 float n_rmsd,
bool use_conformers,
unsigned int n_conformers);
3587 class fit_ligand_info_t {
3592 float fitting_score;
3593 float cluster_volume;
3594 fit_ligand_info_t(
int i,
int c,
int l) : imol(i), cluster_idx(c), ligand_idx(l) { fitting_score = -1.0; cluster_volume = -1.0;}
3595 fit_ligand_info_t() { imol = -1; cluster_idx = -1; ligand_idx = -1; fitting_score = 1.0; cluster_volume = -1.0; }
3598 float get_cluster_volume()
const {
return cluster_volume; }
3611 std::vector<fit_ligand_info_t>
fit_ligand(
int imol_protein,
int imol_map,
int imol_ligand,
3612 float n_rmsd,
bool use_conformers,
unsigned int n_conformers);
3624 std::vector<fit_ligand_info_t>
fit_ligand_multi_ligand(
int imol_protein,
int imol_map,
const std::string &multi_ligand_molecule_number_list,
3625 float n_rmsd,
bool use_conformers,
unsigned int n_conformers);
3657 int n_trials,
float translation_scale_factor);
3672 int add_compound(
int imol,
const std::string &tlc,
int imol_dict,
int imol_map,
float x,
float y,
float z);
3699 const std::string &background_type);
3755 float data_value_for_bottom,
float data_value_for_top)
const;
3778 unsigned int get_max_number_of_simple_mesh_vertices()
const;
3779 void set_max_number_of_simple_mesh_vertices(
unsigned int n);
3783 std::string
pae_png(
const std::string &pae_file_name)
const;
3791 float function_value;
3792 std::chrono::time_point<std::chrono::high_resolution_clock> timer_start;
3793 std::chrono::time_point<std::chrono::high_resolution_clock> timer;
3794 ltj_stats_t() : timer(std::chrono::high_resolution_clock::now()) {
3797 timer_start = timer;
3801 timer = std::chrono::high_resolution_clock::now();
3809 timer = std::chrono::high_resolution_clock::now();
3810 auto d10 = std::chrono::duration_cast<std::chrono::microseconds>(timer - timer_start).count();
3819 bool interrupt_long_term_job;
3890#ifdef DOXYGEN_SHOULD_PARSE_THIS
3893 coot::protein_geometry & get_geometry() {
3906 float bond_width,
float atom_radius_to_bond_width_ratio,
3907 int smoothness_factor);
3920 const std::string &cid,
3921 const std::string &colour_scheme,
3922 const std::string &style,
3923 int secondary_structure_usage_flag);
3930 float saturation,
float goodselliness);
3966 void test_function(
const std::string &s);
3982 std::string
rebox_map(
int imol_model,
const std::string &atom_selection_cid,
3983 int imol_map,
float border,
unsigned int n_pixels_per_edge);
3988#ifdef DOXYGEN_SHOULD_PARSE_THIS
3993 enum mesh_mode_t { UNKNOWN, SINGLE_COLOUR, MULTI_COLOUR };
3997 PyObject *get_pythonic_bonds_mesh(
int imol,
const std::string &mode,
bool against_a_dark_background,
3998 float bond_width,
float atom_radius_to_bond_width_ratio,
3999 int smoothness_factor);
4001 PyObject *get_pythonic_map_mesh(
int imol,
float x,
float y,
float z,
float radius,
float contour_level);
4003 PyObject *get_pythonic_molecular_representation_mesh(
int imol,
const std::string &atom_selection,
4004 const std::string &colour_sheme,
4005 const std::string &style,
4006 int secondary_structure_usage_flag);
4008 PyObject *get_pythonic_gaussian_surface_mesh(
int imol,
float sigma,
float contour_level,
4009 float box_radius,
float grid_scale,
float fft_b_factor);
4026 PyObject *get_pythonic_simple_molecule(
int imol,
const std::string &cid,
bool include_hydrogen_atoms_flag);
Definition api-cell.hh:35
Definition residue-and-atom-specs.hh:35
Definition coot-colour.hh:35
Definition instancing.hh:58
map histogram class
Definition coot-molecule.hh:1466
a container class for information about changing rotamers
Definition coot-molecule.hh:1230
Definition coot-molecule.hh:124
Definition residue-and-atom-specs.hh:216
The basic mesh for transfering mesh geometry and colours.
Definition simple-mesh.hh:38
map molecule centre
Definition coot-map-utils.hh:151
Definition sfcalc-genmap.hh:38
Definition generic-3d-lines.hh:12
class for the information about columns extracted from auto-reading the given mtz file
Definition molecules-container.hh:1719
std::string Rfree
R-Free column. There were not available if the return value is empty.
Definition molecules-container.hh:1736
std::string sigF_obs
sigF_obs column
Definition molecules-container.hh:1734
std::string phi
phi column
Definition molecules-container.hh:1726
std::string w
weights column
Definition molecules-container.hh:1728
int idx
molecule index
Definition molecules-container.hh:1722
std::string F
F column.
Definition molecules-container.hh:1724
std::string F_obs
F_obs column. There were not available if the return value is empty.
Definition molecules-container.hh:1732
bool weights_used
flag for weights usage
Definition molecules-container.hh:1730
float get_fitting_score() const
Definition molecules-container.hh:3597
Definition molecules-container.hh:3788
void update_timer()
This function is called by the long-term job, udating the timer and count.
Definition molecules-container.hh:3800
double time_difference()
Definition molecules-container.hh:3808
Definition molecules-container.hh:1995
std::pair< int, unsigned int > delete_chain_using_cid(int imol, const std::string &cid)
void set_use_rama_plot_restraints(bool state)
Definition molecules-container.hh:2810
int imol_difference_map
Definition molecules-container.hh:406
std::pair< int, coot::instanced_mesh_t > minimize_energy(int imol, const std::string &atom_selection_cid, int n_cycles, bool do_rama_plot_restraints, float rama_plot_weight, bool do_torsion_restraints, float torsion_weight, bool refinement_is_quiet)
void set_max_number_of_threads(unsigned int n_threads)
std::vector< double > get_residue_sidechain_average_position(int imol, const std::string &cid) const
std::map< std::string, std::string > dictionary_atom_name_map(const std::string &comp_id_1, int imol_1, const std::string &comp_id_2, int imol_2)
std::string molecule_to_mmCIF_string(int imol) const
void set_imol_refinement_map(int i)
Definition molecules-container.hh:464
int fill_partial_residue_using_cid(int imol, const std::string &cid)
std::vector< std::pair< clipper::Coord_orth, float > > get_diff_diff_map_peaks(int imol_diff_map, float screen_centre_x, float screen_centre_y, float screen_centre_z) const
coot::instanced_mesh_t get_rotamer_dodecs_instanced(int imol)
coot::simple_mesh_t get_gaussian_surface(int imol, float sigma, float contour_level, float box_radius, float grid_scale, float b_factor) const
std::vector< coot::geometry_distortion_info_pod_container_t > get_validation_vs_dictionary_for_selection(int imol, const std::string &selection_cid, bool include_non_bonded_contacts)
void clear_extra_restraints(int imol)
std::vector< positioned_atom_spec_t > get_atom_differences(int imol1, int imol2)
float fit_to_map_by_random_jiggle_using_cid(int imol, const std::string &cid, int n_trials, float translation_scale_factor)
void print_non_drawn_bonds(int imol) const
float fit_to_map_by_random_jiggle(int imol, const coot::residue_spec_t &res_spec, int n_trials, float translation_scale_factor)
bool is_valid_model_molecule(int imol) const
ltj_stats_t testing_interrogate_long_term_job()
Definition molecules-container.hh:3836
int servalcat_refine_xray(int imol, int imol_map, const std::string &output_prefix)
::api::cell_t get_cell(int imol) const
void set_use_torsion_restraints(bool state)
Definition molecules-container.hh:2830
void set_refinement_is_verbose(bool state)
Definition molecules-container.hh:2899
void clear()
Delete all molecules.
int get_monomer_from_dictionary(const std::string &comp_id, int imol, bool idealised_flag)
int generate_self_restraints(int imol, float local_dist_max)
int apply_transformation_to_atom_selection(int imol, const std::string &atoms_selection_cid, int n_atoms, float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22, float c0, float c1, float c2, float t0, float t1, float t2)
coot::acedrg_types_for_residue_t get_acedrg_atom_types_for_ligand(int imol, const std::string &residue_cid) const
int delete_hydrogen_atoms(int imol_model)
int copy_molecule(int imol)
std::vector< int > make_masked_maps_split_by_chain(int imol, int imol_map)
std::pair< int, unsigned int > delete_residue(int imol, const std::string &chain_id, int res_no, const std::string &ins_code)
void set_map_sampling_rate(float msr)
Set the map sampling rate.
Definition molecules-container.hh:1693
bool is_valid_map_molecule(int imol_map) const
void add_lsq_superpose_match(const std::string &chain_id_ref, int res_no_ref_start, int res_no_ref_end, const std::string &chain_id_mov, int res_no_mov_start, int res_no_mov_end, int match_type)
void set_colour_wheel_rotation_base(int imol, float r)
int import_cif_dictionary(const std::string &cif_file_name, int imol_enc)
void eigen_flip_ligand(int imol, const std::string &chain_id, int res_no, const std::string &ins_code)
coot::util::sfcalc_genmap_stats_t sfcalc_genmaps_using_bulk_solvent(int imol_model, int imol_2fofc_map, int imol_updating_difference_map, int imol_map_with_data_attached)
void associate_sequence(int imol, const std::string &name_or_chain_id, const std::string &sequence)
std::pair< int, coot::instanced_mesh_t > refine(int imol, int n_cycles)
texture_as_floats_t get_map_section_texture(int imol, int section_id, int axis, float data_value_for_bottom, float data_value_for_top) const
std::string get_torsions_for_residues_in_chain(int imol, const std::string &chain_id) const
std::pair< int, std::vector< merge_molecule_results_info_t > > merge_molecules(int imol, const std::string &list_of_other_molecules)
std::vector< std::pair< std::string, std::string > > get_computed_acedrg_atom_types(const std::string &compound_id, int imol_enc)
bool set_residue_properties(int imol, const std::string &json_string)
set the residue properties
coot::simple_mesh_t test_origin_cube() const
coot::molecule_t::histogram_info_t get_map_vertices_histogram(int imol, int imol_map_for_sampling, double position_x, double position_y, double position_z, float radius, float contour_level, unsigned int n_bins)
int refine_residues(int imol, const std::string &chain_id, int res_no, const std::string &ins_code, const std::string &alt_conf, const std::string &mode, int n_cycles)
void set_map_colour_saturation(int imol, float s)
bool copy_dictionary(const std::string &monomer_name, int imol_current, int imol_new)
void ray_trace_image(const std::string &json_str)
void set_user_defined_atom_colour_by_selection(int imol, const std::vector< std::pair< std::string, unsigned int > > &indexed_residues_cids, bool colour_applies_to_non_carbon_atoms_also)
std::string get_cif_file_name(const std::string &comp_id, int imol_enc) const
void add_target_position_restraint(int imol, const std::string &atom_cid, float pos_x, float pos_y, float pos_z)
std::pair< int, unsigned int > delete_atom(int imol, const std::string &chain_id, int res_no, const std::string &ins_code, const std::string &atom_name, const std::string &alt_conf)
void make_mesh_for_goodsell_style_for_blender(int imol, float colour_wheel_rotation_step, float saturation, float goodselliness)
blender
std::vector< coot::geometry_distortion_info_pod_container_t > get_ligand_validation_vs_dictionary(int imol, const std::string &ligand_cid, bool include_non_bonded_contacts)
coot::simple_mesh_t get_mesh_for_ligand_validation_vs_dictionary(int imol, const std::string &ligand_cid)
void set_rama_plot_restraints_weight(float f)
Definition molecules-container.hh:2820
void export_molecular_representation_as_gltf(int imol, const std::string &atom_selection_cid, const std::string &colour_scheme, const std::string &style, int secondary_structure_usage_flag, const std::string &file_name)
coot::instanced_mesh_t get_bonds_mesh_for_selection_instanced(int imol, const std::string &atom_selection_cid, const std::string &mode, bool against_a_dark_background, float bond_width, float atom_radius_to_bond_width_ratio, bool show_atoms_as_aniso_flag, bool show_aniso_atoms_as_ortep_flag, bool show_aniso_atoms_as_empty_flag, bool draw_hydrogen_atoms_flag, int smoothness_factor)
std::vector< std::string > get_residue_names_with_no_dictionary(int imol) const
void print_secondary_structure_info(int imol) const
float get_torsion_restraints_weight() const
Definition molecules-container.hh:2845
bool match_ligand_torsions_and_position_using_cid(int imol_ligand, int imol_ref, const std::string &cid)
coot::validation_information_t get_q_score(int imol_model, int imol_map) const
void set_gltf_pbr_metalicity_factor(int imol, float metalicity)
coot::molecule_t::rotamer_change_info_t change_to_previous_rotamer(int imol, const std::string &residue_cid, const std::string &alt_conf)
coot::validation_information_t ramachandran_analysis(int imol_model) const
std::vector< coot::residue_spec_t > residues_with_missing_atoms(int imol)
int get_monomer(const std::string &monomer_name)
int make_mask(int imol_map_ref, int imol_model, const std::string &atom_selection_cid, float radius)
void add_to_non_drawn_bonds(int imol, const std::string &atom_selection_cid)
void replace_residue(int imol, const std::string &residue_cid, const std::string &new_residue_type, int imol_enc)
std::string package_version() const
void M2T_updateFloatParameter(int imol, const std::string ¶m_name, float value)
Update float parameter for MoleculesToTriangles molecular mesh.
void export_chemical_features_as_gltf(int imol, const std::string &cid, const std::string &file_name) const
std::pair< int, unsigned int > delete_literal_using_cid(int imol, const std::string &cid)
int get_monomer_and_position_at(const std::string &comp_id, int imol, float x, float y, float z)
std::vector< fit_ligand_info_t > fit_ligand_multi_ligand(int imol_protein, int imol_map, const std::string &multi_ligand_molecule_number_list, float n_rmsd, bool use_conformers, unsigned int n_conformers)
void clear_residue_properties(int imol)
bool get_use_gemmi()
Get the state of using GEMMI for coordinates parsing.
Definition molecules-container.hh:425
float get_geman_mcclure_alpha() const
Definition molecules-container.hh:2909
std::string get_group_for_monomer(const std::string &residue_name) const
void set_add_waters_water_to_protein_distance_lim_min(float d)
Definition molecules-container.hh:2250
void clear_non_drawn_bonds(int imol)
std::vector< coot::atom_distance_t > get_distances_between_atoms_of_residues(int imol, const std::string &cid_res_1, const std::string &cid_res_2, float dist_max) const
void set_logging_level(const std::string &level)
bool shift_field_b_factor_refinement(int imol, int imol_with_data_attached)
void set_draw_missing_residue_loops(bool state)
int transform_map_using_lsq_matrix(int imol_map, lsq_results_t lsq_matrix, float x, float y, float z, float radius)
moorhen::header_info_t get_header_info(int imol) const
std::pair< int, std::string > change_chain_id(int imol, const std::string &from_chain_id, const std::string &to_chain_id, bool use_resno_range, int start_resno, int end_resno)
coot::instanced_mesh_t add_target_position_restraint_and_refine(int imol, const std::string &atom_cid, float pos_x, float pos_y, float pos_z, int n_cycles)
int rotate_around_bond(int imol, const std::string &residue_cid, const std::string &atom_name_1, const std::string &atom_name_2, const std::string &atom_name_3, const std::string &atom_name_4, double torsion_angle)
int replace_fragment(int imol_base, int imol_reference, const std::string &atom_selection)
bool make_backups_flag
the backup-enable state (raw public if needed/preferred)
Definition molecules-container.hh:439
ltj_stats_t long_term_job_stats
long term job
Definition molecules-container.hh:3816
std::string r_factor_stats_as_string(const r_factor_stats &rfs) const
void set_use_bespoke_carbon_atom_colour(int imol, bool state)
void testing_start_long_term_job(unsigned int n_seconds)
coot::validation_information_t peptide_omega_analysis(int imol_model) const
superpose_results_t SSM_superpose(int imol_ref, const std::string &chain_id_ref, int imol_mov, const std::string &chain_id_mov)
generic_3d_lines_bonds_box_t make_exportable_environment_bond_box(int imol, coot::residue_spec_t &spec, float max_dist)
float minimize(int imol, const std::string &atom_selection_cid, int n_cycles, bool do_rama_plot_restraints, float rama_plot_weight, bool do_torsion_restraints, float torsion_weight, bool refinement_is_quiet)
coot::simple_mesh_t get_bonds_mesh(int imol, const std::string &mode, bool against_a_dark_background, float bond_width, float atom_radius_to_bond_width_ratio, int smoothness_factor)
void fill_rotamer_probability_tables()
Fill the rotamer probability tables (currently not ARG and LYS)
std::pair< std::map< coot::residue_spec_t, coot::util::density_correlation_stats_info_t >, std::map< coot::residue_spec_t, coot::util::density_correlation_stats_info_t > > get_mmrrcc(int imol, const std::string &chain_id, unsigned int n_residue_per_residue_range, int imol_map) const
void set_base_colour_for_bonds(int imol, float r, float g, float b)
std::vector< float > get_vertices_for_blender(int imol)
Function for Blender interface.
std::pair< int, unsigned int > delete_residue_using_cid(int imol, const std::string &cid)
coot::instanced_mesh_t get_goodsell_style_mesh_instanced(int imol, float colour_wheel_rotation_step, float saturation, float goodselliness)
std::vector< std::pair< coot::residue_spec_t, std::string > > get_single_letter_codes_for_chain(int imol, const std::string &chain_id) const
float get_map_mean(int imol) const
coot::molecule_t::histogram_info_t get_map_histogram(int imol, unsigned int n_bins, float zoom_factor) const
coot::chain_mutation_info_container_t get_mutation_info(int imol) const
std::pair< std::map< coot::residue_spec_t, coot::util::density_correlation_stats_info_t >, std::map< coot::residue_spec_t, coot::util::density_correlation_stats_info_t > > mmrrcc(int imol, const std::string &chain_id, int imol_map) const
void set_user_defined_bond_colours(int imol, const std::map< unsigned int, std::array< float, 4 > > &colour_map)
User-defined colour-index to colour.
std::vector< coot::molecule_t::interesting_place_t > pepflips_using_difference_map(int imol_coords, int imol_difference_map, float n_sigma) const
int copy_fragment_using_residue_range(int imol, const std::string &chain_id, int res_no_start, int res_no_end)
std::string get_cif_restraints_as_string(const std::string &comp_id, int imol_enc) const
void fix_atom_selection_during_refinement(int imol, const std::string &atom_selection_cid)
std::vector< std::pair< std::string, std::string > > get_gphl_chem_comp_info(const std::string &compound_id, int imol_enc)
int add_compound(int imol, const std::string &tlc, int imol_dict, int imol_map, float x, float y, float z)
double get_sum_density_for_atoms_in_residue(int imol, const std::string &cid, const std::vector< std::string > &atom_names, int imol_map)
coot::instanced_mesh_t get_extra_restraints_mesh(int imol, int mode)
int mask_map_by_atom_selection(int imol_coords, int imol_map, const std::string &cid, float atom_radius, bool invert_flag)
coot::simple_mesh_t get_map_contours_mesh_using_other_map_for_colours(int imol_ref, int imol_map_for_colouring, double position_x, double position_y, double position_z, float radius, float contour_level, float other_map_for_colouring_min_value, float other_map_for_colouring_max_value, bool invert_colour_ramp)
float fit_to_map_by_random_jiggle_with_blur_using_cid(int imol, int imol_map, const std::string &cid, float b_factor, int n_trials, float translation_scale_factor)
coot::validation_information_t rotamer_analysis(int imol_model) const
void export_map_molecule_as_gltf(int imol, float pos_x, float pos_y, float pos_z, float radius, float contour_level, const std::string &file_name)
coot::atom_overlaps_dots_container_t get_overlap_dots_for_ligand(int imol, const std::string &cid_ligand)
void set_temperature_factors_using_cid(int imol, const std::string &cid, float temp_fact)
bool get_use_torsion_restraints() const
Definition molecules-container.hh:2835
std::vector< int > split_multi_model_molecule(int imol)
coot::validation_information_t ramachandran_analysis_for_chain(int imol_model, const std::string &chain_id) const
coot::simple_mesh_t get_rotamer_dodecs(int imol)
coot::util::sfcalc_genmap_stats_t get_latest_sfcalc_stats() const
Definition molecules-container.hh:1993
void generate_chain_self_restraints(int imol, float local_dist_max, const std::string &chain_id)
coot::atom_spec_t atom_cid_to_atom_spec(int imol, const std::string &cid) const
void assign_sequence(int imol_model, int imol_map)
std::pair< int, double > get_torsion(int imol, const std::string &cid, const std::vector< std::string > &atom_names)
int gaussian_surface_to_map_molecule(int imol_map_ref, int imol_model, const std::string &cid, float sigma, float box_radius, float fft_b_factor)
void print_colour_rules(int imol) const
int pyrogen_from_SMILES(const std::string &smiles_string, const std::string &compound_id)
void set_logging_file(const std::string &file_name)
std::string get_molecule_selection_as_json(int imol, const std::string &cid) const
std::pair< int, double > get_ligand_distortion(int imol, const std::string &ligand_cid, bool include_non_bonded_contacts)
int mmcif_tests(bool last_test_only)
std::vector< std::pair< std::string, std::string > > get_sequence_info(int imol) const
std::vector< int > get_dictionary_conformers(const std::string &comp_id, int imol_enc, bool remove_internal_clash_conformers)
void geometry_init_standard()
Read the standard list of residues.
int rail_points_total() const
std::pair< int, unsigned int > delete_residue_atoms_using_cid(int imol, const std::string &cid)
void multiply_residue_temperature_factors(int imol, const std::string &cid, float factor)
std::vector< std::string > get_chains_in_model(int imol) const
std::vector< coot::molecule_t::interesting_place_t > difference_map_peaks(int imol_map, int imol_protein, float n_rmsd) const
int average_map(const std::string &imol_maps, std::vector< float > &scales)
void make_mesh_for_molecular_representation_for_blender(int imol, const std::string &cid, const std::string &colour_scheme, const std::string &style, int secondary_structure_usage_flag)
std::vector< moorhen::h_bond > get_h_bonds(int imol, const std::string &cid_str, bool mcdonald_and_thornton_mode) const
std::vector< coot::residue_spec_t > get_residues_near_residue(int imol, const std::string &residue_cid, float dist) const
float get_suggested_initial_contour_level(int imol) const
int imol_refinement_map
Definition molecules-container.hh:402
int get_number_of_map_sections(int imol_map, int axis_id) const
bool try_read_dictionaries_for_new_residue_types(int imol)
int new_positions_for_residue_atoms(int imol, const std::string &residue_cid, std::vector< coot::api::moved_atom_t > &moved_atoms)
void generate_local_self_restraints(int imol, float local_dist_max, const std::string &residue_cids)
void init_refinement_of_molecule_as_fragment_based_on_reference(int imol_frag, int imol_ref, int imol_map)
std::string molecule_to_PDB_string(int imol) const
int auto_fit_rotamer(int imol, const std::string &chain_id, int res_no, const std::string &ins_code, const std::string &alt_conf, int imol_map)
std::pair< int, unsigned int > delete_residue_atoms_with_alt_conf(int imol, const std::string &chain_id, int res_no, const std::string &ins_code, const std::string &alt_conf)
void set_torsion_restraints_weight(float f)
Definition molecules-container.hh:2840
void add_named_glyco_tree(int imol_model, int imol_map, const std::string &glycosylation_name, const std::string &asn_chain_id, int asn_res_no)
void export_model_molecule_as_gltf(int imol, const std::string &selection_cid, const std::string &mode, bool against_a_dark_background, float bonds_width, float atom_radius_to_bond_width_ratio, int smoothness_factor, bool draw_hydrogen_atoms_flag, bool draw_missing_residue_loops, const std::string &file_name)
std::string file_name_to_string(const std::string &file_name) const
coot::instanced_mesh_t get_bonds_mesh_instanced(int imol, const std::string &mode, bool against_a_dark_background, float bond_width, float atom_radius_to_bond_width_ratio, bool show_atoms_as_aniso_flag, bool show_aniso_atoms_as_ortep_flag, bool show_aniso_atoms_as_empty, bool draw_hydrogen_atoms_flag, int smoothness_factor)
bool match_ligand_torsions_and_position(int imol_ligand, int imol_ref, const std::string &chain_id_ref, int resno_ref)
void eigen_flip_ligand_using_cid(int imol, const std::string &residue_cid)
void ray_trace_shutdown()
Shut down the OSPRay ray-tracing engine.
std::pair< int, std::string > get_active_atom(float x, float y, float z, const std::string &displayed_model_molecules_list) const
int mutate(int imol, const std::string &cid, const std::string &new_residue_type)
void add_parallel_plane_restraint(int imol, const std::string &residue_cid_1, const std::string &residue_cid_2)
void set_show_timings(bool s)
Definition molecules-container.hh:504
void set_bespoke_carbon_atom_colour(int imol, const coot::colour_t &col)
int flood(int imol_model, int imol_map, float n_rmsd)
int make_power_scaled_map(int imol_ref, int imol_map_for_scaling)
void set_add_waters_variance_limit(float d)
Definition molecules-container.hh:2264
void delete_colour_rules(int imol)
coot::simple_mesh_t get_chemical_features_mesh(int imol, const std::string &cid) const
std::string jed_flip(int imol, const std::string &atom_cid, bool invert_selection)
std::vector< std::string > non_standard_residue_types_in_model(int imol) const
float get_density_at_position(int imol_map, float x, float y, float z) const
std::vector< coot::residue_spec_t > get_non_standard_residues_in_molecule(int imol) const
int read_coordinates(const std::string &file_name)
std::string pae_png(const std::string &pae_file_name) const
std::string get_hb_type(const std::string &compound_id, int imol_enc, const std::string &atom_name) const
std::string get_residue_type(int imol, const std::string &cid) const
int flip_hand(int imol_map)
coot::simple_mesh_t get_gaussian_surface_for_atom_selection(int imol, const std::string &cid, float sigma, float contour_level, float box_radius, float grid_scale, float b_factor) const
int refine_residues_using_atom_cid(int imol, const std::string &cid, const std::string &mode, int n_cycles)
std::vector< fit_ligand_info_t > fit_ligand(int imol_protein, int imol_map, int imol_ligand, float n_rmsd, bool use_conformers, unsigned int n_conformers)
void associate_data_mtz_file_with_map(int imol, const std::string &data_mtz_file_name, const std::string &f_col, const std::string &sigf_col, const std::string &free_r_col)
std::string get_residue_name(int imol, const std::string &chain_id, int res_no, const std::string &ins_code) const
void make_mesh_for_gaussian_surface_for_blender(int imol, float sigma, float contour_level, float box_radius, float grid_scale, float b_factor)
Function for Blender interface.
void set_max_number_of_threads_in_thread_pool(unsigned int n_threads)
std::string get_rdkit_mol_pickle_base64(const std::string &residue_name, int imol_enc)
bool match_ligand_torsions(int imol_ligand, int imol_ref, const std::string &chain_id_ref, int resno_ref)
coot::molecule_t::rotamer_change_info_t change_to_first_rotamer(int imol, const std::string &residue_cid, const std::string &alt_conf)
void set_refinement_geman_mcclure_alpha(float a)
Definition molecules-container.hh:2904
float get_map_sampling_rate()
Definition molecules-container.hh:1685
std::vector< coot::atom_spec_t > find_water_baddies(int imol_model, int imol_map, float b_factor_lim, float outlier_sigma_level, float min_dist, float max_dist, bool ignore_part_occ_contact_flag, bool ignore_zero_occ_flag)
void set_molecule_name(int imol, const std::string &new_name)
std::vector< auto_read_mtz_info_t > auto_read_mtz(const std::string &file_name)
std::vector< glm::vec4 > get_colour_table(int imol, bool against_a_dark_background) const
int replace_map_by_mtz_from_file(int imol, const std::string &file_name, const std::string &f, const std::string &phi, const std::string &weight, bool use_weight)
void set_map_is_contoured_with_thread_pool(bool state)
mmdb::Residue * get_residue_using_cid(int imol, const std::string &cid) const
double get_radius_of_gyration(int imol) const
int fill_partial_residues(int imol)
bool delete_all_carbohydrate(int imol)
int write_coordinates(int imol, const std::string &file_name) const
bool regen_map(int imol_map, const std::string &imol_maps, const std::vector< float > &scales)
int copy_fragment_using_cid(int imol, const std::string &multi_cid)
void make_mesh_for_bonds_for_blender(int imol, const std::string &mode, bool against_a_dark_background, float bond_width, float atom_radius_to_bond_width_ratio, int smoothness_factor)
Function for Blender interface.
void end_delete_closed_molecules()
int read_small_molecule_cif(const std::string &file_name)
int add_terminal_residue_directly_using_cid(int imol, const std::string &cid)
void display_molecule_names_table() const
Debugging function: display the table of molecule and names.
void add_lsq_superpose_atom_match(const std::string &chain_id_ref, int res_no_ref, const std::string &atom_name_ref, const std::string &chain_id_mov, int res_no_mov, const std::string &atom_name_mov)
float get_map_rmsd_approx(int imol_map) const
coot::simple_mesh_t make_mesh_from_gltf_file(const std::string &file_name)
std::vector< mr_solution_t > molecular_placement_fit(int imol_map, int imol_model, float x, float y, float z, int n_rotation_solutions=10, int n_translation_solutions=10)
int get_imol_enc_any() const
int sharpen_blur_map_with_resample(int imol_map, float b_factor, float resample_factor, bool in_place_flag)
std::pair< int, std::string > add_terminal_residue_directly(int imol, const std::string &chain_id, int res_no, const std::string &ins_code)
mmdb::Atom * get_atom_using_cid(int imol, const std::string &cid) const
unsigned int get_number_of_molecules() const
Definition molecules-container.hh:451
coot::validation_information_t get_q_score_for_cid(int imol_model, const std::string &cid, int imol_map) const
std::pair< float, float > get_mean_and_variance_of_density_for_non_water_atoms(int imol_coords, int imol_map) const
std::vector< coot::plain_atom_overlap_t > get_atom_overlaps(int imol)
Get Atom Overlaps.
std::vector< int > fit_ligand_right_here(int imol_protein, int imol_map, int imol_ligand, float x, float y, float z, float n_rmsd, bool use_conformers, unsigned int n_conformers)
bool get_make_backups() const
Definition molecules-container.hh:436
std::vector< int > partition_map_by_chain(int imol_map, int imol_model)
float get_spherical_variance(int imol_map, int imol_model, const std::string &atom_cid, float mean_density_other_atoms) const
int gaussian_surface_to_map_molecule_v2(int imol, const std::string &cid, float sigma, float box_radius, float grid_scale, float fft_b_factor)
int get_number_of_hydrogen_atoms(int imol) const
std::vector< double > get_residue_CA_position(int imol, const std::string &cid) const
int refine_residue_range(int imol, const std::string &chain_id, int res_no_start, int res_no_end, int n_cycles)
int new_molecule(const std::string &name)
coot::molecule_t::rotamer_change_info_t change_to_next_rotamer(int imol, const std::string &residue_cid, const std::string &alt_conf)
std::string get_pucker_analysis_info(int imol) const
double test_thread_pool_threads(unsigned int n_threads)
std::vector< float > get_colour_table_for_blender(int imol)
Function for Blender interface.
int copy_fragment_for_refinement_using_cid(int imol, const std::string &multi_cid)
float get_temperature_factor_of_atom(int imol, const std::string &atom_cid) const
int calculate_new_rail_points()
coot::residue_spec_t residue_cid_to_residue_spec(int imol, const std::string &cid) const
r_factor_stats get_r_factor_stats()
coot::simple_mesh_t get_ramachandran_validation_markup_mesh(int imol) const
int read_extra_restraints(int imol, const std::string &file_name)
void set_use_gemmi(bool state)
Definition molecules-container.hh:422
coot::instanced_mesh_t contact_dots_for_ligand(int imol, const std::string &cid, unsigned int smoothness_factor) const
void set_map_colour(int imol, float r, float g, float b)
int cis_trans_convert(int imol, const std::string &atom_cid)
int read_mtz(const std::string &file_name, const std::string &f, const std::string &phi, const std::string &weight, bool use_weight, bool is_a_difference_map)
Read the given mtz file.
std::string get_SMILES_for_residue_type(const std::string &residue_name, int imol_enc) const
int get_number_of_atoms_in_residue(int imol, const std::string &residue_cid) const
coot::symmetry_info_t get_symmetry(int imol, float symmetry_search_radius, float centre_x, float centre_y, float centre_z) const
molecules_container_t(bool verbose=true)
the one and only constructor
int close_molecule(int imol)
bool match_ligand_position(int imol_ligand, int imol_ref, const std::string &chain_id_ref, int resno_ref)
void testing_stop_long_term_job()
void clear_target_position_restraints(int imol)
float get_rama_plot_restraints_weight() const
Definition molecules-container.hh:2825
std::vector< std::string > get_types_in_molecule(int imol) const
get types
std::pair< int, unsigned int > delete_atom_using_cid(int imol, const std::string &cid)
coot::validation_information_t density_fit_analysis(int imol_model, int imol_map) const
lsq_results_t get_lsq_matrix(int imol_ref, int imol_mov, bool summary_to_screen) const
int fill_partial_residue(int imol, const std::string &chain_id, int res_no, const std::string &ins_code)
std::string get_molecule_name(int imol) const
void scale_map(int imol_map, float scale_factor)
bool is_EM_map(int imol) const
int set_residue_to_rotamer_number(int imol, const std::string &residue_cid, const std::string &alt_conf, int rotamer_number)
std::string get_svg_for_2d_ligand_environment_view(int imol, const std::string &residue_cid, bool add_key)
void clear_target_position_restraint(int imol, const std::string &atom_cid)
coot::simple_mesh_t get_octahemisphere(unsigned int n_divisions) const
unsigned int get_number_of_atoms(int imol) const
int read_pdb(const std::string &file_name)
int add_hydrogen_atoms(int imol_model)
std::vector< double > get_residue_average_position(int imol, const std::string &cid) const
int pyrogen_from_ccd_file(const std::string &ccd_file_name)
float get_median_temperature_factor(int imol) const
bool contains_unsaved_models() const
bool lsq_superpose(int imol_ref, int imol_mov)
std::vector< coot::plain_atom_overlap_t > get_overlaps_for_ligand(int imol, const std::string &cid_ligand)
Gat Atom Overlaps for a ligand or residue.
std::vector< std::vector< std::string > > get_ncs_related_chains(int imol) const
float get_map_weight() const
Definition molecules-container.hh:474
void set_add_waters_water_to_protein_distance_lim_max(float d)
Definition molecules-container.hh:2257
double test_launching_threads(unsigned int n_threads_per_batch, unsigned int n_batches) const
void clear_lsq_matches()
Clear any existing lsq matchers.
int sharpen_blur_map(int imol_map, float b_factor, bool in_place_flag)
bool is_a_difference_map(int imol_map) const
void add_colour_rule(int imol, const std::string &selection_cid, const std::string &colour)
Add a colour rule for M2T representations.
std::pair< bool, clipper::Coord_orth > go_to_blob(float x1, float y1, float z1, float x2, float y2, float z2, float contour_level)
int move_molecule_to_new_centre(int imol, float x, float y, float z)
void turn_off_when_close_target_position_restraint(int imol)
int servalcat_refine_xray_with_keywords(int imol, int imol_map, const std::string &output_prefix, const nanobind::dict &key_value_pairs)
void set_make_backups(bool state)
Definition molecules-container.hh:431
int pyrogen_from_rdkit_mol_pickle_base64(const std::string &rdkit_mol_pickled_string, const std::string &compound_id)
double test_the_threading(int n_threads)
std::vector< coot::phi_psi_prob_t > ramachandran_validation(int imol) const
std::pair< int, unsigned int > delete_side_chain(int imol, const std::string &chain_id, int res_no, const std::string &ins_code)
int side_chain_180(int imol, const std::string &atom_cid)
coot::validation_information_t density_correlation_analysis(int imol_model, int imol_map) const
void write_png(const std::string &compound_id, int imol, const std::string &file_name) const
bool apply_translation_to_molecule(int imol, float tx, float ty, float tz)
coot::util::map_molecule_centre_info_t get_map_molecule_centre(int imol) const
void sfcalc_genmap(int imol_model, int imol_map_with_data_attached, int imol_updating_difference_map)
std::pair< int, unsigned int > delete_side_chain_using_cid(int imol, const std::string &cid)
coot::simple::molecule_t get_simple_molecule(int imol, const std::string &residue_cid, bool draw_hydrogen_atoms_flag)
int read_ccp4_map(const std::string &file_name, bool is_a_difference_map)
coot::atom_overlaps_dots_container_t get_overlap_dots(int imol)
int change_alt_locs(int imol, const std::string &cid, const std::string &change_mode)
void set_map_weight(float w)
Definition molecules-container.hh:469
coot::simple_mesh_t get_map_contours_mesh(int imol, double position_x, double position_y, double position_z, float radius, float contour_level)
void ray_trace_init()
Initialise the OSPRay ray-tracing engine. Call this before ray_trace_image().
void set_gltf_pbr_roughness_factor(int imol, float roughness_factor)
std::vector< std::pair< double, double > > fourier_shell_correlation(int imol_map_1, int imol_map_2) const
std::string get_eigenvectors_and_eigenvalues(int imol, const std::string &cid)
int new_positions_for_atoms_in_residues(int imol, const std::vector< coot::api::moved_residue_t > &moved_residues)
float get_molecule_diameter(int imol) const
std::vector< std::pair< std::string, std::string > > get_acedrg_atom_types(const std::string &compound_id, int imol_enc) const
std::string get_svg_for_residue_type(int imol, const std::string &comp_id, bool use_rdkit_svg, const std::string &background_type)
void accept_rotamer_probability_tables_compressed_data(const std::string &data_stream)
std::vector< coot::molecule_t::interesting_place_t > get_interesting_places(int imol, const std::string &mode) const
std::vector< std::pair< std::string, std::string > > get_colour_rules(int imol) const
int connect_updating_maps(int imol_model, int imol_with_data_info_attached, int imol_map_2fofc, int imol_map_fofc)
std::string get_data_set_file_name(int imol) const
coot::instanced_mesh_t get_HOLE(int imol, float start_pos_x, float start_pos_y, float start_pos_z, float end_pos_x, float end_pos_y, float end_pos_z) const
coot::simple_mesh_t get_molecular_representation_mesh(int imol, const std::string &cid, const std::string &colour_scheme, const std::string &style, int secondary_structure_usage_flag)
double get_contouring_time() const
Definition molecules-container.hh:3841
coot::instanced_mesh_t all_molecule_contact_dots(int imol, unsigned int smoothness_factor) const
std::vector< double > get_eigenvalues(int imol, const std::string &chain_id, int res_no, const std::string &ins_code)
int flip_peptide_using_cid(int imol, const std::string &atom_cid, const std::string &alt_conf)
std::vector< coot::molecule_t::interesting_place_t > unmodelled_blobs(int imol_model, int imol_map, float rmsd_cut_off) const
int make_ensemble(const std::string &model_molecules_list)
void clear_refinement(int imol)
void pop_back()
Delete the most recent/last molecule in the molecule vector.
std::vector< coot::residue_range_t > get_missing_residue_ranges(int imol) const
void replace_molecule_by_model_from_file(int imol, const std::string &pdb_file_name)
coot::simple_mesh_t get_map_cap_mesh(int imol, float contour_level, double base_point_x, double base_point_y, double base_point_z, double x_axis_x, double x_axis_y, double x_axis_z, double y_axis_x, double y_axis_y, double y_axis_z, double x_axis_step_size, double y_axis_step_size, unsigned int n_x_axis_points, unsigned int n_y_axis_points)
void make_mesh_for_map_contours_for_blender(int imol, float x, float y, float z, float level, float radius)
Function for Blender interface.
void create_empty_molecules(unsigned int n_empty)
std::string rebox_map(int imol_model, const std::string &atom_selection_cid, int imol_map, float border, unsigned int n_pixels_per_edge)
void M2T_updateIntParameter(int imol, const std::string ¶m_name, int value)
Update int parameter for MoleculesToTriangles molecular mesh.
int split_residue_using_map(int imol, const std::string &residue_cid, int imol_diff_map)
void set_add_waters_sigma_cutoff(float d)
Definition molecules-container.hh:2271
std::vector< std::string > get_groups_for_monomers(const std::vector< std::string > &residue_names) const
std::vector< int > get_triangles_for_blender(int imol)
Function for Blender interface.
bool residue_is_nucleic_acid(int imol, const std::string &cid) const
int write_map(int imol, const std::string &file_name) const
void set_occupancy(int imol, const std::string &cid, float occ_new)
int add_alternative_conformation(int imol_model, const std::string &cid)
bool get_use_rama_plot_restraints() const
Definition molecules-container.hh:2815
void save_unsaved_model_changes()
Save the unsaved model - this function has not yet been written!
float get_atom_overlap_score(int imol)
std::pair< int, unsigned int > delete_using_cid(int imol, const std::string &cid, const std::string &scope)
int read_amber_trajectory(int imol_coords, const std::string &trajectory_file_name, int start_frame, int end_frame, int stride)
int add_terminal_residue_directly_using_bucca_ml_growing_using_cid(int imol, const std::string &cid)
coot::Cartesian get_molecule_centre(int imol) const
int add_waters(int imol_model, int imol_map)
void add_colour_rules_multi(int imol, const std::string &selections_and_colours_combo_string)
int rigid_body_fit(int imol, const std::string &multi_cid, int imol_map)
int add_terminal_residue_directly_using_bucca_ml_growing(int imol, const coot::residue_spec_t &spec)
superposition results
Definition superpose-results.hh:6
int imol
molecule index of the placed model (-1 if not written)
Definition molecules-container.hh:2450
float rotation_score
rotation function score
Definition molecules-container.hh:2446
float translation_score
translation function sigma score
Definition molecules-container.hh:2448
float mean_density_at_ca
mean map density at CA (protein) and C1' (nucleic acid) positions
Definition molecules-container.hh:2449
clipper::Coord_orth translation
position in map coordinates
Definition molecules-container.hh:2447
glm::quat rotation
orientation (quaternion)
Definition molecules-container.hh:2445
std::string pdb_filename
filename of the written PDB
Definition molecules-container.hh:2451