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 "saved-strand-info.hh"
41#include "svg-store-key.hh"
42#include "moorhen-h-bonds.hh"
43#include "header-info.hh"
44#include "positioned-atom-spec.hh"
45#include "user-defined-colour-table.hh"
50 std::vector<coot::molecule_t> molecules;
51 coot::protein_geometry geom;
52 coot::rotamer_probability_tables rot_prob_tables;
53 ramachandrans_container_t ramachandrans_container;
54 static std::atomic<bool> on_going_updating_map_lock;
55 bool draw_missing_residue_loops_flag;
59 int model_rail_points_delta;
60 int map_rail_points_delta;
61 float rmsd_of_difference_map;
62 explicit rail_points_t(
float rmsd) {
63 model_rail_points_delta = 0;
64 map_rail_points_delta = 0;
65 rmsd_of_difference_map = rmsd;
67 rail_points_t(
float rmsd_diff_map_current,
const rail_points_t &rail_points_prev) {
68 model_rail_points_delta = 0;
69 rmsd_of_difference_map = rmsd_diff_map_current;
70 map_rail_points_delta = rail_points_delta(rail_points_prev);
72 int rail_points_delta(
const rail_points_t &prev) {
74 return int(100000.0 * fudge * (prev.rmsd_of_difference_map - rmsd_of_difference_map));
76 static int total(
const std::vector<rail_points_t> &rail_point_history) {
78 for (
const auto &item : rail_point_history) {
79 sum += item.map_rail_points_delta;
84 std::vector<rail_points_t> rail_point_history;
86 class updating_maps_info_f {
88 bool maps_need_an_update;
92 int imol_with_data_info_attached;
93 updating_maps_info_f() {
94 maps_need_an_update =
false;
98 imol_with_data_info_attached = -1;
101#ifdef SKIP_FOR_PYTHON_DOXYGEN
108 updating_maps_info_f updating_maps_info;
109 void set_updating_maps_need_an_update(
int imol);
116 void update_updating_maps(
int imol);
137 static clipper::Xmap<float> *dummy_xmap;
139 float geman_mcclure_alpha;
141 bool use_rama_plot_restraints;
142 float rama_plot_restraints_weight;
144 bool use_torsion_restraints;
145 float torsion_restraints_weight;
147 ctpl::thread_pool thread_pool;
150 coot::restraints_container_t *last_restraints;
151 bool continue_threaded_refinement_loop;
152 bool refinement_is_quiet;
153 int cif_dictionary_read_number;
158 std::string adjust_refinement_residue_name(
const std::string &resname)
const;
159#ifdef DOXYGEN_SHOULD_PARSE_THIS
161 bool make_last_restraints(
const std::vector<std::pair<bool,mmdb::Residue *> > &local_residues,
162 const std::vector<mmdb::Link> &links,
163 const coot::protein_geometry &geom,
164 mmdb::Manager *mol_for_residue_selection,
165 const std::vector<coot::atom_spec_t> &fixed_atom_specs,
166 coot::restraint_usage_Flags flags,
168 const clipper::Xmap<float> *xmap_p);
169 coot::refinement_results_t refine_residues_vec(
int imol,
170 const std::vector<mmdb::Residue *> &residues,
171 const std::string &alt_conf,
174 atom_selection_container_t make_moving_atoms_asc(mmdb::Manager *residues_mol,
175 const std::vector<mmdb::Residue *> &residues)
const;
177 int find_serial_number_for_insert(
int seqnum_new,
178 const std::string &ins_code_for_new,
179 mmdb::Chain *chain_p)
const;
185 std::pair<int, std::vector<std::string> >
186 check_dictionary_for_residue_restraints(
int imol, mmdb::PResidue *SelResidues,
int nSelResidues);
188 std::pair<int, std::vector<std::string> >
189 check_dictionary_for_residue_restraints(
int imol,
const std::vector<mmdb::Residue *> &residues);
191 std::pair<mmdb::Manager *, std::vector<mmdb::Residue *> >
192 create_mmdbmanager_from_res_vector(
const std::vector<mmdb::Residue *> &residues,
194 mmdb::Manager *mol_in,
195 std::string alt_conf);
198 coot::refinement_results_t
199 generate_molecule_and_refine(
int imol,
200 const std::vector<mmdb::Residue *> &residues,
201 const std::string &alt_conf,
203 bool use_map_flag=
true);
205 static void thread_for_refinement_loop_threaded();
207 static std::atomic<bool> restraints_lock;
208 static void get_restraints_lock(
const std::string &calling_function_name);
209 static void release_restraints_lock(
const std::string &calling_function_name);
210 static std::string restraints_locking_function_name;
212 bool particles_have_been_shown_already_for_this_round_flag;
214#ifdef DOXYGEN_SHOULD_PARSE_THIS
216 int servalcat_refine_xray_internal(
int imol,
int imol_map,
const std::string &output_prefix,
217 const std::map<std::string, std::string> &key_value_pairs);
221#ifdef SKIP_FOR_PYTHON_DOXYGEN
227 std::pair<short int, clipper::RTop_orth> get_lsq_matrix_internal(
int imol_ref,
int imol_mov,
bool summary_to_screen)
const;
231 get_q_score_validation_information(mmdb::Manager *mol,
int udd_q_score,
bool do_per_atom)
const;
236 bool refinement_immediate_replacement_flag =
true;
237 int imol_moving_atoms;
238 enum moving_atoms_asc_t {
239 NEW_COORDS_UNSET = 0,
241 NEW_COORDS_REPLACE = 2,
242 NEW_COORDS_REPLACE_CHANGE_ALTCONF = 3,
243 NEW_COORDS_INSERT = 4,
244 NEW_COORDS_INSERT_CHANGE_ALTCONF = 5};
245 short int moving_atoms_asc_type;
247#ifdef DOXYGEN_SHOULD_PARSE_THIS
249 static void all_atom_pulls_off();
250 static std::vector<atom_pull_info_t> atom_pulls;
253 static void atom_pulls_off(
const std::vector<coot::atom_spec_t> &specs);
256#ifdef DOXYGEN_SHOULD_PARSE_THIS
258 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;
270#ifdef DOXYGEN_SHOULD_PARSE_THIS
273 int refine_direct(
int imol, std::vector<mmdb::Residue *> rv,
const std::string &alt_loc,
int n_cycles);
276 double phi_psi_probability(
const coot::util::phi_psi_t &phi_psi,
const ramachandrans_container_t &rc)
const;
279#ifdef SKIP_FOR_PYTHON_DOXYGEN
282 void read_standard_residues();
284 std::map<svg_store_key_t, std::string> ligand_svg_store;
286 atom_selection_container_t standard_residues_asc;
289#ifdef DOXYGEN_SHOULD_PARSE_THIS
292 coot::graph_match_info_t overlap_ligands_internal(
int imol_ligand,
int imol_ref,
const std::string &chain_id_ref,
293 int resno_ref,
bool apply_rtop_flag);
298 superpose_with_atom_selection(atom_selection_container_t asc_ref,
299 atom_selection_container_t asc_mov,
301 std::string moving_mol_name,
302 std::string reference_mol_name,
303 bool move_copy_of_imol2_flag);
308 void print_ssm_sequence_alignment(ssm::Align *SSMAlign,
309 atom_selection_container_t asc_ref,
310 atom_selection_container_t asc_mov,
311 mmdb::PAtom *atom_selection1,
312 mmdb::PAtom *atom_selection2,
313 int n_selected_atoms_1,
int n_selected_atoms_2,
314 bool move_copy_of_imol2_flag);
317 make_ssm_sequence_alignment_as_validation_information(ssm::Align *SSMAlign,
318 atom_selection_container_t asc_ref,
319 atom_selection_container_t asc_mov,
320 mmdb::PAtom *atom_selection1, mmdb::PAtom *atom_selection2,
321 int n_selected_atoms_1,
int n_selected_atoms_2,
322 bool move_copy_of_imol2_flag);
324 void make_and_print_horizontal_ssm_sequence_alignment(ssm::Align *SSMAlign,
325 atom_selection_container_t asc_ref,
326 atom_selection_container_t asc_mov,
327 mmdb::PAtom *atom_selection1,
328 mmdb::PAtom *atom_selection2,
329 int n_selected_atoms_1,
int n_selected_atoms_2)
const;
331 void map_secondary_structure_headers(ssm::Align *SSMAlign,
332 atom_selection_container_t asc_ref,
333 atom_selection_container_t asc_mov,
334 mmdb::PAtom *atom_selection1,
335 mmdb::PAtom *atom_selection2,
336 int n_selected_atoms_1,
int n_selected_atoms_2)
const;
338 std::pair<std::string, std::string>
339 get_horizontal_ssm_sequence_alignment(ssm::Align *SSMAlign,
340 atom_selection_container_t asc_ref,
341 atom_selection_container_t asc_mov,
342 mmdb::PAtom *atom_selection1, mmdb::PAtom *atom_selection2,
343 int n_selected_atoms_1,
int n_selected_atoms_2)
const;
346 std::vector<std::pair<coot::residue_validation_information_t, coot::residue_validation_information_t> >
347 get_pairs(ssm::Align *SSMAlign,
348 atom_selection_container_t asc_ref,
349 atom_selection_container_t asc_mov,
350 mmdb::PAtom *atom_selection1, mmdb::PAtom *atom_selection2,
351 int n_selected_atoms_1,
int n_selected_atoms_2)
const;
354 void print_horizontal_ssm_sequence_alignment(std::pair<std::string, std::string> aligned_sequences)
const;
356 std::string generate_horizontal_ssm_sequence_alignment_string(
const std::pair<std::string, std::string> &aligned_sequences)
const;
360#ifdef SKIP_FOR_PYTHON_DOXYGEN
363 int valid_labels(
const std::string &mtz_file_name,
const std::string &f_col,
const std::string &phi_col,
364 const std::string &weight_col,
int use_weights)
const;
367 float ligand_water_to_protein_distance_lim_max;
368 float ligand_water_to_protein_distance_lim_min;
369 float ligand_water_variance_limit;
370 float ligand_water_sigma_cut_off;
373 unsigned int max_number_of_simple_mesh_vertices;
376#ifdef SKIP_FOR_PYTHON_DOXYGEN
381#ifdef SKIP_FOR_PYTHON_DOXYGEN
386 bool map_is_contoured_using_thread_pool_flag;
387 double contouring_time;
597 std::vector<double>
get_eigenvalues(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code);
606#ifdef DOXYGEN_SHOULD_PARSE_THIS
613#ifdef DOXYGEN_SHOULD_PARSE_THIS
616 mmdb::Manager *get_mol(
unsigned int imol)
const;
654#ifdef MAKE_ENHANCED_LIGAND_TOOLS
750 std::pair<int, std::string>
get_active_atom(
float x,
float y,
float z,
const std::string &displayed_model_molecules_list)
const;
781 bool copy_dictionary(
const std::string &monomer_name,
int imol_current,
int imol_new);
819 std::map<std::string, std::string>
853 std::string
get_hb_type(
const std::string &compound_id,
int imol_enc,
const std::string &atom_name)
const;
871 std::vector<std::pair<std::string, std::string> >
get_acedrg_atom_types(
const std::string &compound_id,
int imol_enc)
const;
894 void write_png(
const std::string &compound_id,
int imol,
const std::string &file_name)
const;
928 bool against_a_dark_background,
929 float bond_width,
float atom_radius_to_bond_width_ratio,
930 int smoothness_factor);
950 bool against_a_dark_background,
951 float bond_width,
float atom_radius_to_bond_width_ratio,
952 bool show_atoms_as_aniso_flag,
953 bool show_aniso_atoms_as_ortep_flag,
954 bool draw_hydrogen_atoms_flag,
955 int smoothness_factor);
963 const std::string &mode,
964 bool against_a_dark_background,
965 float bond_width,
float atom_radius_to_bond_width_ratio,
966 bool show_atoms_as_aniso_flag,
967 bool show_aniso_atoms_as_ortep_flag,
968 bool draw_hydrogen_atoms_flag,
969 int smoothness_factor);
980 float saturation,
float goodselliness);
994 const std::string &file_name);
1004 const std::string &selection_cid,
1005 const std::string &mode,
1006 bool against_a_dark_background,
1007 float bonds_width,
float atom_radius_to_bond_width_ratio,
int smoothness_factor,
1008 bool draw_hydrogen_atoms_flag,
bool draw_missing_residue_loops,
1009 const std::string &file_name);
1022 const std::string &colour_scheme,
const std::string &style,
1023 int secondary_structure_usage_flag,
1024 const std::string &file_name);
1029 const std::string &file_name)
const;
1088 bool colour_applies_to_non_carbon_atoms_also);
1091 void add_colour_rule(
int imol,
const std::string &selection_cid,
const std::string &colour);
1142 const std::string &style,
int secondary_structure_usage_flag);
1155 float box_radius,
float grid_scale,
float b_factor)
const;
1189#ifdef DOXYGEN_SHOULD_PARSE_THIS
1200 std::pair<bool, coot::Cartesian> get_atom_position(
int imol,
coot::atom_spec_t &atom_spec);
1295 std::string
get_residue_name(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code)
const;
1314#ifdef DOXYGEN_SHOULD_PARSE_THIS
1323 coot::util::missing_atom_info missing_atoms_info_raw(
int imol);
1347 std::vector<coot::atom_distance_t>
1349 float dist_max)
const;
1360 int imol_mov,
const std::string &chain_id_mov);
1372 const std::string &chain_id_mov,
int res_no_mov_start,
int res_no_mov_end,
1384 const std::string &chain_id_mov,
int res_no_mov,
const std::string &atom_name_mov);
1389 std::vector<coot::lsq_range_match_info_t> lsq_matchers;
1418 lsq_results_t
get_lsq_matrix(
int imol_ref,
int imol_mov,
bool summary_to_screen)
const;
1423 coot::symmetry_info_t
1424 get_symmetry(
int imol,
float symmetry_search_radius,
float centre_x,
float centre_y,
float centre_z)
const;
1463 std::pair<int, double>
get_torsion(
int imol,
const std::string &cid,
const std::vector<std::string> &atom_names);
1475#ifdef DOXYGEN_SHOULD_PARSE_THIS
1478 float map_sampling_rate;
1504 int read_mtz(
const std::string &file_name,
const std::string &f,
const std::string &phi,
const std::string &weight,
1515 const std::string &weight,
bool use_weight);
1518 class auto_read_mtz_info_t {
1542 void set_fobs_sigfobs(
const std::string &f,
const std::string &s) {
1571 int write_map(
int imol,
const std::string &file_name)
const;
1670 int make_mask(
int imol_map_ref,
int imol_model,
const std::string &atom_selection_cid,
float radius);
1724 float radius,
float contour_level);
1741 double position_x,
double position_y,
double position_z,
1742 float radius,
float contour_level,
1743 float other_map_for_colouring_min_value,
1744 float other_map_for_colouring_max_value,
1745 bool invert_colour_ramp);
1751 void set_colour_map_for_map_coloured_by_other_map(std::vector<std::pair<
double, std::vector<double> > > colour_table );
1753 user_defined_colour_table_t colour_map_by_other_map_user_defined_table;
1764 double position_x,
double position_y,
double position_z,
1765 float radius,
float contour_level,
1766 unsigned int n_bins);
1778 float free_r_factor;
1779 int rail_points_total;
1780 int rail_points_new;
1805 int average_map(
const std::string &imol_maps, std::vector<float> &scales);
1817 bool regen_map(
int imol_map,
const std::string &imol_maps,
const std::vector<float> &scales);
1832 int auto_fit_rotamer(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code,
const std::string &alt_conf,
1869 std::pair<int, unsigned int>
delete_using_cid(
int imol,
const std::string &cid,
const std::string &scope);
1881 std::pair<int, unsigned int>
delete_atom(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code,
1882 const std::string &atom_name,
const std::string &alt_conf);
1900 std::pair<int, unsigned int>
delete_residue(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code);
1920 const std::string &ins_code,
const std::string &alt_conf);
1936 std::pair<int, unsigned int>
delete_side_chain(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code);
2021 ligand_water_to_protein_distance_lim_min = d;
2028 ligand_water_to_protein_distance_lim_max = d;
2035 ligand_water_variance_limit = d;
2042 ligand_water_sigma_cut_off = d;
2060 int flood(
int imol_model,
int imol_map,
float n_rmsd);
2118 const std::string &asn_chain_id,
int asn_res_no);
2129 int flip_peptide(
int imol,
const coot::atom_spec_t &atom_spec,
const std::string &alt_conf);
2147 void eigen_flip_ligand(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code);
2162 int mutate(
int imol,
const std::string &cid,
const std::string &new_residue_type);
2179 std::string
jed_flip(
int imol,
const std::string &atom_cid,
bool invert_selection);
2256 float m00,
float m01,
float m02,
2257 float m10,
float m11,
float m12,
2258 float m20,
float m21,
float m22,
2259 float c0,
float c1,
float c2,
2260 float t0,
float t1,
float t2);
2284 std::pair<int, std::vector<merge_molecule_results_info_t> >
2289#ifdef SKIP_FOR_PYTHON_DOXYGEN
2292 std::pair<int, std::vector<merge_molecule_results_info_t> >
2318 void replace_residue(
int imol,
const std::string &residue_cid,
const std::string &new_residue_type,
int imol_enc);
2351 const std::string &atom_name_1,
2352 const std::string &atom_name_2,
2353 const std::string &atom_name_3,
2354 const std::string &atom_name_4,
2355 double torsion_angle);
2369 const std::string &to_chain_id,
2370 bool use_resno_range,
2371 int start_resno,
int end_resno);
2442 int refine_residues(
int imol,
const std::string &chain_id,
int res_no,
const std::string &ins_code,
2443 const std::string &alt_conf,
const std::string &mode,
int n_cycles);
2471 std::pair<int, coot::instanced_mesh_t>
2474 bool do_rama_plot_restraints,
float rama_plot_weight,
2475 bool do_torsion_restraints,
float torsion_weight,
bool refinement_is_quiet);
2489 minimize(
int imol,
const std::string &atom_selection_cid,
2491 bool do_rama_plot_restraints,
float rama_plot_weight,
2492 bool do_torsion_restraints,
float torsion_weight,
bool refinement_is_quiet);
2589 std::pair<int, coot::instanced_mesh_t>
refine(
int imol,
int n_cycles);
2606 float pos_x,
float pos_y,
float pos_z,
2648 const std::string &chain_id);
2656 const std::string &residue_cids);
2664 const std::string &residue_cid_1,
2665 const std::string &residue_cid_2);
2702 const nanobind::dict &key_value_pairs);
2763 coot::simple::molecule_t
get_simple_molecule(
int imol,
const std::string &residue_cid,
bool draw_hydrogen_atoms_flag);
2780 std::vector<moorhen::h_bond>
get_h_bonds(
int imol,
const std::string &cid_str,
bool mcdonald_and_thornton_mode)
const;
2799 std::vector<coot::geometry_distortion_info_container_t>
2809 std::vector<coot::geometry_distortion_info_container_t>
2821 std::pair<int, double>
get_ligand_distortion(
int imol,
const std::string &ligand_cid,
bool include_non_bonded_contacts);
2899 std::vector <positioned_atom_spec_t>
2919 const std::vector<std::string> &atom_names,
2997 std::vector<coot::molecule_t::interesting_place_t>
difference_map_peaks(
int imol_map,
int imol_protein,
float n_rmsd)
const;
3016 std::vector<coot::molecule_t::interesting_place_t>
unmodelled_blobs(
int imol_model,
int imol_map,
3017 float rmsd_cut_off)
const;
3032 std::vector <coot::atom_spec_t>
3035 float outlier_sigma_level,
3036 float min_dist,
float max_dist,
3037 bool ignore_part_occ_contact_flag,
3038 bool ignore_zero_occ_flag);
3046 float start_pos_x,
float start_pos_y,
float start_pos_z,
3047 float end_pos_x,
float end_pos_y,
float end_pos_z)
const;
3053 std::pair<std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t>,
3054 std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t> >
3055 mmrrcc(
int imol,
const std::string &chain_id,
int imol_map)
const;
3062 std::pair<std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t>,
3063 std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t> >
3064 mmrrcc_internal(
const atom_selection_container_t &asc,
3065 const std::string &chain_id,
3066 const clipper::Xmap<float> &xmap)
const;
3118 float get_spherical_variance(
int imol_map,
int imol_model,
const std::string &atom_cid,
float mean_density_other_atoms)
const;
3146 const std::string &f_col,
const std::string &sigf_col,
3147 const std::string &free_r_col);
3170 int imol_map_with_data_attached,
3171 int imol_updating_difference_map);
3190 int imol_updating_difference_map,
3191 int imol_map_with_data_attached);
3224 float screen_centre_x,
3225 float screen_centre_y,
3226 float screen_centre_z)
const;
3253 std::pair<bool, clipper::Coord_orth>
go_to_blob(
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
3254 float contour_level);
3279 float n_rmsd,
bool use_conformers,
unsigned int n_conformers);
3285 class fit_ligand_info_t {
3290 float fitting_score;
3291 float cluster_volume;
3292 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;}
3293 fit_ligand_info_t() { imol = -1; cluster_idx = -1; ligand_idx = -1; fitting_score = 1.0; cluster_volume = -1.0; }
3296 float get_cluster_volume()
const {
return cluster_volume; }
3309 std::vector<fit_ligand_info_t>
fit_ligand(
int imol_protein,
int imol_map,
int imol_ligand,
3310 float n_rmsd,
bool use_conformers,
unsigned int n_conformers);
3322 std::vector<fit_ligand_info_t>
fit_ligand_multi_ligand(
int imol_protein,
int imol_map,
const std::string &multi_ligand_molecule_number_list,
3323 float n_rmsd,
bool use_conformers,
unsigned int n_conformers);
3355 int n_trials,
float translation_scale_factor);
3370 int add_compound(
int imol,
const std::string &tlc,
int imol_dict,
int imol_map,
float x,
float y,
float z);
3397 const std::string &background_type);
3453 float data_value_for_bottom,
float data_value_for_top)
const;
3476 unsigned int get_max_number_of_simple_mesh_vertices()
const;
3477 void set_max_number_of_simple_mesh_vertices(
unsigned int n);
3481 std::string
pae_png(
const std::string &pae_file_name)
const;
3489 float function_value;
3490 std::chrono::time_point<std::chrono::high_resolution_clock> timer_start;
3491 std::chrono::time_point<std::chrono::high_resolution_clock> timer;
3492 ltj_stats_t() : timer(std::chrono::high_resolution_clock::now()) {
3495 timer_start = timer;
3499 timer = std::chrono::high_resolution_clock::now();
3507 timer = std::chrono::high_resolution_clock::now();
3508 auto d10 = std::chrono::duration_cast<std::chrono::microseconds>(timer - timer_start).count();
3517 bool interrupt_long_term_job;
3588#ifdef DOXYGEN_SHOULD_PARSE_THIS
3591 coot::protein_geometry & get_geometry() {
3604 float bond_width,
float atom_radius_to_bond_width_ratio,
3605 int smoothness_factor);
3618 const std::string &cid,
3619 const std::string &colour_scheme,
3620 const std::string &style,
3621 int secondary_structure_usage_flag);
3628 float saturation,
float goodselliness);
3639 void test_function(
const std::string &s);
3644#ifdef DOXYGEN_SHOULD_PARSE_THIS
3649 enum mesh_mode_t { UNKNOWN, SINGLE_COLOUR, MULTI_COLOUR };
3653 PyObject *get_pythonic_bonds_mesh(
int imol,
const std::string &mode,
bool against_a_dark_background,
3654 float bond_width,
float atom_radius_to_bond_width_ratio,
3655 int smoothness_factor);
3657 PyObject *get_pythonic_map_mesh(
int imol,
float x,
float y,
float z,
float radius,
float contour_level);
3659 PyObject *get_pythonic_molecular_representation_mesh(
int imol,
const std::string &atom_selection,
3660 const std::string &colour_sheme,
3661 const std::string &style,
3662 int secondary_structure_usage_flag);
3664 PyObject *get_pythonic_gaussian_surface_mesh(
int imol,
float sigma,
float contour_level,
3665 float box_radius,
float grid_scale,
float fft_b_factor);
3682 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:1408
a container class for information about changing rotamers
Definition coot-molecule.hh:1192
Definition coot-molecule.hh:122
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:146
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:1518
std::string Rfree
R-Free column. There were not available if the return value is empty.
Definition molecules-container.hh:1535
std::string sigF_obs
sigF_obs column
Definition molecules-container.hh:1533
std::string phi
phi column
Definition molecules-container.hh:1525
std::string w
weights column
Definition molecules-container.hh:1527
int idx
molecule index
Definition molecules-container.hh:1521
std::string F
F column.
Definition molecules-container.hh:1523
std::string F_obs
F_obs column. There were not available if the return value is empty.
Definition molecules-container.hh:1531
bool weights_used
flag for weights usage
Definition molecules-container.hh:1529
float get_fitting_score() const
Definition molecules-container.hh:3295
Definition molecules-container.hh:3486
void update_timer()
This function is called by the long-term job, udating the timer and count.
Definition molecules-container.hh:3498
double time_difference()
Definition molecules-container.hh:3506
Definition molecules-container.hh:1775
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:2535
int imol_difference_map
Definition molecules-container.hh:404
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:462
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
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:3534
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:2555
void set_refinement_is_verbose(bool state)
Definition molecules-container.hh:2624
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)
Definition molecules-container.hh:1492
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::pair< int, std::vector< merge_molecule_results_info_t > > merge_molecules(int imol, const std::string &list_of_other_molecules)
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 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
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:2545
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)
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:2570
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)
bool get_use_gemmi()
Get the state of using GEMMI for coordinates parsing.
Definition molecules-container.hh:423
float get_geman_mcclure_alpha() const
Definition molecules-container.hh:2634
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:2020
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:437
ltj_stats_t long_term_job_stats
long term job
Definition molecules-container.hh:3514
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)
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
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)
std::vector< coot::geometry_distortion_info_container_t > get_ligand_validation_vs_dictionary(int imol, const std::string &ligand_cid, bool include_non_bonded_contacts)
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:2560
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:1773
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 draw_hydrogen_atoms_flag, int smoothness_factor)
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)
void print_colour_rules(int imol) const
void set_logging_file(const std::string &file_name)
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:400
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:2565
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
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)
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:502
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:2034
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
int flip_hand(int imol_map)
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:2629
float get_map_sampling_rate()
Definition molecules-container.hh:1484
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)
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:449
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< 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)
std::vector< coot::plain_atom_overlap_t > get_overlaps(int imol)
Get Atom Overlaps.
bool get_make_backups() const
Definition molecules-container.hh:434
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 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)
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:420
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)
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:2550
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
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
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:472
void set_add_waters_water_to_protein_distance_lim_max(float d)
Definition molecules-container.hh:2027
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:429
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
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:467
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 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
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)
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 draw_hydrogen_atoms_flag, int smoothness_factor)
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:3539
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)
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)
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:2041
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
std::vector< coot::geometry_distortion_info_container_t > get_validation_vs_dictionary_for_selection(int imol, const std::string &selection_cid, bool include_non_bonded_contacts)
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:2540
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 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