23 #ifndef CC_INTERFACE_HH
24 #define CC_INTERFACE_HH
36 #include "utils/coot-utils.hh"
37 #include "coot-utils/coot-coord-utils.hh"
38 #include "coot-utils/coot-density-stats.hh"
40 #include "ligand/dipole.hh"
41 #include "high-res/sequence-assignment.hh"
43 #include "coords/mmdb-extras.h"
44 #include "coords/mmdb-crystal.h"
46 #include "pli/flev-annotations.hh"
47 #include "named-rotamer-score.hh"
49 #include "coords/phenix-geo.hh"
63 alias_path_t(
int index_in,
const std::string &s_in,
bool flag_in) : s(s_in) {
94 std::string git_commit();
96 std::vector<std::string> filtered_by_glob(
const std::string &pre_directory,
100 string_member(
const std::string &search,
const std::vector<std::string> &list);
101 bool compare_strings(
const std::string &a,
const std::string &b);
104 std::string pre_directory_file_selection(GtkWidget *sort_button);
105 void filelist_into_fileselection_clist(GtkWidget *fileselection,
const std::vector<std::string> &v);
107 GtkWidget *wrapped_nothing_bad_dialog(
const std::string &label);
109 std::pair<short int, float> float_from_entry(GtkWidget *entry);
110 std::pair<short int, int> int_from_entry(GtkWidget *entry);
113 add_validation_mol_menu_item(
int imol,
const std::string &name, GtkWidget *menu, GtkSignalFunc callback);
114 void create_initial_validation_graph_submenu_generic(GtkWidget *window1,
115 const std::string &menu_name,
116 const std::string &sub_menu_name);
118 std::string probe_dots_short_contact_name_to_expanded_name(
const std::string &short_name);
124 std::string menu_item_label(GtkWidget *menu_item);
127 std::vector<std::pair<coot::residue_spec_t, double> >
128 add_cablam_markup(
int imol,
const std::string &cablam_file_name);
130 SCM add_cablam_markup_scm(
int imol,
const std::string &cablam_log_file_name);
133 PyObject *add_cablam_markup_py(
int imol,
const std::string &cablam_log_file_name);
145 SCM goto_next_atom_maybe_scm(
const char *chain_id,
int resno,
const char *ins_code,
const char *atom_name);
146 SCM goto_prev_atom_maybe_scm(
const char *chain_id,
int resno,
const char *ins_code,
const char *atom_name);
151 PyObject *goto_next_atom_maybe_py(
const char *chain_id,
int resno,
const char *ins_code,
const char *atom_name);
152 PyObject *goto_prev_atom_maybe_py(
const char *chain_id,
int resno,
const char *ins_code,
const char *atom_name);
155 int set_go_to_atom_from_spec(
const coot::atom_spec_t &atom_spec);
156 int set_go_to_atom_from_res_spec(
const coot::residue_spec_t &spec);
158 int set_go_to_atom_from_res_spec_scm(SCM residue_spec);
159 int set_go_to_atom_from_atom_spec_scm(SCM residue_spec);
162 int set_go_to_atom_from_res_spec_py(PyObject *residue_spec);
163 int set_go_to_atom_from_atom_spec_py(PyObject *residue_spec);
172 std::pair<bool, std::pair<int, coot::atom_spec_t> > active_atom_spec();
175 PyObject *active_atom_spec_py();
199 PyObject *get_symmetry_py(
int imol);
211 void add_molecular_symmetry(
int imol,
212 double r_00,
double r_01,
double r_02,
213 double r_10,
double r_11,
double r_12,
214 double r_20,
double r_21,
double r_22,
215 double about_origin_x,
216 double about_origin_y,
217 double about_origin_z);
219 int add_molecular_symmetry_from_mtrix_from_file(
int imol,
const std::string &file_name);
221 int add_molecular_symmetry_from_mtrix_from_self_file(
int imol);
242 std::vector<int> auto_read_make_and_draw_maps_from_cns(
const char *filename);
245 void add_map_colour_mol_menu_item(
int imol,
const std::string &name,
246 GtkWidget *sub_menu, GtkSignalFunc callback);
248 void add_map_scroll_wheel_mol_menu_item(
int imol,
249 const std::string &name,
251 GtkSignalFunc callback);
288 PyObject *amplitude_vs_resolution_py(
int mol_map);
292 SCM amplitude_vs_resolution_scm(
int mol_map);
307 int analyse_map_point_density_change_py(PyObject *map_number_list);
341 int read_ccp4_map(
const std::string &filename,
int is_diff_map_flag);
346 int handle_read_emdb_data(
const std::string &dir_name);
359 void multi_residue_torsion_fit(
int imol,
const std::vector<coot::residue_spec_t> &specs,
int n_trials);
395 std::string pdb_out_filename,
396 std::string mtz_in_filename,
397 std::string mtz_out_filename,
398 std::string cif_lib_filename,
399 std::string fobs_col_name,
400 std::string sigfobs_col_name,
401 std::string r_free_col_name,
402 short int have_sensible_free_r_flag,
403 short int make_molecules_flag,
404 std::string refmac_count_string,
405 int swap_map_colours_post_refmac_flag,
408 int phase_combine_flag,
409 std::string phib_string,
410 std::string fom_string,
411 std::string ccp4i_project_dir);
429 str_mtime(std::string file_in, time_t mtime_in) {
441 std::string directory_prefix;
442 std::vector<str_mtime> file_mtimes;
449 std::vector<std::pair<std::string, std::string> > parse_ccp4i_defs(
const std::string &filename);
451 std::string ccp4_project_directory(
const std::string &ccp4_project_name);
456 #include "command-arg.hh"
458 void add_to_history(
const std::vector<std::string> &ls);
459 void add_to_history_simple(
const std::string &cmd);
460 void add_to_history_typed(
const std::string &command,
461 const std::vector<coot::command_arg_t> &args);
462 std::string single_quote(
const std::string &s);
463 std::string pythonize_command_name(
const std::string &s);
464 std::string schemize_command_name(
const std::string &s);
465 std::string languagize_command(
const std::vector<std::string> &command_parts);
467 void add_to_database(
const std::vector<std::string> &command_strings);
473 #include "merge-molecule-results-info-t.hh"
476 std::pair<int, std::vector<merge_molecule_results_info_t> > merge_molecules_by_vector(
const std::vector<int> &add_molecules,
int imol);
483 std::vector<std::string> dictionary_entries();
484 void debug_dictionary();
486 std::string SMILES_for_comp_id(
const std::string &comp_id);
490 SCM cif_file_for_comp_id_scm(
const std::string &comp_id);
491 SCM dictionary_entries_scm();
492 SCM SMILES_for_comp_id_scm(
const std::string &comp_id);
497 PyObject *dictionaries_read_py();
498 PyObject *cif_file_for_comp_id_py(
const std::string &comp_id);
499 PyObject *dictionary_entries_py();
500 PyObject *SMILES_for_comp_id_py(
const std::string &comp_id);
509 SCM monomer_restraints(
const char *monomer_type);
523 PyObject *monomer_restraints_py(std::string monomer_type);
524 PyObject *monomer_restraints_for_molecule_py(std::string monomer_type,
int imol);
525 PyObject *set_monomer_restraints_py(
const char *monomer_type, PyObject *restraints);
533 std::vector<std::pair<std::string, coot::residue_spec_t> >
534 list_nomenclature_errors(
int imol);
537 SCM list_nomenclature_errors_scm(
int imol);
540 PyObject *list_nomenclature_errors_py(
int imol);
544 show_fix_nomenclature_errors_gui(
int imol,
545 const std::vector<std::pair<std::string, coot::residue_spec_t> > &nomenclature_errors);
553 SCM dipole_to_scm(std::pair<coot::dipole, int> dp);
556 PyObject *dipole_to_py(std::pair<coot::dipole, int> dp);
561 PyObject *coot_has_guile();
564 bool coot_can_do_lidia_p();
570 PyObject *run_scheme_command(
const char *scheme_command);
573 SCM run_python_command(
const char *python_command);
582 int pyrun_simple_string(
const char *python_command);
590 SCM residue_spec_to_scm(
const coot::residue_spec_t &res);
599 PyObject *residue_spec_to_py(
const coot::residue_spec_t &res);
603 PyObject *residue_spec_make_triple_py(PyObject *residue_spec_py);
607 coot::residue_spec_t residue_spec_from_scm(SCM residue_in);
611 coot::residue_spec_t residue_spec_from_py(PyObject *residue_in);
617 coot::residue_spec_t get_residue_by_type(
int imol,
const std::string &residue_type);
619 std::vector<coot::residue_spec_t> get_residue_specs_in_mol(
int imol,
const std::string &residue_type);
623 PyObject *get_residue_specs_in_mol_py(
int imol,
const std::string &residue_type);
628 SCM get_residue_by_type_scm(
int,
const std::string &residue_type);
632 PyObject *get_residue_by_type_py(
int,
const std::string &residue_type);
641 SCM atom_info_string_scm(
int imol,
const char *chain_id,
int resno,
648 const char *ins_code,
const char *atname,
649 const char *altconf);
650 SCM molecule_to_pdb_string_scm(
int imol);
659 std::string
residue_name(
int imol,
const std::string &chain_id,
int resno,
const std::string &ins_code);
669 SCM
residue_info(
int imol,
const char* chain_id,
int resno,
const char *ins_code);
681 SCM residue_name_scm(
int imol,
const char* chain_id,
int resno,
const char *ins_code);
689 int add_molecule(SCM molecule_expression,
const char *name);
789 const char *ins_code,
const char *atname,
790 const char *altconf);
806 PyObject *
residue_info_py(
int imol,
const char* chain_id,
int resno,
const char *ins_code);
807 PyObject *residue_name_py(
int imol,
const char* chain_id,
int resno,
const char *ins_code);
810 PyObject *residue_centre_from_spec_py(
int imol,
813 PyObject *chain_fragments_py(
int imol,
short int screen_output_also);
816 void set_b_factor_residues_py(
int imol, PyObject *residue_specs_b_value_tuple_list_py);
820 void set_b_factor_residues_scm(
int imol, SCM residue_specs_b_value_tuple_list_scm);
832 int clear_and_update_molecule_py(
int molecule_number, PyObject *molecule_expression);
834 int add_molecule_py(PyObject *molecule_expression,
const char *name);
882 PyObject *residues_near_residue_py(
int imol, PyObject *residue_in,
float radius);
889 PyObject *residues_near_residues_py(
int imol, PyObject *residues_in,
float radius);
932 std::string atom_info_as_text_for_statusbar(
int atom_index,
int imol);
933 std::string atom_info_as_text_for_statusbar(
int atom_index,
int imol,
934 const std::pair<symm_trans_t, Cell_Translation> &sts);
951 PyObject *all_residues_with_serial_numbers_py(
int imol);
970 const char*inscode_1,
972 const char*inscode_2,
973 const char *altconf);
977 PyObject *refine_zone_with_full_residue_spec_py(
int imol,
const char *chain_id,
979 const char*inscode_1,
981 const char*inscode_2,
982 const char *altconf);
985 void set_show_intermediate_atoms_rota_markup(
short int state);
986 void set_show_intermediate_atoms_rama_markup(
short int state);
988 void set_cryo_em_refinement(
bool mode);
989 bool get_cryo_em_refinement();
992 SCM accept_moving_atoms_scm();
995 PyObject *accept_moving_atoms_py();
1000 void register_post_intermediate_atoms_moved_hook(PyObject *function_name);
1003 void set_regenerate_bonds_needs_make_bonds_type_checked(
bool state);
1004 bool get_regenerate_bonds_needs_make_bonds_type_checked_state();
1023 int morph_fit_all(
int imol,
float transformation_averaging_radius);
1026 int morph_fit_chain(
int imol, std::string chain_id,
float transformation_averaging_radius);
1028 int morph_fit_residues_scm(
int imol, SCM residue_specs,
float transformation_averaging_radius);
1031 int morph_fit_residues_py(
int imol, PyObject *residue_specs,
float transformation_averaging_radius);
1033 int morph_fit_residues(
int imol,
const std::vector<coot::residue_spec_t> &residue_specs,
1035 float transformation_averaging_radius);
1046 std::vector<coot::atom_spec_t>
1047 check_waters_baddies(
int imol,
float b_factor_lim,
float map_sigma_lim,
float min_dist,
float max_dist,
short int part_occ_contact_flag,
short int zero_occ_flag,
short int logical_operator_and_or_flag);
1051 std::vector<std::pair<clipper::Coord_orth, double> >
1052 find_blobs(
int imol_model,
int imol_map,
float cut_off_density_level);
1055 SCM
find_blobs_scm(
int imol_model,
int imol_map,
float cut_off_density_level);
1059 PyObject *find_blobs_py(
int imol_model,
int imol_map,
float cut_off_density_level);
1085 PyObject *water_chain_from_shelx_ins_py(
int imol);
1101 print_glyco_tree(
int imol,
const std::string &chain_id,
int resno,
const std::string &ins_code);
1115 int make_variance_map(std::vector<int> map_molecule_number_vec);
1117 int make_variance_map_scm(SCM map_molecule_number_list);
1120 int make_variance_map_py(PyObject *map_molecule_number_list);
1130 void spin_search_by_atom_vectors(
int imol_map,
int imol,
const std::string &chain_id,
int resno,
const std::string &ins_code,
const std::pair<std::string, std::string> &direction_atoms_list,
const std::vector<std::string> &moving_atoms_list);
1132 void spin_search(
int imol_map,
int imol,
const char *chain_id,
int resno,
const char *ins_code, SCM direction_atoms_list, SCM moving_atoms_list);
1143 void spin_N_scm(
int imol, SCM residue_spec_scm,
float angle);
1152 void spin_search_py(
int imol_map,
int imol,
const char *chain_id,
int resno,
const char *ins_code, PyObject *direction_atoms_list, PyObject *moving_atoms_list);
1164 void spin_N_py(
int imol, PyObject *residue_spec,
float angle);
1177 std::vector<std::pair<std::string, std::string> > monomer_lib_3_letter_codes_matching(
const std::string &search_string,
short int allow_minimal_descriptions_flag);
1179 void on_monomer_lib_search_results_button_press (GtkButton *button, gpointer user_data);
1180 void on_monomer_lib_sbase_molecule_button_press (GtkButton *button, gpointer user_data);
1185 int mutate_internal(
int ires,
const char *chain_id,
1186 int imol, std::string &target_res_type);
1193 coot::graph_match_info_t
1194 overlap_ligands_internal(
int imol_ligand,
int imol_ref,
const char *chain_id_ref,
1195 int resno_ref,
bool apply_rtop_flag);
1212 SCM ligand_search_make_conformers_scm();
1216 PyObject *ligand_search_make_conformers_py();
1219 std::vector<int> ligand_search_make_conformers_internal();
1226 void add_animated_ligand_interaction(
int imol,
const coot::fle_ligand_bond_t &lb);
1232 int cootaneer_internal(
int imol_map,
int imol_model,
const coot::atom_spec_t &atom_spec);
1235 int cootaneer(
int imol_map,
int imol_model, SCM atom_in_fragment_atom_spec);
1247 int cootaneer_py(
int imol_map,
int imol_model, PyObject *atom_in_fragment_atom_spec);
1263 std::string sequence_from_map(
int imol,
const std::string &chain_id,
1264 int resno_start,
int resno_end,
int imol_map);
1266 void apply_sequence_to_fragment(
int imol,
const std::string &chain_id,
int resno_start,
int resno_end,
1267 int imol_map,
const std::string &file_name_for_sequences);
1269 void assign_sequence_to_active_fragment();
1280 std::pair<short int, std::string> is_interesting_dots_object_next_p(
const std::vector<std::string> &vs);
1286 SCM generic_string_vector_to_list_internal(
const std::vector<std::string> &v);
1287 SCM generic_int_vector_to_list_internal(
const std::vector<int> &v);
1288 std::vector<std::string> generic_list_to_string_vector_internal(SCM l);
1289 SCM rtop_to_scm(
const clipper::RTop_orth &rtop);
1290 SCM inverse_rtop_scm(SCM rtop_scm);
1292 coot::atom_spec_t atom_spec_from_scm_expression(SCM expr);
1293 SCM atom_spec_to_scm(
const coot::atom_spec_t &spec);
1297 PyObject *generic_string_vector_to_list_internal_py(
const std::vector<std::string>&v);
1298 PyObject *generic_int_vector_to_list_internal_py(
const std::vector<int> &v);
1299 std::vector<std::string> generic_list_to_string_vector_internal_py(PyObject *l);
1300 PyObject *rtop_to_python(
const clipper::RTop_orth &rtop);
1301 PyObject *inverse_rtop_py(PyObject *rtop_py);
1302 coot::atom_spec_t atom_spec_from_python_expression(PyObject *expr);
1303 PyObject *atom_spec_to_py(
const coot::atom_spec_t &spec);
1306 void set_display_control_button_state(
int imol,
const std::string &button_type,
int state);
1312 mmdb::Manager *new_molecule_by_symmetry_matrix_from_molecule(mmdb::Manager *mol,
1313 double m11,
double m12,
double m13,
1314 double m21,
double m22,
double m23,
1315 double m31,
double m32,
double m33,
1316 double tx,
double ty,
double tz,
1317 int pre_shift_to_origin_na,
1318 int pre_shift_to_origin_nb,
1319 int pre_shift_to_origin_nc);
1334 int coot_get_url(
const char *url,
const char *file_name);
1335 int coot_get_url_and_activate_curl_hook(
const char *url,
const char *file_name,
short int do_hook_flag);
1338 SCM coot_get_url_as_string(
const char *url);
1341 SCM curl_progress_info(
const char *file_name);
1345 PyObject *coot_get_url_as_string_py(
const char *url);
1348 PyObject *curl_progress_info_py(
const char *file_name);
1351 size_t write_coot_curl_data(
void *buffer,
size_t size,
size_t nmemb,
void *userp);
1353 size_t write_coot_curl_data_to_file(
void *buffer,
size_t size,
size_t nmemb,
void *userp);
1355 std::string coot_get_url_as_string_internal(
const char *url);
1356 void *wrapped_curl_easy_perform(
void *data);
1357 void stop_curl_download(
const char *file_name);
1359 std::string get_drug_mdl_via_wikipedia_and_drugbank(std::string drugname);
1369 void orient_view(
int imol,
1370 const coot::residue_spec_t ¢ral_residue_spec,
1371 const coot::residue_spec_t &neighbour_residue_spec);
1376 std::vector<std::string>
1377 topological_equivalence_chiral_centres(
const std::string &residue_type);
1386 make_complementary_dotted_surfaces(
int imol_1,
int imol_2,
1387 std::vector<coot::residue_spec_t> &r1,
1388 std::vector<coot::residue_spec_t> &r2);
1390 std::vector<coot::residue_spec_t>
1391 residue_records_list_scm_to_residue_specs(SCM mol_1_residue_records,
1392 const std::string &chain_id);
1393 SCM symbol_value_from_record(SCM record_1,
const std::string &symbol);
1396 std::vector<coot::residue_spec_t>
1397 residue_records_list_py_to_residue_specs(PyObject *mol_1_residue_records,
1398 const std::string &chain_id);
1403 add_generic_object_bond(
int imol1,
int imol2,
1404 const coot::atom_spec_t &atom_spec_1,
1405 const coot::atom_spec_t &atom_spec_2,
1406 int generic_object_number,
1407 const std::string &colour);
1410 pisa_interfaces_display_only(
int imol_1,
int imol_2, clipper::Coord_orth centre_pt);
1411 std::string untangle_mmdb_chain_id_string(
const std::string &mmdb_chain_id_in);
1421 std::vector<coot::named_rotamer_score> score_rotamers(
int imol,
1422 const char *chain_id,
1424 const char *ins_code,
1425 const char *alt_conf,
1428 float lowest_probability);
1437 const char *chain_id,
1439 const char *ins_code,
1440 const char *alt_conf,
1443 float lowest_probability);
1448 PyObject *score_rotamers_py(
int imol,
1449 const char *chain_id,
1451 const char *ins_code,
1452 const char *alt_conf,
1455 float lowest_probability);
1474 std::pair<std::pair<int, int> , std::vector<int> >
1476 const std::vector<coot::residue_spec_t> &residue_specs,
1477 int imol_map,
int nfrags,
bool preserve_residue_names);
1483 protein_db_loop_specs_to_atom_selection_string(
const std::vector<coot::residue_spec_t> &specs);
1485 SCM protein_db_loops_scm(
int imol_coords, SCM residues_specs,
int imol_map,
int nfrags,
bool preserve_residue_names);
1488 PyObject *protein_db_loops_py(
int imol_coords, PyObject *residues_specs,
int imol_map,
int nfrags,
bool preserve_residue_names);
1506 float start_x,
float start_y,
float start_z,
1507 float end_x,
float end_y,
float end_z,
1508 float colour_map_multiplier,
float colour_map_offset,
1509 int n_runs,
bool show_probe_radius_graph_flag,
1510 std::string export_surface_dots_file_name);
1514 void probe_radius_graph_close_callback( GtkWidget *button,
1516 void show_hole_probe_radius_graph(
const std::vector<std::pair<clipper::Coord_orth, double> > &hole_path,
double path_length);
1517 void show_hole_probe_radius_graph_basic(
const std::vector<std::pair<clipper::Coord_orth, double> > &hole_path,
double path_length);
1518 void show_hole_probe_radius_graph_goocanvas(
const std::vector<std::pair<clipper::Coord_orth, double> > &hole_path,
double path_length);
1527 make_link(
int imol, coot::atom_spec_t &spec_1, coot::atom_spec_t &spec_2,
1528 const std::string &link_name,
float length);
1530 void make_link_scm(
int imol, SCM spec_1, SCM spec_2,
const std::string&link_name,
float length);
1534 SCM link_info_scm(
int imol);
1537 void make_link_py(
int imol, PyObject *spec_1, PyObject *spec_2,
const std::string&link_name,
float length);
1541 PyObject *link_info_py(
int imol);
1567 #endif // USE_PYTHON
1615 SCM neighb_residue_specs,
1616 unsigned short int atom_mask_mode,
1618 SCM map_to_model_correlation_stats_scm(
int imol,
1620 SCM neighb_residue_specs,
1621 unsigned short int atom_mask_mode,
1626 PyObject *map_to_model_correlation_py(
int imol,
1627 PyObject *residue_specs,
1628 PyObject *neighb_residue_specs,
1629 unsigned short int atom_mask_mode,
1631 PyObject *map_to_model_correlation_stats_py(
int imol,
1632 PyObject *residue_specs,
1633 PyObject *neighb_residue_specs,
1634 unsigned short int atom_mask_mode,
1638 map_to_model_correlation_stats_per_residue_range_py(
int imol,
1639 const std::string &chain_id,
1641 unsigned int n_residue_per_residue_range,
1642 short int exclude_NOC_flag);
1656 const std::vector<coot::residue_spec_t> &residue_specs,
1657 const std::vector<coot::residue_spec_t> &neigh_residue_specs,
1658 unsigned short int atom_mask_mode,
1671 coot::util::density_correlation_stats_info_t
1673 const std::vector<coot::residue_spec_t> &residue_specs,
1674 const std::vector<coot::residue_spec_t> &neigh_residue_specs,
1675 unsigned short int atom_mask_mode,
1689 std::vector<std::pair<coot::residue_spec_t,float> >
1691 unsigned short int atom_mask_mode,
1695 std::map<coot::residue_spec_t, coot::util::density_stats_info_t>
1697 const std::vector<coot::residue_spec_t> &residue_specs,
1698 unsigned short int atom_mask_mode,
1699 float atom_radius_for_masking,
1706 std::pair<std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t>,
1707 std::map<coot::residue_spec_t, coot::util::density_correlation_stats_info_t> >
1709 unsigned int n_residue_per_residue_range,
1710 short int exclude_NOC_flag);
1712 #endif // not for swigging.
1718 unsigned short int atom_mask_mode,
1724 SCM residue_specs_scm,
1725 unsigned short int atom_mask_mode,
1726 float atom_radius_for_masking,
1729 SCM map_to_model_correlation_stats_per_residue_range_scm(
int imol,
const std::string &chain_id,
int imol_map,
1730 unsigned int n_residue_per_residue_range,
1731 short int exclude_NOC_flag);
1745 SCM residue_specs_scm,
1746 SCM neigh_residue_specs_scm,
1747 unsigned short int atom_mask_mode,
1752 PyObject *map_to_model_correlation_per_residue_py(
int imol, PyObject *residue_specs,
1753 unsigned short int atom_mask_mode,
1755 PyObject *qq_plot_map_and_model_py(
int imol,
1756 PyObject *residue_specs_py,
1757 PyObject *neigh_residue_specs_py,
1758 unsigned short int atom_mask_mode,
1764 float density_score_residue_scm(
int imol, SCM residue_spec,
int imol_map);
1767 float density_score_residue_py(
int imol, PyObject *residue_spec,
int imol_map);
1772 float density_score_residue(
int imol,
const char *chain_id,
int res_no,
const char *ins_code,
int imol_map);
1779 SCM map_sigma_scm(
int imol);
1787 PyObject *map_sigma_py(
int imol);
1788 PyObject *map_statistics_py(
int imol);
1813 void register_interesting_positions_list_scm(SCM pos_list);
1816 void register_interesting_positions_list_py(PyObject *pos_list);
1817 #endif // USE_PYTHON
1823 PyObject *molecule_atom_overlaps_py(
int imol);
1824 #endif // USE_PYTHON
1826 SCM molecule_atom_overlaps_scm(
int imol);
1867 std::pair<int, std::string>
1872 PyObject *align_to_closest_chain_py(std::string target_seq,
float match_fraction);
1875 SCM align_to_closest_chain_scm(std::string target_seq,
float match_fraction);
1882 SCM spherical_density_overlap(SCM i_scm, SCM j_scm);
1884 #endif // __cplusplus
1886 void resolve_clashing_sidechains_by_deletion(
int imol);
1888 void resolve_clashing_sidechains_by_rebuilding(
int imol);
1895 int geom_x,
int geom_y);
1903 const coot::phenix_geo_bonds &g);
1906 const std::string &geo_file_name);
1914 #endif // USE_PYTHON
1922 const std::string &fp_col,
1923 const std::string &sigfp_col);
1924 #endif // USE_PYTHON
1935 std::pair<int, int> decode_ints(
int i);
1941 std::vector<coot::residue_spec_t> scm_to_residue_specs(SCM s);
1943 int key_sym_code_scm(SCM s_scm);
1946 std::vector<coot::residue_spec_t> py_to_residue_specs(PyObject *s);
1947 int key_sym_code_py(PyObject *po);
1948 #endif // USE_PYTHON
1951 PyObject *scm_to_py(SCM s);
1952 SCM py_to_scm(PyObject *o);
1954 #endif // USE_PYTHON
1957 clipper::Spacegroup scm_symop_strings_to_space_group(SCM symop_string_list);
1961 clipper::Spacegroup py_symop_strings_to_space_group(PyObject *symop_string_list);
1964 #endif // CC_INTERFACE_HH
int serial_number_from_residue_specs(int imol, const std::string &chain_id, int res_no, const std::string &ins_code)
return the serial number of the specified residue
void set_radial_map_colouring_centre(int imol, float x, float y, float z)
radial map colouring centre
SCM residues_near_residues_scm(int imol, SCM residues_in, float radius)
return residues near the given residues
void go_to_map_molecule_centre(int imol_map)
Go to the centre of the molecule - for Cryo-EM Molecules.
*PyObject * atom_info_string_py(int imol, const char *chain_id, int resno, const char *ins_code, const char *atname, const char *altconf)
output atom info in a python list for use in scripting:
std::vector< int > auto_read_make_and_draw_maps(const char *filename)
read MTZ file filename and from it try to make maps
int sharpen_blur_map_with_resampling(int imol_map, float b_factor, float resample_factor)
make a sharpened or blurred map with resampling
int sharpen_blur_map(int imol_map, float b_factor)
make a sharpened or blurred map
SCM closest_atom_raw_scm()
return the specs of the closest atom to the centre of the screen
PyObject * get_bonds_representation(int imol)
return a Python object for the bonds
PyObject * closest_atom_simple_py()
return the spec of the closest displayed atom
std::string residue_name(int imol, const std::string &chain_id, int resno, const std::string &ins_code)
return the residue name of the specified residue
float b_factor_from_map(int imol_map)
b-factor from map
SCM CG_spin_search_scm(int imol_model, int imol_map)
Spin search the density based on possible positions of CG of a side-chain.
void write_sequence(int imol, const std::string &file_name)
write the sequence for imol as fasta
PyObject * water_chain_py(int imol)
return the chain id of the water chain. Raw interface
int rigid_body_fit_with_residue_ranges(int imol, const std::vector< coot::residue_range_t > &ranges)
return 0 on fail to refine (no sensible place to put atoms) and 1 on fitting happened.
void add_hydrogens_from_file(int imol, std::string pdb_with_Hs_file_name)
Add hydrogens to imol from the given pdb file.
*SCM set_monomer_restraints(const char *monomer_type, SCM restraints)
set the monomer restraints of the given monomer_type
int read_ccp4_map(const std::string &filename, int is_diff_map_flag)
read a CCP4 map or a CNS map (despite the name).
SCM residue_info(int imol, const char *chain_id, int resno, const char *ins_code)
Return a list of atom info for each atom in the specified residue.
void spin_N_scm(int imol, SCM residue_spec_scm, float angle)
Spin N and CB (and the rest of the side chain if extant)
str mtime for for attributes
Definition: cc-interface.hh:427
std::string get_sequence_as_fasta_for_chain(int imol, const std::string &chain_id)
get the sequence for chain_id in imol
void regularize_residues(int imol, const std::vector< coot::residue_spec_t > &residues)
regularize the given residues
void spin_search_py(int imol_map, int imol, const char *chain_id, int resno, const char *ins_code, PyObject *direction_atoms_list, PyObject *moving_atoms_list)
for the given residue, spin the atoms in moving_atom_list...
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 > > map_to_model_correlation_stats_per_residue_range(int imol, const std::string &chain_id, int imol_map, unsigned int n_residue_per_residue_range, short int exclude_NOC_flag)
map to model density statistics, reported per residue, the middle residue of a range of residues ...
void store_keyed_user_name(std::string key, std::string user_name, std::string passwd)
store username and password for the database.
SCM score_rotamers_scm(int imol, const char *chain_id, int res_no, const char *ins_code, const char *alt_conf, int imol_map, int clash_flag, float lowest_probability)
return the scores of the rotamers for this residue.
std::string refmac_name(int imol)
the name for refmac
void b_factor_distribution_graph(int imol)
B-factor distribution histogram.
SCM water_chain_scm(int imol)
return the chain id of the water chain. Raw interface
SCM map_colour_components(int imol)
return the colour triple of the imolth map
SCM map_to_model_correlation_stats_per_residue_scm(int imol, SCM residue_specs_scm, unsigned short int atom_mask_mode, float atom_radius_for_masking, int imol_map)
map to model stats
std::pair< int, std::string > align_to_closest_chain(std::string target_seq, float match_fraction)
align sequence to closest chain (compare across all chains in all molecules).
void label_closest_atoms_in_neighbour_residues_scm(int imol, SCM residue_spec_scm, float radius)
label the closest atoms in the residues that neighbour residue_spec
int morph_fit_by_secondary_structure_elements(int imol, const std::string &chain_id)
morph transformation are based primarily on rigid body refinement of the secondary structure elements...
int merge_fragments(int imol)
each fragment is presumed to be in its own chain.
int add_molecule(SCM molecule_expression, const char *name)
generate a molecule from an s-expression
PyObject * get_environment_distances_representation_py(int imol, PyObject *residue_spec_py)
return a Python object for the representation of bump and hydrogen bonds of
void spin_N_py(int imol, PyObject *residue_spec, float angle)
Spin N and CB (and the rest of the side chain if extant)
PyObject * map_contours(int imol, float contour_level)
return two lists: a list of vertices and a list of indices for connection
void print_glyco_tree(int imol, const std::string &chain_id, int resno, const std::string &ins_code)
print the glycosylation tree that contains the specified residue
SCM multi_residue_torsion_fit_scm(int imol, SCM residues_specs_scm, int n_trials)
fit residues
float density_score_residue(int imol, const char *chain_id, int res_no, const char *ins_code, int imol_map)
simple density score for given residue (over-ridden by scripting function)
PyObject * map_colour_components_py(int imol)
return the colour triple of the imolth map
pisa internal function
Definition: cc-interface.hh:71
int handle_drag_and_drop_string(const std::string &uri)
handle the string that get when a file or URL is dropped.
SCM find_blobs_scm(int imol_model, int imol_map, float cut_off_density_level)
find blobs
void prodrg_import_function(std::string file_name, std::string comp_id)
import given mdl file into prodrg or other 3d generation program
void set_radial_map_colouring_invert(int imol, int invert_state)
radial map colouring inverted colour map
SCM dictionaries_read()
return a list of all the dictionaries read
PyObject * map_mean_py(int imol)
return sigma for the given map. Return Python False if not a valid map molecule number.
alias path
Definition: cc-interface.hh:58
std::pair< std::pair< int, int >, std::vector< int > > protein_db_loops(int imol_coords, const std::vector< coot::residue_spec_t > &residue_specs, int imol_map, int nfrags, bool preserve_residue_names)
Cowtan's protein_db loops.
void sbase_import_function(std::string comp_id)
import molecule from CCP4 SRS (or SBase, as it used to be called).
int analyse_map_point_density_change(const std::vector< int > &map_number_list)
test function for analysis of multiple map
SCM map_to_model_correlation_scm(int imol, SCM residue_specs, SCM neighb_residue_specs, unsigned short int atom_mask_mode, int imol_map)
atom-mask-mode is as follows:
int encode_ints(int i1, int i2)
encoding of ints
std::map< coot::residue_spec_t, coot::util::density_stats_info_t > map_to_model_correlation_stats_per_residue(int imol, const std::vector< coot::residue_spec_t > &residue_specs, unsigned short int atom_mask_mode, float atom_radius_for_masking, int imol_map)
map to model density statistics, reported per residue
SCM map_to_model_correlation_per_residue_scm(int imol, SCM residue_specs, unsigned short int atom_mask_mode, int imol_map)
map to model correlation
std::vector< int > auto_read_make_and_draw_maps_from_mtz(const char *filename)
set the flag to do a difference map (too) on auto-read MTZ
PyObject * active_residue_py()
Return a list of [imol, chain-id, resno, ins-code, atom-name, alt-conf] for atom that is closest to t...
*SCM get_symmetry(int imol)
return the symmetry of the imolth molecule
float map_to_model_correlation(int imol, const std::vector< coot::residue_spec_t > &residue_specs, const std::vector< coot::residue_spec_t > &neigh_residue_specs, unsigned short int atom_mask_mode, int imol_map)
atom-mask-mode is as follows:
void set_radial_map_colouring_min_radius(int imol, float r)
radial map colouring min
void simple_text_dialog(const std::string &dialog_title, const std::string &text, int geom_x, int geom_y)
make a simple text dialog.
void spin_search(int imol_map, int imol, const char *chain_id, int resno, const char *ins_code, SCM direction_atoms_list, SCM moving_atoms_list)
for the given residue, spin the atoms in moving_atom_list around the bond defined by direction_atoms_...
void set_python_draw_function(const std::string &command_string)
client/server functions
PyObject * residue_info_py(int imol, const char *chain_id, int resno, const char *ins_code)
Return a list of atom info for each atom in the specified residue:
void set_map_correlation_atom_radius(float r)
The atom radius is not passed as a parameter to correlation.
void set_radial_map_colouring_max_radius(int imol, float r)
radial map colouring max
PyObject * CG_spin_search_py(int imol_model, int imol_map)
Spin search the density based on possible positions of CG of a side-chain.
PyObject * get_intermediate_atoms_bonds_representation()
return a Python object for the intermediate atoms bonds
PyObject * closest_atom_py(int imol)
return closest atom in imolth molecule
int handle_read_ccp4_map(const std::string &filename, int is_diff_map_flag)
same function as above - old name for the function. Deleted from the API at some stage ...
void multi_sharpen_blur_map_scm(int imol_map, SCM b_factors_list)
make many sharpened or blurred maps
void get_coords_for_accession_code(const std::string &code)
if possible, read in the new coords getting coords via web.
PyObject * closest_atom_raw_py()
return the specs of the closest atom to the centre of the screen
SCM residues_near_residue(int imol, SCM residue_in_scm, float radius)
return residues near residue
SCM all_residues_with_serial_numbers_scm(int imol)
a utility to return the specs of all the residues, each spec prefixed by the serial number ...
SCM closest_atom_simple_scm()
return the specs of the closest displayed atom
SCM closest_atom(int imol)
return the specs of the closest atom in imolth molecule
int morph_fit_residues(int imol, const std::vector< coot::residue_spec_t > &residue_specs, float transformation_averaging_radius)
morph the given residues.
int flip_hand(int imol_map)
Flip the hand of the map.
std::string resname_from_serial_number(int imol, const char *chain_id, int serial_num)
return the rename from a residue serial number
PyObject * multi_residue_torsion_fit_py(int imol, PyObject *residues_specs_py, int n_trials)
fit residues
trivial helper function for file attributes
Definition: cc-interface.hh:439
void execute_refmac_real(std::string pdb_in_filename, std::string pdb_out_filename, std::string mtz_in_filename, std::string mtz_out_filename, std::string cif_lib_filename, std::string fobs_col_name, std::string sigfobs_col_name, std::string r_free_col_name, short int have_sensible_free_r_flag, short int make_molecules_flag, std::string refmac_count_string, int swap_map_colours_post_refmac_flag, int imol_refmac_map, int diff_map_flag, int phase_combine_flag, std::string phib_string, std::string fom_string, std::string ccp4i_project_dir)
if swap_map_colours_post_refmac_flag is not 1 thenn imol_refmac_map is ignored.
void label_closest_atoms_in_neighbour_residues_py(int imol, PyObject *residue_spec_py, float radius)
label the closest atoms in the residues that neighbour residue_spec
SCM active_residue()
return specs of the atom close to screen centre
void set_rotation_centre(float x, float y, float z)
set the rotation centre
SCM residues_near_position_scm(int imol, SCM pos, float radius)
residues near residue
int clashes_with_symmetry(int imol, const char *chain_id, int res_no, const char *ins_code, float clash_dist)
return 1 if this residue clashes with the symmetry-related atoms of the same molecule.
int morph_fit_chain(int imol, std::string chain_id, float transformation_averaging_radius)
Morph the given chain.
int get_continue_updating_refinement_atoms_state()
return the continue-updating-refinement-atoms state
std::vector< std::pair< coot::residue_spec_t, float > > map_to_model_correlation_per_residue(int imol, const std::vector< coot::residue_spec_t > &specs, unsigned short int atom_mask_mode, int imol_map)
map to model density correlation, reported per residue
void hole(int imol, float start_x, float start_y, float start_z, float end_x, float end_y, float end_z, float colour_map_multiplier, float colour_map_offset, int n_runs, bool show_probe_radius_graph_flag, std::string export_surface_dots_file_name)
starting piont and end point, colour map multiplier and shall the probe radius graph be shown (dummy ...
int clear_and_update_molecule(int molecule_number, SCM molecule_expression)
update a molecule from a s-expression
SCM water_chain_from_shelx_ins_scm(int imol)
return the chain id of the water chain from a shelx molecule. Raw interface
void multi_sharpen_blur_map_py(int imol_map, PyObject *b_factors_list)
make many sharpened or blurred maps
void hydrogenate_region(float radius)
find the active residue, find the near residues (within radius) create a new molecule, run reduce on that, import hydrogens from the result and apply them to the molecule of the active residue.
SCM chain_fragments_scm(int imol, short int screen_output_also)
chain fragments
std::string mtz_file_name(int imol)
presumes that imol_Refinement_Map has been set
void graphics_to_phenix_geo_representation(int imol, int mode, const coot::phenix_geo_bonds &g)
phenix GEO bonds representation
PyObject * get_dictionary_radii()
return a Python object for the radii of the atoms in the dictionary
coot::util::density_correlation_stats_info_t map_to_model_correlation_stats(int imol, const std::vector< coot::residue_spec_t > &residue_specs, const std::vector< coot::residue_spec_t > &neigh_residue_specs, unsigned short int atom_mask_mode, int imol_map)
map to model density correlation stats
SCM qq_plot_map_and_model_scm(int imol, SCM residue_specs_scm, SCM neigh_residue_specs_scm, unsigned short int atom_mask_mode, int imol_map)
QQ plot of the model density correlation, reported per residue.
SCM refine_zone_with_full_residue_spec_scm(int imol, const char *chain_id, int resno1, const char *inscode_1, int resno2, const char *inscode_2, const char *altconf)
Refine the given residue range.
void set_radial_map_colouring_saturation(int imol, float saturation)
radial map colouring saturation
SCM map_statistics_scm(int imol)
return either scheme false on non-a-map or list (mean, standard-deviation, skew, kurtosis) ...
PyObject * molecule_to_pdb_string_py(int imol)
Return the molecule as a PDB string.
SCM map_mean_scm(int imol)
return sigma for the given map. Return scheme False if not a valid map molecule number.
void make_link(int imol, coot::atom_spec_t &spec_1, coot::atom_spec_t &spec_2, const std::string &link_name, float length)
make a link between the specified atoms
PyObject * residues_near_position_py(int imol, PyObject *pos_in, float radius)
Return residue specs for residues that have atoms that are closer than radius Angstroems to the given...