libcootapi
 
Loading...
Searching...
No Matches
/opt/conda/conda-bld/coot-headless_1778826286086/work/api/molecules-container.hh
1
2#ifndef MOLECULES_CONTAINER_HH
3#define MOLECULES_CONTAINER_HH
4
5#include <memory>
6#ifdef SWIG
7#include "Python.h"
8#endif
9
10#include <vector>
11
12#ifdef HAVE_SSMLIB
13#include <ssm/ssm_align.h>
14#endif
15
16#if NB_VERSION_MAJOR // for flychecking
17#include <nanobind/nanobind.h>
18#endif
19
20#include "compat/coot-sysdep.h"
21
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" // the missing atoms type
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" // needed?
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" // put this in utils
40#include "ligand/molecular-replacement.hh" // coot::mr_solution_t, glm/gtc/quaternion.hpp
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"
47
50
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;
58
59 class rail_points_t {
60 public:
61 int model_rail_points_delta; // for the latest change, I mean
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;
68 }
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);
73 }
74 int rail_points_delta(const rail_points_t &prev) {
75 float fudge = 2.4; // 20230117-PE makes 1000 rail points equal ~1% in R-factor for the tutorial data
76 return int(100000.0 * fudge * (prev.rmsd_of_difference_map - rmsd_of_difference_map));
77 }
78 static int total(const std::vector<rail_points_t> &rail_point_history) {
79 int sum = 0;
80 for (const auto &item : rail_point_history) {
81 sum += item.map_rail_points_delta;
82 }
83 return sum;
84 }
85 };
86 std::vector<rail_points_t> rail_point_history; // map and model (model currently not used)
87
88 class updating_maps_info_f {
89 public:
90 bool maps_need_an_update;
91 int imol_model;
92 int imol_2fofc;
93 int imol_fofc;
94 int imol_with_data_info_attached;
95 updating_maps_info_f() {
96 maps_need_an_update = false;
97 imol_model = -1;
98 imol_2fofc = -1;
99 imol_fofc = -1;
100 imol_with_data_info_attached = -1;
101 }
102 };
103#ifdef SKIP_FOR_PYTHON_DOXYGEN
104#else
110 updating_maps_info_f updating_maps_info;
111 void set_updating_maps_need_an_update(int imol);
112 // Checks the above information before acting, of course.
113 // No action if imol is the the model for updating maps.
114
118 void update_updating_maps(int imol); // called from the get_map_contours_mesh() function
119
120 coot::util::sfcalc_genmap_stats_t latest_sfcalc_stats;
121#endif
122 // --------------------- superposition --------------------------
123
124 // --------------------- refinement --------------------------
125
126 // 201803004:
127 // refinement now uses references to Xmaps.
128 // A dummy_map is created and a reference to that is created. Then
129 // the reference is reset to a real xmap in a molecule (imol_for_map).
130 // But, for a reason I don't understand, the refinement crashes when I do that.
131 // When the initial dummy_xmap doesn't go out of scope, then the refinement is OK.
132 // So this static dummy map is the map that doesn't go out of scope.
133 // We only need one of it, so it goes here, rather than get created every
134 // time we do a refinement. It may need to be public in future.
135 //
136 // 20221018-PE:
137 // Now that we are in api, then I am now no longer sure that this should be static
138 // or what static means in WebAssembly.
139 static clipper::Xmap<float> *dummy_xmap;
140 float map_weight;
141 float geman_mcclure_alpha;
142
143 bool use_rama_plot_restraints;
144 float rama_plot_restraints_weight;
145
146 bool use_torsion_restraints;
147 float torsion_restraints_weight;
148
149 ctpl::thread_pool thread_pool;
150 bool show_timings;
151
152 coot::restraints_container_t *last_restraints;
153 bool continue_threaded_refinement_loop;
154 bool refinement_is_quiet;
155 int cif_dictionary_read_number;
156
160 std::string adjust_refinement_residue_name(const std::string &resname) const;
161#ifdef DOXYGEN_SHOULD_PARSE_THIS
162#else
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,
169 bool use_map_flag,
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,
174 mmdb::Manager *mol);
175
176 atom_selection_container_t make_moving_atoms_asc(mmdb::Manager *residues_mol,
177 const std::vector<mmdb::Residue *> &residues) const;
178
179 int find_serial_number_for_insert(int seqnum_new,
180 const std::string &ins_code_for_new,
181 mmdb::Chain *chain_p) const;
182
183 // return 0 if any of the residues in selection don't have (at least) bond
184 // restraints. Try to auto-load the dictionary cifs and try again.
185 // The vector is a list of residues for which no restraints could be found.
186
187 std::pair<int, std::vector<std::string> >
188 check_dictionary_for_residue_restraints(int imol, mmdb::PResidue *SelResidues, int nSelResidues);
189
190 std::pair<int, std::vector<std::string> >
191 check_dictionary_for_residue_restraints(int imol, const std::vector<mmdb::Residue *> &residues);
192
193 std::pair<mmdb::Manager *, std::vector<mmdb::Residue *> >
194 create_mmdbmanager_from_res_vector(const std::vector<mmdb::Residue *> &residues,
195 int imol,
196 mmdb::Manager *mol_in,
197 std::string alt_conf);
198
199 // simple mmdb::Residue * interface to refinement. 20081216
200 coot::refinement_results_t
201 generate_molecule_and_refine(int imol, // needed for UDD Atom handle transfer
202 const std::vector<mmdb::Residue *> &residues,
203 const std::string &alt_conf,
204 mmdb::Manager *mol,
205 bool use_map_flag=true);
206
207 static void thread_for_refinement_loop_threaded();
208
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; // static because it is set by above
213
214 bool particles_have_been_shown_already_for_this_round_flag;
215
216#ifdef DOXYGEN_SHOULD_PARSE_THIS
217#else
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);
220#endif
221
222
223#ifdef SKIP_FOR_PYTHON_DOXYGEN
224#else
229 std::pair<short int, clipper::RTop_orth> get_lsq_matrix_internal(int imol_ref, int imol_mov, bool summary_to_screen) const;
230#endif
231
233 get_q_score_validation_information(mmdb::Manager *mol, int udd_q_score, bool do_per_atom) const;
234
235#endif
236
237
238 bool refinement_immediate_replacement_flag = true;
239 int imol_moving_atoms;
240 enum moving_atoms_asc_t {
241 NEW_COORDS_UNSET = 0, // moving_atoms_asc_type values
242 NEW_COORDS_ADD = 1, // not used?
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;
248
249#ifdef DOXYGEN_SHOULD_PARSE_THIS
250#else
251 static void all_atom_pulls_off();
252 static std::vector<atom_pull_info_t> atom_pulls;
253 // nanobinds doesn't have a atom_spec_t, does it?
254 static void atom_pull_off(const coot::atom_spec_t &spec);
255 static void atom_pulls_off(const std::vector<coot::atom_spec_t> &specs);
256#endif
257
258#ifdef DOXYGEN_SHOULD_PARSE_THIS
259#else
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;
261#endif
262
271
272#ifdef DOXYGEN_SHOULD_PARSE_THIS
273#else
275 int refine_direct(int imol, std::vector<mmdb::Residue *> rv, const std::string &alt_loc, int n_cycles);
276
278 double phi_psi_probability(const coot::util::phi_psi_t &phi_psi, const ramachandrans_container_t &rc) const;
279#endif
280
281#ifdef SKIP_FOR_PYTHON_DOXYGEN
282#else
284 void read_standard_residues();
285
286 std::map<svg_store_key_t, std::string> ligand_svg_store;
287
288 atom_selection_container_t standard_residues_asc;
289#endif
290
291#ifdef DOXYGEN_SHOULD_PARSE_THIS
292#else
293
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);
296
297 int install_model(const coot::molecule_t &m);
298
300 superpose_with_atom_selection(atom_selection_container_t asc_ref,
301 atom_selection_container_t asc_mov,
302 int imol_mov,
303 std::string moving_mol_name,
304 std::string reference_mol_name,
305 bool move_copy_of_imol2_flag);
306#endif
307
308#ifdef HAVE_SSMLIB
309
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);
317
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);
325
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;
332
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;
339
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;
346
347 // for gesampt this will be vector of vector
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;
354
355
356 void print_horizontal_ssm_sequence_alignment(std::pair<std::string, std::string> aligned_sequences) const;
357
358 std::string generate_horizontal_ssm_sequence_alignment_string(const std::pair<std::string, std::string> &aligned_sequences) const;
359
360#endif // HAVE_SSMLIB
361
362#ifdef SKIP_FOR_PYTHON_DOXYGEN
363#else
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;
367
368 // water fitting settings
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;
373#endif
374
375 unsigned int max_number_of_simple_mesh_vertices;
376
377 // --------------------- init --------------------------
378#ifdef SKIP_FOR_PYTHON_DOXYGEN
379#else
380 void init(); // private
381#endif
382
383#ifdef SKIP_FOR_PYTHON_DOXYGEN
384#else
386 void debug() const;
387
388 bool map_is_contoured_using_thread_pool_flag;
389 double contouring_time;
390#endif
391
392public:
393
395 explicit molecules_container_t(bool verbose=true);
396
398
402 int imol_refinement_map; // direct access
406 int imol_difference_map; // direct access
407
408 bool use_gemmi; // for mmcif and PDB parsing. 20240112-PE set to true by default in init()
409
410 // -------------------------------- Basic Utilities -----------------------------------
412
417 std::string package_version() const;
418
422 void set_use_gemmi(bool state) { use_gemmi = state; }
423
425 bool get_use_gemmi() { return use_gemmi; }
426
427
431 void set_make_backups(bool state) { make_backups_flag = state; }
432
436 bool get_make_backups() const { return make_backups_flag; }
437
440
446 std::string file_name_to_string(const std::string &file_name) const;
447
451 unsigned int get_number_of_molecules() const { return molecules.size(); }
452
459 void create_empty_molecules(unsigned int n_empty);
460
465
469 void set_map_weight(float w) { map_weight = w; }
470
474 float get_map_weight() const { return map_weight; }
475
480 void scale_map(int imol_map, float scale_factor);
481
488 coot::atom_spec_t atom_cid_to_atom_spec(int imol, const std::string &cid) const;
489
496 coot::residue_spec_t residue_cid_to_residue_spec(int imol, const std::string &cid) const;
497
504 void set_show_timings(bool s) { show_timings = s; }
505
506 // duplicate?
507 // coot::protein_geometry & get_geom() { return geom; }
508
516 moorhen::header_info_t get_header_info(int imol) const;
517
523 int get_imol_enc_any() const;
524
525 // -------------------------------- generic utils -----------------------------------
527
533 std::string get_molecule_name(int imol) const;
534
539 void set_molecule_name(int imol, const std::string &new_name);
540
543
551 bool is_valid_model_molecule(int imol) const;
552
560 bool is_valid_map_molecule(int imol_map) const;
561
567 bool is_a_difference_map(int imol_map) const;
568
572 int new_molecule(const std::string &name);
573
579 int close_molecule(int imol);
580
584
586 void pop_back();
587
589 void clear();
590
599 std::vector<double> get_eigenvalues(int imol, const std::string &chain_id, int res_no, const std::string &ins_code);
600
612 std::string get_eigenvectors_and_eigenvalues(int imol, const std::string &cid);
613
618
619#ifdef SWIG
620#else
621#ifdef DOXYGEN_SHOULD_PARSE_THIS
622#else
624 coot::molecule_t & operator[] (unsigned int imol);
625#endif
626#endif
627
628#ifdef DOXYGEN_SHOULD_PARSE_THIS
629#else
631 mmdb::Manager *get_mol(unsigned int imol) const;
632#endif
633
634// we don't want this in the nanobinds
635#ifdef NB_VERSION_MAJOR
636#else
637 // no protection, for testing only
638 clipper::Xmap<float> get_xmap(int imol) const;
639#endif
640
643
648 void accept_rotamer_probability_tables_compressed_data(const std::string &data_stream);
649
650 // -------------------------------- backup and saving -----------------------------------
652
659
662
663 // -------------------------------- geometry/dictionaries --------------------------------
665
668
674 std::vector<std::string> non_standard_residue_types_in_model(int imol) const;
675
676#ifdef MAKE_ENHANCED_LIGAND_TOOLS
683 // RDKit::RWMol get_rdkit_mol(const std::string &residue_name, int imol_enc);
684
685 // std::shared_ptr<RDKit::RWMol> get_rdkit_mol_shared(const std::string &residue_name, int imol_enc);
686
692 std::string get_rdkit_mol_pickle_base64(const std::string &residue_name, int imol_enc);
693#endif
694
695 // -------------------------------- coordinates utils -----------------------------------
697
703 int read_coordinates(const std::string &file_name);
704
712 int read_pdb(const std::string &file_name);
713
719 int read_small_molecule_cif(const std::string &file_name);
720
733 int read_amber_trajectory(int imol_coords,
734 const std::string &trajectory_file_name,
735 int start_frame,
736 int end_frame,
737 int stride);
738
742 void print_secondary_structure_info(int imol) const;
743
751 void replace_molecule_by_model_from_file(int imol, const std::string &pdb_file_name);
752
758 std::vector<int> split_multi_model_molecule(int imol);
759
765 int make_ensemble(const std::string &model_molecules_list);
766
772 std::string molecule_to_PDB_string(int imol) const;
773
779 std::string molecule_to_mmCIF_string(int imol) const;
780
790 std::pair<int, std::string> get_active_atom(float x, float y, float z, const std::string &displayed_model_molecules_list) const;
791
798 int import_cif_dictionary(const std::string &cif_file_name, int imol_enc);
799
806 std::string get_cif_file_name(const std::string &comp_id, int imol_enc) const;
807
814 std::string get_cif_restraints_as_string(const std::string &comp_id, int imol_enc) const;
815
821 bool copy_dictionary(const std::string &monomer_name, int imol_current, int imol_new);
822
828 int get_monomer(const std::string &monomer_name);
829
838 int get_monomer_from_dictionary(const std::string &comp_id, int imol, bool idealised_flag);
839
849 int get_monomer_and_position_at(const std::string &comp_id, int imol, float x, float y, float z);
850
859 std::map<std::string, std::string>
860 dictionary_atom_name_map(const std::string &comp_id_1, int imol_1, const std::string &comp_id_2, int imol_2);
861
863 std::vector<std::string> get_types_in_molecule(int imol) const;
864
865 // 20221030-PE nice to have one day:
866 // int get_monomer_molecule_by_network_and_dict_gen(const std::string &text);
867
875 std::vector<std::string> get_groups_for_monomers(const std::vector<std::string> &residue_names) const;
876
883 std::string get_group_for_monomer(const std::string &residue_name) const;
884
893 std::string get_hb_type(const std::string &compound_id, int imol_enc, const std::string &atom_name) const;
894
902 std::vector<std::pair<std::string, std::string> > get_gphl_chem_comp_info(const std::string &compound_id, int imol_enc);
903
911 std::vector<std::pair<std::string, std::string> > get_acedrg_atom_types(const std::string &compound_id, int imol_enc) const;
912
925 std::vector<std::pair<std::string, std::string> > get_computed_acedrg_atom_types(const std::string &compound_id, int imol_enc);
926
933 coot::acedrg_types_for_residue_t get_acedrg_atom_types_for_ligand(int imol, const std::string &residue_cid) const;
934
940 void set_occupancy(int imol, const std::string &cid, float occ_new);
941
955 std::string get_molecule_selection_as_json(int imol, const std::string &cid) const;
956
966 std::string get_torsions_for_residues_in_chain(int imol, const std::string &chain_id) const;
967
974 void write_png(const std::string &compound_id, int imol, const std::string &file_name) const;
975
982 int write_coordinates(int imol, const std::string &file_name) const;
983
992
1007 coot::simple_mesh_t get_bonds_mesh(int imol, const std::string &mode,
1008 bool against_a_dark_background,
1009 float bond_width, float atom_radius_to_bond_width_ratio,
1010 int smoothness_factor);
1011
1029 coot::instanced_mesh_t get_bonds_mesh_instanced(int imol, const std::string &mode,
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);
1037
1043 coot::instanced_mesh_t get_bonds_mesh_for_selection_instanced(int imol, const std::string &atom_selection_cid,
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);
1052
1061 coot::instanced_mesh_t get_goodsell_style_mesh_instanced(int imol, float colour_wheel_rotation_step,
1062 float saturation, float goodselliness);
1063
1075 void export_map_molecule_as_gltf(int imol, float pos_x, float pos_y, float pos_z, float radius, float contour_level,
1076 const std::string &file_name);
1077
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);
1092
1103 void export_molecular_representation_as_gltf(int imol, const std::string &atom_selection_cid,
1104 const std::string &colour_scheme, const std::string &style,
1105 int secondary_structure_usage_flag,
1106 const std::string &file_name);
1107
1110 void export_chemical_features_as_gltf(int imol, const std::string &cid,
1111 const std::string &file_name) const;
1112
1117 void set_gltf_pbr_roughness_factor(int imol, float roughness_factor);
1118
1123 void set_gltf_pbr_metalicity_factor(int imol, float metalicity);
1124
1127
1130
1159 void ray_trace_image(const std::string &json_str);
1160
1167 std::vector<glm::vec4> get_colour_table(int imol, bool against_a_dark_background) const;
1168
1173 void set_colour_wheel_rotation_base(int imol, float r);
1174
1181 void set_base_colour_for_bonds(int imol, float r, float g, float b);
1182
1187 void add_to_non_drawn_bonds(int imol, const std::string &atom_selection_cid);
1188
1193
1197 void print_non_drawn_bonds(int imol) const;
1198
1200 void set_user_defined_bond_colours(int imol, const std::map<unsigned int, std::array<float, 4> > &colour_map);
1201
1205 void set_user_defined_atom_colour_by_selection(int imol, const std::vector<std::pair<std::string, unsigned int> > &indexed_residues_cids,
1206 bool colour_applies_to_non_carbon_atoms_also);
1207
1209 void add_colour_rule(int imol, const std::string &selection_cid, const std::string &colour);
1210
1216 void add_colour_rules_multi(int imol, const std::string &selections_and_colours_combo_string);
1217
1221 void delete_colour_rules(int imol);
1222
1226 std::vector<std::pair<std::string, std::string> > get_colour_rules(int imol) const;
1227
1231 void print_colour_rules(int imol) const;
1232
1236 void set_use_bespoke_carbon_atom_colour(int imol, bool state);
1237
1242
1244 void M2T_updateFloatParameter(int imol, const std::string &param_name, float value);
1245
1247 void M2T_updateIntParameter(int imol, const std::string &param_name, int value);
1248
1260 const std::string &colour_scheme,
1261 const std::string &style,
1262 int secondary_structure_usage_flag);
1263
1271 bool set_residue_properties(int imol, const std::string &json_string);
1272
1273 // \brief clear the reisidue properties
1277
1290 coot::simple_mesh_t get_gaussian_surface(int imol, float sigma, float contour_level,
1291 float box_radius, float grid_scale, float b_factor) const;
1292
1307 float sigma, float contour_level,
1308 float box_radius, float grid_scale,
1309 float b_factor) const;
1310
1311 // Make a map from a gaussian surface
1327 int gaussian_surface_to_map_molecule(int imol_map_ref, int imol_model,
1328 const std::string &cid,
1329 float sigma, float box_radius, float fft_b_factor);
1330
1331 // Make a map from a gaussian surface
1344 int gaussian_surface_to_map_molecule_v2(int imol, const std::string &cid,
1345 float sigma, float box_radius,
1346 float grid_scale, float fft_b_factor);
1347
1354 coot::simple_mesh_t get_chemical_features_mesh(int imol, const std::string &cid) const;
1355
1366 mmdb::Atom *get_atom_using_cid(int imol, const std::string &cid) const;
1367
1378 mmdb::Residue *get_residue_using_cid(int imol, const std::string &cid) const;
1379
1380#ifdef DOXYGEN_SHOULD_PARSE_THIS
1381#else
1385 mmdb::Atom *get_atom(int imol, const coot::atom_spec_t &atom_spec) const;
1389 mmdb::Residue *get_residue(int imol, const coot::residue_spec_t &residue_spec) const;
1391 std::pair<bool, coot::Cartesian> get_atom_position(int imol, coot::atom_spec_t &atom_spec);
1392#endif
1393
1402 bool residue_is_nucleic_acid(int imol, const std::string &cid) const;
1403
1410 std::vector<double> get_residue_CA_position(int imol, const std::string &cid) const;
1411
1418 std::vector<double> get_residue_average_position(int imol, const std::string &cid) const;
1419
1426 std::vector<double> get_residue_sidechain_average_position(int imol, const std::string &cid) const;
1427
1433 unsigned int get_number_of_atoms(int imol) const;
1434
1440 float get_molecule_diameter(int imol) const;
1441
1450 int get_number_of_hydrogen_atoms(int imol) const;
1451
1457 std::vector<std::string> get_chains_in_model(int imol) const;
1458
1464 std::vector<std::vector<std::string> > get_ncs_related_chains(int imol) const;
1465
1472 std::vector<std::pair<coot::residue_spec_t, std::string> > get_single_letter_codes_for_chain(int imol, const std::string &chain_id) const;
1473
1479 std::vector<std::string> get_residue_names_with_no_dictionary(int imol) const;
1480
1489 std::string get_residue_name(int imol, const std::string &chain_id, int res_no, const std::string &ins_code) const;
1490
1496 std::string get_residue_type(int imol, const std::string &cid) const;
1497
1505 std::string get_SMILES_for_residue_type(const std::string &residue_name, int imol_enc) const;
1506
1513 std::vector<coot::residue_spec_t> residues_with_missing_atoms(int imol);
1514
1515#ifdef DOXYGEN_SHOULD_PARSE_THIS
1516#else
1518 // (20230117-PE I should fix that)
1524 coot::util::missing_atom_info missing_atoms_info_raw(int imol);
1525#endif
1526
1531 std::vector<coot::residue_range_t> get_missing_residue_ranges(int imol) const;
1532
1540 std::vector<coot::residue_spec_t> get_residues_near_residue(int imol, const std::string &residue_cid, float dist) const;
1541
1548 std::vector<coot::atom_distance_t>
1549 get_distances_between_atoms_of_residues(int imol, const std::string &cid_res_1, const std::string &cid_res_2,
1550 float dist_max) const;
1551
1560 superpose_results_t SSM_superpose(int imol_ref, const std::string &chain_id_ref,
1561 int imol_mov, const std::string &chain_id_mov);
1562
1572 void add_lsq_superpose_match(const std::string &chain_id_ref, int res_no_ref_start, int res_no_ref_end,
1573 const std::string &chain_id_mov, int res_no_mov_start, int res_no_mov_end,
1574 int match_type);
1575
1584 void add_lsq_superpose_atom_match(const std::string &chain_id_ref, int res_no_ref, const std::string &atom_name_ref,
1585 const std::string &chain_id_mov, int res_no_mov, const std::string &atom_name_mov);
1586
1589
1590 std::vector<coot::lsq_range_match_info_t> lsq_matchers;
1591
1597 bool lsq_superpose(int imol_ref, int imol_mov);
1598
1609 int transform_map_using_lsq_matrix(int imol_map, lsq_results_t lsq_matrix, float x, float y, float z, float radius);
1619 lsq_results_t get_lsq_matrix(int imol_ref, int imol_mov, bool summary_to_screen) const;
1620
1624 coot::symmetry_info_t
1625 get_symmetry(int imol, float symmetry_search_radius, float centre_x, float centre_y, float centre_z) const;
1626
1634 ::api::cell_t get_cell(int imol) const;
1635
1642
1648 int undo(int imol);
1649
1655 int redo(int imol);
1656
1664 std::pair<int, double> get_torsion(int imol, const std::string &cid, const std::vector<std::string> &atom_names);
1665
1671 void set_temperature_factors_using_cid(int imol, const std::string &cid, float temp_fact);
1672
1673 // -------------------------------- map utils -------------------------------------------
1675
1676#ifdef DOXYGEN_SHOULD_PARSE_THIS
1677#else
1679 float map_sampling_rate;
1680#endif
1681
1685 float get_map_sampling_rate() { return map_sampling_rate; }
1686
1693 void set_map_sampling_rate(float msr) { map_sampling_rate = msr; }
1694
1705 int read_mtz(const std::string &file_name, const std::string &f, const std::string &phi, const std::string &weight,
1706 bool use_weight, bool is_a_difference_map);
1707
1715 int replace_map_by_mtz_from_file(int imol, const std::string &file_name, const std::string &f, const std::string &phi,
1716 const std::string &weight, bool use_weight);
1717
1719 class auto_read_mtz_info_t {
1720 public:
1722 int idx;
1724 std::string F;
1726 std::string phi;
1728 std::string w;
1732 std::string F_obs;
1734 std::string sigF_obs;
1736 std::string Rfree;
1737 // constructor
1738 auto_read_mtz_info_t() {idx = -1; weights_used = false; }
1739 // constructor
1740 auto_read_mtz_info_t(int index, const std::string &F_in, const std::string &phi_in) :
1741 idx(index), F(F_in), phi(phi_in), weights_used(false) {}
1742 // set Fobs sigFobs column labels
1743 void set_fobs_sigfobs(const std::string &f, const std::string &s) {
1744 F_obs = f;
1745 sigF_obs = s;
1746 }
1747 };
1748
1754 std::vector<auto_read_mtz_info_t> auto_read_mtz(const std::string &file_name);
1755
1764 int read_ccp4_map(const std::string &file_name, bool is_a_difference_map);
1765
1772 int write_map(int imol, const std::string &file_name) const;
1773
1779 float get_map_mean(int imol) const;
1780
1788 float get_map_rmsd_approx(int imol_map) const;
1789
1798 coot::molecule_t::histogram_info_t get_map_histogram(int imol, unsigned int n_bins, float zoom_factor) const;
1799
1800
1805
1811 bool is_EM_map(int imol) const;
1812
1820 int sharpen_blur_map(int imol_map, float b_factor, bool in_place_flag);
1821
1832 int sharpen_blur_map_with_resample(int imol_map, float b_factor, float resample_factor, bool in_place_flag);
1833
1847 int mask_map_by_atom_selection(int imol_coords, int imol_map, const std::string &cid, float atom_radius, bool invert_flag);
1848
1861 std::vector<int> partition_map_by_chain(int imol_map, int imol_model);
1862
1871 int make_mask(int imol_map_ref, int imol_model, const std::string &atom_selection_cid, float radius);
1872
1878 int flip_hand(int imol_map);
1879
1886 std::vector<int> make_masked_maps_split_by_chain(int imol, int imol_map);
1887
1893 int dedust_map(int imol);
1894
1905 void set_map_colour(int imol, float r, float g, float b);
1906
1911
1924 coot::simple_mesh_t get_map_contours_mesh(int imol, double position_x, double position_y, double position_z,
1925 float radius, float contour_level);
1926
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);
1959 coot::simple_mesh_t get_map_cap_mesh(int imol, float contour_level,
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);
1965
1970 void set_map_colour_saturation(int imol, float s);
1971 void set_colour_map_for_map_coloured_by_other_map(std::vector<std::pair<double, std::vector<double> > > colour_table );
1972
1973 user_defined_colour_table_t colour_map_by_other_map_user_defined_table;
1974
1984 double position_x, double position_y, double position_z,
1985 float radius, float contour_level,
1986 unsigned int n_bins);
1987
1988
1989
1993 coot::util::sfcalc_genmap_stats_t get_latest_sfcalc_stats() const { return latest_sfcalc_stats; }
1994
1996 public:
1997 float r_factor; // 0 to 1
1998 float free_r_factor;
1999 int rail_points_total;
2000 int rail_points_new;
2001 };
2002
2007
2013 std::string r_factor_stats_as_string(const r_factor_stats &rfs) const;
2014
2025 int average_map(const std::string &imol_maps, std::vector<float> &scales);
2026
2037 bool regen_map(int imol_map, const std::string &imol_maps, const std::vector<float> &scales);
2038
2039 // -------------------------------- coordinates modelling -------------------------------
2041
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,
2053 int imol_map);
2054
2062 coot::molecule_t::rotamer_change_info_t change_to_next_rotamer(int imol, const std::string &residue_cid, const std::string &alt_conf);
2063
2071 coot::molecule_t::rotamer_change_info_t change_to_previous_rotamer(int imol, const std::string &residue_cid, const std::string &alt_conf);
2072
2080 coot::molecule_t::rotamer_change_info_t change_to_first_rotamer(int imol, const std::string &residue_cid, const std::string &alt_conf);
2081
2089 int set_residue_to_rotamer_number(int imol, const std::string &residue_cid, const std::string &alt_conf, int rotamer_number);
2090
2098 std::pair<int, unsigned int> delete_using_cid(int imol, const std::string &cid, const std::string &scope);
2099
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);
2112
2119 std::pair<int, unsigned int> delete_atom_using_cid(int imol, const std::string &cid);
2120
2130 std::pair<int, unsigned int> delete_residue(int imol, const std::string &chain_id, int res_no, const std::string &ins_code);
2131
2138 std::pair<int, unsigned int> delete_residue_using_cid(int imol, const std::string &cid);
2139
2149 std::pair<int, unsigned int> delete_residue_atoms_with_alt_conf(int imol, const std::string &chain_id, int res_no,
2150 const std::string &ins_code, const std::string &alt_conf);
2156 std::pair<int, unsigned int> delete_residue_atoms_using_cid(int imol, const std::string &cid);
2157
2166 std::pair<int, unsigned int> delete_side_chain(int imol, const std::string &chain_id, int res_no, const std::string &ins_code);
2167
2174 std::pair<int, unsigned int> delete_side_chain_using_cid(int imol, const std::string &cid);
2175
2182 std::pair<int, unsigned int> delete_chain_using_cid(int imol, const std::string &cid);
2183
2190 std::pair<int, unsigned int> delete_literal_using_cid(int imol, const std::string &cid);
2191
2198
2199 // (I should have) change(d) that stupid (alt) loc (I should have made you leave your key)
2200 //
2212 int change_alt_locs(int imol, const std::string &cid, const std::string &change_mode);
2213
2222 std::pair<int, std::string> add_terminal_residue_directly(int imol, const std::string &chain_id, int res_no, const std::string &ins_code);
2223
2224 // std::pair<int, std::string> add_terminal_residue_directly_using_cid(int imol, const std::string &cid);
2225 //
2231 int add_terminal_residue_directly_using_cid(int imol, const std::string &cid);
2232
2240
2246
2251 ligand_water_to_protein_distance_lim_min = d;
2252 }
2253
2258 ligand_water_to_protein_distance_lim_max = d;
2259 }
2260
2265 ligand_water_variance_limit = d;
2266 }
2267
2272 ligand_water_sigma_cut_off = d;
2273 }
2274
2281 int add_waters(int imol_model, int imol_map);
2282
2290 int flood(int imol_model, int imol_map, float n_rmsd);
2291
2297 int add_hydrogen_atoms(int imol_model);
2298
2304 int delete_hydrogen_atoms(int imol_model);
2305
2312 int add_alternative_conformation(int imol_model, const std::string &cid);
2313
2322 int fill_partial_residue(int imol, const std::string &chain_id, int res_no, const std::string &ins_code);
2323
2330 int fill_partial_residue_using_cid(int imol, const std::string &cid);
2331
2338
2347 void add_named_glyco_tree(int imol_model, int imol_map, const std::string &glycosylation_name,
2348 const std::string &asn_chain_id, int asn_res_no);
2349
2350#if NB_VERSION_MAJOR
2351#else
2359 int flip_peptide(int imol, const coot::atom_spec_t &atom_spec, const std::string &alt_conf);
2360#endif
2361
2369 int flip_peptide_using_cid(int imol, const std::string &atom_cid, const std::string &alt_conf);
2370
2377 void eigen_flip_ligand(int imol, const std::string &chain_id, int res_no, const std::string &ins_code);
2378
2383 void eigen_flip_ligand_using_cid(int imol, const std::string &residue_cid);
2384
2392 int mutate(int imol, const std::string &cid, const std::string &new_residue_type);
2393
2400 int side_chain_180(int imol, const std::string &atom_cid);
2401
2409 std::string jed_flip(int imol, const std::string &atom_cid, bool invert_selection);
2410
2419 int move_molecule_to_new_centre(int imol, float x, float y, float z);
2420
2426 void multiply_residue_temperature_factors(int imol, const std::string &cid, float factor);
2427
2433 coot::Cartesian get_molecule_centre(int imol) const;
2434
2441 double get_radius_of_gyration(int imol) const;
2442
2444 struct mr_solution_t {
2445 glm::quat rotation;
2447 clipper::Coord_orth translation;
2450 int imol;
2451 std::string pdb_filename;
2452 mr_solution_t() : rotation(glm::quat(1,0,0,0)), rotation_score(0.0f),
2453 translation(0,0,0), translation_score(0.0f),
2454 mean_density_at_ca(0.0f), imol(-1) {}
2455 };
2456
2473 std::vector<mr_solution_t> molecular_placement_fit(int imol_map, int imol_model,
2474 float x, float y, float z,
2475 int n_rotation_solutions = 10,
2476 int n_translation_solutions = 10);
2477
2483 int copy_molecule(int imol);
2484
2491 int copy_fragment_using_cid(int imol, const std::string &multi_cid);
2492
2504 int copy_fragment_for_refinement_using_cid(int imol, const std::string &multi_cid);
2505
2514 int copy_fragment_using_residue_range(int imol, const std::string &chain_id, int res_no_start, int res_no_end);
2515
2519 int apply_transformation_to_atom_selection(int imol, const std::string &atoms_selection_cid,
2520 int n_atoms, // for validation of the atom selection, (int because mmdb atom type)
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, // the centre of the rotation
2525 float t0, float t1, float t2); // translation
2526
2535 bool apply_translation_to_molecule(int imol, float tx, float ty, float tz);
2536
2542 int new_positions_for_residue_atoms(int imol, const std::string &residue_cid, std::vector<coot::api::moved_atom_t> &moved_atoms);
2543
2548 int new_positions_for_atoms_in_residues(int imol, const std::vector<coot::api::moved_residue_t> &moved_residues);
2549
2559 std::pair<int, std::vector<merge_molecule_results_info_t> >
2560 merge_molecules(int imol, const std::string &list_of_other_molecules);
2561
2562 // this is called by the above function and is useful for other non-api functions (such as add_compound()).
2563
2564#ifdef SKIP_FOR_PYTHON_DOXYGEN
2565//#ifdef DOXYGEN_SHOULD_PARSE_THIS
2566#else
2567 std::pair<int, std::vector<merge_molecule_results_info_t> >
2568 merge_molecules(int imol, std::vector<mmdb::Manager *> mols);
2569#endif
2570
2577 int cis_trans_convert(int imol, const std::string &atom_cid);
2578
2593 void replace_residue(int imol, const std::string &residue_cid, const std::string &new_residue_type, int imol_enc);
2594
2602 int replace_fragment(int imol_base, int imol_reference, const std::string &atom_selection);
2603
2609 int rigid_body_fit(int imol, const std::string &multi_cid, int imol_map);
2610
2625 int rotate_around_bond(int imol, const std::string &residue_cid,
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);
2631
2643 std::pair<int, std::string> change_chain_id(int imol, const std::string &from_chain_id,
2644 const std::string &to_chain_id,
2645 bool use_resno_range,
2646 int start_resno, int end_resno);
2647
2657 int split_residue_using_map(int imol, const std::string &residue_cid, int imol_diff_map);
2658
2664 void associate_sequence(int imol, const std::string &name_or_chain_id, const std::string &sequence);
2665
2674 void assign_sequence(int imol_model, int imol_map);
2675
2680 std::vector<std::pair<std::string, std::string> > get_sequence_info(int imol) const;
2681
2689 coot::chain_mutation_info_container_t get_mutation_info(int imol) const;
2690
2691 // -------------------------------- Coordinates Refinement ------------------------------
2693
2703 int refine_residues_using_atom_cid(int imol, const std::string &cid, const std::string &mode, int n_cycles);
2704
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);
2719
2729 int refine_residue_range(int imol, const std::string &chain_id, int res_no_start, int res_no_end, int n_cycles);
2730
2746 std::pair<int, coot::instanced_mesh_t>
2747 minimize_energy(int imol, const std::string &atom_selection_cid,
2748 int n_cycles,
2749 bool do_rama_plot_restraints, float rama_plot_weight,
2750 bool do_torsion_restraints, float torsion_weight, bool refinement_is_quiet);
2751
2763 float
2764 minimize(int imol, const std::string &atom_selection_cid,
2765 int n_cycles,
2766 bool do_rama_plot_restraints, float rama_plot_weight,
2767 bool do_torsion_restraints, float torsion_weight, bool refinement_is_quiet);
2768
2775 void fix_atom_selection_during_refinement(int imol, const std::string &atom_selection_cid);
2776
2784 void add_target_position_restraint(int imol, const std::string &atom_cid, float pos_x, float pos_y, float pos_z);
2785
2790 void clear_target_position_restraint(int imol, const std::string &atom_cid);
2791
2796
2800 void set_logging_level(const std::string &level);
2801
2805 void set_logging_file(const std::string &file_name);
2806
2810 void set_use_rama_plot_restraints(bool state) { use_rama_plot_restraints = state; }
2811
2815 bool get_use_rama_plot_restraints() const { return use_rama_plot_restraints; }
2816
2820 void set_rama_plot_restraints_weight(float f) { rama_plot_restraints_weight = f; }
2821
2825 float get_rama_plot_restraints_weight() const { return rama_plot_restraints_weight; }
2826
2830 void set_use_torsion_restraints(bool state) { use_torsion_restraints = state; }
2831
2835 bool get_use_torsion_restraints() const { return use_torsion_restraints; }
2836
2840 void set_torsion_restraints_weight(float f) { torsion_restraints_weight = f; }
2841
2845 float get_torsion_restraints_weight() const { return torsion_restraints_weight; }
2846
2852 void init_refinement_of_molecule_as_fragment_based_on_reference(int imol_frag, int imol_ref, int imol_map);
2853
2864 std::pair<int, coot::instanced_mesh_t> refine(int imol, int n_cycles);
2865
2881 float pos_x, float pos_y, float pos_z,
2882 int n_cycles);
2887
2892 void clear_refinement(int imol);
2893
2899 void set_refinement_is_verbose(bool state) { refinement_is_quiet = !state; }
2900
2904 void set_refinement_geman_mcclure_alpha(float a) { geman_mcclure_alpha = a; }
2905
2909 float get_geman_mcclure_alpha() const { return geman_mcclure_alpha; }
2910
2915 int generate_self_restraints(int imol, float local_dist_max);
2916
2922 void generate_chain_self_restraints(int imol, float local_dist_max,
2923 const std::string &chain_id);
2924
2930 void generate_local_self_restraints(int imol, float local_dist_max,
2931 const std::string &residue_cids);
2932
2939 const std::string &residue_cid_1,
2940 const std::string &residue_cid_2);
2941
2947
2951 int read_extra_restraints(int imol, const std::string &file_name);
2952
2957
2965 int servalcat_refine_xray(int imol, int imol_map, const std::string &output_prefix);
2966
2967#if NB_VERSION_MAJOR
2976 int servalcat_refine_xray_with_keywords(int imol, int imol_map, const std::string &output_prefix,
2977 const nanobind::dict &key_value_pairs);
2978#endif
2979
2980 // -------------------------------- Coordinates validation ------------------------------
2982
2989
2996
3005
3011 std::vector<coot::phi_psi_prob_t> ramachandran_validation(int imol) const;
3012
3020 coot::instanced_mesh_t contact_dots_for_ligand(int imol, const std::string &cid, unsigned int smoothness_factor) const;
3021
3028 coot::instanced_mesh_t all_molecule_contact_dots(int imol, unsigned int smoothness_factor) const;
3029
3037 // Note this function is not const because we pass a pointer to the protein_geometry geom.
3038 coot::simple::molecule_t get_simple_molecule(int imol, const std::string &residue_cid, bool draw_hydrogen_atoms_flag);
3039
3047
3055 std::vector<moorhen::h_bond> get_h_bonds(int imol, const std::string &cid_str, bool mcdonald_and_thornton_mode) const;
3056
3064 // Function is not const because it might change the protein_geometry geom.
3066
3074 std::vector<coot::geometry_distortion_info_pod_container_t>
3075 get_ligand_validation_vs_dictionary(int imol, const std::string &ligand_cid, bool include_non_bonded_contacts);
3076
3084 std::vector<coot::geometry_distortion_info_pod_container_t>
3085 get_validation_vs_dictionary_for_selection(int imol, const std::string &selection_cid, bool include_non_bonded_contacts);
3086
3096 std::pair<int, double> get_ligand_distortion(int imol, const std::string &ligand_cid, bool include_non_bonded_contacts);
3097
3106 bool match_ligand_torsions(int imol_ligand, int imol_ref, const std::string &chain_id_ref, int resno_ref);
3107
3119 bool match_ligand_position(int imol_ligand, int imol_ref, const std::string &chain_id_ref, int resno_ref);
3120
3129 bool match_ligand_torsions_and_position(int imol_ligand, int imol_ref, const std::string &chain_id_ref, int resno_ref);
3130
3136 bool match_ligand_torsions_and_position_using_cid(int imol_ligand, int imol_ref, const std::string &cid);
3137
3138 // not const because it can dynamically add dictionaries
3140 coot::atom_overlaps_dots_container_t get_overlap_dots(int imol);
3141
3146 coot::atom_overlaps_dots_container_t get_overlap_dots_for_ligand(int imol, const std::string &cid_ligand);
3147
3149 // not const because it can dynamically add dictionaries
3154 std::vector<coot::plain_atom_overlap_t> get_atom_overlaps(int imol);
3155
3160 float get_atom_overlap_score(int imol);
3161
3163 // not const because it can dynamically add dictionaries
3167 std::vector<coot::plain_atom_overlap_t> get_overlaps_for_ligand(int imol, const std::string &cid_ligand);
3168
3176 std::vector <positioned_atom_spec_t>
3177 get_atom_differences(int imol1, int imol2);
3178
3183 std::string get_pucker_analysis_info(int imol) const;
3184
3185
3186 // -------------------------------- Coordinates and map validation ----------------------
3188
3197 coot::validation_information_t density_fit_analysis(int imol_model, int imol_map) const;
3198
3201 double get_sum_density_for_atoms_in_residue(int imol, const std::string &cid,
3202 const std::vector<std::string> &atom_names,
3203 int imol_map);
3204
3210 int get_number_of_atoms_in_residue(int imol, const std::string &residue_cid) const;
3211
3219
3226
3233
3242 coot::validation_information_t ramachandran_analysis_for_chain(int imol_model, const std::string &chain_id) const;
3243
3250
3256 float get_median_temperature_factor(int imol) const;
3257
3264 float get_temperature_factor_of_atom(int imol, const std::string &atom_cid) const;
3265
3271 std::vector<coot::molecule_t::interesting_place_t> get_interesting_places(int imol, const std::string &mode) const;
3272
3280 std::vector<coot::molecule_t::interesting_place_t> difference_map_peaks(int imol_map, int imol_protein, float n_rmsd) const;
3281
3289 std::vector<coot::molecule_t::interesting_place_t> pepflips_using_difference_map(int imol_coords, int imol_difference_map, float n_sigma) const;
3290
3299 std::vector<coot::molecule_t::interesting_place_t> unmodelled_blobs(int imol_model, int imol_map,
3300 float rmsd_cut_off) const;
3301
3314 // Use the string_user_data of the spec for the button label
3315 std::vector <coot::atom_spec_t>
3316 find_water_baddies(int imol_model, int imol_map,
3317 float b_factor_lim,
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);
3322
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;
3331
3341#ifdef SWIG
3342#else
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;
3346
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;
3357#endif
3358
3359 // calculate the MMRRCC for the residues in the chain
3360 // Multi Masked Residue Range Corellation Coefficient
3361#ifdef SWIG
3362#else
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;
3369#endif
3370
3379 std::vector<std::pair<double, double> > fourier_shell_correlation(int imol_map_1, int imol_map_2) const;
3380
3387 int make_power_scaled_map(int imol_ref, int imol_map_for_scaling);
3388
3395 coot::validation_information_t get_q_score(int imol_model, int imol_map) const;
3396
3404 coot::validation_information_t get_q_score_for_cid(int imol_model, const std::string &cid, int imol_map) const;
3405
3412 std::pair<float,float> get_mean_and_variance_of_density_for_non_water_atoms(int imol_coords, int imol_map) const;
3413
3420 float get_spherical_variance(int imol_map, int imol_model, const std::string &atom_cid, float mean_density_other_atoms) const;
3421
3422 // -------------------------------- Rail Points ------------------------------------------
3424
3429
3434
3435 // -------------------------------- Updating Maps ---------------------------------------
3437
3447 void associate_data_mtz_file_with_map(int imol, const std::string &data_mtz_file_name,
3448 const std::string &f_col, const std::string &sigf_col,
3449 const std::string &free_r_col);
3450
3462 int connect_updating_maps(int imol_model, int imol_with_data_info_attached, int imol_map_2fofc, int imol_map_fofc);
3463
3471 void sfcalc_genmap(int imol_model,
3472 int imol_map_with_data_attached,
3473 int imol_updating_difference_map);
3474
3491 int imol_2fofc_map,
3492 int imol_updating_difference_map,
3493 int imol_map_with_data_attached);
3494
3505 bool shift_field_b_factor_refinement(int imol, int imol_with_data_attached);
3506
3514 float get_density_at_position(int imol_map, float x, float y, float z) const;
3515
3523 // This is a light-weight fetch, the values have already been computed, here
3524 // were are merely copying them.
3525 std::vector<std::pair<clipper::Coord_orth, float> > get_diff_diff_map_peaks(int imol_diff_map,
3526 float screen_centre_x,
3527 float screen_centre_y,
3528 float screen_centre_z) const;
3529
3530
3534 std::string get_data_set_file_name(int imol) const;
3535
3536 // -------------------------------- Go To Blob ---------------------------------------
3538
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);
3557
3558
3559 // -------------------------------- Ligand Functions ---------------------------------------
3561
3564 // I am not yet clear what extra cut-offs and flags need to be added here.
3580 std::vector<int> fit_ligand_right_here(int imol_protein, int imol_map, int imol_ligand, float x, float y, float z,
3581 float n_rmsd, bool use_conformers, unsigned int n_conformers);
3582
3586
3587 class fit_ligand_info_t {
3588 public:
3589 int imol; // the imol of the fitted ligand
3590 int cluster_idx; // the index of the cluster
3591 int ligand_idx; // the ligand idx for a given cluster
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; }
3597 float get_fitting_score() const { return fitting_score; }
3598 float get_cluster_volume() const { return cluster_volume; }
3599 };
3600
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);
3613
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);
3626
3635 float fit_to_map_by_random_jiggle(int imol, const coot::residue_spec_t &res_spec, int n_trials, float translation_scale_factor);
3636
3645 float fit_to_map_by_random_jiggle_using_cid(int imol, const std::string &cid, int n_trials, float translation_scale_factor);
3646
3656 float fit_to_map_by_random_jiggle_with_blur_using_cid(int imol, int imol_map, const std::string &cid, float b_factor,
3657 int n_trials, float translation_scale_factor);
3658
3671
3672 int add_compound(int imol, const std::string &tlc, int imol_dict, int imol_map, float x, float y, float z);
3673 // This is a ligand function, not really a ligand-fitting function.
3697 std::string get_svg_for_residue_type(int imol, const std::string &comp_id,
3698 bool use_rdkit_svg,
3699 const std::string &background_type);
3700
3715 std::string get_svg_for_2d_ligand_environment_view(int imol, const std::string &residue_cid, bool add_key);
3716
3723 std::vector<coot::residue_spec_t> get_non_standard_residues_in_molecule(int imol) const;
3724
3731
3742 std::vector<int> get_dictionary_conformers(const std::string &comp_id, int imol_enc, bool remove_internal_clash_conformers);
3743
3754 texture_as_floats_t get_map_section_texture(int imol, int section_id, int axis,
3755 float data_value_for_bottom, float data_value_for_top) const;
3756
3761 int get_number_of_map_sections(int imol_map, int axis_id) const;
3762
3763 // -------------------------------- Others -------------------------------------
3765
3769 coot::simple_mesh_t make_mesh_from_gltf_file(const std::string &file_name);
3770
3776 coot::simple_mesh_t get_octahemisphere(unsigned int n_divisions) const;
3777
3778 unsigned int get_max_number_of_simple_mesh_vertices() const;
3779 void set_max_number_of_simple_mesh_vertices(unsigned int n);
3780
3783 std::string pae_png(const std::string &pae_file_name) const;
3784
3785 // -------------------------------- Testing -------------------------------------
3787
3788 class ltj_stats_t {
3789 public:
3790 unsigned int count;
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()) {
3795 count = 0;
3796 function_value = 0;
3797 timer_start = timer;
3798 }
3801 timer = std::chrono::high_resolution_clock::now();
3802 count += 1;
3803 }
3804
3809 timer = std::chrono::high_resolution_clock::now();
3810 auto d10 = std::chrono::duration_cast<std::chrono::microseconds>(timer - timer_start).count();
3811 return d10;
3812 }
3813 };
3814
3817
3818 // not for user-control
3819 bool interrupt_long_term_job;
3820
3826 void testing_start_long_term_job(unsigned int n_seconds);
3827
3832
3837
3841 double get_contouring_time() const { return contouring_time; }
3842
3848 void set_max_number_of_threads(unsigned int n_threads);
3849
3853 void set_max_number_of_threads_in_thread_pool(unsigned int n_threads);
3854
3860 double test_the_threading(int n_threads);
3861
3868 double test_launching_threads(unsigned int n_threads_per_batch, unsigned int n_batches) const;
3869
3875 double test_thread_pool_threads(unsigned int n_threads);
3876
3886 int mmcif_tests(bool last_test_only);
3887
3888 // I want this function in the C++ documentation, but not the Python API documentation.
3889 // Hmm.
3890#ifdef DOXYGEN_SHOULD_PARSE_THIS
3891#else
3893 coot::protein_geometry & get_geometry() {
3894 return geom;
3895 }
3896#endif
3897
3898 // -------------------------------- Blender Interface ---------------------------------------
3899
3901
3903 void make_mesh_for_map_contours_for_blender(int imol, float x, float y, float z, float level, float radius);
3905 void make_mesh_for_bonds_for_blender(int imol, const std::string &mode, bool against_a_dark_background,
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);
3925 void make_mesh_for_gaussian_surface_for_blender(int imol, float sigma, float contour_level, float box_radius, float grid_scale, float b_factor);
3927
3929 void make_mesh_for_goodsell_style_for_blender(int imol, float colour_wheel_rotation_step,
3930 float saturation, float goodselliness);
3931
3933 std::vector<float> get_colour_table_for_blender(int imol);
3935 std::vector<float> get_vertices_for_blender(int imol);
3937 std::vector<int> get_triangles_for_blender(int imol);
3938
3939 // -------------------------------- Pyrogen ---------------------------------------
3940
3947 int pyrogen_from_SMILES(const std::string &smiles_string, const std::string &compound_id);
3948
3953 int pyrogen_from_ccd_file(const std::string &ccd_file_name);
3954
3962 int pyrogen_from_rdkit_mol_pickle_base64(const std::string &rdkit_mol_pickled_string, const std::string &compound_id);
3963
3964 // -------------------------------- Other ---------------------------------------
3965
3966 void test_function(const std::string &s);
3967
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);
3984
3985#if NB_VERSION_MAJOR
3986 // skip this (old) block for nanobinds
3987#else
3988#ifdef DOXYGEN_SHOULD_PARSE_THIS
3989
3991
3993 enum mesh_mode_t { UNKNOWN, SINGLE_COLOUR, MULTI_COLOUR };
3995 PyObject *simple_mesh_to_pythonic_mesh(const coot::simple_mesh_t &mesh, int mesh_mode);
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);
4027
4028#endif
4029#endif
4030
4031};
4032
4033#endif // MOLECULES_CONTAINER_HH
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 validation-information.hh:39
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 &param_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 redo(int imol)
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
int dedust_map(int imol)
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
int undo(int imol)
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
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 &param_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