Coot Scripting Interface  7000
c-interface.h
Go to the documentation of this file.
1 /* src/c-interface.h
2  *
3  * Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 The University of York
4  * Copyright 2007 by Paul Emsley
5  * Copyright 2007, 2008, 2009, 2010, 2011, 2012 by The University of Oxford
6  * Copyright 2014, 2015, 2016 by Medical Research Council
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or (at
11  * your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301, USA
22  */
23 
24 /* svn $Id: c-interface.h 1458 2007-01-26 20:20:18Z emsley $ */
25 
46 #ifndef C_INTERFACE_H
47 #define C_INTERFACE_H
48 
49 /*
50  The following extern stuff here because we want to return the
51  filename from the file entry box. That code (e.g.)
52  on_ok_button_coordinates_clicked (callback.c), is written and
53  compiled in c.
54 
55  But, we need that function to set the filename in mol_info, which
56  is a c++ class.
57 
58 p So we need to have this function external for c++ linking.
59 
60 */
61 
62 /* Francois says move this up here so that things don't get wrapped
63  twice in C-declarations inside gmp library. Hmm! */
64 #ifdef __cplusplus
65 #ifdef USE_GUILE
66 #include <cstdio> /* for std::FILE in gmp.h for libguile.h */
67 #include <libguile.h> /* for SCM type (returned by safe_scheme_command) */
68 #else
69 #include <string> /* for std::string; included (sic!) in above for guile */
70 #endif /* USE_GUILE */
71 #endif /* c++ */
72 
73 #ifdef USE_PYTHON
74 #include "Python.h"
75 #endif
76 
77 #include <gtk/gtk.h>
78 
79 #ifndef BEGIN_C_DECLS
80 
81 #ifdef __cplusplus
82 #define BEGIN_C_DECLS extern "C" {
83 #define END_C_DECLS }
84 
85 #else
86 #define BEGIN_C_DECLS
87 #define END_C_DECLS
88 #endif
89 #endif /* BEGIN_C_DECLS */
90 
91 BEGIN_C_DECLS
92 
93 
94 #define COOT_SCHEME_DIR "COOT_SCHEME_DIR"
95 #define COOT_PYTHON_DIR "COOT_PYTHON_DIR"
96 
97 /* ------------------------------------------------------------------------ */
98 /* Startup Functions: */
99 /* ------------------------------------------------------------------------ */
100 #ifdef USE_GUILE
101 void try_load_scheme_extras_dir();
102 #endif /* USE_GUILE */
103 #ifdef USE_PYTHON
104 void try_load_python_extras_dir();
105 #endif /* USE_PYTHON */
106 
107 /* section Startup Functions */
109 /* \{ */
112 void set_prefer_python();
124 int prefer_python();
125 /* \} */
126 
127 /* ------------------------------------------------------------------------ */
128 /* File system Functions: */
129 /* ------------------------------------------------------------------------ */
130 /* File system Utility function: maybe there is a better place for it... */
131 
132 
133 /* Return like mkdir: mkdir returns zero on success, or -1 if an error */
134 /* occurred */
135 
136 /* if it already exists as a dir, return 0 of course. Perhaps should */
137 /* be called "is_directory?_if_not_make_it". */
138 
139 /* section File System Functions */
141 /* \{ */
142 
151 int make_directory_maybe(const char *dir);
152 
159 
167 
170 void add_coordinates_glob_extension(const char *ext);
171 
174 void add_data_glob_extension(const char *ext);
175 
178 void add_dictionary_glob_extension(const char *ext);
179 
182 void add_map_glob_extension(const char *ext);
183 
186 void remove_coordinates_glob_extension(const char *ext);
187 
190 void remove_data_glob_extension(const char *ext);
191 
194 void remove_dictionary_glob_extension(const char *ext);
195 
198 void remove_map_glob_extension(const char *ext);
199 
204 
209 
213 void set_filter_fileselection_filenames(int istate);
214 
215 
218 
220 short int file_type_coords(const char *file_name);
221 
222 
224 void open_coords_dialog();
225 
226 
231 /* --- CHECKME - do these need to be here? --- */
232 void set_file_chooser_selector(int istate);
233 int file_chooser_selector_state();
234 void set_file_chooser_overwrite(int istate);
235 int file_chooser_overwrite_state();
236 
237 /* \brief show the export map GUI */
238 void export_map_gui(short int export_map_fragment);
239 
240 /* \} */
241 
242 
244 /* \{ */
245 
249 void set_main_window_title(const char *s);
250 
252 void set_show_modelling_toolbar(short int state);
253 
254 /* \} */
255 
256 /* -------------------------------------------------------------------- */
257 /* mtz and data handling utilities */
258 /* -------------------------------------------------------------------- */
259 /* section MTZ and data handling utilities */
261 /* \{ */
262 /* We try as .phs and .cif files first */
263 
267 void manage_column_selector(const char *filename);
268 
269 /* \} */
270 
271 /* -------------------------------------------------------------------- */
272 /* Molecule Functions : */
273 /* -------------------------------------------------------------------- */
274 /* section Molecule Info Functions */
276 /* \{ */
277 
281 int chain_n_residues(const char *chain_id, int imol);
285 float molecule_centre_internal(int imol, int iaxis);
290 int seqnum_from_serial_number(int imol, const char *chain_id,
291  int serial_num);
292 
296 char *insertion_code_from_serial_number(int imol, const char *chain_id, int serial_num);
297 
298 #ifdef __cplusplus
299 #ifdef USE_PYTHON
300 PyObject *python_representation_kk(int imol);
301 #endif
302 #endif
303 
307 /* char *chain_id(int imol, int ichain); */
308 #ifdef __cplusplus
309 #ifdef USE_GUILE
310 SCM
311 chain_id_scm(int imol, int ichain);
312 #endif
313 #ifdef USE_PYTHON
314 PyObject *
315 chain_id_py(int imol, int ichain);
316 #endif
317 #endif
318 
326 int n_models(int imol);
327 
331 int n_chains(int imol);
332 
344 int is_solvent_chain_p(int imol, const char *chain_id);
345 
357 int is_protein_chain_p(int imol, const char *chain_id);
358 
371 int is_nucleotide_chain_p(int imol, const char *chain_id);
372 
373 
378 int n_residues(int imol);
379 
384 int n_atoms(int imol);
385 
386 
387 /* Does this work? */
390 /* list remarks(int imol); */
391 #ifdef __cplusplus
392 #ifdef USE_GUILE
393 SCM remarks_scm(int imol);
394 /* return a list or scheme false */
395 SCM residue_centre_scm(int imol, const char *chain_id, int resno, const char *ins_code);
396 #endif
397 #ifdef USE_PYTHON
398 /* return a list or python false */
399 PyObject *remarks_py(int imol);
400 PyObject *residue_centre_py(int imol, const char *chain_id, int resno, const char *ins_code);
401 #endif
402 #endif
403 
404 
405 #ifdef __cplusplus
406 #ifdef USE_GUILE
407 SCM model_composition_statistics_scm(int imol);
408 #endif
409 #ifdef USE_PYTHON
410 PyObject *model_composition_statistics_py(int imol);
411 #endif
412 #endif
413 
414 
416 void sort_chains(int imol);
417 
419 void sort_residues(int imol);
420 
422 void remarks_dialog(int imol);
423 
427 
431 
432 
433 /* Placeholder only.
434 
435  not documented, it doesn't work yet, because CalcSecStructure()
436  creates SS type on the residues, it does not build and store
437  CHelix, CStrand, CSheet records. */
438 void write_header_secondary_structure_info(int imol, const char *file_name);
439 
440 
446 int copy_molecule(int imol);
447 
457 int add_ligand_delete_residue_copy_molecule(int imol_ligand_new,
458  const char *chain_id_ligand_new,
459  int resno_ligand_new,
460  int imol_current,
461  const char *chain_id_ligand_current,
462  int resno_ligand_current);
463 
471 int exchange_chain_ids_for_seg_ids(int imol);
472 
474 void show_remarks_browswer();
475 
476 
477 /* \} */
478 
479 /* -------------------------------------------------------------------- */
480 /* Library/Utility Functions: */
481 /* -------------------------------------------------------------------- */
482 
483 /* section Library and Utility Functions */
485 /* \{ */
486 
487 #ifdef __cplusplus
488 
489 #ifdef USE_GUILE
490 SCM coot_sys_build_type_scm();
491 #endif
492 #ifdef USE_PYTHON
493 PyObject *coot_sys_build_type_py();
494 #endif /* USE_PYTHON */
495 #endif /* c++ */
496 
499 int git_revision_count();
501 int svn_revision();
502 
503 
508 const char *molecule_name(int imol);
509 #ifdef __cplusplus
510 #ifdef USE_GUILE
511 
512 SCM molecule_name_stub_scm(int imol, int include_path_flag);
513 #endif /* USE_GUILE */
514 #ifdef USE_PYTHON
515 
516 PyObject *molecule_name_stub_py(int imol, int include_path_flag);
517 #endif /* USE_PYTHON */
518 #endif /* __cplusplus */
519 
520 void set_molecule_name(int imol, const char *new_name);
521 gboolean coot_checked_exit(int retval);
524 void coot_real_exit(int retval);
526 void coot_no_state_real_exit(int retval);
527 
529 void coot_clear_backup_or_real_exit(int retval);
531 void coot_save_state_and_exit(int retval, int save_state_flag);
532 
533 
534 #ifdef __cplusplus
535 #ifdef USE_GUILE
536 
537 void run_clear_backups(int retval);
538 #endif /* USE_GUILE */
539 #ifdef USE_PYTHON
540 void run_clear_backups_py(int retval);
541 #endif /* USE_PYTHON */
542 #endif /* c++ */
543 
544 
548 int first_coords_imol();
549 
555 
560 
566 int mmcif_sfs_to_mtz(const char *cif_file_name, const char *mtz_file_name);
567 
568 /* \} */
569 
570 /* -------------------------------------------------------------------- */
571 /* More Library/Utility Functions: */
572 /* -------------------------------------------------------------------- */
573 /* section Graphics Utility Functions */
575 /* \{ */
576 
578 void set_do_anti_aliasing(int state);
581 
586 void set_do_GL_lighting(int state);
589 
597 short int use_graphics_interface_state();
598 
603 
611 
619 int reset_view();
620 
626 
627 /* return either 1 (yes, there is at least one hydrogen) or 0 (no
628  hydrogens, or no such molecule). The scripting interface to this
629  does not have the _raw suffix and returns a scheme or python
630  boolean True or False. */
631 int molecule_has_hydrogens_raw(int imol);
632 
633 /* a testing/debugging function. Used in a test to make sure that the
634  outside number of a molecule (the vector index) is the same as that
635  embedded in the molecule description object. Return -1 on
636  non-valid passed imol. */
637 int own_molecule_number(int imol);
638 
641 
644 /* used by above to set the angle to rotate to (time dependent) */
645 double get_idle_function_rock_target_angle();
646 
647 
650 void set_rocking_factors(float width_scale, float frequency_scale);
651 
654 void set_idle_function_rotate_angle(float f); /* degrees */
655 
658 
659 /* pass back the newly created molecule number */
662 int handle_read_draw_molecule(const char *filename);
663 
667 int make_updating_model_molecule(const char *filename);
668 
669 /* or better still, use the json file from refmac ... but not yet. */
670 /* void updating_refmac_refinement_files(const char *updating_refmac_refinement_files_json_file_name); */
671 
672 /* used by above, no API for this - also, not yet */
673 /* int updating_refmac_refinement_json_timeout_function(gpointer data); */
674 
675 
678 
689 void set_convert_to_v2_atom_names(short int state);
690 
695 int handle_read_draw_molecule_with_recentre(const char *filename,
696  int recentre_on_read_pdb_flag);
697 
700 int handle_read_draw_molecule_and_move_molecule_here(const char *filename);
701 
703 int read_pdb(const char *filename);
704 
708 int assign_hetatms(int imol);
709 
714 int hetify_residue(int imol, const char * chain_id, int resno, const char *ins_code);
715 
720 int residue_has_hetatms(int imol, const char * chain_id, int resno, const char *ins_code);
721 
722 #ifdef __cplusplus
723 #ifdef USE_GUILE
724 
725 SCM het_group_residues_scm(int imol);
726 #endif
727 #ifdef USE_PYTHON
728 
729 PyObject *het_group_residues_py(int imol);
730 #endif
731 #endif
732 
737 int het_group_n_atoms(const char *comp_id);
738 
741 int replace_fragment(int imol_target, int imol_fragment, const char *atom_selection);
742 
746 int copy_residue_range(int imol_target, const char *chain_id_target,
747  int imol_reference, const char *chain_id_reference,
748  int resno_range_start, int resno_range_end);
749 
752 #ifdef __cplusplus
753 #ifdef USE_GUILE
754 int replace_residues_from_mol_scm(int imol_target,
755  int imol_ref,
756  SCM residue_specs_list_ref_scm);
757 #endif /* USE_GUILE */
758 
759 #ifdef USE_PYTHON
760 int replace_residues_from_mol_py(int imol_target,
761  int imol_ref,
762  PyObject *residue_specs_list_ref_py);
763 #endif /* USE_PYTHON */
764 #endif /* __cplusplus */
765 
766 
769 int clear_and_update_model_molecule_from_file(int molecule_number,
770  const char *file_name);
771 
772 /* Used in execute_rigid_body_refine */
773 /* Fix this on a rainy day. */
774 /* atom_selection_container_t */
775 /* make_atom_selection(int imol, const coot::minimol::molecule &mol); */
776 
781 void screendump_image(const char *filename);
782 
785 
786 /* is this a good place for this function? */
787 
790 void set_draw_solid_density_surface(int imol, short int state);
791 
801 void set_draw_map_standard_lines(int imol, short int state);
802 
811 void set_solid_density_surface_opacity(int imol, float opacity);
812 
813 float get_solid_density_surface_opacity(int imol);
814 
819 void set_flat_shading_for_solid_density_surface(short int state);
820 
821 /* \} */
822 
823 /* -------------------------------------------------------------------- */
824 /* Testing Interface: */
825 /* -------------------------------------------------------------------- */
826 #ifdef __cplusplus
827 #ifdef USE_GUILE
828 SCM test_internal_scm();
829 SCM test_internal_single_scm();
830 #endif /* USE_GUILE */
831 #ifdef USE_PYTHON
832 PyObject *test_internal_py();
833 PyObject *test_internal_single_py();
834 #endif /* USE_PYTHON */
835 #endif /* __cplusplus */
836 
837 
838 /* --------------------------------------------------------------------- */
839 /* Interface Preferences */
840 /* --------------------------------------------------------------------- */
841 /* section Interface Preferences */
849 void set_scroll_by_wheel_mouse(int istate);
852 
854 void set_auto_recontour_map(int state);
855 
858 
863 
868 
871 void print_view_matrix(); /* print the view matrix */
872 
873 float get_view_matrix_element(int row, int col); /* used in (view-matrix) command */
874 
878 float get_view_quaternion_internal(int element);
879 
881 void set_view_quaternion(float i, float j, float k, float l);
882 
886 void apply_ncs_to_view_orientation(int imol, const char *current_chain, const char *next_ncs_chain);
889  const char *current_chain,
890  const char *next_ncs_chain,
891  short int forward_flag);
892 
894 void set_fps_flag(int t);
896 int get_fps_flag();
897 
900 void set_show_origin_marker(int istate);
903 
909 
911 void hide_main_toolbar();
914 void show_main_toolbar();
915 
920 
923 
926 void set_model_toolbar_docked_position(int state);
927 
931 int suck_model_fit_dialog_bl();
932 
937 void add_status_bar_text(const char *s);
938 
943 
944 /* functions to dock the accept/reject dialog to the toolbar */
945 void set_accept_reject_dialog_docked(int state);
948 
949 /* functions to show/hide i.e. make sensitive the docked accept/reject toolbar */
954 
955 /* functions for the refinement toolbar style */
956 void set_model_toolbar_style(int state);
957 int model_toolbar_style_state();
958 
959 /* functions for the main toolbar style */
960 void set_main_toolbar_style(int state);
961 int main_toolbar_style_state();
962 
965 /* ----------------------------------------------------------------------- */
966 /* mouse buttons */
967 /* ----------------------------------------------------------------------- */
968 /* section Mouse Buttons */
970 /* \{ */
971 
976 void quanta_buttons();
981 void quanta_like_zoom();
982 
983 
984 /* -------------------------------------------------------------------- */
985 /* Ctrl for rotate or pick: */
986 /* -------------------------------------------------------------------- */
991 void set_control_key_for_rotate(int state);
994 
1005 
1006 #ifdef __cplusplus
1007 #ifdef USE_GUILE
1008 
1010 #endif
1011 
1012 #ifdef USE_PYTHON
1013 
1014 PyObject *select_atom_under_pointer_py();
1015 #endif
1016 #endif /* __cplusplus */
1017 
1018 /* \} */
1019 
1020 /* --------------------------------------------------------------------- */
1021 /* Cursor Functions: */
1022 /* --------------------------------------------------------------------- */
1023 /* section Cursor Function */
1027 void normal_cursor();
1029 void fleur_cursor();
1031 void pick_cursor_maybe();
1033 void rotate_cursor();
1034 
1039 void set_pick_cursor_index(int icursor_index);
1040 
1044 /* --------------------------------------------------------------------- */
1045 /* Model/Fit/Refine Functions: */
1046 /* --------------------------------------------------------------------- */
1047 /* section Model/Fit/Refine Functions */
1057 void show_select_map_dialog();
1064 
1065 
1068 
1074 
1077 /* --------------------------------------------------------------------- */
1078 /* backup/undo functions: */
1079 /* --------------------------------------------------------------------- */
1080 /* section Backup Functions */
1082 /* \{ */
1083 /* c-interface-build functions */
1084 
1086 void make_backup(int imol);
1087 
1089 void turn_off_backup(int imol);
1091 void turn_on_backup(int imol);
1095 int backup_state(int imol);
1096 
1098 int apply_undo(); /* "Undo" button callback */
1100 int apply_redo();
1101 
1103 void set_have_unsaved_changes(int imol);
1104 
1107 int have_unsaved_changes_p(int imol);
1108 
1109 
1112 void set_undo_molecule(int imol);
1113 
1117 
1123 void set_unpathed_backup_file_names(int state);
1126 
1132 void set_decoloned_backup_file_names(int state);
1135 
1136 
1139 
1141 void set_backup_compress_files(int state);
1142 
1143 /* \} */
1144 
1145 /* --------------------------------------------------------------------- */
1146 /* recover session: */
1147 /* --------------------------------------------------------------------- */
1148 /* section Recover Session Function */
1150 /* \{ */
1159 void recover_session();
1160 /* \} */
1161 
1162 /* ---------------------------------------------------------------------- */
1163 /* map functions: */
1164 /* ---------------------------------------------------------------------- */
1165 /* section Map Functions */
1167 /* \{ */
1168 
1172 void calc_phases_generic(const char *mtz_file_name);
1173 
1180  const char *f_col,
1181  const char *sigf_col,
1182  int imol_coords);
1183 
1184 
1188  const char *f_col,
1189  const char *sigf_col,
1190  int imol_coords);
1191 
1192 #ifdef USE_PYTHON
1193 
1196 PyObject *calculate_maps_and_stats_py(int imol_model,
1197  int imol_map_with_data_attached,
1198  int imol_map_2fofc,
1199  int imol_map_fofc);
1200 #endif
1201 
1204 void sfcalc_genmap(int imol_model, int imol_map_with_data_attached, int imol_updating_difference_map);
1205 
1209 void set_auto_updating_sfcalc_genmap(int imol_model, int imol_map_with_data_attached, int imol_updating_difference_map);
1210 
1211 gdouble* get_map_colour(int imol);
1212 
1213 #ifdef __cplusplus
1214 #ifdef USE_GUILE
1215 SCM get_map_colour_scm(int imol);
1216 #endif
1217 #ifdef USE_PYTHON
1218 PyObject *get_map_colour_py(int imol);
1219 #endif
1220 #endif
1221 
1222 
1223 
1226 void set_scroll_wheel_map(int imap);
1231 void set_scrollable_map(int imol);
1233 int scroll_wheel_map();
1235 void save_previous_map_colour(int imol);
1237 void restore_previous_map_colour(int imol);
1238 
1243 void set_active_map_drag_flag(int t);
1245 short int get_active_map_drag_flag();
1246 
1248 void set_last_map_colour(double f1, double f2, double f3);
1250 void set_map_colour(int imol, float red, float green, float blue);
1251 
1253 void set_contour_level_absolute(int imol_map, float level);
1255 void set_contour_level_in_sigma(int imol_map, float level);
1256 
1258 float get_contour_level_absolute(int imol);
1259 
1261 float get_contour_level_in_sigma(int imol);
1262 
1264 void set_last_map_sigma_step(float f);
1270 void set_contour_by_sigma_step_by_mol(float f, short int state, int imol);
1271 
1274 float data_resolution(int imol);
1275 
1279 float model_resolution(int imol);
1280 
1285 int export_map(int imol, const char *filename);
1287 int export_map_fragment(int imol, float x, float y, float z, float radius, const char *filename);
1288 
1290 void export_map_fragment_with_text_radius(int imol, const char *radius_text, const char *filename);
1291 
1293 int export_map_fragment_with_origin_shift(int imol, float x, float y, float z, float radius, const char *filename);
1294 
1296 int export_map_fragment_to_plain_file(int imol, float x, float y, float z, float radius, const char *filename);
1297 
1298 /* return the new molecule number. The cell is given in Angstroms and
1299  the angles in degrees. The ref_space_group can be a H-M symbol or
1300  a colon-separated string of symmetry operators.
1301 */
1302 int transform_map_raw(int imol,
1303  double r00, double r01, double r02,
1304  double r10, double r11, double r12,
1305  double r20, double r21, double r22,
1306  double t0, double t1, double t2,
1307  double pt0, double pt1, double pt2,
1308  double box_half_size,
1309  const char *ref_space_group,
1310  double cell_a, double cell_b, double cell_c,
1311  double alpha, double beta, double gamma);
1312 
1313 
1317 int difference_map(int imol1, int imol2, float map_scale);
1318 
1323 int reinterp_map(int map_no, int reference_map_no);
1324 
1328 int smooth_map(int map_no, float sampling_multiplier);
1329 
1330 #ifdef __cplusplus
1331 #ifdef USE_GUILE
1332 
1337 int average_map_scm(SCM map_number_and_scales);
1338 #endif
1339 #ifdef USE_PYTHON
1340 
1345 int average_map_py(PyObject *map_number_and_scales);
1346 #endif /* USE_PYTHON */
1347 #endif /* c++ */
1348 
1349 /* \} */
1350 
1351 /* ----------------------------------------------------------------------- */
1352 /* (density) iso level increment entry */
1353 /* ----------------------------------------------------------------------- */
1354 /* section Density Increment */
1358 char* get_text_for_iso_level_increment_entry(int imol); /* const gchar *text */
1359 char* get_text_for_diff_map_iso_level_increment_entry(int imol); /* const gchar *text */
1360 
1361 /* void set_iso_level_increment(float val); */
1366 void set_iso_level_increment(float val);
1367 float get_iso_level_increment();
1368 void set_iso_level_increment_from_text(const char *text, int imol);
1369 
1374 void set_diff_map_iso_level_increment(float val);
1375 
1379 void set_diff_map_iso_level_increment_from_text(const char *text, int imol);
1380 
1385 void set_map_sampling_rate_text(const char *text);
1386 
1391 void set_map_sampling_rate(float r);
1392 
1393 /* MOVE-ME to c-interface-gtk-widgets.h */
1394 char* get_text_for_map_sampling_rate_text();
1395 
1397 float get_map_sampling_rate();
1398 
1404 void change_contour_level(short int is_increment); /* else is decrement. */
1405 
1408 void set_last_map_contour_level(float level);
1411 void set_last_map_contour_level_by_sigma(float n_sigma);
1412 
1416 void set_stop_scroll_diff_map(int i);
1420 void set_stop_scroll_iso_map(int i);
1421 
1425 void set_stop_scroll_iso_map_level(float f);
1426 
1430 void set_stop_scroll_diff_map_level(float f);
1431 
1434 
1435 
1438 /* ------------------------------------------------------------------------ */
1439 /* density stuff */
1440 /* ------------------------------------------------------------------------ */
1441 /* section Density Functions */
1445 void set_map_line_width(int w);
1447 int map_line_width_state();
1448 
1458 int make_and_draw_map(const char *mtz_file_name,
1459  const char *f_col, const char *phi_col,
1460  const char *weight,
1461  int use_weights, int is_diff_map);
1462 
1470  const char *a, const char *b, const char *weight,
1471  int use_weights, int is_diff_map,
1472  short int have_refmac_params,
1473  const char *fobs_col,
1474  const char *sigfobs_col,
1475  const char *r_free_col,
1476  short int sensible_f_free_col);
1477 
1481 /* Note to self, we need to save the reso limits in the state file */
1483  const char *a, const char *b,
1484  const char *weight,
1485  int use_weights, int is_diff_map,
1486  short int have_refmac_params,
1487  const char *fobs_col,
1488  const char *sigfobs_col,
1489  const char *r_free_col,
1490  short int sensible_f_free_col,
1491  short int is_anomalous,
1492  short int use_reso_limits,
1493  float low_reso_limit,
1494  float high_reso_lim);
1495 
1499 int make_updating_map(const char *mtz_file_name,
1500  const char *f_col, const char *phi_col,
1501  const char *weight,
1502  int use_weights, int is_diff_map);
1503 
1504 
1505 void stop_updating_molecule(int imol);
1506 
1507 #ifdef __cplusplus
1508 #ifdef USE_GUILE
1509 SCM refmac_parameters_scm(int imol);
1510 #endif /* USE_GUILE */
1511 
1512 #ifdef USE_PYTHON
1513 PyObject *refmac_parameters_py(int imol);
1514 #endif /* USE_PYTHON */
1515 
1516 #endif /* __cplusplus */
1517 
1518 
1520 int valid_labels(const char *mtz_file_name, const char *f_col,
1521  const char *phi_col,
1522  const char *weight_col,
1523  int use_weights);
1524 
1526 /* We need to know if an mtz file has phases. If it doesn't then we */
1527 /* go down a (new 20060920) different path. */
1528 int mtz_file_has_phases_p(const char *mtz_file_name);
1529 
1531 int is_mtz_file_p(const char *filename);
1532 
1534 int cns_file_has_phases_p(const char *cns_file_name);
1535 
1536 void wrapped_auto_read_make_and_draw_maps(const char *filename);
1537 
1538 void set_auto_read_do_difference_map_too(int i);
1551  void set_auto_read_column_labels(const char *fwt, const char *phwt,
1552  int is_for_diff_map_flag);
1553 
1554 
1555 /* MOVE-ME to c-interface-gtk-widgets.h */
1556 char* get_text_for_density_size_widget(); /* const gchar *text */
1557 void set_density_size_from_widget(const char *text);
1558 
1559 /* MOVE-ME to c-interface-gtk-widgets.h */
1560 char *get_text_for_density_size_em_widget();
1561 void set_density_size_em_from_widget(const char *text);
1562 
1564 void set_map_radius(float f);
1565 
1567 void set_map_radius_em(float radius);
1568 
1570 void set_density_size(float f);
1571 
1572 void set_map_radius_slider_max(float f);
1573 
1575 void set_display_intro_string(const char *str);
1576 
1578 float get_map_radius();
1579 
1585 void set_esoteric_depth_cue(int istate);
1586 
1591 
1597 int swap_difference_map_colours_state();
1598 
1602 int set_map_is_difference_map(int imol, short int bool_flag);
1603 
1605 int map_is_difference_map(int imol);
1606 
1611 int another_level();
1612 
1618 
1621 
1624 float density_at_point(int imol_map, float x, float y, float z);
1625 
1626 /* \} */
1627 
1628 
1629 /* ------------------------------------------------------------------------ */
1630 /* Parameters from map: */
1631 /* ------------------------------------------------------------------------ */
1632 /* section Parameters from map */
1634 /* \{ */
1635 
1640 const char *mtz_hklin_for_map(int imol_map);
1641 
1650 const char *mtz_fp_for_map(int imol_map);
1651 
1659 const char *mtz_phi_for_map(int imol_map);
1660 
1668 const char *mtz_weight_for_map(int imol_map);
1669 
1675 short int mtz_use_weight_for_map(int imol_map);
1676 
1677 #ifdef __cplusplus
1678 #ifdef USE_GUILE
1679 
1683 SCM map_parameters_scm(int imol);
1688 SCM cell_scm(int imol);
1691 #endif /* USE_GUILE */
1692 #ifdef USE_PYTHON
1693 
1697 PyObject *map_parameters_py(int imol);
1702 PyObject *cell_py(int imol);
1703 #endif /* USE_PYTHON */
1704 #endif /* c++ */
1705 
1708 /* ------------------------------------------------------------------------ */
1709 /* Write PDB file: */
1710 /* ------------------------------------------------------------------------ */
1711 /* section PDB Functions */
1716 /* return 0 on success, 1 on error. */
1717 int write_pdb_file(int imol, const char *file_name);
1718 
1720 /* return 0 on success, 1 on error. */
1721 int write_cif_file(int imol, const char *file_name);
1722 
1725 /* return 0 on success, 1 on error. */
1726 int write_residue_range_to_pdb_file(int imol, const char *chainid,
1727  int resno_start, int resno_end,
1728  const char *filename);
1729 
1730 /* return 0 on success, -1 on error. */
1731 int write_chain_to_pdb_file(int imol, const char *chainid, const char *filename);
1732 
1733 
1736 int quick_save();
1737 
1741 
1744 void set_write_conect_record_state(int state);
1745 
1750 /* ------------------------------------------------------------------------ */
1751 /* Info Dialog */
1752 /* ------------------------------------------------------------------------ */
1753 /* section Info Dialog */
1755 /* \{ */
1756 
1761 void info_dialog(const char *txt);
1762 
1766 void info_dialog_and_text(const char *txt);
1767 
1772 void info_dialog_with_markup(const char *txt);
1773 
1774 
1775 /* \} */
1776 
1777 
1778 /* ------------------------------------------------------------------------ */
1779 /* refmac stuff */
1780 /* ------------------------------------------------------------------------ */
1781 /* section Refmac Functions */
1783 /* \{ */
1786 void set_refmac_counter(int imol, int refmac_count);
1787 
1788 #ifdef __cplusplus
1789 #ifdef USE_GUILE
1790 SCM get_refmac_sad_atom_info_scm();
1791 #endif /* GUILE */
1792 #ifdef USE_PYTHON
1793 PyObject *get_refmac_sad_atom_info_py();
1794 #endif /* PYTHON */
1795 #endif /* c++ */
1796 
1802 void swap_map_colours(int imol1, int imol2);
1806 void set_keep_map_colour_after_refmac(int istate);
1807 
1812 
1813 /* refmac vresion testing, returns 1 for new refmac (>5.3) otherwise 0 */
1814 int refmac_runs_with_nolabels(void);
1815 
1816 /* \} */
1817 
1818 /* --------------------------------------------------------------------- */
1819 /* symmetry */
1820 /* --------------------------------------------------------------------- */
1821 /* section Symmetry Functions */
1823 /* \{ */
1824 char* get_text_for_symmetry_size_widget(); /* const gchar *text */
1825 
1826 /* MOVE-ME to c-interface-gtk-widgets.h */
1827 void set_symmetry_size_from_widget(const char *text);
1829 void set_symmetry_size(float f);
1830 double* get_symmetry_bonds_colour(int imol);
1832 short int get_show_symmetry(); /* master */
1834 void set_show_symmetry_master(short int state);
1838 void set_show_symmetry_molecule(int mol_no, short int state);
1843 void symmetry_as_calphas(int mol_no, short int state);
1848 short int get_symmetry_as_calphas_state(int imol);
1849 
1852 void set_symmetry_molecule_rotate_colour_map(int imol, int state);
1853 
1860 
1862 void set_symmetry_colour_by_symop(int imol, int state);
1864 void set_symmetry_whole_chain(int imol, int state);
1866 void set_symmetry_atom_labels_expanded(int state);
1867 
1871 int has_unit_cell_state(int imol);
1872 
1873 /* a gui function really */
1874 void add_symmetry_on_to_preferences_and_apply();
1875 
1878 int undo_symmetry_view();
1879 
1884 
1891 void save_symmetry_coords(int imol,
1892  const char *filename,
1893  int symop_no,
1894  int shift_a,
1895  int shift_b,
1896  int shift_c,
1897  int pre_shift_to_origin_na,
1898  int pre_shift_to_origin_nb,
1899  int pre_shift_to_origin_nc);
1900 
1913 int new_molecule_by_symmetry(int imol,
1914  const char *name,
1915  double m11, double m12, double m13,
1916  double m21, double m22, double m23,
1917  double m31, double m32, double m33,
1918  double tx, double ty, double tz,
1919  int pre_shift_to_origin_na,
1920  int pre_shift_to_origin_nb,
1921  int pre_shift_to_origin_nc);
1922 
1923 
1924 
1939  const char *name,
1940  const char *mmdb_atom_selection_string,
1941  double m11, double m12, double m13,
1942  double m21, double m22, double m23,
1943  double m31, double m32, double m33,
1944  double tx, double ty, double tz,
1945  int pre_shift_to_origin_na,
1946  int pre_shift_to_origin_nb,
1947  int pre_shift_to_origin_nc);
1948 
1949 
1953 int new_molecule_by_symop(int imol, const char *symop_string,
1954  int pre_shift_to_origin_na,
1955  int pre_shift_to_origin_nb,
1956  int pre_shift_to_origin_nc);
1957 
1961 int n_symops(int imol);
1962 
1963 /* This function works by active symm atom. */
1964 int move_reference_chain_to_symm_chain_position();
1965 
1966 #ifdef __cplusplus
1967 #ifdef USE_GUILE
1968 
1971 SCM origin_pre_shift_scm(int imol);
1972 #endif /* USE_GUILE */
1973 #ifdef USE_PYTHON
1974 
1977 PyObject *origin_pre_shift_py(int imol);
1978 #endif /* USE_PYTHON */
1979 #endif
1980 
1981 void setup_save_symmetry_coords();
1982 
1992 short int set_space_group(int imol, const char *spg);
1993 
1999 int set_unit_cell_and_space_group(int imol, float a, float b, float c, float alpha, float beta, float gamma, const char *space_group);
2000 
2005 int set_unit_cell_and_space_group_using_molecule(int imol, int imol_from);
2006 
2013 void set_symmetry_shift_search_size(int shift);
2014 
2015 /* \} */ /* end of symmetry functions */
2016 
2017 /* ------------------------------------------------------------------- */
2018 /* file selection */
2019 /* ------------------------------------------------------------------- */
2020 /* section File Selection Functions */
2022 /* \{ */ /* start of file selection functions */
2023 
2024 /* so that we can save/set the directory for future fileselections
2025  (i.e. the new fileselection will open in the directory that the
2026  last one ended in) */
2027 
2028 
2029 #ifdef __cplusplus
2030 #ifdef USE_GUILE
2031 /* Return the default file name suggestion (that would come up in the
2032  save coordinates dialog) or scheme false if imol is not a valid
2033  model molecule. */
2034 SCM save_coords_name_suggestion_scm(int imol);
2035 #endif /* USE_GUILE */
2036 #ifdef USE_PYTHON
2037 /* Return the default file name suggestion (that would come up in the
2038  save coordinates dialog) or Python false if imol is not a valid
2039  model molecule. */
2040 PyObject *save_coords_name_suggestion_py(int imol);
2041 #endif /* USE_PYTHON */
2042 #endif /* __cplusplus */
2043 
2044 /* \} */ /* end of file selection functions */
2045 
2046 /* -------------------------------------------------------------------- */
2047 /* history */
2048 /* -------------------------------------------------------------------- */
2049 /* section History Functions */
2052 /* \{ */ /* end of file selection functions */
2053 /* We don't want this exported to the scripting level interface,
2054  really... (that way lies madness, hehe). oh well... */
2055 
2060 
2065 void set_console_display_commands_state(short int istate);
2073 void set_console_display_commands_hilights(short int bold_flag, short int colour_flag, int colour_index);
2074 
2075 /* \} */
2076 
2077 /* --------------------------------------------------------------------- */
2078 /* state (a graphics_info thing) */
2079 /* --------------------------------------------------------------------- */
2080 /* info */
2082 /* \{ */
2083 
2085 void save_state();
2086 
2088 void save_state_file(const char *filename);
2089 
2091 void save_state_file_py(const char *filename);
2092 
2094 /* set the filename */
2095 void set_save_state_file_name(const char *filename);
2096 
2097 #ifdef __cplusplus
2098 #ifdef USE_GUILE
2099 
2103 #endif
2104 #ifdef USE_PYTHON
2105 
2108 PyObject *save_state_file_name_py();
2109 #endif /* USE_PYTHON */
2110 #endif /* c++ */
2111 
2112 /* only to be used in callbacks.c, don't export */
2113 const char *save_state_file_name_raw();
2114 
2120 void set_run_state_file_status(short int istat);
2122 void run_state_file(); /* just do it */
2123 #ifdef USE_PYTHON
2124 void run_state_file_py(); /* just do it */
2125 #endif /* USE_PYTHON */
2126 
2127 void run_state_file_maybe(); /* depending on the above state variables */
2128 
2129 
2130 /* \} */
2131 
2132 /* -------------------------------------------------------------------- */
2133 /* virtual trackball */
2134 /* -------------------------------------------------------------------- */
2135 /* subsection Virtual Trackball */
2137 /* \{ */
2138 
2139 #define VT_FLAT 1
2140 #define VT_SPHERICAL 2
2141 
2144 void vt_surface(int mode);
2148 int vt_surface_status();
2149 
2150 /* \} */
2151 
2152 
2153 /* --------------------------------------------------------------------- */
2154 /* clipping */
2155 /* --------------------------------------------------------------------- */
2156 /* section Clipping Functions */
2158 /* \{ */
2159 
2161 void set_clipping_back( float v);
2163 void set_clipping_front(float v);
2164 /* \} */
2165 
2166 /* ----------------------------------------------------------------------- */
2167 /* Unit Cell */
2168 /* ----------------------------------------------------------------------- */
2169 /* section Unit Cell interface */
2171 /* \{ */
2172 
2174 short int get_show_unit_cell(int imol);
2175 
2180 void set_show_unit_cells_all(short int istate);
2181 
2186 void set_show_unit_cell(int imol, short int istate);
2187 
2188 void set_unit_cell_colour(float red, float green, float blue);
2189 /* \} */
2190 
2191 /* ----------------------------------------------------------------------- */
2192 /* Colour */
2193 /* ----------------------------------------------------------------------- */
2194 /* section Colour */
2196 /* \{ */
2197 
2198 /* set the colour merge ratio (a fraction 0.0 to 1.0) */
2199 void set_symmetry_colour_merge(float v);
2200 
2203 
2208 
2213 
2215 void set_colour_by_chain(int imol);
2216 
2218 void set_colour_by_chain_goodsell_mode(int imol);
2219 
2221 void set_colour_by_molecule(int imol);
2222 
2223 /* get the value of graphics_info_t::rotate_colour_map_on_read_pdb_c_only_flag */
2224 int get_colour_map_rotation_on_read_pdb_c_only_flag();
2225 
2227 void set_symmetry_colour(float r, float g, float b);
2228 
2229 /* \} */
2230 
2231 /* Section Map colour*/
2233 /* \{ */
2237 void set_colour_map_rotation_for_map(float f); /* "global"/default */
2238 
2242 void set_molecule_bonds_colour_map_rotation(int imol, float theta);
2243 
2246 /* \} */
2247 
2248 /* ----------------------------------------------------------------------- */
2249 /* Anisotropic Atoms */
2250 /* ----------------------------------------------------------------------- */
2251 /* section Anisotropic Atoms Interface */
2253 /* \{ */
2254 /* we use the text interface to this in callback.c rather */
2255 /* than getting the float directly. */
2256 
2258 float get_limit_aniso(); /* not a function of the molecule */
2259 
2261 short int get_show_limit_aniso(); /* not a function of the molecule */
2262 
2264 short int get_show_aniso(); /* not a function of the molecule */
2265 
2267 void set_limit_aniso(short int state);
2268 
2269 /* MOVE-ME to c-interface-gtk-widgets.h */
2270 void set_aniso_limit_size_from_widget(const char *text);
2271 
2273 void set_show_aniso(int state);
2274 
2275 /* MOVE-ME to c-interface-gtk-widgets.h */
2276 char *get_text_for_aniso_limit_radius_entry();
2277 
2279 void set_aniso_probability(float f);
2280 
2282 float get_aniso_probability();
2283 
2284 /* \} */
2285 
2286 /* ---------------------------------------------------------------------- */
2287 /* Display Functions */
2288 /* ---------------------------------------------------------------------- */
2289 /* section Display Functions */
2291 /* \{ */
2292 /* currently doesn't get seen when the window starts due to */
2293 /* out-of-order issues. */
2294 
2296 void set_graphics_window_size(int x_size, int y_size);
2298 void set_graphics_window_position(int x_pos, int y_pos);
2300 void store_graphics_window_position(int x_pos, int y_pos); /* "configure_event" callback */
2301 
2305 
2307 void graphics_draw(); /* and wrapper interface to gtk_widget_draw(glarea) */
2308 
2310 void zalman_stereo_mode();
2312 void hardware_stereo_mode();
2316 int stereo_mode_state();
2318 void mono_mode();
2320 void side_by_side_stereo_mode(short int use_wall_eye_mode);
2321 
2322 /* DTI stereo mode - undocumented, secret interface for testing, currently.
2323 state should be 0 or 1. */
2324 /* when it works, call it dti_side_by_side_stereo_mode() */
2325 void set_dti_stereo_mode(short int state);
2326 
2330 void set_hardware_stereo_angle_factor(float f);
2333 
2334 void set_model_display_radius(int state, float radius);
2335 
2337 void set_model_fit_refine_dialog_position(int x_pos, int y_pos);
2339 void set_display_control_dialog_position(int x_pos, int y_pos);
2341 void set_go_to_atom_window_position(int x_pos, int y_pos);
2343 void set_delete_dialog_position(int x_pos, int y_pos);
2345 void set_rotate_translate_dialog_position(int x_pos, int y_pos);
2347 void set_accept_reject_dialog_position(int x_pos, int y_pos);
2349 void set_ramachandran_plot_dialog_position(int x_pos, int y_pos);
2351 void set_edit_chi_angles_dialog_position(int x_pos, int y_pos);
2353 void set_rotamer_selection_dialog_position(int x_pos, int y_pos);
2354 
2355 /* \} */
2356 
2357 /* ---------------------------------------------------------------------- */
2358 /* Smooth "Scrolling" */
2359 /* ---------------------------------------------------------------------- */
2360 /* section Smooth Scrolling */
2362 /* \{ */
2363 
2367 void set_smooth_scroll_flag(int v);
2368 
2370 int get_smooth_scroll();
2371 
2372 /* MOVE-ME to c-interface-gtk-widgets.h */
2373 void set_smooth_scroll_steps_str(const char * t);
2374 
2375 /* useful exported interface */
2379 void set_smooth_scroll_steps(int i);
2380 
2381 /* MOVE-ME to c-interface-gtk-widgets.h */
2382 char *get_text_for_smooth_scroll_steps();
2383 
2384 /* MOVE-ME to c-interface-gtk-widgets.h */
2385 void set_smooth_scroll_limit_str(const char *t);
2386 
2387 /* useful exported interface */
2389 void set_smooth_scroll_limit(float lim);
2390 
2391 char *get_text_for_smooth_scroll_limit();
2392 
2393 /* \} */
2394 
2395 
2396 /* ---------------------------------------------------------------------- */
2397 /* Font Size */
2398 /* ---------------------------------------------------------------------- */
2399 /* section Font Parameters */
2401 /* \{ */
2402 
2406 void set_font_size(int i);
2407 
2411 int get_font_size();
2412 
2415 void set_font_colour(float red, float green, float blue);
2416 
2418 void set_use_stroke_characters(int state);
2419 
2420 /* \} */
2421 
2422 /* ---------------------------------------------------------------------- */
2423 /* Rotation Centre */
2424 /* ---------------------------------------------------------------------- */
2425 /* section Rotation Centre */
2427 /* \{ */
2428 /* MOVE-ME to c-interface-gtk-widgets.h */
2429 void set_rotation_centre_size_from_widget(const gchar *text); /* and redraw */
2431 void set_rotation_centre_size(float f); /* and redraw (maybe) */
2432 /* MOVE-ME to c-interface-gtk-widgets.h */
2433 gchar *get_text_for_rotation_centre_cube_size();
2434 
2436 short int recentre_on_read_pdb();
2438 void set_recentre_on_read_pdb(short int);
2439 
2441 void set_rotation_centre(float x, float y, float z);
2442 /* The redraw happens somewhere else... */
2443 void set_rotation_centre_internal(float x, float y, float z);
2444 float rotation_centre_position(int axis); /* only return one value: x=0, y=1, z=2 */
2447 void go_to_ligand();
2448 
2449 #ifdef USE_PYTHON
2450 #ifdef __cplusplus
2451 PyObject *go_to_ligand_py();
2452 #endif
2453 #endif
2454 
2456 void set_go_to_ligand_n_atoms_limit(int n_atom_min);
2457 
2462 void set_reorienting_next_residue_mode(int state);
2463 
2464 /* \} */
2465 
2466 /* ---------------------------------------------------------------------- */
2467 /* orthogonal axes */
2468 /* ---------------------------------------------------------------------- */
2469 
2470 /* section Orthogonal Axes */
2472 /* \{ */
2473 /* Draw the axes in the top left?
2474 
2475 0 off, 1 on */
2476 void set_draw_axes(int i);
2477 /* \} */
2478 
2479 /* ----------------------------------------------------------------------- */
2480 /* utility function */
2481 /* ----------------------------------------------------------------------- */
2482 /* section Atom Selection Utilities */
2484 /* \{ */
2485 
2486 /* does not account for alternative conformations properly */
2487 /* return -1 if atom not found. */
2488 int atom_index(int imol, const char *chain_id, int iresno, const char *atom_id);
2489 /* using alternative conformations properly ?! */
2490 /* return -1 if atom not found. */
2491 int atom_index_full(int imol, const char *chain_id, int iresno, const char *inscode, const char *atom_id, const char *altconf);
2492 /* Refine zone needs to be passed atom indexes (which it then converts */
2493 /* to residue numbers - sigh). So we need a function to get an
2494  atom. Return -1 on failure */
2495 /* index from a given residue to use with refine_zone(). Return -1 on failure */
2496 int atom_index_first_atom_in_residue(int imol, const char *chain_id,
2497  int iresno, const char *ins_code);
2498 /* For rotamers, we are given a residue spec (and altconf), we need
2499  the index of the first atom of this type, no atom name is given,
2500  hence we cannot use full_atom_spec_to_atom_index(). */
2501 int atom_index_first_atom_in_residue_with_altconf(int imol,
2502  const char *chain_id,
2503  int iresno,
2504  const char *ins_code,
2505  const char *alt_conf);
2507 float median_temperature_factor(int imol);
2509 float average_temperature_factor(int imol);
2512 
2514 void clear_pending_picks();
2515 char *centre_of_mass_string(int imol);
2516 #ifdef USE_PYTHON
2517 char *centre_of_mass_string_py(int imol);
2518 #endif
2519 
2524 
2527 void set_reset_b_factor_moved_atoms(int state);
2531 
2532 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
2533 #ifdef USE_GUILE
2534 void set_temperature_factors_for_atoms_in_residue_scm(int imol, SCM residue_spec_scm, float bf);
2535 #endif
2536 #endif
2537 
2541 int set_atom_attribute(int imol, const char *chain_id, int resno, const char *ins_code, const char *atom_name, const char*alt_conf, const char *attribute_name, float val);
2542 
2546 int set_atom_string_attribute(int imol, const char *chain_id, int resno, const char *ins_code, const char *atom_name, const char*alt_conf, const char *attribute_name, const char *attribute_value);
2547 
2549 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
2550 #ifdef USE_GUILE
2551 int set_atom_attributes(SCM attribute_expression_list);
2552 #endif
2553 
2554 #ifdef USE_PYTHON
2555 int set_atom_attributes_py(PyObject *attribute_expression_list);
2556 #endif
2557 #endif /* __cplusplus */
2558 
2560 void set_residue_name(int imol, const char *chain_id, int res_no, const char *ins_code, const char *new_residue_name);
2561 
2562 /* \} */
2563 
2564 /* ----------------------------------------------------------------------- */
2565 /* skeletonization */
2566 /* ----------------------------------------------------------------------- */
2567 /* section Skeletonization Interface */
2569 /* \{ */
2570 void skel_greer_on();
2571 void skel_greer_off();
2572 
2581 int skeletonize_map(int imol, short int prune_flag);
2582 
2584 int unskeletonize_map(int imol);
2585 
2586 void set_initial_map_for_skeletonize(); /* set graphics_info variable
2587  for use in callbacks.c */
2588 
2593 void set_max_skeleton_search_depth(int v); /* for high resolution
2594  maps, change to 20 or
2595  something (default 10). */
2596 
2597 
2598 
2599 /* ----------------------------------------------------------------------- */
2600 /* skeletonization level widgets */
2601 /* ----------------------------------------------------------------------- */
2602 
2603 /* MOVE-ME to c-interface-gtk-widgets.h */
2604 gchar *get_text_for_skeletonization_level_entry();
2605 
2606 /* MOVE-ME to c-interface-gtk-widgets.h */
2607 void set_skeletonization_level_from_widget(const char *txt);
2608 
2609 /* MOVE-ME to c-interface-gtk-widgets.h */
2610 gchar *get_text_for_skeleton_box_size_entry();
2611 
2612 /* MOVE-ME to c-interface-gtk-widgets.h */
2613 void set_skeleton_box_size_from_widget(const char *txt);
2614 
2616 void set_skeleton_box_size(float f);
2617 
2618 /* \} */
2619 
2620 /* ----------------------------------------------------------------------- */
2621 /* save coordinates */
2622 /* ----------------------------------------------------------------------- */
2623 /* section Save Coordinates */
2625 /* \{ */
2626 
2627 
2631 int save_coordinates(int imol, const char *filename);
2632 
2635 
2636 /* access to graphics_info_t::save_imol for use in callback.c */
2637 int save_molecule_number_from_option_menu();
2638 /* access from callback.c, not to be used in scripting, I suggest.
2639  Sets the *save* molecule number */
2640 void set_save_molecule_number(int imol);
2641 
2642 /* \} */
2643 
2644 /* ----------------------------------------------------------------------- */
2645 /* .phs file reading */
2646 /* ----------------------------------------------------------------------- */
2647 /* section Read Phases File Functions */
2649 /* \{ */
2650 
2656 void
2657 read_phs_and_coords_and_make_map(const char *pdb_filename);
2658 
2663 int
2665 
2666 
2672 int
2673 read_phs_and_make_map_using_cell_symm_from_mol(const char *phs_filename, int imol);
2674 
2675 int
2676 read_phs_and_make_map_using_cell_symm_from_mol_using_implicit_phs_filename(int imol);
2677 
2679 int
2680 read_phs_and_make_map_using_cell_symm(const char *phs_file_name,
2681  const char *hm_spacegroup, float a, float b, float c,
2682  float alpha, float beta, float gamma);
2695 int
2696 read_phs_and_make_map_with_reso_limits(int imol, const char* phs_file_name,
2697  float reso_lim_low, float reso_lim_high);
2698 
2699 /* work out the spacegroup from the given symm operators, e.g. return "P 1 21 1"
2700 given "x,y,z ; -x,y+1/2,-z" */
2701 /* char * */
2702 /* spacegroup_from_operators(const char *symm_operators_in_clipper_format); */
2703 
2704 void
2705 graphics_store_phs_filename(const gchar *phs_filename);
2706 
2707 short int possible_cell_symm_for_phs_file();
2708 
2709 /* MOVE-ME to c-interface-gtk-widgets.h */
2710 gchar *get_text_for_phs_cell_chooser(int imol, char *field);
2711 
2712 /* \} */
2713 
2714 /* ----------------------------------------------------------------------- */
2715 /* Movement */
2716 /* ----------------------------------------------------------------------- */
2717 /* section Graphics Move */
2719 /* \{ */
2721 void undo_last_move(); /* suggested by Frank von Delft */
2722 
2724 void translate_molecule_by(int imol, float x, float y, float z);
2725 
2728 void transform_molecule_by(int imol,
2729  float m11, float m12, float m13,
2730  float m21, float m22, float m23,
2731  float m31, float m32, float m33,
2732  float x, float y, float z);
2733 
2736 void transform_zone(int imol, const char *chain_id, int resno_start, int resno_end, const char *ins_code,
2737  float m11, float m12, float m13,
2738  float m21, float m22, float m23,
2739  float m31, float m32, float m33,
2740  float x, float y, float z);
2741 
2742 /* \} */
2743 
2744 /* ----------------------------------------------------------------------- */
2745 /* go to atom widget */
2746 /* ----------------------------------------------------------------------- */
2747 /* section Go To Atom Widget Functions */
2749 /* \{ */
2750 
2752 void post_go_to_atom_window();
2753 
2757 char *go_to_atom_chain_id();
2759 char *go_to_atom_atom_name();
2763 char *go_to_atom_ins_code();
2765 char *go_to_atom_alt_conf();
2766 
2767 
2776 int set_go_to_atom_chain_residue_atom_name(const char *t1_chain_id, int iresno,
2777  const char *t3_atom_name);
2778 
2787 int set_go_to_atom_chain_residue_atom_name_full(const char *chain_id,
2788  int resno,
2789  const char *ins_code,
2790  const char *atom_name,
2791  const char *alt_conf);
2793 int set_go_to_atom_chain_residue_atom_name_no_redraw(const char *t1, int iresno, const char *t3,
2794  short int make_the_move_flag);
2795 
2796 int set_go_to_atom_chain_residue_atom_name_strings(const gchar *t1,
2797  const gchar *t2,
2798  const gchar *txt);
2799 
2800 
2804 
2805 
2806 /* moving gtk function out of build functions, delete_atom() updates
2807  the go to atom atom list on deleting an atom */
2808 void update_go_to_atom_residue_list(int imol);
2809 
2810 /* return an atom index */
2812 int atom_spec_to_atom_index(int mol, char *chain, int resno, char *atom_name);
2813 
2815 int full_atom_spec_to_atom_index(int imol, const char *chain, int resno,
2816  const char *inscode, const char *atom_name,
2817  const char *altloc);
2818 
2821 
2825 
2826 void update_go_to_atom_window_on_other_molecule_chosen(int imol);
2827 
2848 void set_go_to_atom_molecule(int imol);
2849 
2850 /* MOVE-ME to c-interface-gtk-widgets.h */
2851 void unset_go_to_atom_widget(); /* unstore the static go_to_atom_window */
2852 
2853 
2854 
2855 /* \} */
2856 
2857 
2858 /* ----------------------------------------------------------------------- */
2859 /* autobuilding control */
2860 /* ----------------------------------------------------------------------- */
2861 /* section AutoBuilding functions (Defunct) */
2862 /* void autobuild_ca_on(); - moved to junk */
2863 
2864 void autobuild_ca_off();
2865 
2866 void test_fragment();
2867 
2868 void do_skeleton_prune();
2869 
2870 int test_function(int i, int j);
2871 
2872 #ifdef __cplusplus
2873 #ifdef USE_GUILE
2874 SCM test_function_scm(SCM i, SCM j);
2875 #endif
2876 #ifdef USE_PYTHON
2877 PyObject *test_function_py(PyObject *i, PyObject *j);
2878 #endif /* PYTHON */
2879 #endif
2880 
2881 
2882 /* glyco tools test */
2883 void glyco_tree_test();
2884 
2885 #ifdef __cplusplus
2886 #ifdef USE_GUILE
2887 SCM glyco_tree_scm(int imol, SCM active_residue_scm);
2888 SCM glyco_tree_residues_scm(int imol, SCM active_residue_scm);
2889 SCM glyco_tree_internal_distances_fn_scm(int imol, SCM residue_spec, const std::string &file_name); // testing function
2890 SCM glyco_tree_residue_id_scm(int imol, SCM residue_spec_scm);
2891 SCM glyco_tree_compare_trees_scm(int imol_1, SCM res_spec_1, int imol_2, SCM res_spec_2);
2892 SCM glyco_tree_matched_residue_pairs_scm(int imol_1, SCM res_spec_1, int imol_2, SCM res_spec_2);
2893 #endif
2894 #ifdef USE_PYTHON
2895 PyObject *glyco_tree_py(int imol, PyObject *active_residue_py);
2896 PyObject *glyco_tree_residues_py(int imol, PyObject *active_residue_py);
2897 PyObject *glyco_tree_internal_distances_fn_py(int imol, PyObject *residue_spec, const std::string &file_name); // testing function
2898 PyObject *glyco_tree_residue_id_py(int imol, PyObject *residue_spec_py);
2899 PyObject *glyco_tree_compare_trees_py(int imol_1, PyObject *res_spec_1, int imol_2, PyObject *res_spec_2);
2900 PyObject *glyco_tree_matched_residue_pairs_py(int imol_1, PyObject *res_spec_1, int imol_2, PyObject *res_spec_2);
2901 #endif /* PYTHON */
2902 #endif
2903 
2904 
2905 
2906 /* ----------------------------------------------------------------------- */
2907 /* map and molecule control */
2908 /* ----------------------------------------------------------------------- */
2909 /* section Map and Molecule Control */
2911 /* \{ */
2912 
2915 
2916 void add_map_display_control_widgets();
2917 void add_mol_display_control_widgets();
2918 void add_map_and_mol_display_control_widgets();
2919 
2920 void reset_graphics_display_control_window();
2921 void close_graphics_display_control_window(); /* destroy widget */
2922 
2924 void set_map_displayed(int imol, int state);
2926 void set_mol_displayed(int imol, int state);
2927 
2931 void set_display_only_model_mol(int imol);
2932 
2935 void set_mol_active(int imol, int state);
2936 
2937 #ifdef __cplusplus
2938 #ifdef USE_GUILE
2939 
2942 void display_maps_scm(SCM maps_list);
2943 #endif
2944 #ifdef USE_PYTHON
2945 void display_maps_py(PyObject *pyo);
2946 #endif
2947 #endif
2948 
2949 
2950 
2955 int mol_is_displayed(int imol);
2958 int mol_is_active(int imol);
2961 int map_is_displayed(int imol);
2962 
2965 void set_all_maps_displayed(int on_or_off);
2966 
2969 void set_all_models_displayed_and_active(int on_or_off);
2970 
2974 
2976 void display_only_active();
2977 
2978 
2979 #ifdef __cplusplus
2980 #ifdef USE_GUILE
2981 
2982 SCM space_group_scm(int imol);
2983 #endif
2984 #ifdef USE_PYTHON
2985 PyObject *space_group_py(int imol);
2986 #endif
2987 #endif
2988 
2993 char *show_spacegroup(int imol);
2994 
2995 
2996 
2997 
2998 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
2999 #ifdef USE_GUILE
3000 
3002 SCM symmetry_operators_scm(int imol);
3003 /* take the return value from above and return a xHM symbol (for
3004  testing currently) */
3005 SCM symmetry_operators_to_xHM_scm(SCM symmetry_operators);
3006 #endif
3007 
3008 #ifdef USE_PYTHON
3009 
3011 PyObject *symmetry_operators_py(int imol);
3012 /* take the return value from above and return a xHM symbol (for
3013  testing currently) */
3014 PyObject *symmetry_operators_to_xHM_py(PyObject *symmetry_operators);
3015 #endif /* USE_PYTHON */
3016 #endif /* c++ */
3017 
3018 
3019 /* \} */
3020 
3021 /* ----------------------------------------------------------------------- */
3022 /* Merge Molecules */
3023 /* ----------------------------------------------------------------------- */
3024 /* section Merge Molecules */
3025 
3035 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
3036 #ifdef USE_GUILE
3037 SCM merge_molecules(SCM add_molecules, int imol);
3038 void set_merge_molecules_ligand_spec_scm(SCM ligand_spec_scm);
3039 #endif
3040 
3041 #ifdef USE_PYTHON
3042 PyObject *merge_molecules_py(PyObject *add_molecules, int imol);
3043 void set_merge_molecules_ligand_spec_py(PyObject *ligand_spec_py);
3044 #endif /* PYTHON */
3045 #endif /* c++ */
3046 
3047 
3048 /* ----------------------------------------------------------------------- */
3049 /* Align and Mutate GUI */
3050 /* ----------------------------------------------------------------------- */
3051 /* section Align and Mutate */
3056 void align_and_mutate(int imol, const char *chain_id, const char *fasta_maybe, short int renumber_residues_flag);
3058 void set_alignment_gap_and_space_penalty(float wgap, float wspace);
3059 
3060 
3061 /* What are these functions? consider deleting them - we have alignment_mismatches_* . */
3062 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
3063 #ifdef USE_GUILE
3064 SCM alignment_results_scm(int imol, const char* chain_id, const char *seq);
3069 SCM nearest_residue_by_sequence_scm(int imol, const char* chain_id, int resno, const char *ins_code);
3070 #endif /* USE_GUILE */
3071 #ifdef USE_PYTHON
3072 PyObject *alignment_results_py(int imol, const char* chain_id, const char *seq);
3075 PyObject *nearest_residue_by_sequence_py(int imol, const char* chain_id, int resno, const char *ins_code);
3076 #endif /* USE_PYTHON */
3077 #endif /* c++ */
3078 
3081 /* ----------------------------------------------------------------------- */
3082 /* Renumber residue range */
3083 /* ----------------------------------------------------------------------- */
3084 /* section Renumber Residue Range */
3089 int renumber_residue_range(int imol, const char *chain_id,
3090  int start_res, int last_res, int offset);
3091 
3092 
3095 int change_residue_number(int imol, const char *chain_id, int current_resno, const char *current_inscode, int new_resno, const char *new_inscode);
3098 /* ----------------------------------------------------------------------- */
3099 /* Change chain id */
3100 /* ----------------------------------------------------------------------- */
3101 /* section Change Chain ID */
3106 void change_chain_id(int imol, const char *from_chain_id, const char *to_chain_id,
3107  short int use_res_range_flag, int from_resno, int to_resno);
3108 
3109 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
3110 #ifdef USE_GUILE
3111 SCM change_chain_id_with_result_scm(int imol, const char *from_chain_id, const char *to_chain_id,
3112  short int use_res_range_flag, int from_resno, int to_resno);
3113 #endif /* USE_GUILE */
3114 #ifdef USE_PYTHON
3115 PyObject *change_chain_id_with_result_py(int imol, const char *from_chain_id, const char *to_chain_id, short int use_res_range_flag, int from_resno, int to_resno);
3116 #endif /* USE_PYTHON */
3117 #endif /* c++ */
3118 /* \} */
3119 
3120 /* ----------------------------------------------------------------------- */
3121 /* scripting */
3122 /* ----------------------------------------------------------------------- */
3123 /* section Scripting Interface */
3124 
3126 /* \{ */
3127 
3132 int probe_available_p();
3133 #ifdef USE_PYTHON
3134 int probe_available_p_py();
3135 #endif
3136 
3138 void post_scripting_window();
3139 
3142 
3145 
3146 /* called from c-inner-main */
3147 void run_command_line_scripts();
3148 
3149 void set_guile_gui_loaded_flag();
3150 void set_python_gui_loaded_flag();
3151 void set_found_coot_gui();
3152 void set_found_coot_python_gui();
3153 
3154 /* \} */
3155 
3156 /* ----------------------------------------------------------------------- */
3157 /* Monomer */
3158 /* ----------------------------------------------------------------------- */
3159 /* section monomers */
3160 
3162 /* \{ */
3163 
3164 int get_monomer_for_molecule_by_index(int dict_idx, int imol_enc);
3165 
3166 
3167 /* Don't let this be seen by standard c, since I am using a std::string */
3168 /* and now we make it return a value, which we can decode in the calling
3169  function. I make a dummy version for when GUILE is not being used in case
3170  there are functions in the rest of the code that call safe_scheme_command
3171  without checking if there is USE_GUILE first.
3172  importing ability for python modules, use_namespace to maintain the
3173  namespace of the module, returns 1 if not running, 0 on success, -1
3174  when error importing (no further information) */
3175 
3177 void run_script (const char *filename);
3179 void run_guile_script (const char *filename);
3181 void run_python_script(const char *filename);
3183 int import_python_module(const char *module_name, int use_namespace);
3184 
3185 #ifdef __cplusplus
3186 #ifdef USE_GUILE
3187 
3189 SCM matching_compound_names_from_dictionary_scm(const char *compound_name_fragment,
3190  short int allow_minimal_descriptions_flag);
3191 
3195 SCM comp_id_to_name_scm(const char *comp_id);
3196 #endif /* USE_GUILE */
3197 
3204 int auto_load_dictionary(const char *comp_id);
3206 int reload_dictionary(const char *comp_id);
3207 
3210 void add_non_auto_load_residue_name(const char *s);
3213 void remove_non_auto_load_residue_name(const char *s);
3214 
3215 #ifdef USE_PYTHON
3216 
3218 PyObject *matching_compound_names_from_dictionary_py(const char *compound_name_fragment,
3219  short int allow_minimal_descriptions_flag);
3223 PyObject *comp_id_to_name_py(const char *comp_id);
3224 #endif /* USE_PYTHON */
3225 #endif /*__cplusplus */
3226 
3227 
3228 /* \} */
3229 
3230 /* ----------------------------------------------------------------------- */
3231 /* regularize/refine */
3232 /* ----------------------------------------------------------------------- */
3233 /* section Regularization and Refinement */
3235 /* \{ */
3236 
3237 void do_regularize(short int state); /* pass 0 for off (unclick togglebutton) */
3238 void do_refine(short int state);
3239 
3240 /* and a gui function used by those functions */
3241 void do_regularize_kill_delete_dialog();
3242 
3248 
3251 
3256 
3257 
3258 /* return 1 if planar peptide restraints are on, 0 if off */
3259 int planar_peptide_restraints_state();
3260 
3261 
3266 void set_use_trans_peptide_restraints(short int on_off_state);
3267 
3275 
3278 
3280 void set_refine_hydrogen_bonds(int state);
3281 
3282 
3286 void set_refinement_immediate_replacement(int istate);
3287 
3290 
3297 
3302 void c_accept_moving_atoms();
3303 
3305 void accept_regularizement();
3306 void clear_up_moving_atoms(); /* remove the molecule and bonds */
3307 void clear_moving_atoms_object(); /* just get rid of just the bonds (redraw done here). */
3308 
3309 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
3310 
3311 
3320 short int refinement_already_ongoing_p();
3321 
3322 #ifdef USE_GUILE
3323 
3334 SCM refine_residues_scm(int imol, SCM r); /* presumes the alt_conf is "". */
3335 SCM refine_residues_with_alt_conf_scm(int imol, SCM r, const char *alt_conf);
3336 SCM refine_residues_with_modes_with_alt_conf_scm(int imol, SCM residues_spec_list_scm,
3337  const char *alt_conf,
3338  SCM mode_1,
3339  SCM mode_2,
3340  SCM mode_3);
3341 SCM regularize_residues_scm(int imol, SCM r); /* presumes the alt_conf is "". */
3342 SCM regularize_residues_with_alt_conf_scm(int imol, SCM r, const char *alt_conf);
3343 #endif
3344 #ifdef USE_PYTHON
3345 
3348 PyObject *refine_residues_py(int imol, PyObject *r); /* presumes the alt_conf is "". */
3349 PyObject *refine_residues_with_modes_with_alt_conf_py(int imol, PyObject *r, const char *alt_conf,
3350  PyObject *mode_1,
3351  PyObject *mode_2,
3352  PyObject *mode_3);
3353 PyObject *refine_residues_with_alt_conf_py(int imol, PyObject *r, const char *alt_conf);
3354 PyObject *regularize_residues_py(int imol, PyObject *r); /* presumes the alt_conf is "". */
3355 PyObject *regularize_residues_with_alt_conf_py(int imol, PyObject *r, const char *alt_conf);
3356 #endif /* PYTHON */
3357 #endif /* c++ */
3358 
3359 /* Used by on_accept_reject_refinement_reject_button_clicked() */
3360 void stop_refinement_internal();
3361 
3362 void set_refinement_use_soft_mode_nbc_restraints(short int flag);
3363 
3365 void shiftfield_b_factor_refinement(int imol);
3366 
3368 void shiftfield_xyz_factor_refinement(int imol);
3369 
3374 void set_refine_with_torsion_restraints(int istate);
3377 
3389 void set_matrix(float f);
3390 
3392 float matrix_state();
3393 
3397 float get_map_weight();
3398 
3399 float estimate_map_weight(int imol_map);
3400 
3401 
3407 void set_refine_auto_range_step(int i);
3408 
3415 void set_refine_max_residues(int n);
3416 
3418 void refine_zone_atom_index_define(int imol, int ind1, int ind2);
3419 
3423 void refine_zone(int imol, const char *chain_id, int resno1, int resno2, const char *altconf);
3425 void repeat_refine_zone(); /* use stored atom indices to re-run the refinement using the same atoms as previous */
3426 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
3427 #ifdef USE_GUILE
3428 SCM refine_zone_with_score_scm(int imol, const char *chain_id, int resno1, int resno2, const char *altconf);
3429 SCM regularize_zone_with_score_scm(int imol, const char *chain_id, int resno1, int resno2, const char *altconf);
3430 #endif /* guile */
3431 #ifdef USE_PYTHON
3432 PyObject *refine_zone_with_score_py(int imol, const char *chain_id, int resno1, int resno2, const char *altconf);
3433 PyObject *regularize_zone_with_score_py(int imol, const char *chain_id, int resno1, int resno2, const char *altconf);
3434 #endif /* PYTHON */
3435 #endif /* c++ */
3436 
3440 void refine_auto_range(int imol, const char *chain_id, int resno1, const char *altconf);
3441 
3446 int regularize_zone(int imol, const char *chain_id, int resno1, int resno2, const char *altconf);
3447 
3456 
3459 
3467 void set_refinement_refine_per_frame(int istate);
3468 
3471 
3477 void set_refinement_drag_elasticity(float e);
3478 
3481 void set_refine_ramachandran_angles(int state);
3482 void set_refine_ramachandran_torsion_angles(int state);
3483 
3490 
3495 
3496 /* not ready yet \brief set the weight for torsion restraints (default 1.0)*/
3497 void set_torsion_restraints_weight(double w);
3498 
3502 void set_refine_rotamers(int state);
3503 
3504 void set_refinement_geman_mcclure_alpha_from_text(int combobox_item_idx, const char *t);
3505 void set_refinement_lennard_jones_epsilon_from_text(int combobox_item_idx, const char *t);
3506 void set_refinement_ramachandran_restraints_weight_from_text(int combobox_item_idx, const char *t);
3507 void set_refinement_overall_weight_from_text(const char *t);
3508 void set_refinement_torsion_weight_from_text(int combobox_item_index, const char *t);
3509 void set_refine_params_dialog_more_control_frame_is_active(int state);
3510 
3511 
3512 int refine_ramachandran_angles_state();
3513 
3514 void set_numerical_gradients(int istate);
3515 
3516 void set_debug_refinement(int state);
3517 
3518 
3525 
3527 void check_chiral_volumes(int imol);
3528 
3529 #ifdef __cplusplus
3530 #ifdef USE_GUILE
3531 SCM chiral_volume_errors_scm(int imol);
3532 #endif /* USE_GUILE */
3533 #ifdef USE_PYTHON
3534 PyObject *chiral_volume_errors_py(int imol);
3535 #endif /* USE_PYTHON */
3536 #endif /* __cplusplus */
3537 
3538 
3541 void set_show_chiral_volume_errors_dialog(short int istate);
3542 
3551 
3554 
3561 int imol_refinement_map(); /* return -1 on no map */
3562 
3567 int set_imol_refinement_map(int imol); /* returns imol on success, otherwise -1 */
3568 
3573 int does_residue_exist_p(int imol, char *chain_id, int resno, char *inscode);
3574 
3579 int delete_restraints(const char *comp_id);
3580 
3591 int add_extra_bond_restraint(int imol, const char *chain_id_1, int res_no_1, const char *ins_code_1, const char *atom_name_1, const char *alt_conf_1, const char *chain_id_2, int res_no_2, const char *ins_code_2, const char *atom_name_2, const char *alt_conf_2, double bond_dist, double esd);
3592 
3603 int add_extra_geman_mcclure_restraint(int imol, const char *chain_id_1, int res_no_1, const char *ins_code_1, const char *atom_name_1, const char *alt_conf_1, const char *chain_id_2, int res_no_2, const char *ins_code_2, const char *atom_name_2, const char *alt_conf_2, double bond_dist, double esd);
3604 #ifdef __cplusplus
3605 #ifdef USE_GUILE
3606 int add_extra_bond_restraints_scm(int imol, SCM extra_bond_restraints_scm);
3607 #endif // USE_GUILE
3608 #ifdef USE_PYTHON
3609 int add_extra_bond_restraints_py(int imol, PyObject *extra_bond_restraints_py);
3610 #endif // USE_GUILE
3611 #endif
3612 int add_extra_angle_restraint(int imol,
3613  const char *chain_id_1, int res_no_1, const char *ins_code_1, const char *atom_name_1, const char *alt_conf_1,
3614  const char *chain_id_2, int res_no_2, const char *ins_code_2, const char *atom_name_2, const char *alt_conf_2,
3615  const char *chain_id_3, int res_no_3, const char *ins_code_3, const char *atom_name_3, const char *alt_conf_3,
3616  double torsion_angle, double esd);
3617 int add_extra_torsion_restraint(int imol,
3618  const char *chain_id_1, int res_no_1, const char *ins_code_1, const char *atom_name_1, const char *alt_conf_1,
3619  const char *chain_id_2, int res_no_2, const char *ins_code_2, const char *atom_name_2, const char *alt_conf_2,
3620  const char *chain_id_3, int res_no_3, const char *ins_code_3, const char *atom_name_3, const char *alt_conf_3,
3621  const char *chain_id_4, int res_no_4, const char *ins_code_4, const char *atom_name_4, const char *alt_conf_4,
3622  double torsion_angle, double esd, int period);
3623 int add_extra_start_pos_restraint(int imol, const char *chain_id_1, int res_no_1, const char *ins_code_1, const char *atom_name_1, const char *alt_conf_1, double esd);
3624 
3625 int add_extra_target_position_restraint(int imol,
3626  const char *chain_id,
3627  int res_no,
3628  const char *ins_code,
3629  const char *atom_name,
3630  const char *alt_conf, float x, float y, float z, float weight);
3631 
3633 void delete_all_extra_restraints(int imol);
3634 
3636 void delete_extra_restraints_for_residue(int imol, const char *chain_id, int res_no, const char *ins_code);
3637 
3638 #ifdef __cplusplus
3639 #ifdef USE_GUILE
3640 void delete_extra_restraints_for_residue_spec_scm(int imol, SCM residue_spec_in);
3641 #endif // USE_GUILE
3642 #ifdef USE_PYTHON
3643 void delete_extra_restraints_for_residue_spec_py(int imol, PyObject *residue_spec_in_py);
3644 #endif // USE_PYTHON
3645 #endif // __cplusplus
3646 
3647 void delete_extra_restraints_worse_than(int imol, float n_sigma);
3648 
3650 void add_refmac_extra_restraints(int imol, const char *file_name);
3651 
3652 void set_show_extra_restraints(int imol, int state);
3653 int extra_restraints_are_shown(int imol);
3654 
3656 void set_extra_restraints_prosmart_sigma_limits(int imol, double limit_high, double limit_low);
3657 
3659 void generate_local_self_restraints(int imol, const char *chain_id, float local_dist_max);
3660 
3662 void generate_self_restraints(int imol, float local_dist_max);
3663 
3664 #ifdef __cplusplus
3665 #ifdef USE_GUILE
3666 
3667 void generate_local_self_restraints_by_residues_scm(int imol, SCM residue_specs, float local_dist_max);
3668 #endif // USE_GUILE
3669 #ifdef USE_PYTHON
3670 void generate_local_self_restraints_by_residues_py(int imol, PyObject *residue_specs, float local_dist_max);
3671 #endif // USE_PYTHON
3672 #endif // __cplusplus
3673 
3674 
3676 void write_interpolated_extra_restraints(int imol_1, int imol_2, int n_steps, char *file_name_stub);
3677 
3682 void write_interpolated_models_and_extra_restraints(int imol_1, int imol_2, int n_steps, char *file_name_stub,
3683  int interpolation_mode);
3684 
3685 void set_show_parallel_plane_restraints(int imol, int state);
3686 int parallel_plane_restraints_are_shown(int imol);
3687 void add_parallel_plane_restraint(int imol,
3688  const char *chain_id_1, int re_no_1, const char *ins_code_1,
3689  const char *chain_id_2, int re_no_2, const char *ins_code_2);
3690 void set_extra_restraints_representation_for_bonds_go_to_CA(int imol, short int state);
3691 
3692 
3693 #ifdef __cplusplus
3694 #ifdef USE_GUILE
3695 /* restraint_spec is something like (list 'bond spec-1 spec-2)
3696 
3697  spec-1 and spec-2 do not have to be in the order that the bond was created. */
3698 void delete_extra_restraint_scm(int imol, SCM restraint_spec);
3699 SCM list_extra_restraints_scm(int imol);
3700 #endif /* USE_GUILE */
3701 #ifdef USE_PYTHON
3702 /* restraint_spec is something like ['bond', spec_1, spec_2]
3703 
3704  spec_1 and spec_2 do not have to be in the order that the bond was created. */
3705 void delete_extra_restraint_py(int imol, PyObject *restraint_spec);
3706 PyObject *list_extra_restraints_py(int imol);
3707 #endif /* USE_PYTHON */
3708 #endif /* __cplusplus */
3709 
3714 
3715 void clear_all_atom_pull_restraints();
3716 void set_auto_clear_atom_pull_restraint(int state);
3717 int get_auto_clear_atom_pull_restraint_state();
3718 
3719 
3720 /* ----------------------------------------------------------------------- */
3721 /* Restraints editor */
3722 /* ----------------------------------------------------------------------- */
3723 
3725 void show_restraints_editor(const char *monomer_type);
3727 void show_restraints_editor_by_index(int menu_item_index);
3728 
3730 void write_restraints_cif_dictionary(const char *monomer_type, const char *file_name);
3731 
3732 /* \} */
3733 
3734 /* ----------------------------------------------------------------------- */
3735 /* Simplex Refinement */
3736 /* ----------------------------------------------------------------------- */
3741 void
3742 fit_residue_range_to_map_by_simplex(int res1, int res2, char *altloc, char *chain_id, int imol, int imol_for_map);
3743 
3745 float
3746 score_residue_range_fit_to_map(int res1, int res2, char *altloc, char *chain_id, int imol, int imol_for_map);
3749 /* ----------------------------------------------------------------------- */
3750 /* Nomenclature Errors */
3751 /* ----------------------------------------------------------------------- */
3753 /* \{ */
3757 int fix_nomenclature_errors(int imol);
3758 
3764 void set_nomenclature_errors_on_read(const char *mode);
3765 
3766 /* \} */
3767 
3768 /* ----------------------------------------------------------------------- */
3769 /* Atom info */
3770 /* ----------------------------------------------------------------------- */
3771 /* section Atom Info Interface */
3773 /* \{ */
3774 
3777 void
3778 output_atom_info_as_text(int imol, const char *chain_id, int resno,
3779  const char *ins_code, const char *atname,
3780  const char *altconf);
3781 
3782 /* \} */
3783 
3784 /* ----------------------------------------------------------------------- */
3785 /* (Eleanor's) Residue info */
3786 /* ----------------------------------------------------------------------- */
3787 /* section Residue Info */
3789 /* \{ */
3790 /* Similar to above, we need only one click though. */
3791 void do_residue_info_dialog();
3792 
3793 /* MOVE-ME to c-interface-gtk-widgets.h */
3794  void output_residue_info_dialog (int imol, int atom_index); /* widget version */
3795 /* scripting version */
3797 void residue_info_dialog(int imol, const char *chain_id, int resno, const char *ins_code);
3798 int residue_info_dialog_is_displayed();
3799 void output_residue_info_as_text(int atom_index, int imol); /* text version */
3800 /* functions that uses mmdb_manager functions/data types moved to graphics_info_t */
3801 
3802 void do_distance_define();
3803 void do_angle_define();
3804 void do_torsion_define();
3805 void residue_info_apply_all_checkbutton_toggled();
3806 void clear_residue_info_edit_list();
3807 
3808 /* a graphics_info_t function wrapper: */
3809 void unset_residue_info_widget();
3810 void clear_simple_distances();
3811 void clear_last_simple_distance();
3812 
3813 /* \} */
3814 
3815 /* ----------------------------------------------------------------------- */
3816 /* GUI edit functions */
3817 /* ----------------------------------------------------------------------- */
3818 /* section Edit Fuctions */
3820 /* \{ */
3821 
3822 void do_edit_copy_molecule();
3823 void do_edit_copy_fragment();
3824 void do_edit_replace_residue();
3825 void do_edit_replace_fragment();
3826 
3827 /* \} */
3828 
3829 /* ----------------------------------------------------------------------- */
3830 /* residue environment */
3831 /* ----------------------------------------------------------------------- */
3832 /* section Residue Environment Functions */
3834 /* \{ */
3837 void set_show_environment_distances(int state);
3840 void set_show_environment_distances_bumps(int state);
3847 void set_environment_distances_distance_limits(float min_dist, float max_dist);
3848 
3851 
3853 void set_environment_distances_label_atom(int state);
3854 
3856 void label_neighbours();
3857 
3859 void label_atoms_in_residue();
3860 
3861 
3862 
3868 double add_geometry_distance(int imol_1, float x_1, float y_1, float z_1, int imol_2, float x_2, float y_2, float z_2);
3869 #ifdef __cplusplus
3870 #ifdef USE_GUILE
3871 double add_atom_geometry_distance_scm(int imol_1, SCM atom_spec_1, int imol_2, SCM atom_spec_2);
3872 #endif
3873 #ifdef USE_PYTHON
3874 double add_atom_geometry_distance_py(int imol_1, PyObject *atom_spec_1, int imol_2, PyObject *atom_spec_2);
3875 #endif
3876 #endif /* __cplusplus */
3877 
3878 /* \} */
3879 
3880 
3881 /* ----------------------------------------------------------------------- */
3882 /* pointer position */
3883 /* ----------------------------------------------------------------------- */
3884 /* section Pointer Position Function */
3886 /* \{ */
3891 #ifdef __cplusplus
3892 #ifdef USE_PYTHON
3893 PyObject *get_pointer_position_frac_py();
3894 #endif // USE_PYTHON
3895 #endif /* c++ */
3896 /* \} */
3897 
3898 /* ----------------------------------------------------------------------- */
3899 /* pointer distances */
3900 /* ----------------------------------------------------------------------- */
3901 /* section Pointer Functions */
3903 /* \{ */
3905 void set_show_pointer_distances(int istate);
3908 /* \} */
3909 
3910 /* ----------------------------------------------------------------------- */
3911 /* zoom */
3912 /* ----------------------------------------------------------------------- */
3913 /* section Zoom Functions */
3915 /* \{ */
3920 void scale_zoom(float f);
3921 /* internal interface */
3922 void scale_zoom_internal(float f);
3924 float zoom_factor();
3925 
3928 void set_smooth_scroll_do_zoom(int i);
3929 /* default 1 (on) */
3931 int smooth_scroll_do_zoom();
3932 float smooth_scroll_zoom_limit();
3933 void set_smooth_scroll_zoom_limit(float f);
3934 void set_zoom(float f);
3935 
3936 /* \} */
3937 
3938 /* ----------------------------------------------------------------------- */
3939 /* CNS data stuff */
3940 /* ----------------------------------------------------------------------- */
3942 /* \{ */
3944 int handle_cns_data_file(const char *filename, int imol);
3945 
3951 int handle_cns_data_file_with_cell(const char *filename, int imol, float a, float b, float c, float alpha, float beta, float gamma, const char *spg_info);
3952 /* \} */
3953 
3954 /* ----------------------------------------------------------------------- */
3955 /* cif stuff */
3956 /* ----------------------------------------------------------------------- */
3957 /* section mmCIF Functions */
3959 /* dataset stuff */
3960 /* \{ */
3961 int auto_read_cif_data_with_phases(const char *filename);
3962 int read_cif_data_with_phases_sigmaa(const char *filename);
3963 int read_cif_data_with_phases_diff_sigmaa(const char *filename);
3964 int read_cif_data(const char *filename, int imol_coords);
3965 int read_cif_data_2fofc_map(const char *filename, int imol_coords);
3966 int read_cif_data_fofc_map(const char *filename, int imol_coords);
3967 int read_cif_data_with_phases_fo_fc(const char *filename);
3968 int read_cif_data_with_phases_2fo_fc(const char *filename);
3969 int read_cif_data_with_phases_nfo_fc(const char *filename,
3970  int map_type);
3971 int read_cif_data_with_phases_fo_alpha_calc(const char *filename);
3972 
3973 
3974 /* cif (geometry) dictionary */
3975 /* \brief return the number of bonds read (> 0 can be treated as success) */
3976 int handle_cif_dictionary(const char *filename);
3977 /* \brief synonym for above.
3978 
3979 return the number of bonds read (> 0 can be treated as success) */
3980 int read_cif_dictionary(const char *filename);
3981 
3982 /* \brief return the number of bonds read (> 0 can be treated as success).
3983  Apply to the given molecule.
3984 
3985  imol_enc can be the model molecule number or
3986  IMOL_ENC_ANY = -999999, IMOL_ENC_AUTO = -999998, IMOL_ENC_UNSET = -999997
3987 
3988  */
3989 int handle_cif_dictionary_for_molecule(const char *filename, int imol_enc, short int new_molecule_from_dictionary_cif_checkbutton_state);
3990 
3991 int write_connectivity(const char* monomer_name, const char *filename);
3994 
3995 #ifdef __cplusplus
3996 #ifdef USE_GUILE
3997 
3998 SCM non_standard_residue_names_scm(int imol);
3999 #endif
4000 #ifdef USE_PYTHON
4001 
4002 PyObject *non_standard_residue_names_py(int imol);
4003 #endif /* USE_PYTHON */
4004 #endif /* c++ */
4005 
4006 /* Use the environment variable COOT_REFMAC_LIB_DIR to find cif files
4007  in subdirectories and import them all. */
4008 void import_all_refmac_cifs();
4009 
4010 int read_small_molecule_cif(const char *file_name);
4011 
4012 int read_small_molecule_data_cif(const char *file_name);
4013 
4014 int read_small_molecule_data_cif_and_make_map_using_coords(const char *file_name,
4015  int imol_coords);
4016 
4017 /* \} */
4018 
4019 /* ----------------------------------------------------------------------- */
4020 /* SHELX stuff */
4021 /* ----------------------------------------------------------------------- */
4022 /* section SHELXL Functions */
4024 /* \{ */
4026 int read_shelx_ins_file(const char *filename, short int recentre_flag);
4028 int write_shelx_ins_file(int imol, const char *filename);
4029 /* for shelx fcf file that needs to be filtered: */
4030 int handle_shelx_fcf_file_internal(const char *filename);
4031 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
4032 #ifdef USE_GUILE
4033 
4036 SCM chain_id_for_shelxl_residue_number(int imol, int resno);
4037 #endif /* USE_GUILE */
4038 /* return 1 for yes, 0 for invalid imol or no. */
4039 int is_shelx_molecule(int imol);
4040 
4041 #ifdef USE_PYTHON
4042 
4044 PyObject *chain_id_for_shelxl_residue_number_py(int imol, int resno);
4045 #endif /* USE_PYTHON */
4046 
4047 void add_shelx_string_to_molecule(int imol, const char *string);
4048 #endif /* c++ */
4049 
4050 /* \} */
4051 /* ------------------------------------------------------------------------ */
4052 /* Validation: */
4053 /* ------------------------------------------------------------------------ */
4054 /* section Validation Functions */
4056 /* \{ */
4057 void deviant_geometry(int imol);
4058 short int is_valid_model_molecule(int imol);
4059 short int is_valid_map_molecule(int imol);
4060 
4061 
4071 void difference_map_peaks(int imol, int imol_coords, float level, float max_closeness, int do_positive_level_flag, int do_negative_level_flag, int around_model_only_flag);
4072 
4073 /* \brief set the max closeness (i.e. no smaller peaks can be within
4074  max_closeness of a larger peak)
4075 
4076 In the GUI for difference map peaks, there is not a means to set the
4077 max_closeness, so here is a means to set it and query it. */
4078 void set_difference_map_peaks_max_closeness(float m);
4079 float difference_map_peaks_max_closeness();
4080 
4081 void clear_diff_map_peaks();
4082 
4086 void gln_asn_b_factor_outliers(int imol);
4087 #ifdef USE_PYTHON
4088 void gln_asn_b_factor_outliers_py(int imol);
4089 #endif /* USE_PYTHON */
4090 
4091 #ifdef __cplusplus
4092 #ifdef USE_PYTHON
4093 
4097 PyObject *map_peaks_py(int imol_map, float n_sigma);
4098 PyObject *map_peaks_near_point_py(int imol_map, float n_sigma, float x, float y, float z, float radius);
4099 PyObject *map_peaks_near_point_from_list_py(int imol_map, PyObject *peak_list, float x, float y, float z, float radius);
4100 PyObject *map_peaks_around_molecule_py(int imol_map, float sigma, int negative_also_flag, int imol_coords);
4101 
4102 /* BL says:: this probably shouldnt be here but cluster with KK code */
4103 PyObject *screen_vectors_py();
4104 #endif /* USE_PYTHON */
4105 
4106 #ifdef USE_GUILE
4107 
4111 SCM map_peaks_scm(int imol_map, float n_sigma);
4112 SCM map_peaks_near_point_scm(int imol_map, float n_sigma, float x, float y, float z, float radius);
4113 #endif /* USE_GUILE */
4114 
4115 
4116 /* does this live here really? */
4117 #ifdef USE_GUILE
4118 SCM get_torsion_scm(int imol, SCM atom_spec_1, SCM atom_spec_2, SCM atom_spec_3, SCM atom_spec_4);
4119 
4122 SCM set_torsion_scm(int imol, const char *chain_id, int res_no, const char *insertion_code,
4123  const char *alt_conf,
4124  const char *atom_name_1,
4125  const char *atom_name_2,
4126  const char *atom_name_3,
4127  const char *atom_name_4, double tors);
4128 
4130 void multi_residue_torsion_scm(int imol, SCM residues_specs_scm);
4131 
4132 
4133 #endif /* USE_GUILE */
4134 
4135 
4136 #ifdef USE_PYTHON
4137 PyObject *get_torsion_py(int imol, PyObject *atom_spec_1, PyObject *atom_spec_2, PyObject *atom_spec_3, PyObject *atom_spec_4);
4138 
4141 PyObject *set_torsion_py(int imol, const char *chain_id, int res_no, const char *insertion_code,
4142  const char *alt_conf,
4143  const char *atom_name_1,
4144  const char *atom_name_2,
4145  const char *atom_name_3,
4146  const char *atom_name_4, double tors);
4147 
4149 void multi_residue_torsion_py(int imol, PyObject *residues_specs_py);
4150 
4151 #endif /* USE_PYTHON */
4152 
4153 
4154 #endif /* __cplusplus */
4155 
4156 /* These functions are called from callbacks.c */
4157 void clear_multi_residue_torsion_mode();
4158 void set_multi_residue_torsion_reverse_mode(short int mode);
4159 void show_multi_residue_torsion_dialog(); /* show the rotatable bonds dialog */
4160 void setup_multi_residue_torsion(); /* show the pick dialog */
4161 
4162 
4163 float atom_overlap_score(int imol);
4164 
4165 /* \} */
4166 
4167 /* ----------------------------------------------------------------------- */
4168 /* ramachandran plot */
4169 /* ----------------------------------------------------------------------- */
4170 /* section Ramachandran Plot Functions */
4172 /* \{ */
4173 /* Note for optionmenu from the main window menubar, we should use
4174  code like this, rather than the map_colour/attach_scroll_wheel code
4175  (actually, they are mostly the same, differing only the container
4176  delete code). */
4177 
4179 void do_ramachandran_plot(int imol);
4180 
4183 void set_kleywegt_plot_n_diffs(int n_diffs);
4184 
4185 
4186 /* the the menu */
4187 void add_on_rama_choices();
4188 
4191 void set_ramachandran_plot_contour_levels(float level_prefered, float level_allowed);
4196 void set_ramachandran_plot_background_block_size(float blocksize) ;
4197 
4200 void set_ramachandran_psi_axis_mode(int mode);
4201 int ramachandran_psi_axis_mode();
4202 
4203 void set_moving_atoms(double phi, double psi);
4204 
4205 void accept_phi_psi_moving_atoms();
4206 void setup_edit_phi_psi(short int state); /* a button callback */
4207 
4208 
4209 /* no need to export this to scripting interface */
4210 void setup_dynamic_distances(short int state);
4211 
4212 void destroy_edit_backbone_rama_plot();
4213 
4215 void ramachandran_plot_differences(int imol1, int imol2);
4216 
4218 void ramachandran_plot_differences_by_chain(int imol1, int imol2,
4219  const char *a_chain, const char *b_chain);
4220 /* \} */
4221 
4222 /* ----------------------------------------------------------------------- */
4223 /* sequence_view */
4224 /* ----------------------------------------------------------------------- */
4226 /* \{ */
4228 void do_sequence_view(int imol);
4229 
4231 void nsv(int imol);
4235 void set_sequence_view_is_docked(short int state);
4236 
4238 void set_nsv_canvas_pixel_limit(int cpl);
4239 
4241 void sequence_view_old_style(int imol);
4242 
4245 
4246 /* this is a widget function, it shouldn't be here */
4247 void add_on_sequence_view_choices();
4248 
4249 /* \} */
4250 
4251 /* ----------------------------------------------------------------------- */
4252 /* rotate moving atoms peptide */
4253 /* ----------------------------------------------------------------------- */
4254 void change_peptide_carbonyl_by(double angle);/* in degrees. */
4255 void change_peptide_peptide_by(double angle); /* in degress */
4256 void execute_setup_backbone_torsion_edit(int imol, int atom_index);
4257 void setup_backbone_torsion_edit(short int state);
4258 
4259 void set_backbone_torsion_peptide_button_start_pos(int ix, int iy);
4260 void change_peptide_peptide_by_current_button_pos(int ix, int iy);
4261 void set_backbone_torsion_carbonyl_button_start_pos(int ix, int iy);
4262 void change_peptide_carbonyl_by_current_button_pos(int ix, int iy);
4263 
4264 /* ----------------------------------------------------------------------- */
4265 /* atom labelling */
4266 /* ----------------------------------------------------------------------- */
4267 /* The guts happens in molecule_class_info_t, here is just the
4268  exported interface */
4269 /* section Atom Labelling */
4271 /* \{ */
4272 /* Note we have to search for " CA " etc */
4273 int add_atom_label(int imol, char *chain_id, int iresno, char *atom_id);
4274 int remove_atom_label(int imol, char *chain_id, int iresno, char *atom_id);
4275 void remove_all_atom_labels();
4276 
4277 void set_label_on_recentre_flag(int i); /* 0 for off, 1 or on */
4278 
4279 int centre_atom_label_status();
4280 
4284 void set_brief_atom_labels(int istat);
4285 
4288 
4290 void set_seg_ids_in_atom_labels(int istat);
4291 /* \} */
4292 
4293 /* ----------------------------------------------------------------------- */
4294 /* scene rotation */
4295 /* ----------------------------------------------------------------------- */
4296 /* section Screen Rotation */
4298 /* stepsize in degrees */
4299 /* \{ */
4301 void rotate_y_scene(int nsteps, float stepsize);
4303 void rotate_x_scene(int nsteps, float stepsize);
4305 void rotate_z_scene(int nsteps, float stepsize);
4306 
4316 void spin_zoom_trans(int axis, int nstep, float stepsize, float zoom_by,
4317  float x_rel, float y_rel, float z_rel);
4318 
4319 /* \} */
4320 
4321 
4322 /* ----------------------------------------------------------------------- */
4323 /* scene rotation */
4324 /* ----------------------------------------------------------------------- */
4325 /* section Screen Translation */
4327 /* \{ */
4329 void translate_scene_x(int nsteps);
4331 void translate_scene_y(int nsteps);
4333 void translate_scene_z(int nsteps);
4334 /* \} */
4335 
4336 
4337 /* ----------------------------------------------------------------------- */
4338 /* Views */
4339 /* ----------------------------------------------------------------------- */
4340 /* section Views Interface */
4342 /* \{ */
4344 int add_view_here(const char *view_name);
4346 int add_view_raw(float rcx, float rcy, float rcz, float quat1, float quat2,
4347  float quat3, float quat4, float zoom, const char *view_name);
4348 void play_views();
4349 void remove_this_view();
4351 int remove_named_view(const char *view_name);
4353 void remove_view(int view_number);
4354 /* go to the first view. if snap_to_view_flag, go directly, else
4355  smooth twisty path.*/
4356 int go_to_first_view(int snap_to_view_flag);
4357 int go_to_view_number(int view_number, int snap_to_view_flag);
4358 int add_spin_view(const char *view_name, int n_steps, float degrees_total);
4360 void add_view_description(int view_number, const char *description);
4367 int add_action_view(const char *view_name, const char *action_function);
4372 int insert_action_view_after_view(int view_number, const char *view_name, const char *action_function);
4373 int n_views();
4374 
4376 void save_views(const char *view_file_name);
4377 
4378 float views_play_speed();
4379 void set_views_play_speed(float f);
4380 
4381 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
4382 #ifdef USE_GUILE
4383 
4386 SCM view_name(int view_number);
4387 SCM view_description(int view_number);
4388 void go_to_view(SCM view);
4389 #endif /* USE_GUILE */
4390 
4391 #ifdef USE_PYTHON
4392 
4394 PyObject *view_name_py(int view_number);
4395 PyObject *view_description_py(int view_number);
4396 void go_to_view_py(PyObject *view);
4397 #endif /* USE_PYTHON */
4398 #endif /* __cplusplus */
4399 
4401 void clear_all_views();
4402 /* \} */
4403 
4404 /* ----------------------------------------------------------------------- */
4405 /* movies */
4406 /* ----------------------------------------------------------------------- */
4407 /* movies */
4408 /* section Movies Interface */
4410 /* \{ */
4411 void set_movie_file_name_prefix(const char *file_name);
4412 void set_movie_frame_number(int frame_number);
4413 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
4414 #ifdef USE_GUILE
4415 SCM movie_file_name_prefix();
4416 #endif
4417 #ifdef USE_PYTHON
4418 PyObject *movie_file_name_prefix_py();
4419 #endif /* USE_PYTHON */
4420 #endif /* c++ */
4421 int movie_frame_number();
4422 void set_make_movie_mode(int make_movies_flag);
4423 /* \} */
4424 
4425 /* ----------------------------------------------------------------------- */
4426 /* graphics background colour */
4427 /* ----------------------------------------------------------------------- */
4428 /* section Background Colour */
4430 /* \{ */
4431 
4435 void set_background_colour(double red, double green, double blue);
4436 
4438 void redraw_background();
4439 
4444 int background_is_black_p();
4445 /* \} */
4446 
4447 /* ----------------------------------------------------------------------- */
4448 /* ligand fitting stuff */
4449 /* ----------------------------------------------------------------------- */
4450 /* section Ligand Fitting Functions */
4452 /* \{ */
4453 
4457 
4460 void set_ligand_cluster_sigma_level(float f); /* default 2.2 */
4461 
4465 void set_ligand_flexible_ligand_n_samples(int i); /* default 50: Really? */
4466 void set_ligand_verbose_reporting(int i); /* 0 off (default), 1 on */
4467 
4471 void set_find_ligand_n_top_ligands(int n); /* fit the top n ligands,
4472  not all of them, default
4473  10. */
4474 
4475 void set_find_ligand_do_real_space_refinement(short int state);
4476 
4493 void set_find_ligand_multi_solutions_per_cluster(float lim_1, float lim_2);
4494 
4500 void set_find_ligand_mask_waters(int istate);
4501 
4502 /* get which map to search, protein mask and ligands from button and
4503  then do it*/
4504 
4505 /* extract the sigma level and stick it in */
4506 /* graphics_info_t::ligand_cluster_sigma_level */
4507 
4509 void set_ligand_search_protein_molecule(int imol);
4511 void set_ligand_search_map_molecule(int imol_map);
4514 void add_ligand_search_ligand_molecule(int imol_ligand);
4517 void add_ligand_search_wiggly_ligand_molecule(int imol_ligand);
4518 
4520 void set_find_ligand_here_cluster(int state);
4521 
4522 void execute_ligand_search();
4523 
4524 #ifdef __cplusplus
4525 #ifdef USE_GUILE
4526 SCM execute_ligand_search_scm();
4527 #endif
4528 #ifdef USE_PYTHON
4529 PyObject *execute_ligand_search_py();
4530 #endif /* USE_PYTHON */
4531 #endif /* __cplusplus */
4532 void add_ligand_clear_ligands();
4533 
4534 /* conformers added to cc-interface because it uses a std::vector internally. */
4535 
4536 
4539 void ligand_expert();
4540 
4545 void do_find_ligands_dialog();
4546 
4556 #ifdef __cplusplus
4557 #ifdef USE_GUILE
4558 SCM overlap_ligands(int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref);
4559 SCM analyse_ligand_differences(int imol_ligand, int imol_ref, const char *chain_id_ref,
4560  int resno_ref);
4561 SCM compare_ligand_atom_types_scm(int imol_ligand, int imol_ref, const char *chain_id_ref,
4562  int resno_ref);
4563 #endif /* USE_GUILE */
4564 void match_ligand_torsions(int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref);
4565 #ifdef USE_PYTHON
4566 PyObject *overlap_ligands_py(int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref);
4567 PyObject *analyse_ligand_differences_py(int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref);
4568 PyObject *compare_ligand_atom_types_py(int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref);
4569 #endif /* PYTHON*/
4570 #endif /* __cplusplus */
4571 
4579 void match_ligand_atom_names(int imol_ligand, const char *chain_id_ligand, int resno_ligand, const char *ins_code_ligand,
4580  int imol_reference, const char *chain_id_reference, int resno_reference, const char *ins_code_reference);
4581 
4592 void match_ligand_atom_names_to_comp_id(int imol_ligand, const char *chain_id_ligand, int resno_ligand, const char *ins_code_ligand, const char *comp_id_ref);
4593 
4594 /* Transfer as many atom names as possible from the reference ligand
4595  to the given ligand. The atom names are determined from graph
4596  matching the reference ligand onto the given ligand.
4597 
4598  Function needs to be written. Non-trivial (the atom graph matching
4599  is OK, and the atom pairs straightforwardly determined, but what
4600  should be done with the atom names that are matched from the
4601  reference ligand, but also a different atom of the same name is not
4602  matched?).
4603  */
4604 /* void tranfer_atom_names(int imol_ligand, const char *chain_id_ligand, int res_no_ligand, const char *ins_code_ligand, */
4605 /* int imol_reference, const char *chain_id_reference, int res_no_reference, const char *ins_code_reference); */
4606 
4607 
4608 
4609 /* Just pondering - just a stub currently.
4610 
4611  For use with exporting ligands from the 2D sketcher to the main
4612  coot window. It should find the residue that this residue is
4613  sitting on top of that is in a molecule that has lot of atoms
4614  (i.e. is a protein) and create a new molecule that is a copy of the
4615  molecule without the residue/ligand that this (given) ligand
4616  overlays - and a copy of this given ligand. */
4617 int exchange_ligand(int imol_lig, const char *chain_id_lig, int resno_lig, const char *ins_code_lig);
4618 
4619 
4620 
4624 void flip_ligand(int imol, const char *chain_id, int resno);
4625 
4626 void jed_flip(int imol, const char *chain_id, int res_no, const char *ins_code, const char *atom_name, const char *alt_conf, short int invert_selection);
4627 
4628 
4629 /* \} */
4630 
4631 /* ----------------------------------------------------------------------- */
4632 /* water fitting */
4633 /* ----------------------------------------------------------------------- */
4634 /* section Water Fitting Functions */
4636 /* \{ */
4637 
4640 
4642 void renumber_waters(int imol);
4643 
4645 void execute_find_waters_real(int imol_for_map,
4646  int imol_for_protein,
4647  short int new_waters_mol_flag,
4648  float rmsd_cut_off);
4649 
4650 void find_waters(int imol_for_map,
4651  int imol_for_protein,
4652  short int new_waters_mol_flag,
4653  float rmsd_cut_off,
4654  short int show_blobs_dialog);
4655 
4656 
4660 int move_waters_to_around_protein(int imol);
4661 
4665 void move_hetgroups_to_around_protein(int imol);
4666 
4670 float max_water_distance(int imol);
4671 
4672 char *get_text_for_find_waters_sigma_cut_off();
4673 void set_value_for_find_waters_sigma_cut_off(float f);
4674 
4680 
4684 void set_ligand_water_to_protein_distance_limits(float f1, float f2);
4685 
4687 void set_ligand_water_n_cycles(int i);
4688 void set_write_peaksearched_waters();
4689 
4691 void execute_find_blobs(int imol_model, int imol_for_map, float cut_off, short int interactive_flag);
4692 
4693 /* there is also a c++ interface to find blobs, which returns a vector
4694  of pairs (currently) */
4695 
4705 void split_water(int imol, const char *chain_id, int res_no, const char *ins_code);
4706 
4707 
4708 /* \} */
4709 
4710 /* ----------------------------------------------------------------------- */
4711 /* bond representation */
4712 /* ----------------------------------------------------------------------- */
4713 /* section Bond Representation */
4715 /* \{ */
4716 
4718 void set_default_bond_thickness(int t);
4719 
4721 void set_bond_thickness(int imol, float t);
4724 
4726 void set_use_variable_bond_thickness(short int state);
4727 
4729 void set_bond_colour_rotation_for_molecule(int imol, float f);
4730 
4732 void set_draw_stick_mode_atoms_default(short int state);
4733 
4734 
4739 
4740 void set_unbonded_atom_star_size(float f);
4741 
4743 void set_default_representation_type(int type);
4744 
4747 
4751 void set_draw_zero_occ_markers(int status);
4752 
4753 
4757 void set_draw_cis_peptide_markups(int status);
4758 
4759 
4760 
4763 void set_draw_hydrogens(int imol, int istat);
4764 
4768 int draw_hydrogens_state(int imol);
4769 
4775 void set_draw_stick_mode_atoms(int imol, short int state);
4776 
4781 void set_draw_missing_residues_loops(short int state);
4782 
4784 void graphics_to_ca_representation (int imol);
4792 void graphics_to_bonds_representation(int mol);
4800 void graphics_to_rainbow_representation(int imol);
4812 int graphics_molecule_bond_type(int imol);
4814 int set_b_factor_bonds_scale_factor(int imol, float f);
4817 void change_model_molecule_representation_mode(int up_or_down);
4818 
4819 /* not today void set_ca_bonds_loop_params(float p1, float p2, float p3); */
4820 
4823 void set_use_grey_carbons_for_molecule(int imol, short int state);
4828 void set_grey_carbon_colour(int imol, float r, float g, float b);
4829 
4830 /* undocumented feature for development. */
4831 void set_draw_moving_atoms_restraints(int state);
4832 
4836 int make_ball_and_stick(int imol,
4837  const char *atom_selection_str,
4838  float bond_thickness, float sphere_size,
4839  int do_spheres_flag);
4841 int clear_ball_and_stick(int imol);
4842 
4843 /* \brief display/undisplay the given additional representation */
4844 void set_show_additional_representation(int imol, int representation_number, int on_off_flag);
4845 
4846 /* \brief display/undisplay all the additional representations for the given molecule */
4847 void set_show_all_additional_representations(int imol, int on_off_flag);
4848 
4849 /* \brief undisplay all the additional representations for the given
4850  molecule, except the given representation number (if it is off, leave it off) */
4851 void all_additional_representations_off_except(int imol, int representation_number,
4852  short int ball_and_sticks_off_too_flag);
4853 
4854 
4855 /* delete a given additional representation */
4856 void delete_additional_representation(int imol, int representation_number);
4857 
4859 int additional_representation_by_string(int imol, const char *atom_selection,
4860  int representation_type,
4861  int bonds_box_type,
4862  float bond_width,
4863  int draw_hydrogens_flag);
4864 
4865 /* representation_types: */
4866 /* enum { coot::SIMPLE_LINES, coot::STICKS, coot::BALL_AND_STICK, coot::SURFACE };
4867 
4868  bonds_box_type:
4869  enum { UNSET_TYPE = -1, NORMAL_BONDS=1, CA_BONDS=2, COLOUR_BY_CHAIN_BONDS=3,
4870  CA_BONDS_PLUS_LIGANDS=4, BONDS_NO_WATERS=5, BONDS_SEC_STRUCT_COLOUR=6,
4871  BONDS_NO_HYDROGENS=15,
4872  CA_BONDS_PLUS_LIGANDS_SEC_STRUCT_COLOUR=7,
4873  CA_BONDS_PLUS_LIGANDS_B_FACTOR_COLOUR=14,
4874  COLOUR_BY_MOLECULE_BONDS=8,
4875  COLOUR_BY_RAINBOW_BONDS=9, COLOUR_BY_B_FACTOR_BONDS=10,
4876  COLOUR_BY_OCCUPANCY_BONDS=11};
4877 
4878 */
4879 
4883 int additional_representation_by_attributes(int imol, const char *chain_id,
4884  int resno_start, int resno_end,
4885  const char *ins_code,
4886  int representation_type,
4887  int bonds_box_type,
4888  float bond_width,
4889  int draw_hydrogens_flag);
4890 
4891 
4892 #ifdef __cplusplus
4893 
4894 #ifdef USE_GUILE
4895 SCM additional_representation_info_scm(int imol);
4896 #endif /* USE_GUILE */
4897 
4898 #ifdef USE_PYTHON
4899 PyObject *additional_representation_info_py(int imol);
4900 #endif /* USE_PYTHON */
4901 
4902 #endif /* __cplusplus */
4903 
4904 /* Turn on nice animated ligand interaction display.
4905 
4906 turn on with arg 1.
4907 
4908 turn off with arg 0. */
4909 void set_flev_idle_ligand_interactions(int state);
4910 
4911 /* Toggle for animated ligand interaction display above */
4912 void toggle_flev_idle_ligand_interactions();
4913 
4914 
4915 
4916 /* \} */
4917 
4918 /* ----------------------------------------------------------------------- */
4919 /* dots display */
4920 /* ----------------------------------------------------------------------- */
4921 
4923 /* \{ */
4927 int dots(int imol,
4928  const char *atom_selection_str,
4929  const char *dots_object_name,
4930  float dot_density, float sphere_size_scale);
4931 
4932 
4937 void set_dots_colour(int imol, float r, float g, float b);
4938 
4942 void unset_dots_colour(int imol);
4943 
4945 void clear_dots(int imol, int dots_handle);
4946 
4948 void clear_dots_by_name(int imol, const char *dots_object_name);
4949 
4951 int n_dots_sets(int imol);
4952 /* \} */
4953 
4954 
4955 /* ----------------------------------------------------------------------- */
4956 /* pepflip */
4957 /* ----------------------------------------------------------------------- */
4958 /* section Pep-flip Interface */
4960 /* \{ */
4961 void do_pepflip(short int state); /* sets up pepflip, ready for atom pick. */
4963 /* the residue with CO, for scripting interface. */
4964 void pepflip(int imol, const char *chain_id, int resno, const char *inscode,
4965  const char *altconf);
4966 int pepflip_intermediate_atoms();
4967 int pepflip_intermediate_atoms_other_peptide();
4968 
4969 #ifdef __cplusplus
4970 #ifdef USE_GUILE
4971 SCM pepflip_using_difference_map_scm(int imol_coords, int imol_difference_map, float n_sigma);
4972 #endif
4973 #ifdef USE_PYTHON
4974 PyObject *pepflip_using_difference_map_py(int imol_coords, int imol_difference_map, float n_sigma);
4975 #endif
4976 #endif
4977 /* \} */
4978 
4979 /* ----------------------------------------------------------------------- */
4980 /* rigid body refinement */
4981 /* ----------------------------------------------------------------------- */
4982 /* section Rigid Body Refinement Interface */
4984 /* \{ */
4985 /* a gui-based interface: setup the rigid body refinement.*/
4986 void do_rigid_body_refine(short int state); /* set up for atom picking */
4987 
4993 void rigid_body_refine_zone(int reso_start, int resno_end,
4994  const char *chain_id, int imol);
4995 
4996 void
4997 rigid_body_refine_by_atom_selection(int imol,
4998  const char *atom_selection_string);
4999 
5000 #ifdef __cplusplus
5001 #ifdef USE_GUILE
5002 
5005 SCM rigid_body_refine_by_residue_ranges_scm(int imol, SCM residue_ranges);
5006 #endif /* USE_GUILE */
5007 #ifdef USE_PYTHON
5008 
5011 PyObject *
5012 rigid_body_refine_by_residue_ranges_py(int imol, PyObject *residue_ranges);
5013 #endif /* USE_PYTHON */
5014 #endif /* __cplusplus */
5015 
5016 void execute_rigid_body_refine(short int auto_range_flag); /* atom picking has happened.
5017  Actually do it */
5018 
5019 
5024 
5025 /* \} */
5026 
5027 /* ----------------------------------------------------------------------- */
5028 /* dynamic map */
5029 /* ----------------------------------------------------------------------- */
5030 /* section Dynamic Map */
5032 /* \{ */
5033 void toggle_dynamic_map_display_size();
5034 void toggle_dynamic_map_sampling();
5035 /* scripting interface: */
5036 void set_dynamic_map_size_display_on();
5037 void set_dynamic_map_size_display_off();
5038 int get_dynamic_map_size_display();
5039 void set_dynamic_map_sampling_on();
5040 void set_dynamic_map_sampling_off();
5041 int get_dynamic_map_sampling();
5042 void set_dynamic_map_zoom_offset(int i);
5043 
5044 /* \} */
5045 
5046 /* ----------------------------------------------------------------------- */
5047 /* build one residue by phi/psi search */
5048 /* ----------------------------------------------------------------------- */
5049 /* section Add Terminal Residue Functions */
5051 /* \{ */
5052 void do_add_terminal_residue(short int state);
5053 /* execution of this is in graphics_info_t because it uses a mmdb::Residue */
5054 /* in the interface and we can't have that in c-interface.h */
5055 /* (compilation of coot_wrap_guile goes mad on inclusion of */
5056 /* mmdb_manager.h) */
5057 void set_add_terminal_residue_n_phi_psi_trials(int n);
5058 /* Add Terminal Residues actually build 2 residues, this allows us to
5059  see both residues - default is 0 (off). */
5060 void set_add_terminal_residue_add_other_residue_flag(int i);
5061 void set_add_terminal_residue_do_rigid_body_refine(short int v);
5062 void set_terminal_residue_do_rigid_body_refine(short int v); /* remove this for 0.9, wraps above */
5063 void set_add_terminal_residue_debug_trials(short int debug_state);
5064 int add_terminal_residue_immediate_addition_state();
5065 
5070 
5076 int add_terminal_residue(int imol, const char *chain_id, int residue_number,
5077  const char *residue_type, int immediate_add);
5078 
5083 int add_nucleotide(int imol, const char *chain_id, int res_no);
5084 
5085 
5091 int add_terminal_residue_using_phi_psi(int imol, const char *chain_id, int res_no,
5092  const char *residue_type, float phi, float psi);
5093 
5095 void set_add_terminal_residue_default_residue_type(const char *type);
5098 void set_add_terminal_residue_do_post_refine(short int istat);
5101 
5102 #ifdef __cplusplus
5103 #ifdef USE_GUILE
5104 SCM find_terminal_residue_type(int imol, const char *chain_id, int resno);
5105 #endif
5106 #ifdef USE_PYTHON
5107 PyObject *find_terminal_residue_type_py(int imol, const char *chain_id, int resno);
5108 #endif /* PYTHON */
5109 #endif /* c++ */
5110 
5111 /* \} */
5112 
5113 
5114 /* ----------------------------------------------------------------------- */
5115 /* scripting a residue with atoms */
5116 /* ----------------------------------------------------------------------- */
5117 /* section Add A Residue Functions */
5119 /* \{ */
5120 #ifdef __cplusplus
5121 
5122 /* \brief add a residue with atoms in scripting
5123 
5124  @return the number of atoms added
5125 */
5126 #ifdef USE_PYTHON
5127 int add_residue_with_atoms_py(int imol, PyObject *residue_spec, const std::string &res_name, PyObject *list_of_atoms);
5128 #endif
5129 #endif /* c++ */
5130 
5131 /* \} */
5132 
5133 /* ----------------------------------------------------------------------- */
5134 /* delete residue */
5135 /* ----------------------------------------------------------------------- */
5136 /* section Delete Residues */
5138 /* in build */
5139 /* by graphics */
5140 /* \{ */
5141 void delete_atom_by_atom_index(int imol, int index, short int do_delete_dialog);
5142 void delete_residue_by_atom_index(int imol, int index, short int do_delete_dialog);
5143 void delete_residue_hydrogens_by_atom_index(int imol, int index, short int do_delete_dialog);
5144 
5146 void delete_residue_range(int imol, const char *chain_id, int resno_start, int end_resno);
5147 
5149 void delete_residue(int imol, const char *chain_id, int resno, const char *inscode);
5151 void delete_residue_with_full_spec(int imol, int imodel, const char *chain_id, int resno, const char *inscode, const char *altloc);
5152 #ifdef __cplusplus
5153 #ifdef USE_GUILE
5154 
5155 void delete_residues_scm(int imol, SCM residue_specs_scm);
5156 #endif
5157 #ifdef USE_PYTHON
5158 
5159 void delete_residues_py(int imol, PyObject *residue_specs_py);
5160 #endif
5161 #endif /* c++ */
5162 
5163 void delete_residue_hydrogens(int imol, const char *chain_id, int resno, const char *inscode, const char *altloc);
5165 void delete_atom(int imol, const char *chain_id, int resno, const char *ins_code, const char *at_name, const char *altloc);
5167 void delete_residue_sidechain(int imol, const char *chain_id, int resno, const char*ins_code,
5168  short int do_delete_dialog);
5172 int delete_hydrogen_atoms(int imol);
5173 
5177 int delete_hydrogens(int imol);
5178 
5182 int delete_waters(int imol);
5183 
5185 void delete_chain(int imol, const char *chain_id);
5186 
5188 void delete_sidechains_for_chain(int imol, const char *chain_id);
5189 
5190 void post_delete_item_dialog();
5191 
5192 
5193 
5194 /* toggle callbacks */
5195 void set_delete_atom_mode();
5196 void set_delete_residue_mode();
5197 void set_delete_residue_zone_mode();
5198 void set_delete_residue_hydrogens_mode();
5199 void set_delete_water_mode();
5200 void set_delete_sidechain_mode();
5201 void set_delete_sidechain_range_mode();
5202 void set_delete_chain_mode();
5203 short int delete_item_mode_is_atom_p(); /* (predicate) a boolean */
5204 short int delete_item_mode_is_residue_p(); /* predicate again */
5205 short int delete_item_mode_is_water_p();
5206 short int delete_item_mode_is_sidechain_p();
5207 short int delete_item_mode_is_sidechain_range_p();
5208 short int delete_item_mode_is_chain_p();
5209 void clear_pending_delete_item(); /* for when we cancel with picking an atom */
5210 void clear_delete_item_widget();
5211 void store_delete_item_widget_position();
5212 short int delete_item_widget_is_being_shown();
5213 short int delete_item_widget_keep_active_on();
5214 
5215 
5216 /* utility function, moving widget work out of c-interface-build.cc */
5217 void delete_object_handle_delete_dialog(short int do_delete_dialog);
5218 
5219 /* \} */
5220 
5221 /* ----------------------------------------------------------------------- */
5222 /* rotate/translate buttons */
5223 /* ----------------------------------------------------------------------- */
5224 /* section Rotate/Translate Buttons */
5225 /* sets flag for atom selection clicks */
5226 void do_rot_trans_setup(short int state);
5227 void rot_trans_reset_previous();
5228 void set_rotate_translate_zone_rotates_about_zone_centre(int istate);
5229 void set_rot_trans_object_type(short int rt_type); /* zone, chain, mol */
5230 int get_rot_trans_object_type();
5231 
5232 /* ----------------------------------------------------------------------- */
5233 /* cis and trans info and conversion */
5234 /* ----------------------------------------------------------------------- */
5235 void do_cis_trans_conversion_setup(int istate);
5236 void cis_trans_convert(int imol, const char *chain_id, int resno, const char *altconf);
5237 
5238 #ifdef __cplusplus /* need this wrapper, else gmp.h problems in callback.c */
5239 #ifdef USE_GUILE
5240 
5243 SCM cis_peptides(int imol);
5244 SCM twisted_trans_peptides(int imol);
5245 #endif /* GUILE */
5246 #ifdef USE_PYTHON
5247 
5250 PyObject *cis_peptides_py(int imol);
5251 PyObject *twisted_trans_peptides_py(int imol);
5252 #endif /* PYTHON */
5253 #endif
5254 
5258 
5259 
5260 /* ----------------------------------------------------------------------- */
5261 /* db-main */
5262 /* ----------------------------------------------------------------------- */
5263 /* section Mainchain Building Functions */
5264 
5266 /* \{ */
5267 void do_db_main(short int state);
5275 int db_mainchain(int imol,
5276  const char *chain_id,
5277  int iresno_start,
5278  int iresno_end,
5279  const char *direction);
5280 
5285 int db_mainchains_fragment(int imol, const char *chain_id, int res_no);
5286 
5287 /* \} */
5288 
5289 /* ----------------------------------------------------------------------- */
5290 /* close molecule */
5291 /* ----------------------------------------------------------------------- */
5292 /* section Close Molecule Functions */
5294 /* \{ */
5295 
5297 void close_molecule(int imol);
5298 
5299 
5300 /* \} */
5301 
5302 /* ----------------------------------------------------------------------- */
5303 /* rotamers */
5304 /* ----------------------------------------------------------------------- */
5305 /* section Rotamer Functions */
5307 /* \{ */
5308 
5309 /* functions defined in c-interface-build */
5310 
5314 void set_rotamer_search_mode(int mode);
5315 
5318 
5319 void setup_rotamers(short int state);
5320 
5321 /* display the rotamer option and display the most likely in the graphics as a */
5322 /* moving_atoms_asc */
5323 void do_rotamers(int atom_index, int imol);
5324 
5325 void show_rotamers_dialog(int imol, const char *chain_id, int resno, const char *ins_code, const char *altconf);
5326 
5330 void set_rotamer_lowest_probability(float f);
5331 
5333 void set_rotamer_check_clashes(int i);
5334 
5341 float auto_fit_best_rotamer(int resno,
5342  const char *altloc,
5343  const char *insertion_code,
5344  const char *chain_id, int imol_coords, int imol_map,
5345  int clash_flag, float lowest_probability);
5346 
5352 void set_auto_fit_best_rotamer_clash_flag(int i); /* */
5353 /* currently stub function only */
5354 float rotamer_score(int imol, const char *chain_id, int res_no, const char *insertion_code,
5355  const char *alt_conf);
5356 void setup_auto_fit_rotamer(short int state); /* called by the Auto Fit button call
5357  back, set's in_auto_fit_define. */
5358 
5361 int n_rotamers(int imol, const char *chain_id, int resno, const char *ins_code);
5363 int set_residue_to_rotamer_number(int imol, const char *chain_id, int resno, const char *ins_code,
5364  const char *alt_conf, int rotamer_number);
5365 
5372 int set_residue_to_rotamer_name(int imol, const char *chain_id, int resno, const char *ins_code,
5373  const char *alt_conf, const char *rotamer_name);
5374 
5375 #ifdef __cplusplus
5376 #ifdef USE_GUILE
5377 SCM get_rotamer_name_scm(int imol, const char *chain_id, int resno, const char *ins_code);
5378 #endif
5379 #ifdef USE_PYTHON
5380 PyObject *get_rotamer_name_py(int imol, const char *chain_id, int resno, const char *ins_code);
5381 #endif /* USE_GUILE */
5382 #endif /* c++ */
5383 
5384 
5389 void fill_partial_residues(int imol);
5390 
5391 void fill_partial_residue(int imol, const char *chain_id, int resno, const char* inscode);
5392 
5397 void simple_fill_partial_residues(int imol);
5398 
5399 #ifdef __cplusplus
5400 #ifdef USE_GUILE
5401 SCM missing_atom_info_scm(int imol);
5402 #endif /* USE_GUILE */
5403 #ifdef USE_PYTHON
5404 PyObject *missing_atom_info_py(int imol);
5405 #endif /* USE_PYTHON */
5406 #endif /* __cplusplus */
5407 
5408 
5409 
5410 #ifdef __cplusplus /* need this wrapper, else gmp.h problems in callback.c */
5411 #ifdef USE_GUILE
5412 
5415 SCM rotamer_graphs(int imol);
5416 #endif /* USE_GUILE */
5417 #ifdef USE_PYTHON
5418 
5421 PyObject *rotamer_graphs_py(int imol);
5422 #endif /* USE_PYTHON */
5423 #endif /* c++ */
5424 
5425 /* \} */
5426 
5427 /* ----------------------------------------------------------------------- */
5428 /* 180 degree flip */
5429 /* ----------------------------------------------------------------------- */
5431 /* \{ */
5432 
5434 void do_180_degree_side_chain_flip(int imol, const char* chain_id, int resno,
5435  const char *inscode, const char *altconf);
5436 
5437 void setup_180_degree_flip(short int state);
5438 
5439 /* ! \brief side-chain 180 flip the terminal chi angle of the residue of the active atom */
5440 int side_chain_flip_180_intermediate_atoms();
5441 
5442 
5443 /* \} */
5444 
5445 /* ----------------------------------------------------------------------- */
5446 /* mutate */
5447 /* ----------------------------------------------------------------------- */
5448 /* section Mutate Functions */
5450 /* \{ */
5451 
5452 /* c-interface-build */
5453 void setup_mutate(short int state);
5457 void setup_mutate_auto_fit(short int state);
5458 
5459 void do_mutation(const char *type, short int is_stub_flag);
5460 
5463 void mutate_active_residue();
5464 
5465 /* auto-mutate stuff */
5466 short int progressive_residues_in_chain_check(const char *chain_id, int imol);
5467 
5473 int mutate(int imol, const char *chain_id, int ires, const char *inscode, const char *target_res_type);
5474 
5476 int mutate_base(int imol, const char *chain_id, int res_no, const char *ins_code, const char *res_type);
5477 
5478 /* push the residues along a bit
5479 
5480 e.g. if nudge_by is 1, then the sidechain of residue 20 is moved up
5481 onto what is currently residue 21. The mainchain numbering and atoms is not changed.
5482 
5483 @return 0 for failure to nudge (becauese not all the residues were in the range)
5484  and 1 for success.
5485 */
5486 int nudge_residue_sequence(int imol, char *chain_id, int res_no_range_start, int res_no_range_end, int nudge_by, short int nudge_residue_numbers_also);
5487 
5492 void set_mutate_auto_fit_do_post_refine(short int istate);
5493 
5496 
5501 void set_rotamer_auto_fit_do_post_refine(short int istate);
5502 
5505 
5506 
5522  const char *chain_id,
5523  int imol, char target_res_type);
5524 /* ires is the seqnum of the residue (conventional) */
5525 int mutate_single_residue_by_seqno(int ires, const char *inscode,
5526  const char *chain_id,
5527  int imol, char target_res_type);
5528 
5529 /* an internal function - not useful for scripting: */
5530 
5531 void do_base_mutation(const char *type);
5532 
5535 void set_residue_type_chooser_stub_state(short int istat);
5536 
5537 void handle_residue_type_chooser_entry_chose_type(const char *entry_text, short int stub_mode);
5538 
5539 
5540 /* \} */
5541 
5542 /* ----------------------------------------------------------------------- */
5543 /* alternate conformation */
5544 /* ----------------------------------------------------------------------- */
5545 /* section Alternative Conformation */
5547 /* c-interface-build function */
5550 short int alt_conf_split_type_number();
5551 void set_add_alt_conf_split_type_number(short int i);
5552 
5553 #ifdef __cplusplus
5554 #ifdef USE_GUILE
5555 
5559 SCM add_alt_conf_scm(int imol, const char *chain_id, int res_no, const char *ins_code,
5560  const char *alt_conf, int rotamer_number);
5561 #endif /* USE_GUILE */
5562 #ifdef USE_PYTHON
5563 
5567 PyObject *add_alt_conf_py(int imol, const char*chain_id, int res_no, const char *ins_code,
5568  const char *alt_conf, int rotamer_number);
5569 #endif /* USE_PYTHON */
5570 #endif /* __cplusplus */
5571 
5572 void unset_add_alt_conf_dialog(); /* set the static dialog holder in
5573  graphics info to NULL */
5574 void unset_add_alt_conf_define(); /* turn off pending atom pick */
5575 void altconf(); /* temporary debugging interface. */
5576 void set_add_alt_conf_new_atoms_occupancy(float f); /* default 0.5 */
5577 float get_add_alt_conf_new_atoms_occupancy();
5578 void set_show_alt_conf_intermediate_atoms(int i);
5579 int show_alt_conf_intermediate_atoms_state();
5580 void zero_occupancy_residue_range(int imol, const char *chain_id, int ires1, int ires2);
5581 void fill_occupancy_residue_range(int imol, const char *chain_id, int ires1, int ires2);
5582 void set_occupancy_residue_range(int imol, const char *chain_id, int ires1, int ires2, float occ);
5583 void set_b_factor_residue_range(int imol, const char *chain_id, int ires1, int ires2, float bval);
5584 void reset_b_factor_residue_range(int imol, const char *chain_id, int ires1, int ires2);
5587 /* ----------------------------------------------------------------------- */
5588 /* pointer atoms */
5589 /* ----------------------------------------------------------------------- */
5590 /* section Pointer Atom Functions */
5592 /* c-interface-build */
5595 void place_atom_at_pointer();
5596 /* which calls the following gui function (if using non dummies) */
5597 void place_atom_at_pointer_by_window();
5598 void place_typed_atom_at_pointer(const char *type);
5599 
5600 /* ! \brief set pointer atom is a water (HOH) */
5601 void set_pointer_atom_is_dummy(int i);
5602 void display_where_is_pointer(); /* print the coordinates of the
5603  pointer to the console */
5608 int pointer_atom_molecule();
5609 void set_pointer_atom_molecule(int imol);
5610 
5613 /* ----------------------------------------------------------------------- */
5614 /* baton mode */
5615 /* ----------------------------------------------------------------------- */
5617 /* section Baton Build Functions */
5618 /* c-interface-build */
5621 void set_baton_mode(short int i); /* Mouse movement moves the baton not the view? */
5623 int try_set_draw_baton(short int i); /* draw the baton or not */
5625 void accept_baton_position(); /* put an atom at the tip */
5627 void baton_tip_try_another();
5629 void baton_tip_previous();
5631 void shorten_baton();
5633 void lengthen_baton();
5638 void set_baton_build_params(int istart_resno, const char *chain_id, const char *direction);
5642 /* ----------------------------------------------------------------------- */
5643 /* post baton mode */
5644 /* ----------------------------------------------------------------------- */
5645 /* section Post-Baton Functions */
5646 /* c-interface-build */
5647 /* \brief Reverse the direction of a the fragment of the clicked on
5648  atom/residue.
5649 
5650  A fragment is a consecutive range of residues -
5651  where there is a gap in the numbering, that marks breaks between
5652  fragments in a chain. There also needs to be a distance break - if
5653  the CA of the next/previous residue is more than 5A away, that also
5654  marks a break. Throw away all atoms in fragment other than CAs.*/
5655 void reverse_direction_of_fragment(int imol, const char *chain_id, int resno);
5656 void setup_reverse_direction(short int i);
5657 
5658 
5659 /* ----------------------------------------------------------------------- */
5660 /* terminal OXT atom */
5661 /* ----------------------------------------------------------------------- */
5662 /* section Terminal OXT Atom */
5664 /* c-interface-build */
5666 short int add_OXT_to_residue(int imol, const char *chain_id, int reso, const char *insertion_code);
5667 
5670 /* ----------------------------------------------------------------------- */
5671 /* crosshairs */
5672 /* ----------------------------------------------------------------------- */
5673 /* section Crosshairs Interface */
5677 void set_draw_crosshairs(short int i);
5678 /* so that we display the crosshairs with the radiobuttons in the
5679  right state, return draw_crosshairs_flag */
5680 short int draw_crosshairs_state();
5683 /* ----------------------------------------------------------------------- */
5684 /* Edit Chi Angles */
5685 /* ----------------------------------------------------------------------- */
5686 /* section Edit Chi Angles */
5688 /* \{ */
5689 /* c-interface-build functions */
5690 void setup_edit_chi_angles(short int state);
5691 
5692 void rotate_chi(float am);
5693 
5699 void set_find_hydrogen_torsions(short int state);
5700 void set_graphics_edit_current_chi(int ichi); /* button callback */
5701 void unset_moving_atom_move_chis();
5702 void set_moving_atom_move_chis();
5703 
5708 int edit_chi_angles(int imol, const char *chain_id, int resno,
5709  const char *ins_code, const char *altconf);
5710 
5711 int set_show_chi_angle_bond(int imode);
5712 
5713 /* a callback from the callbacks.c, setting the state of
5714  graphics_info_t::edit_chi_angles_reverse_fragment flag */
5715 void set_edit_chi_angles_reverse_fragment_state(short int istate);
5716 
5717 /* No need for this to be exported to scripting */
5720 void setup_torsion_general(short int state);
5721 /* No need for this to be exported to scripting */
5722 void toggle_torsion_general_reverse();
5723 
5724 void setup_residue_partial_alt_locs(short int state);
5725 
5726 /* \} */
5727 
5728 /* ----------------------------------------------------------------------- */
5729 /* Backrub */
5730 /* ----------------------------------------------------------------------- */
5733 /* \brief Do a back-rub rotamer search (with autoaccept).
5734 
5735 @return the success status, 0 for fail, 1 for successful fit. */
5736 int backrub_rotamer(int imol, const char *chain_id, int res_no,
5737  const char *ins_code, const char *alt_conf);
5738 
5741 
5745 /* ----------------------------------------------------------------------- */
5746 /* Mask */
5747 /* ----------------------------------------------------------------------- */
5748 /* section Masks */
5751 /* The idea is to generate a new map that has been masked by some
5752  coordinates. */
5759 int mask_map_by_molecule(int map_mol_no, int coord_mol_no, short int invert_flag);
5760 
5762 int mask_map_by_atom_selection(int map_mol_no, int coords_mol_no, const char *mmdb_atom_selection, short int invert_flag);
5763 
5768 int make_masked_maps_split_by_chain(int imol, int imol_map);
5769 
5771 void set_map_mask_atom_radius(float rad);
5773 float map_mask_atom_radius();
5774 
5777 /* ----------------------------------------------------------------------- */
5778 /* check waters interface */
5779 /* ----------------------------------------------------------------------- */
5780 /* section Check Waters Interface */
5782 /* interactive check by b-factor, density level etc. */
5784 void set_check_waters_b_factor_limit(float f);
5785 void set_check_waters_map_sigma_limit(float f);
5786 void set_check_waters_min_dist_limit(float f);
5787 void set_check_waters_max_dist_limit(float f);
5788 
5789 
5791 void delete_checked_waters_baddies(int imol, float b_factor_lim,
5792  float map_sigma_lim,
5793  float min_dist, float max_dist,
5794  short int part_occ_contact_flag,
5795  short int zero_occ_flag,
5796  short int logical_operator_and_or_flag);
5797 
5798 /* difference map variance check */
5799 void check_waters_by_difference_map(int imol_waters, int imol_diff_map,
5800  int interactive_flag);
5801 /* results widget are in graphics-info.cc */
5802 /* Let's give access to the sigma level (default 4) */
5803 float check_waters_by_difference_map_sigma_level_state();
5804 void set_check_waters_by_difference_map_sigma_level(float f);
5805 
5806 #ifdef __cplusplus
5807 #ifdef USE_GUILE
5808 
5814 SCM highly_coordinated_waters_scm(int imol, int coordination_number, float dist_max);
5815 
5816 SCM metal_coordination_scm(int imol, float dist_max);
5817 #endif
5818 #ifdef USE_PYTHON
5819 
5824 PyObject *highly_coordinated_waters_py(int imol, int coordination_number, float dist_max);
5825 PyObject *metal_coordination_py(int imol, float dist_max);
5826 #endif
5827 #endif
5828 
5829 
5832 /* ----------------------------------------------------------------------- */
5833 /* Least squares */
5834 /* ----------------------------------------------------------------------- */
5835 /* section Least-Squares matching */
5838 void clear_lsq_matches();
5839 void add_lsq_match(int reference_resno_start,
5840  int reference_resno_end,
5841  const char *chain_id_reference,
5842  int moving_resno_start,
5843  int moving_resno_end,
5844  const char *chain_id_moving,
5845  int match_type); /* 0: all
5846  1: main
5847  2: CA
5848  */
5849 #ifdef __cplusplus
5850 #ifdef USE_GUILE
5851 void add_lsq_atom_pair_scm(SCM atom_spec_ref, SCM atom_spec_moving);
5852 #endif
5853 #ifdef USE_PYTHON
5854 void add_lsq_atom_pair_py(PyObject *atom_spec_ref, PyObject *atom_spec_moving);
5855 #endif
5856 #endif /* __cplusplus */
5857 
5858 #ifdef __cplusplus /* need this wrapper, else gmp.h problems in callback.c */
5859 #ifdef USE_GUILE
5860 
5863 SCM apply_lsq_matches(int imol_reference, int imol_moving);
5864 SCM get_lsq_matrix_scm(int imol_reference, int imol_moving);
5865 #endif
5866 #ifdef USE_PYTHON
5867 /* Return an rtop pair (proper list) on good match, else False */
5868 PyObject *apply_lsq_matches_py(int imol_reference, int imol_moving);
5869 PyObject *get_lsq_matrix_py(int imol_reference, int imol_moving);
5870 #endif /* PYTHON */
5871 #endif /* __cplusplus */
5872 
5873 /* poor old python programmers... */
5874 int apply_lsq_matches_simple(int imol_reference, int imol_moving);
5875 
5876 /* section Least-Squares plane interface */
5877 void setup_lsq_deviation(int state);
5878 void setup_lsq_plane_define(int state);
5879 void unset_lsq_plane_dialog(); /* callback from destroy of widget */
5880 void remove_last_lsq_plane_atom();
5881 
5885 /* ----------------------------------------------------------------------- */
5886 /* trim */
5887 /* ----------------------------------------------------------------------- */
5888 /* section Molecule Trimming Interface */
5892 /* a c-interface-build function */
5895 void trim_molecule_by_map(int imol_coords, int imol_map,
5896  float map_level, int delete_or_zero_occ_flag);
5897 
5901 /* ------------------------------------------------------------------------ */
5902 /* povray/raster3d interface */
5903 /* ------------------------------------------------------------------------ */
5904 /* make the text input to external programs */
5906 /* \{ */
5907 
5909 void raster3d(const char *rd3_filename);
5910 void povray(const char *filename);
5911 void renderman(const char *rib_filename);
5912 /* a wrapper for the (scheme) function that makes the image, callable
5913  from callbacks.c */
5914 void make_image_raster3d(const char *filename);
5915 void make_image_povray(const char *filename);
5916 #ifdef USE_PYTHON
5917 void make_image_raster3d_py(const char *filename);
5918 void make_image_povray_py(const char *filename);
5919 #endif /* USE_PYTHON */
5920 
5922 void set_raster3d_bond_thickness(float f);
5924 void set_raster3d_atom_radius(float f);
5926 void set_raster3d_density_thickness(float f);
5928 void set_renderer_show_atoms(int istate);
5930 void set_raster3d_bone_thickness(float f);
5932 void set_raster3d_shadows_enabled(int state);
5935 void set_raster3d_water_sphere(int istate);
5937 void set_raster3d_font_size(const char *size_in);
5939 void raster_screen_shot(); /* run raster3d or povray and guile */
5940  /* script to render and display image */
5941 #ifdef USE_PYTHON
5942 void raster_screen_shot_py(); /* run raster3d or povray and python */
5943 #endif
5944 /* \} */
5945 
5946 /* ----------------------------------------------------------------------- */
5947 /* citation notice */
5948 /* ----------------------------------------------------------------------- */
5949 void citation_notice_off();
5950 
5951 /* ----------------------------------------------------------------------- */
5952 /* Superpose */
5953 /* ----------------------------------------------------------------------- */
5954 /* section Superposition (SSM) */
5956 /* \{ */
5957 
5963 void superpose(int imol1, int imol2, short int move_imol2_flag);
5964 
5965 
5971 void superpose_with_chain_selection(int imol1, int imol2,
5972  const char *chain_imol1,
5973  const char *chain_imol2,
5974  int chain_used_flag_imol1,
5975  int chain_used_flag_imol2,
5976  short int move_imol2_copy_flag);
5977 
5989 int superpose_with_atom_selection(int imol1, int imol2,
5990  const char *mmdb_atom_sel_str_1,
5991  const char *mmdb_atom_sel_str_2,
5992  short int move_imol2_copy_flag);
5993 
5994 /* \} */
5995 
5996 /* ----------------------------------------------------------------------- */
5997 /* NCS */
5998 /* ----------------------------------------------------------------------- */
5999 /* section NCS */
6002 /* \{ */
6004 void set_draw_ncs_ghosts(int imol, int istate);
6007 int draw_ncs_ghosts_state(int imol);
6008 
6010 void set_ncs_ghost_bond_thickness(int imol, float f);
6012 void ncs_update_ghosts(int imol); /* update ghosts */
6014 int make_dynamically_transformed_ncs_maps(int imol_model, int imol_map,
6015  int overwrite_maps_of_same_name_flag);
6016 void make_ncs_ghosts_maybe(int imol);
6018 void add_ncs_matrix(int imol, const char *this_chain_id, const char *target_chain_id,
6019  float m11, float m12, float m13,
6020  float m21, float m22, float m23,
6021  float m31, float m32, float m33,
6022  float t1, float t2, float t3);
6023 
6024 void clear_ncs_ghost_matrices(int imol);
6025 
6029 int add_strict_ncs_matrix(int imol,
6030  const char *this_chain_id,
6031  const char *target_chain_id,
6032  float m11, float m12, float m13,
6033  float m21, float m22, float m23,
6034  float m31, float m32, float m33,
6035  float t1, float t2, float t3);
6036 int add_strict_ncs_from_mtrix_from_self_file(int imol);
6037 
6039 int show_strict_ncs_state(int imol);
6041 void set_show_strict_ncs(int imol, int state);
6044 void set_ncs_homology_level(float flev);
6045 
6046 /* for a single copy */
6048 void copy_chain(int imol, const char *from_chain, const char *to_chain);
6049 /* do multiple copies */
6051 void copy_from_ncs_master_to_others(int imol, const char *chain_id);
6057 void copy_residue_range_from_ncs_master_to_others(int imol, const char *master_chain_id,
6058  int residue_range_start, int residue_range_end);
6059 #ifdef __cplusplus
6060 #ifdef USE_GUILE
6061 
6067 SCM ncs_master_chains_scm(int imol);
6068 void copy_residue_range_from_ncs_master_to_chains_scm(int imol, const char *master_chain_id,
6069  int residue_range_start, int residue_range_end,
6070  SCM chain_id_list);
6072 void copy_from_ncs_master_to_chains_scm(int imol, const char *master_chain_id,
6073  SCM chain_id_list);
6074 #endif
6075 #ifdef USE_PYTHON
6076 PyObject *ncs_master_chains_py(int imol);
6077 void copy_residue_range_from_ncs_master_to_chains_py(int imol, const char *master_chain_id,
6078  int residue_range_start, int residue_range_end,
6079  PyObject *chain_id_list);
6080 void copy_from_ncs_master_to_chains_py(int imol, const char *master_chain_id,
6081  PyObject *chain_id_list);
6082 #endif
6083 #endif
6084 
6086 void ncs_control_change_ncs_master_to_chain(int imol, int ichain);
6088 void ncs_control_change_ncs_master_to_chain_id(int imol, const char *chain_id);
6090 void ncs_control_display_chain(int imol, int ichain, int state);
6091 
6092 void set_ncs_matrix_type(int flag);
6093 int get_ncs_matrix_state();
6094 
6095 #ifdef __cplusplus
6096 #ifdef USE_GUILE
6097 /* Return the NCS differences as a list.
6098 
6099  e.g. ("B" "A" '(((1 "") (1 "") 0.4) ((2 "") (2 "") 0.3))
6100  i.e. ncs-related-chain its-master-chain-id and a list of residue
6101  info: (residue number matches: (this-resno this-inscode
6102  matching-mater-resno matching-master-inscode
6103  rms-atom-position-differences))) */
6104 SCM ncs_chain_differences_scm(int imol, const char *master_chain_id);
6105 
6113 SCM ncs_chain_ids_scm(int imol);
6114 #endif /* USE_GUILE */
6115 #ifdef USE_PYTHON
6116 /* Return the NCS differences as a list.
6117 
6118  e.g. ["B", "A", [[[1, ""], [1, ""], 0.4], [[2, ""], [2, ""], 0.3]]]
6119  i.e. ncs_related_chain its_master_chain_id and a list of residue
6120  info: [residue number matches: [this_resno, this_inscode,
6121  matching_master_resno, matching_master_inscode,
6122  rms_atom_position_differences]] */
6123 PyObject *ncs_chain_differences_py(int imol, const char *master_chain_id);
6124 
6132 PyObject *ncs_chain_ids_py(int imol);
6133 #endif /* USE_PYTHON */
6134 
6135 #ifdef USE_GUILE
6136 
6140 SCM ncs_ghosts_scm(int imol);
6141 #endif /* USE_GUILE */
6142 
6143 #ifdef USE_PYTHON
6144 
6148 PyObject *ncs_ghosts_py(int imol);
6149 #endif /* USE_PYTHON */
6150 
6151 
6152 #endif /* __cplusplus */
6153 
6154 /* \} */
6155 
6156 /* ----------------------------------------------------------------------- */
6157 /* Autobuild helices and strands */
6158 /* ----------------------------------------------------------------------- */
6159 
6160 #define FIND_SECSTRUC_NORMAL 0
6161 #define FIND_SECSTRUC_STRICT 1
6162 #define FIND_SECSTRUC_HI_RES 2
6163 #define FIND_SECSTRUC_LO_RES 3
6164 
6175 int place_helix_here();
6176 
6188 int place_strand_here(int n_residues, int n_sample_strands);
6189 
6190 
6191 void set_place_helix_here_fudge_factor(float ff);
6192 
6193 
6199 
6200 
6208 int find_helices();
6209 
6217 int find_strands();
6218 
6226  short int use_helix, int helix_length, int helix_target,
6227  short int use_strand, int strand_length, int strand_target );
6228 
6236  short int use_helix, int helix_length, int helix_target,
6237  short int use_strand, int strand_length, int strand_target,
6238  float radius );
6239 
6240 /* \} */
6241 
6242 
6243 /* ----------------------------------------------------------------------- */
6244 /* Autobuild nucleotides */
6245 /* ----------------------------------------------------------------------- */
6246 
6257 int find_nucleic_acids_local( float radius );
6258 
6259 /* \} */
6260 
6261 
6262 /* ----------------------------------------------------------------------- */
6263 /* New Molecule by Various Selection */
6264 /* ----------------------------------------------------------------------- */
6271 int new_molecule_by_residue_type_selection(int imol, const char *residue_type);
6272 
6277 int new_molecule_by_atom_selection(int imol, const char* atom_selection);
6278 
6283 int new_molecule_by_sphere_selection(int imol, float x, float y, float z,
6284  float r, short int allow_partial_residues);
6285 
6286 
6287 #ifdef __cplusplus
6288 #ifdef USE_PYTHON
6289 
6292 int new_molecule_by_residue_specs_py(int imol, PyObject *residue_spec_list_py);
6293 #endif /* USE_PYTHON */
6294 
6295 #ifdef USE_GUILE
6296 
6299 int new_molecule_by_residue_specs_scm(int imol, SCM residue_spec_list_scm);
6300 #endif /* USE_GUILE */
6301 #endif /* __cplusplus */
6302 
6306 /* ----------------------------------------------------------------------- */
6307 /* Miguel's orientation axes matrix */
6308 /* ----------------------------------------------------------------------- */
6309 /* section Miguel's orientation axes matrix */
6310 
6311 void
6312 set_axis_orientation_matrix(float m11, float m12, float m13,
6313  float m21, float m22, float m23,
6314  float m31, float m32, float m33);
6315 
6316 void
6317 set_axis_orientation_matrix_usage(int state);
6318 
6319 
6320 
6321 /* ----------------------------------------------------------------------- */
6322 /* RNA/DNA */
6323 /* ----------------------------------------------------------------------- */
6324 /* section RNA/DNA */
6327 /* \{ */
6337 int ideal_nucleic_acid(const char *RNA_or_DNA, const char *form,
6338  short int single_stranged_flag,
6339  const char *sequence);
6340 
6341 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
6342 #ifdef USE_GUILE
6343 
6354 SCM pucker_info_scm(int imol, SCM residue_spec, int do_pukka_pucker_check);
6355 #endif /* USE_GUILE */
6356 #ifdef USE_PYTHON
6357 
6365 PyObject *pucker_info_py(int imol, PyObject *residue_spec, int do_pukka_pucker_check);
6366 #endif /* USE_PYTHON */
6367 #endif /* __cplusplus */
6368 
6371 int watson_crick_pair(int imol, const char * chain_id, int resno);
6373 int watson_crick_pair_for_residue_range(int imol, const char * chain_id, int resno_start, int resno_end);
6374 
6375 /* not for user level */
6376 void setup_base_pairing(int state);
6377 
6378 
6379 /* \} */
6380 
6381 /* ----------------------------------------------------------------------- */
6382 /* sequence (assignment) */
6383 /* ----------------------------------------------------------------------- */
6384 /* section Sequence (Assignment) */
6386 /* \{ */
6387 
6389 void print_sequence_chain(int imol, const char *chain_id);
6390 
6393 void print_sequence_chain_general(int imol, const char *chain_id,
6394  short int pir_format,
6395  short int file_output,
6396  const char *file_name);
6397 
6399 void assign_fasta_sequence(int imol, const char *chain_id_in, const char *seq);
6403 void assign_pir_sequence(int imol, const char *chain_id_in, const char *seq);
6404 /* I don't know what this does. */
6405 void assign_sequence(int imol_model, int imol_map, const char *chain_id);
6408 void assign_sequence_from_file(int imol, const char *file);
6410 void assign_sequence_from_string(int imol, const char *chain_id_in, const char *seq);
6412 void delete_all_sequences_from_molecule(int imol);
6414 void delete_sequence_by_chain_id(int imol, const char *chain_id_in);
6415 
6416 #ifdef __cplusplus/* protection from use in callbacks.c, else compilation probs */
6417 #ifdef USE_GUILE
6418 
6422 SCM sequence_info(int imol);
6423 
6431 SCM alignment_mismatches_scm(int imol);
6432 #endif /* USE_GUILE */
6433 
6434 #ifdef USE_PYTHON
6435 
6439 PyObject *sequence_info_py(int imol);
6449 PyObject *alignment_mismatches_py(int imol);
6450 #endif /* USE_PYTHON */
6451 #endif /* C++ */
6452 /* \} */
6453 
6454 /* ----------------------------------------------------------------------- */
6455 /* Surfaces */
6456 /* ----------------------------------------------------------------------- */
6457 /* section Surface Interface */
6459 /* \{ */
6465 void do_surface(int imol, int istate);
6466 int molecule_is_drawn_as_surface_int(int imol); /* predicate */
6467 #ifdef __cplusplus
6468 #ifdef USE_GUILE
6469 
6475 void do_clipped_surface_scm(int imol, SCM residue_specs);
6476 #endif /* USE_GUILE */
6477 #ifdef USE_PYTHON
6478 
6480 void do_clipped_surface_py(int imol, PyObject *residue_specs);
6481 #endif /* USE_PYTHON */
6482 #endif /* __cplusplus */
6483 void set_electrostatic_surface_charge_range(float v);
6484 float get_electrostatic_surface_charge_range();
6485 
6488 void set_transparent_electrostatic_surface(int imol, float opacity);
6489 
6492 float get_electrostatic_surface_opacity(int imol);
6493 
6494 
6495 /* \} */
6496 
6497 /* ----------------------------------------------------------------------- */
6498 /* FFfearing */
6499 /* ----------------------------------------------------------------------- */
6501 /* \{ */
6504 int fffear_search(int imol_model, int imol_map);
6506 void set_fffear_angular_resolution(float f);
6509 /* \} */
6510 
6511 /* ----------------------------------------------------------------------- */
6512 /* remote control */
6513 /* ----------------------------------------------------------------------- */
6514 /* section Remote Control */
6516 /* \{ */
6519 void set_coot_listener_socket_state_internal(int sock_state);
6520 
6522 void set_socket_string_waiting(const char *s);
6524 void set_socket_python_string_waiting(const char *s);
6525 
6526 void set_remote_control_port(int port_number);
6527 int get_remote_control_port_number();
6528 
6529 
6530 /* tooltip */
6531 void set_tip_of_the_day_flag(int state);
6532 /* \} */
6533 
6534 /* ----------------------------------------------------------------------- */
6535 /* Display lists */
6536 /* ----------------------------------------------------------------------- */
6537 /* section Display Lists for Maps */
6542 void set_display_lists_for_maps(int i);
6543 
6546 
6547 /* update the maps to the current position - rarely needed */
6548 void update_maps();
6549 /* \} */
6550 
6551 
6552 /* ----------------------------------------------------------------------- */
6553 /* Browser Help */
6554 /* ----------------------------------------------------------------------- */
6556 /* \{ */
6558 void browser_url(const char *url);
6562 void set_browser_interface(const char *browser);
6563 
6567 void handle_online_coot_search_request(const char *entry_text);
6568 /* \} */
6569 
6570 // #include "c-interface-generic-objects.h"
6571 
6572 
6573 /* ----------------------------------------------------------------------- */
6574 /* Molprobity interface */
6575 /* ----------------------------------------------------------------------- */
6577 /* \{ */
6580 void handle_read_draw_probe_dots(const char *dots_file);
6581 
6584 void handle_read_draw_probe_dots_unformatted(const char *dots_file, int imol, int show_clash_gui_flag);
6585 
6586 
6588 void set_do_probe_dots_on_rotamers_and_chis(short int state);
6593 void set_do_probe_dots_post_refine(short int state);
6597 
6598 /* state is 1 for on and 0 for off */
6599 void set_do_coot_probe_dots_during_refine(short int state);
6600 
6603 char *unmangle_hydrogen_name(const char *pdb_hydrogen_name);
6604 
6610 
6614 
6615 #ifdef __cplusplus
6616 #ifdef USE_GUILE
6617 
6619 SCM user_mods_scm(const char *file_name);
6620 #endif /* USE_GUILE */
6621 #ifdef USE_PYTHON
6622 
6624 PyObject *user_mods_py(const char *file_name);
6625 #endif /* USE_PYTHON */
6626 #endif /* c++ */
6627 
6628 /* \} */
6629 
6630 
6631 /* ----------------------------------------------------------------------- */
6632 /* Sharpen */
6633 /* ----------------------------------------------------------------------- */
6635 /* \{ */
6638 void sharpen(int imol, float b_factor);
6639 void sharpen_with_gompertz_scaling(int imol, float b_factor, short int try_gompertz, float gompertz_factor);
6640 
6642 void set_map_sharpening_scale_limit(float f);
6644 /* ---------------------------------------------------------------------------- */
6645 /* Density Map Kurtosis */
6646 /* ---------------------------------------------------------------------------- */
6647 float optimal_B_kurtosis(int imol);
6648 
6649 
6650 /* ----------------------------------------------------------------------- */
6651 /* Intermediate Atom Manipulation */
6652 /* ----------------------------------------------------------------------- */
6653 
6655 /* \{ */
6656 #ifdef __cplusplus
6657 #ifdef USE_GUILE
6658 SCM drag_intermediate_atom_scm(SCM atom_spec, SCM position);
6659 #endif
6660 #ifdef USE_PYTHON
6661 PyObject *drag_intermediate_atom_py(PyObject *atom_spec, PyObject *position);
6662 
6664 //
6665 // A function requested by Hamish.
6666 // This aplies to intermediate atoms (add_extra_target_position_restraint)
6667 // does not. This activates refinement after the restraint is added (add_extra_target_position_restraint
6668 // does not).
6669 PyObject *add_target_position_restraint_for_intermediate_atom_py(PyObject *atom_spec, PyObject *position);
6670 
6671 // and the multiple-atom version of that (so that they can be applied at the same time)
6672 PyObject *add_target_position_restraints_for_intermediate_atoms_py(PyObject *atom_spec_position_list);
6673 #endif
6674 #endif /* c++ */
6675 /* \} */
6676 
6677 /* ----------------------------------------------------------------------- */
6678 /* Fixed Atom Manipulation */
6679 /* ----------------------------------------------------------------------- */
6680 
6682 /* \{ */
6683 #ifdef __cplusplus
6684 #ifdef USE_GUILE
6685 SCM mark_atom_as_fixed_scm(int imol, SCM atom_spec, int state);
6686 int mark_multiple_atoms_as_fixed_scm(int imol, SCM atom_spec_list, int state);
6687 #endif
6688 #ifdef USE_PYTHON
6689 PyObject *mark_atom_as_fixed_py(int imol, PyObject *atom_spec, int state);
6690 int mark_multiple_atoms_as_fixed_py(int imol, PyObject *atom_spec_list, int state);
6691 #endif
6692 #endif /* c++ */
6693 
6694 void setup_fixed_atom_pick(short int ipick, short int is_unpick);
6695 
6697 void clear_all_fixed_atoms(int imol);
6698 void clear_fixed_atoms_all();
6699 
6700 /* produce debugging output from problematic atom picking */
6701 void set_debug_atom_picking(int istate);
6702 
6703 /* \} */
6704 
6705 /* ----------------------------------------------------------------------- */
6706 /* Partial Charge */
6707 /* ----------------------------------------------------------------------- */
6709 /* \{ */
6712 void show_partial_charge_info(int imol, const char *chain_id, int resno, const char *ins_code);
6713 /* \} */
6714 
6715 /* ----------------------------------------------------------------------- */
6716 /* EM Interface */
6717 /* ----------------------------------------------------------------------- */
6719 /* \{ */
6723 int scale_cell(int imol_map, float fac_u, float fac_v, float fac_w);
6724 
6725 /* create a number of maps by segmenting the given map, above the
6726  (absolute) low_level. New maps are on the same grid as the input
6727  map. */
6728 void segment_map(int imol_map, float low_level);
6729 
6730 void segment_map_multi_scale(int imol_map, float low_level, float b_factor_inc, int n_rounds);
6731 
6732 void map_histogram(int imol_map);
6733 
6734 /* \} */
6735 
6736 
6737 /* ----------------------------------------------------------------------- */
6738 /* CCP4i Interface */
6739 /* ----------------------------------------------------------------------- */
6741 /* \{ */
6742 #ifdef __cplusplus
6743 #ifdef USE_GUILE
6744 
6746 SCM ccp4i_projects_scm();
6747 #endif /* USE_GUILE */
6748 #ifdef USE_PYTHON
6749 
6751 PyObject *ccp4i_projects_py();
6752 #endif /* USE_PYTHON */
6753 #endif /* c++ */
6754 
6758 void set_add_ccp4i_projects_to_file_dialogs(short int state);
6759 
6761 void write_ccp4mg_picture_description(const char *filename);
6762 
6763 /* \} */
6764 
6765 /* ----------------------------------------------------------------------- */
6766 /* Dipoles */
6767 /* ----------------------------------------------------------------------- */
6769 /* \{ */
6770 void delete_dipole(int imol, int dipole_number);
6771 #ifdef __cplusplus
6772 #ifdef USE_GUILE
6773 
6775 SCM add_dipole_for_residues_scm(int imol, SCM residue_specs);
6777 SCM add_dipole_scm(int imol, const char* chain_id, int res_no, const char *ins_code);
6778 #endif /* USE_GUILE */
6779 #ifdef USE_PYTHON
6780 
6781 PyObject *add_dipole_py(int imol, const char* chain_id, int res_no,
6782  const char *ins_code);
6785 PyObject *add_dipole_for_residues_py(int imol, PyObject *residue_specs);
6786 #endif /* USE_PYTHON */
6787 #endif /* c++ */
6788 /* \} */
6789 
6790 /* ----------------------------------------------------------------------- */
6791 /* Patterson */
6792 /* ----------------------------------------------------------------------- */
6796 int make_and_draw_patterson(const char *mtz_file_name,
6797  const char *f_col,
6798  const char *sigf_col);
6803  const char *i_col,
6804  const char *sigi_col);
6805 
6806 /* ----------------------------------------------------------------------- */
6807 /* Laplacian */
6808 /* ----------------------------------------------------------------------- */
6810 /* \{ */
6812 int laplacian (int imol);
6813 /* \} */
6814 
6815 /* ----------------------------------------------------------------------- */
6816 /* Tips */
6817 /* ----------------------------------------------------------------------- */
6819 /* \{ */
6820 /* \} */
6821 
6822 /* ----------------------------------------------------------------------- */
6823 /* PKGDATADIR */
6824 /* ----------------------------------------------------------------------- */
6826 /* \{ */
6827 #ifdef __cplusplus
6828 #ifdef USE_PYTHON
6829 PyObject *get_pkgdatadir_py();
6830 #endif /* USE_PYTHON */
6831 #ifdef USE_GUILE
6832 // note: built-ins: (%package-data-dir) and %guile-build-info
6833 SCM get_pkgdatadir_scm();
6834 #endif
6835 #endif /* __cplusplus */
6836 /* \} */
6837 
6838 /* ----------------------------------------------------------------------- */
6839 /* SMILES */
6840 /* ----------------------------------------------------------------------- */
6842 /* \{ */
6844 void do_smiles_gui();
6845 /* \} */
6846 /* ----------------------------------------------------------------------- */
6847 /* Fun */
6848 /* ----------------------------------------------------------------------- */
6849 /* section Fun */
6850 void do_tw();
6851 
6852 /* ----------------------------------------------------------------------- */
6853 /* Phenix Support */
6854 /* ----------------------------------------------------------------------- */
6856 /* \{ */
6858 void set_button_label_for_external_refinement(const char *button_label);
6859 /* \} */
6860 
6861 
6862 /* ----------------------------------------------------------------------- */
6863 /* Text */
6864 /* ----------------------------------------------------------------------- */
6866 /* \{ */
6872 int place_text(const char*text, float x, float y, float z, int size);
6873 
6875 void remove_text(int text_handle);
6876 
6877 void edit_text(int text_handle, const char *new_text);
6878 
6881 int text_index_near_position(float x, float y, float z, float r);
6882 /* \} */
6883 
6884 /* ----------------------------------------------------------------------- */
6885 /* PISA Interface */
6886 /* ----------------------------------------------------------------------- */
6888 /* \{ */
6891 int pisa_interaction(int imol_1, int imol_2);
6892 #ifdef __cplusplus
6893 #ifdef USE_GUILE
6894 /* \brief the scripting interface, called from parsing the PISA XML
6895  interface description
6896 
6897  An interface_description_scm is a record detailing the interface.
6898  A record contains the bsa, asa, and 2 molecule records. Molecule
6899  records contain list of residue records. The interface (dots) is
6900  be made from these lists of residue records. Note of course that
6901  imol_2 (or 1) can be a symmetry copy of (part of) mol_1 (or 2).
6902 
6903  Return the dot indexes (currently -1)
6904 
6905 */
6906 SCM handle_pisa_interfaces_scm(SCM interfaces_description_scm);
6907 
6908 /* internal function */
6909 SCM pisa_molecule_record_residues(SCM molecule_record_1);
6910 SCM pisa_molecule_record_chain_id(SCM molecule_record_1);
6911 void add_pisa_interface_bond_scm(int imol_1, int imol_2, SCM pisa_bond_scm,
6912  int interface_number);
6913 
6914 
6915 /* clear out and undisplay all pisa interface descriptions. */
6916 void pisa_clear_interfaces();
6917 #endif /* USE_GUILE */
6918 #ifdef USE_PYTHON
6919 /* \brief the scripting interface, called from parsing the PISA XML
6920  interface description
6921 
6922  An interface_description_scm is a record detailing the interface.
6923  A record contains the bsa, asa, and 2 molecule records. Molecule
6924  records contain list of residue records. The interface (dots) is
6925  be made from these lists of residue records. Note of course that
6926  imol_2 (or 1) can be a symmetry copy of (part of) mol_1 (or 2).
6927 
6928  Return the dot indexes (currently -1)
6929 
6930 */
6931 PyObject *handle_pisa_interfaces_py(PyObject *interfaces_description_py);
6932 
6933 /* internal function */
6934 /* PyObject *pisa_molecule_record_residues_py(PyObject *molecule_record_1); */
6935 /* PyObject *pisa_molecule_record_chain_id_py(PyObject *molecule_record_1); */
6936 void add_pisa_interface_bond_py(int imol_1, int imol_2, PyObject *pisa_bond_py,
6937  int interface_number);
6938 
6939 /* clear out and undisplay all pisa interface descriptions. */
6940 void pisa_clear_interfaces();
6941 #endif /* USE_PYTHON */
6942 #endif /* c++ */
6943 
6944 
6948 /* ----------------------------------------------------------------------- */
6949 /* Jiggle fit */
6950 /* ----------------------------------------------------------------------- */
6955 float fit_to_map_by_random_jiggle(int imol, const char *chain_id, int resno, const char *ins_code,
6956  int n_trials, float jiggle_scale_factor);
6957 
6960 float fit_molecule_to_map_by_random_jiggle(int imol, int n_trials, float jiggle_scale_factor);
6964 float fit_molecule_to_map_by_random_jiggle_and_blur(int imol, int n_trials, float jiggle_scale_factor, float map_blur_factor);
6965 
6968 float fit_chain_to_map_by_random_jiggle(int imol, const char *chain_id, int n_trials, float jiggle_scale_factor);
6969 
6974 float fit_chain_to_map_by_random_jiggle_and_blur(int imol, const char *chain_id, int n_trials, float jiggle_scale_factor, float map_blur_factor);
6975 
6979 /* ----------------------------------------------------------------------- */
6980 /* SBase interface */
6981 /* ----------------------------------------------------------------------- */
6984 #ifdef __cplusplus
6985 #ifdef USE_GUILE
6986 
6988 SCM matching_compound_names_from_sbase_scm(const char *compound_name_fragment);
6989 #endif /* USE_GUILE */
6990 #ifdef USE_PYTHON
6991 
6993 PyObject *matching_compound_names_from_sbase_py(const char *compound_name_fragment);
6994 #endif /* USE_PYTHON */
6995 #endif /*__cplusplus */
6996 
7002 int get_ccp4srs_monomer_and_dictionary(const char *comp_id);
7003 
7005 int get_sbase_monomer(const char *comp_id);
7006 
7010 /* Needs a/the correct section */
7011 /* add a linked residue based purely on dictionary template.
7012  For addition of NAG to ASNs typically.
7013 
7014  This doesn't work with residues with alt confs.
7015 
7016  Link type is the refmac dictionary link type (e.g. "ASN-NAG").
7017 
7018  return success status (0 = fail).
7019 */
7020 int add_linked_residue(int imol, const char *chain_id, int resno, const char *ins_code,
7021  const char *new_residue_comp_id, const char *link_type, int n_trials);
7022 #ifdef __cplusplus
7023 #ifdef USE_GUILE
7024 // mode is either 1: add 2: add and fit 3: add, fit and refine
7025 SCM add_linked_residue_scm(int imol, const char *chain_id, int resno, const char *ins_code,
7026  const char *new_residue_comp_id, const char *link_type, int mode);
7027 #endif
7028 #ifdef USE_PYTHON
7029 PyObject *add_linked_residue_py(int imol, const char *chain_id, int resno, const char *ins_code,
7030  const char *new_residue_comp_id, const char *link_type, int mode);
7031 #endif
7032 #endif
7033 void set_add_linked_residue_do_fit_and_refine(int state);
7034 
7035 /* ----------------------------------------------------------------------- */
7036 /* Flattened Ligand Environment View Interface */
7037 /* ----------------------------------------------------------------------- */
7040 void fle_view_internal(int imol, const char *chain_id, int res_no,
7041  const char *ins_code,
7042  int imol_ligand_fragment,
7043  const char *prodrg_output_flat_mol_file_name,
7044  const char *prodrg_output_flat_pdb_file_name,
7045  const char *prodrg_output_3d_pdb_file_name,
7046  const char *prodrg_output_dict_cif_file_name);
7047 /* for command-line operation */
7048 void fle_view_internal_to_png(int imol, const char *chain_id, int res_no,
7049  const char *ins_code,
7050  int imol_ligand_fragment,
7051  const char *prodrg_output_flat_mol_file_name,
7052  const char *prodrg_output_flat_pdb_file_name,
7053  const char *prodrg_output_3d_pdb_file_name,
7054  const char *prodrg_output_dict_cif_file_name,
7055  int output_to_png_file_flag,
7056  const char *png_file_name);
7057 
7058 void fle_view_with_rdkit(int imol, const char *chain_id, int res_no, const char *ins_code, float residues_near_radius);
7059 void fle_view_with_rdkit_to_png(int imol, const char *chain_id, int res_no, const char *ins_code, float residues_near_radius, const char *png_file_name);
7060 void fle_view_with_rdkit_to_svg(int imol, const char *chain_id, int res_no, const char *ins_code, float residues_near_radius, const char *svg_file_name);
7061 
7062 void fle_view_with_rdkit_internal(int imol, const char *chain_id, int res_no, const char *ins_code, float residues_near_radius, const char *file_format, const char *file_name);
7063 
7067 void fle_view_set_water_dist_max(float dist_max);
7071 void fle_view_set_h_bond_dist_max(float h_bond_dist_max);
7072 
7079 int sprout_hydrogens(int imol, const char *chain_id, int res_no, const char *ins_code);
7080 
7084 /* ----------------------------------------------------------------------- */
7085 /* LSQ-improve */
7086 /* ----------------------------------------------------------------------- */
7100 void lsq_improve(int imol_ref, const char *ref_selection,
7101  int imol_moving, const char *moving_selection,
7102  int n_res, float dist_crit);
7107 /* ----------------------------------------------------------------------- */
7108 /* Multirefine interface (because in guile-gtk there is no way to
7109  insert toolbuttons into the toolbar) so this
7110  rather kludgy interface. It should go when we
7111  move to guile-gnome, I think. */
7112 /* ----------------------------------------------------------------------- */
7113 void toolbar_multi_refine_stop();
7114 void toolbar_multi_refine_continue();
7115 void toolbar_multi_refine_cancel();
7116 void set_visible_toolbar_multi_refine_stop_button(short int state);
7117 void set_visible_toolbar_multi_refine_continue_button(short int state);
7118 void set_visible_toolbar_multi_refine_cancel_button(short int state);
7119 /* button_type is one of "stop", "continue", "cancel"
7120  state is 1 for on, 0 for off. */
7121 void toolbar_multi_refine_button_set_sensitive(const char *button_type, short int state);
7124 
7125 
7126 /* ----------------------------------------------------------------------- */
7127 /* single-model view */
7128 /* ----------------------------------------------------------------------- */
7132 void single_model_view_model_number(int imol, int imodel);
7150 /* ----------------------------------------------------------------------- */
7151 /* update self */
7152 /* ----------------------------------------------------------------------- */
7153 /* this function is here because it is called by c_inner_main() (ie. need a c interface). */
7154 void run_update_self_maybe(); /* called when --update-self given at command line */
7155 
7156 /* ----------------------------------------------------------------------- */
7157 /* keyboarding mode */
7158 /* ----------------------------------------------------------------------- */
7159 void show_go_to_residue_keyboarding_mode_window();
7160 void handle_go_to_residue_keyboarding_mode(const gchar *text);
7161 
7162 /* ----------------------------------------------------------------------- */
7163 /* graphics ligand view */
7164 /* ----------------------------------------------------------------------- */
7170 void set_show_graphics_ligand_view(int state);
7174 /* ----------------------------------------------------------------------- */
7175 /* experimental */
7176 /* ----------------------------------------------------------------------- */
7180 void add_ligand_builder_menu_item_maybe();
7181 
7184 
7185 #ifdef __cplusplus
7186 #ifdef USE_GUILE
7187 SCM all_molecule_rotamer_score(int imol);
7188 SCM all_molecule_ramachandran_score(int imol); /* a stub currently */
7189 #endif /* USE_GUILE */
7190 #ifdef USE_PYTHON
7191 PyObject *all_molecule_rotamer_score_py(int imol);
7192 PyObject *all_molecule_ramachandran_score_py(int imol); /* a stub currently */
7193 PyObject *all_molecule_ramachandran_region_py(int imol);
7194 #endif /* USE_PYTHON */
7195 #endif /* __cplusplus */
7196 
7202 void globularize(int imol);
7203 
7217 #ifdef __cplusplus
7218 #ifdef USE_GUILE
7219 void user_defined_click_scm(int n_clicks, SCM func);
7220 #endif
7221 #ifdef USE_PYTHON
7222 void user_defined_click_py(int n_clicks, PyObject *func);
7223 #endif /* PYTHON */
7224 #endif /* __cplusplus */
7225 
7228 void full_screen(int mode);
7229 
7230 #endif /* C_INTERFACE_H */
7231 END_C_DECLS
void apply_ncs_to_view_orientation_and_screen_centre(int imol, const char *current_chain, const char *next_ncs_chain, short int forward_flag)
as above, but shift the screen centre also.
void run_script(const char *filename)
run script file
void set_raster3d_water_sphere(int istate)
set the flag to show waters as spheres for the Raster3D representation. 1 show as spheres...
int read_pdb(const char *filename)
read coordinates from filename
int quick_save()
save all modified coordinates molecules to the default names and save the state too.
PyObject * sequence_info_py(int imol)
return the sequence info that has been assigned to molecule number imol. return as a list of dotted p...
void set_do_anti_aliasing(int state)
set the bond lines to be antialiased
void change_chain_id(int imol, const char *from_chain_id, const char *to_chain_id, short int use_res_range_flag, int from_resno, int to_resno)
change the chain id of the specified residue
int set_imol_refinement_map(int imol)
set the molecule number of the map to be used for refinement/fitting.
int backup_state(int imol)
return the backup state for molecule number imol
void set_ligand_cluster_sigma_level(float f)
set the default sigma level that the map is searched to find potential ligand sites ...
void do_ramachandran_plot(int imol)
Ramachandran plot for molecule number imol.
void set_symmetry_molecule_rotate_colour_map(int imol, int state)
set the colour map rotation (i.e. the hue) for the symmetry atoms of molecule number imol ...
int set_unit_cell_and_space_group(int imol, float a, float b, float c, float alpha, float beta, float gamma, const char *space_group)
set the unit cell for a given model molecule
int assign_hetatms(int imol)
some programs produce PDB files with ATOMs where there should be HETATMs. This is a function to assig...
void redraw_background()
re draw the background colour when switching between mono and stereo
int mmcif_sfs_to_mtz(const char *cif_file_name, const char *mtz_file_name)
convert the structure factors in cif_file_name to an mtz file.
void set_model_fit_refine_dialog_stays_on_top(int istate)
model-fit-refine dialog stays on top
void set_only_last_model_molecule_displayed()
only display the last model molecule
void set_dragged_refinement_steps_per_frame(int v)
set the number of refinement steps applied to the intermediate atoms each frame of graphics...
void write_restraints_cif_dictionary(const char *monomer_type, const char *file_name)
write cif restraints for monomer
void set_convert_to_v2_atom_names(short int state)
shall we convert nucleotides to match the old dictionary names?
int apply_redo()
apply redo - the &quot;Redo&quot; button callback
float get_map_sampling_rate()
return the map sampling rate
void set_hardware_stereo_angle_factor(float f)
how much should the eyes be separated in stereo mode?
void do_clipped_surface_scm(int imol, SCM residue_specs)
draw the surface of the imolth molecule clipped to the residues given by residue_specs.
void remove_view(int view_number)
the given view number
int mutate_single_residue_by_serial_number(int ires_ser, const char *chain_id, int imol, char target_res_type)
an alternate interface to mutation of a singe residue.
void graphics_to_ca_plus_ligands_sec_struct_representation(int imol)
draw molecule number imol with CA bonds in secondary structure representation and ligands ...
void set_fffear_angular_resolution(float f)
set and return the fffear angular resolution in degrees
void translate_scene_z(int nsteps)
translate rotation centre relative to screen axes for nsteps
void set_colour_by_molecule(int imol)
colour molecule number imol by molecule
void set_raster3d_density_thickness(float f)
set the density line thickness for the Raster3D representation
void handle_read_draw_probe_dots(const char *dots_file)
pass a filename that contains molprobity&#39;s probe output in XtalView format
void set_alignment_gap_and_space_penalty(float wgap, float wspace)
set the penalty for affine gap and space when aligning, defaults -3.0 and -0.4
void delete_sidechains_for_chain(int imol, const char *chain_id)
delete the side chains in the chain
void delete_residues_scm(int imol, SCM residue_specs_scm)
delete residues in the residue spec list
float auto_fit_best_rotamer(int resno, const char *altloc, const char *insertion_code, const char *chain_id, int imol_coords, int imol_map, int clash_flag, float lowest_probability)
auto fit by rotamer search.
void c_accept_moving_atoms()
accept the new positions of the regularized or refined residues
void ramachandran_plot_differences(int imol1, int imol2)
2 molecule ramachandran plot (NCS differences) a.k.a. A Kleywegt Plot.
int make_and_draw_patterson(const char *mtz_file_name, const char *f_col, const char *sigf_col)
Make a patterson molecule.
short int set_space_group(int imol, const char *spg)
set the space group for a coordinates molecule
void write_interpolated_extra_restraints(int imol_1, int imol_2, int n_steps, char *file_name_stub)
proSMART interpolated restraints for model morphing
void info_dialog_with_markup(const char *txt)
as above, create a dialog with information
int draw_ncs_ghosts_state(int imol)
return the drawing state of NCS ghosts for molecule number imol. Return -1 on imol is a bad molecule ...
void set_filter_fileselection_filenames(int istate)
on opening a file selection dialog, pre-filter the files.
void set_pick_cursor_index(int icursor_index)
let the user have a different pick cursor
SCM overlap_ligands(int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref)
Overlap residue with &quot;template&quot;-based matching.
int n_chains(int imol)
number of chains in molecule number imol
int map_from_mtz_by_calc_phases(const char *mtz_file_name, const char *f_col, const char *sigf_col, int imol_coords)
Calculate SFs from an MTZ file and generate a map.
PyObject * rigid_body_refine_by_residue_ranges_py(int imol, PyObject *residue_ranges)
rigid body refine using residue ranges. residue_ranges is a list of residue ranges. A residue range is [chain_id, resno_start, resno_end].
void set_ligand_water_to_protein_distance_limits(float f1, float f2)
set ligand to protein distance limits
int try_set_draw_baton(short int i)
draw the baton or not
void rotate_y_scene(int nsteps, float stepsize)
rotate view round y axis stepsize degrees for nstep such steps
int delete_restraints(const char *comp_id)
delete the restraints for the given comp_id (i.e. residue name)
float matrix_state()
return the relative weight of the geometric terms to the map terms.
void make_backup(int imol)
make backup for molecule number imol
void set_find_hydrogen_torsions(short int state)
show torsions that rotate hydrogens in the torsion angle manipulation dialog. Note that this may be n...
void print_all_history_in_scheme()
print the history in scheme format
void add_ligand_search_ligand_molecule(int imol_ligand)
add a rigid ligand molecule to the list of ligands to search for in ligand searching ...
void symmetry_as_calphas(int mol_no, short int state)
display symmetry as CAs?
void set_file_chooser_selector(int istate)
this flag set chooser as default for windows, otherwise use selector 0 is selector 1 is chooser ...
void set_environment_distances_label_atom(int state)
Label the atom on Environment Distances start/change.
void set_clipping_back(float v)
set clipping plane back
void ligand_expert()
this sets the flag to have expert option ligand entries in the Ligand Searching dialog ...
int backup_compress_files_state()
return the state for compression of backup files
void post_other_modelling_tools_dialog()
display the Other Modelling Tools dialog
int find_helices()
autobuild helices
void hide_main_toolbar()
hide the horizontal main toolbar in the GTK2 version
void set_use_trans_peptide_restraints(short int on_off_state)
add a restraint on peptides to keep trans peptides trans
int first_unsaved_coords_imol()
What is the molecule number of first unsaved coordinates molecule?
void shiftfield_b_factor_refinement(int imol)
shiftfield B-factor refinement
short int mtz_use_weight_for_map(int imol_map)
return flag for whether weights were used that was use to generate the map
void align_and_mutate(int imol, const char *chain_id, const char *fasta_maybe, short int renumber_residues_flag)
align and mutate the given chain to the given sequence
void set_rotation_centre_size(float f)
set rotoation centre marker size
void set_map_radius_em(float radius)
set the extent of the box/radius of electron density contours for EM map
SCM symmetry_operators_scm(int imol)
return a list of symmetry operators as strings - or scheme false if that is not possible.
void run_clear_backups(int retval)
run clear-backups
int add_terminal_residue_using_phi_psi(int imol, const char *chain_id, int res_no, const char *residue_type, float phi, float psi)
Add a terminal residue using given phi and psi angles.
void set_swap_difference_map_colours(int i)
not everone likes coot&#39;s default difference map colouring.
void add_coordinates_glob_extension(const char *ext)
add an extension to be treated as coordinate files
void set_show_origin_marker(int istate)
set a flag: is the origin marker to be shown? 1 for yes, 0 for no.
int rotamer_auto_fit_do_post_refine_state()
what is the value of the previous flag?
int set_go_to_atom_chain_residue_atom_name_full(const char *chain_id, int resno, const char *ins_code, const char *atom_name, const char *alt_conf)
set the go to (full) atom specification
int git_revision_count()
return the git revision count for for this build.
void vt_surface(int mode)
How should the mouse move the view?
PyObject * cis_peptides_py(int imol)
return cis_peptide info for imol.
int make_and_draw_map(const char *mtz_file_name, const char *f_col, const char *phi_col, const char *weight, int use_weights, int is_diff_map)
make a map from an mtz file (simple interface)
SCM ncs_ghosts_scm(int imol)
get the NCS ghost description
int seqnum_from_serial_number(int imol, const char *chain_id, int serial_num)
a residue seqnum (normal residue number) from a residue serial number
int read_phs_and_make_map_using_cell_symm_from_previous_mol(const char *phs_filename)
read a phs file, the cell and symm information is from previously read (most recently read) coordinat...
void unset_model_fit_refine_dialog()
unset model/fit/refine dialog
int set_atom_string_attribute(int imol, const char *chain_id, int resno, const char *ins_code, const char *atom_name, const char *alt_conf, const char *attribute_name, const char *attribute_value)
set a string attibute to the atom with the given specifier.
PyObject * nearest_residue_by_sequence_py(int imol, const char *chain_id, int resno, const char *ins_code)
return the residue spec of the nearest residue by sequence numbering. Return Python False if not poss...
PyObject * map_peaks_py(int imol_map, float n_sigma)
return a list of map peaks of molecule number imol_map above n_sigma. There will be cluster filtering...
void set_show_modelling_toolbar(short int state)
void graphics_to_b_factor_cas_representation(int imol)
draw molecule number imol coloured by B-factor, CA + ligands
void set_bond_thickness(int imol, float t)
set the thickness of the bonds in molecule number imol to t pixels
int set_go_to_atom_chain_residue_atom_name(const char *t1_chain_id, int iresno, const char *t3_atom_name)
set the go to atom specification
void set_go_to_atom_molecule(int imol)
set the molecule for the Go To Atom
void set_show_paths_in_display_manager(int i)
Show Paths in Display Manager?
SCM comp_id_to_name_scm(const char *comp_id)
return the monomer name
void toggle_idle_spin_function()
Spin spin spin (or not)
int scroll_by_wheel_mouse_state()
return the internal state of the scroll-wheel map contouring
int set_b_factor_bonds_scale_factor(int imol, float f)
scale the colours for colour by b factor representation
int dots(int imol, const char *atom_selection_str, const char *dots_object_name, float dot_density, float sphere_size_scale)
display dotted surface
void post_scheme_scripting_window()
pop-up a scripting window for scheming
char * unmangle_hydrogen_name(const char *pdb_hydrogen_name)
make an attempt to convert pdb hydrogen name to the name used in Coot (and the refmac dictionary...
int set_map_is_difference_map(int imol, short int bool_flag)
post-hoc set the map of molecule number imol to be a difference map
void add_view_description(int view_number, const char *description)
Add a view description/annotation to the give view number.
int single_model_view_this_model_number(int imol)
the current model number being displayed
char * insertion_code_from_serial_number(int imol, const char *chain_id, int serial_num)
the insertion code of the residue.
void add_planar_peptide_restraints()
add a restraint on peptides to make them planar
void set_diff_map_iso_level_increment(float val)
set the contour scroll step for difference map (in absolute e/A3) to val
SCM ncs_chain_ids_scm(int imol)
Return the ncs chains id for the given molecule.
SCM molecule_name_stub_scm(int imol, int include_path_flag)
return the molecule name without file extension
void save_state_file(const char *filename)
save the current state to file filename
int difference_map(int imol1, int imol2, float map_scale)
make a difference map, taking map_scale * imap2 from imap1, on the grid of imap1. Return the new mole...
SCM map_parameters_scm(int imol)
return the parameter that made the map,
PyObject * save_state_file_name_py()
the save state file name
void graphics_to_ca_plus_ligands_and_sidechains_representation(int imol)
draw molecule number imol as CA + ligands + sidechains
int stereo_mode_state()
what is the stero state?
PyObject * molecule_name_stub_py(int imol, int include_path_flag)
return the molecule name without file extension
void set_refine_with_torsion_restraints(int istate)
turn on (or off) torsion restraints
void set_contour_level_absolute(int imol_map, float level)
set the contour level, direct control
int make_dynamically_transformed_ncs_maps(int imol_model, int imol_map, int overwrite_maps_of_same_name_flag)
make NCS map
int do_anti_aliasing_state()
return the flag for antialiasing the bond lines
PyObject * highly_coordinated_waters_py(int imol, int coordination_number, float dist_max)
return a list first of waters, second metals that are coordinated with at least coordination_number o...
int set_atom_attribute(int imol, const char *chain_id, int resno, const char *ins_code, const char *atom_name, const char *alt_conf, const char *attribute_name, float val)
set a numberical attibute to the atom with the given specifier.
void set_refine_ramachandran_angles(int state)
turn on Ramachandran angles refinement in refinement and regularization
int imol_refinement_map()
the molecule number of the map used for refinement
void write_ccp4mg_picture_description(const char *filename)
write a ccp4mg picture description file
void set_default_representation_type(int type)
set the default representation type (default 1).
void set_console_display_commands_state(short int istate)
set a flag to show the text command equivalent of gui commands in the console as they happen...
float fffear_angular_resolution()
return the fffear angular resolution in degrees
void write_interpolated_models_and_extra_restraints(int imol_1, int imol_2, int n_steps, char *file_name_stub, int interpolation_mode)
proSMART interpolated restraints for model morphing and write interpolated model
void remove_text(int text_handle)
Remove &quot;3d&quot; text item.
int mutate_base(int imol, const char *chain_id, int res_no, const char *ins_code, const char *res_type)
mutate a base. return success status, 1 for a good mutate.
void remove_planar_peptide_restraints()
remove restraints on peptides to make them planar.
void set_smooth_scroll_flag(int v)
set smooth scrolling
void set_residue_selection_flash_frames_number(int i)
set the number of frames for which the selected residue range flashes
void set_stop_scroll_iso_map_level(float f)
set the actual map level changing limit
void move_hetgroups_to_around_protein(int imol)
move all hetgroups (including waters) of molecule number imol so that they are around the protein...
SCM map_peaks_scm(int imol_map, float n_sigma)
return a list of map peaks of molecule number imol_map above n_sigma. There will be cluster filtering...
void set_map_radius(float f)
set the extent of the box/radius of electron density contours for x-ray maps
SCM sequence_info(int imol)
return the sequence info that has been assigned to molecule number imol. return as a list of dotted p...
void set_socket_string_waiting(const char *s)
feed the main thread a scheme script to evaluate
SCM set_torsion_scm(int imol, const char *chain_id, int res_no, const char *insertion_code, const char *alt_conf, const char *atom_name_1, const char *atom_name_2, const char *atom_name_3, const char *atom_name_4, double tors)
set the given torsion the given residue. tors is in degrees. Return the resulting torsion (also in de...
PyObject * user_mods_py(const char *file_name)
return the parsed user mod fields from the PDB file file_name (output by reduce most likely) ...
SCM matching_compound_names_from_sbase_scm(const char *compound_name_fragment)
return a list of compoundIDs of in SBase of which the given string is a substring of the compound nam...
void print_view_matrix()
print the view matrix to the console, useful for molscript, perhaps
void simple_fill_partial_residues(int imol)
Fill amino acid residues.
void nsv(int imol)
display the sequence view for molecule number imol
void update_go_to_atom_window_on_changed_mol(int imol)
update the Go To Atom window
void set_model_fit_refine_dialog_position(int x_pos, int y_pos)
set position of Model/Fit/Refine dialog
int single_model_view_next_model_number(int imol)
change the representation to the next model number to be displayed
void undo_last_move()
undo last move
int have_unsaved_changes_p(int imol)
does molecule number imol have unsaved changes?
int draw_hydrogens_state(int imol)
the state of draw hydrogens for molecule number imol.
void set_ligand_flexible_ligand_n_samples(int i)
set the number of conformation samples
void print_sequence_chain(int imol, const char *chain_id)
Print the sequence to the console of the given molecule.
void set_view_quaternion(float i, float j, float k, float l)
Set the view quaternion.
int residue_has_hetatms(int imol, const char *chain_id, int resno, const char *ins_code)
residue has HETATMs?
void update_go_to_atom_window_on_new_mol()
update the Go To Atom window. This updates the option menu for the molecules.
int fix_nomenclature_errors(int imol)
fix nomenclature errors in molecule number imol
void assign_pir_sequence(int imol, const char *chain_id_in, const char *seq)
Assign a PIR sequence to a given chain in the molecule. If the chain of the molecule already had a ch...
int export_map(int imol, const char *filename)
export (write to disk) the map of molecule number imol to filename.
int decoloned_backup_file_names_state()
return the state for adding paths to backup file names
void set_find_ligand_multi_solutions_per_cluster(float lim_1, float lim_2)
allow multiple ligand solutions per cluster.
void remove_omega_torsion_restriants()
remove omega restraints on CIS and TRANS linked residues.
int set_atom_attributes(SCM attribute_expression_list)
set lots of atom attributes at once by-passing the rebonding and redrawing of the above 2 functions ...
int add_nucleotide(int imol, const char *chain_id, int res_no)
Add a terminal nucleotide.
void set_rotamer_selection_dialog_position(int x_pos, int y_pos)
set rotamer selection dialog position
void set_show_environment_distances_as_solid(int state)
show the environment distances with solid modelling
float get_molecule_bonds_colour_map_rotation(int imol)
Get the colour map rotation for molecule number imol.
void set_grey_carbon_colour(int imol, float r, float g, float b)
set the colour for the carbon atoms
PyObject * select_atom_under_pointer_py()
return Python false or a list of molecule number and an atom spec
void set_show_unit_cells_all(short int istate)
set the state of show unit cell for all molecules
void set_rotamer_lowest_probability(float f)
For Dunbrack rotamers, set the lowest probability to be considered. Set as a percentage i...
int average_map_py(PyObject *map_number_and_scales)
make an average map from the map_number_and_scales (which is a list of pairs map_number, scale_factor. The output map is in the same grid as the first (valid) map. Return -1 on failure to make an averaged map, otherwise return the new map molecule number.
void graphics_to_rainbow_representation(int imol)
draw molecule number imol in Jones&#39; Rainbow
void set_run_state_file_status(short int istat)
set run state file status
int map_is_difference_map(int imol)
map is difference map?
void set_all_models_displayed_and_active(int on_or_off)
if on_or_off is 0 turn off all models displayed and active, for other values of on_or_off turn on all...
void set_draw_solid_density_surface(int imol, short int state)
sets the density map of the given molecule to be drawn as a (transparent) solid surface.
void refine_auto_range(int imol, const char *chain_id, int resno1, const char *altconf)
refine a zone using auto-range
short int python_at_prompt_at_startup_state()
is the python interpreter at the prompt?
int n_residues(int imol)
return the number of residues in the molecule,
void set_find_ligand_mask_waters(int istate)
how shall we treat the waters during ligand fitting?
void set_show_environment_distances_bumps(int state)
show bumps environment distances. If state is 0, bump distances are turned off, otherwise bump distan...
void show_set_undo_molecule_chooser()
show the Undo Molecule chooser - i.e. choose the molecule to which the &quot;Undo&quot; button applies...
void remove_map_glob_extension(const char *ext)
remove an extension to be treated as geometry map files
void fle_view_set_water_dist_max(float dist_max)
set the maximum considered distance to water
int get_fps_flag()
set the state of show frames-per-second flag
void set_backup_compress_files(int state)
set if backup files will be compressed or not using gzip
void set_dots_colour(int imol, float r, float g, float b)
set the colour of the surface dots of the imol-th molecule to be the given single colour ...
int place_text(const char *text, float x, float y, float z, int size)
Put text at x,y,z.
int rotamer_search_mode_state()
SCM rigid_body_refine_by_residue_ranges_scm(int imol, SCM residue_ranges)
rigid body refine using residue ranges. residue_ranges is a list of residue ranges. A residue range is (list chain-id resno-start resno-end).
void remove_non_auto_load_residue_name(const char *s)
remove residue name from the list of residue names that don&#39;t get auto-loaded from the Refmac diction...
float median_temperature_factor(int imol)
return the median temperature factor for imol
void set_recentre_on_read_pdb(short int)
set the recentre-on-pdb state
void translate_scene_x(int nsteps)
translate rotation centre relative to screen axes for nsteps
void assign_sequence_from_string(int imol, const char *chain_id_in, const char *seq)
Assign a sequence to a given molecule from a simple string.
SCM save_state_file_name_scm()
the save state file name
void baton_tip_try_another()
move the baton tip position - another prime candidate for a key binding
void set_fix_chiral_volumes_before_refinement(int istate)
correct the sign of chiral volumes before commencing refinement?
int set_residue_to_rotamer_name(int imol, const char *chain_id, int resno, const char *ins_code, const char *alt_conf, const char *rotamer_name)
set the residue specified to the rotamer name specified.
void set_add_terminal_residue_immediate_addition(int i)
set immediate addition of terminal residue
void make_tight_planar_peptide_restraints()
make the planar peptide restraints tight
void set_rotamer_auto_fit_do_post_refine(short int istate)
Do you want Coot to automatically run a refinement after every rotamer autofit?
void show_select_map_dialog()
display the Display Manager dialog
void single_model_view_model_number(int imol, int imodel)
put molecule number imol to display only model number imodel
int create_pointer_atom_molecule_maybe()
Return the current pointer atom molecule, create a pointer atom molecule if necessary (i...
void difference_map_peaks(int imol, int imol_coords, float level, float max_closeness, int do_positive_level_flag, int do_negative_level_flag, int around_model_only_flag)
generate a list of difference map peaks
void set_smooth_scroll_steps(int i)
set the number of steps in the smooth scroll
int export_map_fragment_to_plain_file(int imol, float x, float y, float z, float radius, const char *filename)
tmp interface for Hamish
void show_main_toolbar()
show the horizontal main toolbar in the GTK2 version (the toolbar is shown by default) ...
void mutate_active_residue()
display a dialog that allows the choice of residue type to which to mutate
int n_dots_sets(int imol)
return the number of dots sets for molecule number imol
void hide_modelling_toolbar()
hide the vertical modelling toolbar in the GTK2 version
float fit_molecule_to_map_by_random_jiggle_and_blur(int imol, int n_trials, float jiggle_scale_factor, float map_blur_factor)
jiggle fit the molecule to the current refinment map. return &lt; -100 if not possible, else return the new best fit for this molecule - create a map that is blurred by the given factor for fitting
void spin_zoom_trans(int axis, int nstep, float stepsize, float zoom_by, float x_rel, float y_rel, float z_rel)
Bells and whistles rotation.
void post_go_to_atom_window()
Post the Go To Atom Window.
void raster_screen_shot()
run raster3d and display the resulting image.
void calc_phases_generic(const char *mtz_file_name)
fire up a GUI, which asks us which model molecule we want to calc phases from. On &quot;OK&quot; button there...
int show_origin_marker_state()
return the origin marker shown? state
int add_extra_bond_restraint(int imol, const char *chain_id_1, int res_no_1, const char *ins_code_1, const char *atom_name_1, const char *alt_conf_1, const char *chain_id_2, int res_no_2, const char *ins_code_2, const char *atom_name_2, const char *alt_conf_2, double bond_dist, double esd)
add a user-define bond restraint
void set_show_environment_distances(int state)
show environment distances. If state is 0, distances are turned off, otherwise distances are turned o...
void rotate_z_scene(int nsteps, float stepsize)
rotate view round z axis stepsize degrees for nstep such steps
int db_mainchains_fragment(int imol, const char *chain_id, int res_no)
CA-Zone to Mainchain for a fragment based on the given residue.
int do_GL_lighting_state()
return the flag for GL lighting
void set_auto_fit_best_rotamer_clash_flag(int i)
set the clash flag for rotamer search
int auto_load_dictionary(const char *comp_id)
try to auto-load the dictionary for comp_id from the refmac monomer library.
void delete_residue_hydrogens(int imol, const char *chain_id, int resno, const char *inscode, const char *altloc)
delete hydrogen atoms in residue
void set_max_skeleton_search_depth(int v)
set the skeleton search depth, used in baton building
void do_180_degree_side_chain_flip(int imol, const char *chain_id, int resno, const char *inscode, const char *altconf)
rotate 180 degrees around the last chi angle
int symmetry_molecule_rotate_colour_map_state(int imol)
should there be colour map rotation (i.e. the hue) change for the symmetry atoms of molecule number i...
void post_display_control_window()
display the Display Constrol window
void set_accept_reject_dialog_docked_show(int state)
set the accept/reject dialog docked show state
void set_interactive_probe_dots_molprobity_radius(float r)
set the radius over which we can run interactive probe, bigger is better but slower.
void set_brief_atom_labels(int istat)
use brief atom names for on-screen labels
void change_model_molecule_representation_mode(int up_or_down)
change the representation of the model molecule closest to the centre of the screen ...
int change_residue_number(int imol, const char *chain_id, int current_resno, const char *current_inscode, int new_resno, const char *new_inscode)
change chain id, residue number or insertion code for given residue
void toggle_idle_rock_function()
Rock (not roll) (self-timed)
PyObject * comp_id_to_name_py(const char *comp_id)
return the monomer name
void set_accept_reject_dialog_position(int x_pos, int y_pos)
set position of the Accept/Reject dialog
SCM matching_compound_names_from_dictionary_scm(const char *compound_name_fragment, short int allow_minimal_descriptions_flag)
return a list of compoundIDs in the dictionary of which the given string is a substring of the compou...
void renumber_waters(int imol)
Renumber the waters of molecule number imol with consecutive numbering.
void transform_zone(int imol, const char *chain_id, int resno_start, int resno_end, const char *ins_code, float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33, float x, float y, float z)
transform fragment of molecule number imol by the given rotation matrix, then translate by (x...
int get_auto_recontour_map()
return the auto-recontour state
int read_phs_and_make_map_using_cell_symm(const char *phs_file_name, const char *hm_spacegroup, float a, float b, float c, float alpha, float beta, float gamma)
read phs file use coords to use cell and symm to make map
int fffear_search(int imol_model, int imol_map)
fffear search model in molecule number imol_model in map number imol_map
void set_reset_b_factor_moved_atoms(int state)
reset temperature factor for all moved atoms to the default for new atoms (usually 30) ...
int secondary_structure_restraints_type()
return the secondary structure restraints type
void set_symmetry_size(float f)
set the size of the displayed symmetry
const char * mtz_phi_for_map(int imol_map)
return the phases column in mtz file that was use to generate the map
void raster3d(const char *rd3_filename)
create a r3d file for the current view
void display_only_active()
display only the active mol and the refinement map
void set_density_size(float f)
another (old) way of setting the radius of the map
void refine_zone(int imol, const char *chain_id, int resno1, int resno2, const char *altconf)
refine a zone
int place_strand_here(int n_residues, int n_sample_strands)
add a strands
void set_contour_level_in_sigma(int imol_map, float level)
set the contour level, direct control in r.m.s.d. (if you like that sort of thing) ...
SCM add_alt_conf_scm(int imol, const char *chain_id, int res_no, const char *ins_code, const char *alt_conf, int rotamer_number)
add an alternative conformer to a residue. Add it in conformation rotamer number rotamer_number.
int get_font_size()
return the font size
int background_is_black_p()
is the background black (or nearly black)?
void set_decoloned_backup_file_names(int state)
set the state for adding paths to backup file names
int reset_view()
&quot;Reset&quot; the view
int find_nucleic_acids_local(float radius)
autobuild nucleic acid chains
int model_fit_refine_dialog_stays_on_top_state()
return the state model-fit-refine dialog stays on top
float get_contour_level_absolute(int imol)
get the contour level
void delete_residue_with_full_spec(int imol, int imodel, const char *chain_id, int resno, const char *inscode, const char *altloc)
delete residue with altconf
void set_rotamer_search_mode(int mode)
set the mode of rotamer search, options are (ROTAMERSEARCHAUTOMATIC), (ROTAMERSEARCHLOWRES) (aka...
void set_use_stroke_characters(int state)
set use stroke characters
void set_show_pointer_distances(int istate)
turn on (or off) the pointer distance by passing 1 (or 0).
float fit_molecule_to_map_by_random_jiggle(int imol, int n_trials, float jiggle_scale_factor)
jiggle fit the molecule to the current refinment map. return &lt; -100 if not possible, else return the new best fit for this molecule.
void ncs_control_display_chain(int imol, int ichain, int state)
display the NCS master chain
int superpose_with_atom_selection(int imol1, int imol2, const char *mmdb_atom_sel_str_1, const char *mmdb_atom_sel_str_2, short int move_imol2_copy_flag)
detailed interface to superposition.
SCM user_mods_scm(const char *file_name)
return the parsed user mod fields from the PDB file file_name (output by reduce most likely) ...
void manage_column_selector(const char *filename)
given a filename, try to read it as a data file
void set_fps_flag(int t)
set show frame-per-second flag
void match_ligand_atom_names_to_comp_id(int imol_ligand, const char *chain_id_ligand, int resno_ligand, const char *ins_code_ligand, const char *comp_id_ref)
Match ligand atom names to a reference ligand type (comp_id)
void set_draw_map_standard_lines(int imol, short int state)
toggle for standard lines representation of map.
void do_clipped_surface_py(int imol, PyObject *residue_specs)
draw the surface of the imolth molecule clipped to the residues given by residue_specs ...
int get_write_conect_record_state()
return the state of the write_conect_records_flag.
void set_add_terminal_residue_default_residue_type(const char *type)
set the residue type of an added terminal residue.
void set_stop_scroll_diff_map_level(float f)
set the actual difference map level changing limit
int backrub_rotamer_intermediate_atoms()
apply rotamer backrub to the active atom of the intermediate atoms
void set_show_symmetry_master(short int state)
set display symmetry, master controller
int control_key_for_rotate_state()
return the control key rotate state
void set_water_check_spherical_variance_limit(float f)
set the limit of interesting variance, above which waters are listed (otherwise ignored) ...
int replace_fragment(int imol_target, int imol_fragment, const char *atom_selection)
replace the parts of molecule number imol that are duplicated in molecule number imol_frag ...
void copy_from_ncs_master_to_chains_scm(int imol, const char *master_chain_id, SCM chain_id_list)
Copy chain from master to a list of NCS chains.
int move_waters_to_around_protein(int imol)
move waters of molecule number imol so that they are around the protein.
void set_seg_ids_in_atom_labels(int istat)
set if brief atom labels should have seg-ids also
void set_unpathed_backup_file_names(int state)
set the state for adding paths to backup file names
int hetify_residue(int imol, const char *chain_id, int resno, const char *ins_code)
if this is not a standard group, then turn the atoms to HETATMs.
PyObject * map_parameters_py(int imol)
return the parameter of the molecule, something like (45 46 47 90 90 120), angles in degress ...
void export_map_fragment_with_text_radius(int imol, const char *radius_text, const char *filename)
void set_sticky_sort_by_date()
sort files in the file selection by date?
float get_electrostatic_surface_opacity(int imol)
return 1.0 for non transparent and 0.5 if screendoor transparency has been turned on...
void delete_residues_py(int imol, PyObject *residue_specs_py)
delete residues in the residue spec list
void sfcalc_genmap(int imol_model, int imol_map_with_data_attached, int imol_updating_difference_map)
Calculate structure factors from the model and update the given difference map accordingly.
void delete_all_extra_restraints(int imol)
clear out all the extra/user-defined restraints for molecule number imol
void refine_zone_atom_index_define(int imol, int ind1, int ind2)
refine a zone based on atom indexing
int chain_n_residues(const char *chain_id, int imol)
the number of residues in chain chain_id and molecule number imol
int set_residue_to_rotamer_number(int imol, const char *chain_id, int resno, const char *ins_code, const char *alt_conf, int rotamer_number)
set the residue specified to the rotamer number specifed.
void pick_cursor_maybe()
pick cursor maybe
void set_all_maps_displayed(int on_or_off)
if on_or_off is 0 turn off all maps displayed, for other values of on_or_off turn on all maps ...
void label_atoms_in_residue()
Label the atoms in the central residue.
int is_mtz_file_p(const char *filename)
is the given filename an mtz file?
void mono_mode()
try to turn on mono mode
int copy_residue_range(int imol_target, const char *chain_id_target, int imol_reference, const char *chain_id_reference, int resno_range_start, int resno_range_end)
copy the given residue range from the reference chain to the target chain
void save_symmetry_coords(int imol, const char *filename, int symop_no, int shift_a, int shift_b, int shift_c, int pre_shift_to_origin_na, int pre_shift_to_origin_nb, int pre_shift_to_origin_nc)
save the symmetry coordinates of molecule number imol to filename
void remove_data_glob_extension(const char *ext)
remove an extension to be treated as data (reflection) files
void set_default_temperature_factor_for_new_atoms(float new_b)
set the default temperature factor for newly created atoms (initial default 20)
void set_ncs_homology_level(float flev)
At what level of homology should we say that we can&#39;t see homology for NCS calculation? (default 0.8)
void set_map_mask_atom_radius(float rad)
set the atom radius for map masking
void set_default_initial_contour_level_for_map(float n_sigma)
set the default inital contour for 2FoFc-style map
void show_restraints_editor_by_index(int menu_item_index)
show restraints editor using residue type index
int text_index_near_position(float x, float y, float z, float r)
return the closest text that is with r A of the given position. If no text item is close...
float get_view_quaternion_internal(int element)
internal function to get an element of the view quaternion. The whole quaternion is returned by the s...
void set_mol_active(int imol, int state)
make the coordinates molecule active/inactve (clickable), 0 for off, 1 for on
void set_rigid_body_fit_acceptable_fit_fraction(float f)
set rigid body fraction of atoms in positive density
int does_residue_exist_p(int imol, char *chain_id, int resno, char *inscode)
Does the residue exist? (Raw function)
void go_to_ligand()
centre on the ligand of the &quot;active molecule&quot;, if we are already there, centre on the next hetgroup (...
int copy_molecule(int imol)
copy molecule imol
int cis_trans_convert_intermediate_atoms()
cis-trans convert the active residue of the active atom in the inermediate atoms, and continue with t...
short int get_show_unit_cell(int imol)
return the stage of show unit cell for molecule number imol
void show_remarks_browswer()
show the remarks browser
void set_model_fit_refine_rotate_translate_zone_label(const char *txt)
Allow the changing of Model/Fit/Refine button label from &quot;Rotate/Translate Zone&quot;. ...
void set_active_map_drag_flag(int t)
set the state of immediate map upate on map drag.
int another_level()
Add another contour level for the last added map.
int refinement_move_atoms_with_zero_occupancy_state()
return the state of &quot;shall atoms with zero occupancy be moved when refining?&quot;
void trim_molecule_by_map(int imol_coords, int imol_map, float map_level, int delete_or_zero_occ_flag)
cut off (delete or give zero occupancy) atoms in the given molecule if they are below the given map (...
int pointer_atom_molecule()
Return the current pointer atom molecule.
void show_partial_charge_info(int imol, const char *chain_id, int resno, const char *ins_code)
show the partial charges for the residue of the given specs (charges are read from the dictionary) ...
void set_map_colour(int imol, float red, float green, float blue)
set the colour of the imolth map
PyObject * refine_residues_py(int imol, PyObject *r)
refine the residues in the given residue spec list
void set_bond_colour_rotation_for_molecule(int imol, float f)
set bond colour for molecule
int brief_atom_labels_state()
the brief atom label state
void set_matrix(float f)
set the relative weight of the geometric terms to the map terms
void normal_cursor()
normal cursor
void set_display_control_dialog_position(int x_pos, int y_pos)
set position of Display Control dialog
void set_save_coordinates_in_original_directory(int i)
set save coordinates in the starting directory
float get_map_radius()
return the extent of the box/radius of electron density contours
short int get_symmetry_as_calphas_state(int imol)
what is state of display CAs for molecule number mol_no?
int cns_file_has_phases_p(const char *cns_file_name)
does the given file have cns phases?
int handle_read_draw_molecule(const char *filename)
a synonym for read-pdb. Read the coordinates from filename (can be pdb, cif or shelx format) ...
void set_display_intro_string(const char *str)
Give me this nice message str when I start coot.
void multi_residue_torsion_py(int imol, PyObject *residues_specs_py)
create a multi-residue torsion dialog (user manipulation of torsions)
void info_dialog(const char *txt)
create a dialog with information
short int refinement_already_ongoing_p()
If there is a refinement on-going already, we don&#39;t want to start a new one.
void add_data_glob_extension(const char *ext)
add an extension to be treated as data (reflection) files
void shorten_baton()
shorten the baton length
char * go_to_atom_ins_code()
the go-to-atom insertion code
void set_graphics_window_size(int x_size, int y_size)
set the window size
void superpose(int imol1, int imol2, short int move_imol2_flag)
simple interface to superposition.
int add_terminal_residue_do_post_refine_state()
what is the value of the previous flag?
void set_map_displayed(int imol, int state)
make the map displayed/undisplayed, 0 for off, 1 for on
void store_graphics_window_position(int x_pos, int y_pos)
store the graphics window position
int find_secondary_structure(short int use_helix, int helix_length, int helix_target, short int use_strand, int strand_length, int strand_target)
autobuild secondary structure
void set_refinement_immediate_replacement(int istate)
set immediate replacement mode for refinement and regularization. You need this (call with istate=1) ...
PyObject * het_group_residues_py(int imol)
get the specs for hetgroups - waters are not counted as het-groups.
int keep_map_colour_after_refmac_state()
the keep-map-colour-after-refmac internal state
int map_line_width_state()
return the width in which density contours are drawn
void update_sequence_view_current_position_highlight_from_active_atom()
update the sequnce view current position highlight based on active atom
void add_status_bar_text(const char *s)
Put text s into the status bar.
void remove_coordinates_glob_extension(const char *ext)
remove an extension to be treated as coordinate files
void set_show_chiral_volume_errors_dialog(short int istate)
For experienced Cooters who don&#39;t like Coot nannying about chiral volumes during refinement.
void set_baton_build_params(int istart_resno, const char *chain_id, const char *direction)
set the parameters for the start of a new baton-built fragment. direction can either be &quot;forwards&quot; or...
int delete_waters(int imol)
delete all waters in molecule,
int filter_fileselection_filenames_state()
, return the state of the above variable
int exchange_chain_ids_for_seg_ids(int imol)
Experimental interface for Ribosome People.
int new_molecule_by_sphere_selection(int imol, float x, float y, float z, float r, short int allow_partial_residues)
create a new molecule that consists of only the atoms within the given radius (r) of the given positi...
int new_molecule_by_residue_specs_py(int imol, PyObject *residue_spec_list_py)
create a new molecule that consists of only the atoms of the specified list of residues ...
void fit_residue_range_to_map_by_simplex(int res1, int res2, char *altloc, char *chain_id, int imol, int imol_for_map)
refine residue range using simplex optimization
SCM chain_id_for_shelxl_residue_number(int imol, int resno)
float molecule_centre_internal(int imol, int iaxis)
internal function for molecule centre
void remarks_dialog(int imol)
a gui dialog showing remarks header info (for a model molecule).
void run_python_script(const char *filename)
run python script file
void set_prefer_python()
tell coot that you prefer to run python scripts if/when there is an option to do so.
void set_add_terminal_residue_do_post_refine(short int istat)
set a flag to run refine zone on terminal residues after an addition.
SCM remarks_scm(int imol)
return a list of the remarks of hte molecule number imol
int unskeletonize_map(int imol)
undisplay the skeleton on molecule number imol
void set_ligand_water_n_cycles(int i)
set the number of cycles of water searching
SCM cell_scm(int imol)
return the parameter that made the map,
PyObject * set_torsion_py(int imol, const char *chain_id, int res_no, const char *insertion_code, const char *alt_conf, const char *atom_name_1, const char *atom_name_2, const char *atom_name_3, const char *atom_name_4, double tors)
set the given torsion the given residue. tors is in degrees. Return the resulting torsion (also in de...
void user_defined_click_scm(int n_clicks, SCM func)
run a user defined function
void execute_find_waters_real(int imol_for_map, int imol_for_protein, short int new_waters_mol_flag, float rmsd_cut_off)
find waters
void set_nomenclature_errors_on_read(const char *mode)
set way nomenclature errors should be handled on reading coordinates.
PyObject * add_dipole_py(int imol, const char *chain_id, int res_no, const char *ins_code)
generate a dipole from all atoms in the given residues.
int full_atom_spec_to_atom_index(int imol, const char *chain, int resno, const char *inscode, const char *atom_name, const char *altloc)
what is the atom index of the given atom?
int n_rotamers(int imol, const char *chain_id, int resno, const char *ins_code)
return the number of rotamers for this residue - return -1 on no residue found.
void clear_all_fixed_atoms(int imol)
clear all fixed atoms
int map_from_mtz_by_refmac_calc_phases(const char *mtz_file_name, const char *f_col, const char *sigf_col, int imol_coords)
Calculate SFs (using refmac optionally) from an MTZ file and generate a map. Get F and SIGF automatic...
void set_use_grey_carbons_for_molecule(int imol, short int state)
make the carbon atoms for molecule imol be grey
int regularize_zone(int imol, const char *chain_id, int resno1, int resno2, const char *altconf)
regularize a zone
void set_scroll_by_wheel_mouse(int istate)
Some people (like Phil Evans) don&#39;t want to scroll their map with the mouse-wheel.
void set_colour_by_chain_goodsell_mode(int imol)
colour molecule number imol by chain type, goodsell-like colour scheme
float get_bond_colour_rotation_for_molecule(int imol)
get the bond colour for molecule.
float fit_to_map_by_random_jiggle(int imol, const char *chain_id, int resno, const char *ins_code, int n_trials, float jiggle_scale_factor)
jiggle fit to the current refinment map. return &lt; -100 if not possible, else return the new best fit ...
void run_state_file()
run the state file (reading from default filenname)
const char * mtz_weight_for_map(int imol_map)
return the weight column in the mtz file that was use to generate the map
void set_do_probe_dots_on_rotamers_and_chis(short int state)
shall we run molprobity for on edit chi angles intermediate atoms?
int get_default_bond_thickness()
get the default thickness for bonds
void set_kleywegt_plot_n_diffs(int n_diffs)
set the number of biggest difference arrows on the Kleywegt plot.
void set_use_only_extra_torsion_restraints_for_torsions(short int state)
set use only extra torsion restraints for torsions
void set_idle_function_rotate_angle(float f)
how far should we rotate when (auto) spinning? Fast computer? set this to 0.1
void unset_dots_colour(int imol)
no longer set the dots of molecule imol to a single colour
void set_rotate_translate_dialog_position(int x_pos, int y_pos)
set position of the Rotate/Translate Residue Range dialog
void ncs_control_change_ncs_master_to_chain_id(int imol, const char *chain_id)
change the NCS master chain (by chain_id)
int make_and_draw_patterson_using_intensities(const char *mtz_file_name, const char *i_col, const char *sigi_col)
Make a patterson molecule.
void delete_all_sequences_from_molecule(int imol)
Delete all the sequences from a given molecule.
void globularize(int imol)
globularize the molecule.
void set_draw_missing_residues_loops(short int state)
set the state for drawing missing resiude loops
void set_ramachandran_plot_dialog_position(int x_pos, int y_pos)
set position of the Ramachadran Plot dialog
int another_level_from_map_molecule_number(int imap)
Add another contour level for the given map.
void set_undo_molecule(int imol)
set the molecule to which undo operations are done to molecule number imol
void set_symmetry_shift_search_size(int shift)
set the cell shift search size for symmetry searching.
void set_stop_scroll_diff_map(int i)
create a lower limit to the &quot;Fo-Fc-style&quot; map contour level changing
void set_delete_dialog_position(int x_pos, int y_pos)
set position of Delete dialog
void set_draw_stick_mode_atoms(int imol, short int state)
draw little coloured balls on atoms
void coot_no_state_real_exit(int retval)
exit without writing a state file
int mol_is_displayed(int imol)
return the display state of molecule number imol
void sequence_view_old_style(int imol)
show old style sequence view
int smooth_map(int map_no, float sampling_multiplier)
make a new map (a copy of map_no) that is in the cell, spacegroup and a multiple of the sampling of t...
void rotate_cursor()
rotate cursor
int make_directory_maybe(const char *dir)
make a directory dir (if it doesn&#39;t exist) and return error code
void reattach_modelling_toolbar()
reattach the modelling toolbar to the last attached position
SCM highly_coordinated_waters_scm(int imol, int coordination_number, float dist_max)
return an improper list first is list of metals, second is list of waters that are coordinated with a...
int scroll_wheel_map()
the contouring of which map is altered when the scroll wheel changes?
void set_skeleton_box_size(float f)
the box size (in Angstroms) for which the skeleton is displayed
void open_coords_dialog()
display the open coordinates dialog
SCM origin_pre_shift_scm(int imol)
return the pre-shift (the shift that translates the centre of the molecule as close as possible to th...
void save_state_file_py(const char *filename)
save the current state to file filename
int scale_cell(int imol_map, float fac_u, float fac_v, float fac_w)
Scale the cell, for use with EM maps, where the cell needs to be adjusted. Use like: (scale-cell 2 1...
SCM merge_molecules(SCM add_molecules, int imol)
merge molecules
void sort_residues(int imol)
sort the residues of the imol-th molecule
int show_pointer_distances_state()
show the state of display of the pointer distances
void set_symmetry_colour(float r, float g, float b)
set the symmetry colour base
void wrapped_create_find_waters_dialog()
create a dialog for water fitting
void set_go_to_atom_window_position(int x_pos, int y_pos)
set position of Go To Atom dialog
void generate_local_self_restraints_by_residues_scm(int imol, SCM residue_specs, float local_dist_max)
generate external distance self restraints for selected residues
int export_map_fragment_with_origin_shift(int imol, float x, float y, float z, float radius, const char *filename)
export a fragment of the map about (x,y,z)
void show_restraints_editor(const char *monomer_type)
show restraints editor
SCM refine_residues_scm(int imol, SCM r)
refine residues, r is a list of residue specs.
int set_go_to_atom_chain_residue_atom_name_no_redraw(const char *t1, int iresno, const char *t3, short int make_the_move_flag)
set go to atom but don&#39;t redraw
void unset_refine_params_dialog()
unset refine params dialog
void set_smooth_scroll_do_zoom(int i)
set smooth scroll with zoom
void shiftfield_xyz_factor_refinement(int imol)
shiftfield xyz refinement
void side_by_side_stereo_mode(short int use_wall_eye_mode)
turn on side bye side stereo mode
int clear_and_update_model_molecule_from_file(int molecule_number, const char *file_name)
replace pdb. Fail if molecule_number is not a valid model molecule. Return -1 on failure. Else return molecule_number
int insert_action_view_after_view(int view_number, const char *view_name, const char *action_function)
add an action view after the view of the given view number
void graphics_to_user_defined_atom_colours_all_atoms_representation(int imol)
draw molecule number imol all atoms coloured by user-defined atom colours
const char * mtz_fp_for_map(int imol_map)
return the FP column in the file that was use to generate the map
int write_cif_file(int imol, const char *file_name)
write molecule number imol as a mmCIF to file file_name
int make_ball_and_stick(int imol, const char *atom_selection_str, float bond_thickness, float sphere_size, int do_spheres_flag)
make a ball and stick representation of imol given atom selection
void add_ncs_matrix(int imol, const char *this_chain_id, const char *target_chain_id, float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33, float t1, float t2, float t3)
Add NCS matrix.
void set_refine_rotamers(int state)
set the state for using rotamer restraints &quot;drive&quot; mode
float map_mask_atom_radius()
get the atom radius for map masking
SCM space_group_scm(int imol)
return the spacegroup as a string, return scheme false if unable to do so.
PyObject * matching_compound_names_from_sbase_py(const char *compound_name_fragment)
return a list of compoundIDs of in SBase of which the given string is a substring of the compound nam...
void hardware_stereo_mode()
try to turn on stereo mode
int is_protein_chain_p(int imol, const char *chain_id)
is this a protein chain? [Raw function]
void label_neighbours()
Label the atoms in the residues around the central residue.
int valid_labels(const char *mtz_file_name, const char *f_col, const char *phi_col, const char *weight_col, int use_weights)
does the mtz file have the columms that we want it to have?
void set_display_lists_for_maps(int i)
Should display lists be used for maps? It may speed things up if these are turned on (or off) - depen...
void ramachandran_plot_differences_by_chain(int imol1, int imol2, const char *a_chain, const char *b_chain)
A chain-specific Kleywegt Plot.
void check_chiral_volumes(int imol)
query the state of the above option
short int do_probe_dots_post_refine_state()
show the state of shall we run molprobity after a refinement has happened?
void set_show_symmetry_molecule(int mol_no, short int state)
set display symmetry for molecule number mol_no
void load_tutorial_model_and_data()
load tutorial model and data
void flip_ligand(int imol, const char *chain_id, int resno)
flip the ligand (usually active residue) around its eigen vectors to the next flip number...
SCM nearest_residue_by_sequence_scm(int imol, const char *chain_id, int resno, const char *ins_code)
return the residue spec of the nearest residue by sequence numbering.
float hardware_stereo_angle_factor_state()
return the hardware stereo angle factor
void execute_find_blobs(int imol_model, int imol_for_map, float cut_off, short int interactive_flag)
find blobs
void set_button_label_for_external_refinement(const char *button_label)
set the button label of the external Refinement program
int find_secondary_structure_local(short int use_helix, int helix_length, int helix_target, short int use_strand, int strand_length, int strand_target, float radius)
autobuild secondary structure
void graphics_window_size_and_position_to_preferences()
store the graphics window position and size to zenops-graphics-window-size-and-postion.scm in the preferences directory.
void set_molecule_bonds_colour_map_rotation(int imol, float theta)
set the colour map rotation for molecule number imol
int refinement_immediate_replacement_state()
query the state of the immediate replacement mode
void set_show_aniso(int state)
set show aniso atoms
void transform_molecule_by(int imol, float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33, float x, float y, float z)
transform molecule number imol by the given rotation matrix, then translate by (x,y,z) in Angstroms
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...
int accept_reject_dialog_docked_state()
the accept/reject dialog docked state
void run_guile_script(const char *filename)
guile run script file
void clear_dots_by_name(int imol, const char *dots_object_name)
clear the first dots object for imol with given name
void set_last_map_colour(double f1, double f2, double f3)
set the colour of the last (highest molecule number) map
void print_sequence_chain_general(int imol, const char *chain_id, short int pir_format, short int file_output, const char *file_name)
optionally write the sequence to the file for the given molecule, optionally in PIR format ...
float interactive_probe_dots_molprobity_radius()
return the radius over which we can run interactive probe.
void set_flat_shading_for_solid_density_surface(short int state)
set the flag to do flat shading rather than smooth shading for solid density surface.
void set_solid_density_surface_opacity(int imol, float opacity)
set the opacity of density surface representation of the given map.
void set_raster3d_atom_radius(float f)
set the atom radius for the Raster3D representation
short int recentre_on_read_pdb()
return the recentre-on-pdb state
void set_display_only_model_mol(int imol)
from all the model molecules, display only imol
int mutate_auto_fit_do_post_refine_state()
what is the value of the previous flag?
void set_background_colour(double red, double green, double blue)
set the background colour
int new_molecule_by_symop(int imol, const char *symop_string, int pre_shift_to_origin_na, int pre_shift_to_origin_nb, int pre_shift_to_origin_nc)
create a new molecule (molecule number is the return value) from imol.
void set_last_map_contour_level_by_sigma(float n_sigma)
set the contour level of the map with the highest molecule number to n_sigma sigma ...
void accept_baton_position()
accept the baton tip position - a prime candidate for a key binding
void set_map_sampling_rate(float r)
set the map sampling rate (default 1.5)
void open_cif_dictionary_file_selector_dialog()
open the cif dictionary file selector dialog
void add_dictionary_glob_extension(const char *ext)
add an extension to be treated as geometry dictionary files
void set_colour_map_rotation_on_read_pdb(float f)
set the hue change step on reading a new molecule
void delete_sequence_by_chain_id(int imol, const char *chain_id_in)
Delete the sequence for a given chain_id from a given molecule.
SCM add_dipole_for_residues_scm(int imol, SCM residue_specs)
generate a dipole from all atoms in the given residues. Return the dipole description ...
char * go_to_atom_atom_name()
the go-to-atom atom name
void generate_local_self_restraints(int imol, const char *chain_id, float local_dist_max)
generate external distance local self restraints
void set_ncs_ghost_bond_thickness(int imol, float f)
set bond thickness of NCS ghosts for molecule number imol
void repeat_refine_zone()
repeat the previous (user-selected) refine zone
int sprout_hydrogens(int imol, const char *chain_id, int res_no, const char *ins_code)
Add hydrogens to specificied residue.
int edit_chi_angles(int imol, const char *chain_id, int resno, const char *ins_code, const char *altconf)
display the edit chi angles gui for the given residue
void set_transparent_electrostatic_surface(int imol, float opacity)
simple on/off screendoor transparency at the moment, an opacity &gt; 0.0 will turn on screendoor transpa...
void show_model_toolbar_all_icons()
show all available icons in the modelling toolbar (same as MFR dialog)
void set_refine_ramachandran_restraints_type(int type)
change the target function type
int refinement_refine_per_frame_state()
query the state of the above option
void post_model_fit_refine_dialog()
display the Model/Fit/Refine dialog
void start_ligand_builder_gui()
display the ligand builder dialog
void close_molecule(int imol)
close the molecule
void set_raster3d_bone_thickness(float f)
set the bone (skeleton) thickness for the Raster3D representation
int write_shelx_ins_file(int imol, const char *filename)
write a SHELXL .ins file for molecule number imol
int db_mainchain(int imol, const char *chain_id, int iresno_start, int iresno_end, const char *direction)
CA -&gt; mainchain conversion.
short int file_type_coords(const char *file_name)
is the given file name suitable to be read as coordinates?
int delete_hydrogens(int imol)
delete all hydrogens in molecule,
int show_environment_distances_state()
show the state of display of the environment distances
void do_surface(int imol, int istate)
draw surface of molecule number imol
int remove_named_view(const char *view_name)
the view with the given name
void set_residue_name(int imol, const char *chain_id, int res_no, const char *ins_code, const char *new_residue_name)
set the residue name of the specified residue
char * show_spacegroup(int imol)
return the spacegroup of molecule number imol . Deprecated.
void translate_scene_y(int nsteps)
translate rotation centre relative to screen axes for nsteps
int add_strict_ncs_matrix(int imol, const char *this_chain_id, const char *target_chain_id, float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33, float t1, float t2, float t3)
add an NCS matrix for strict NCS molecule representation
int add_view_raw(float rcx, float rcy, float rcz, float quat1, float quat2, float quat3, float quat4, float zoom, const char *view_name)
return the view number
int new_molecule_by_symmetry(int imol, const char *name, double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33, double tx, double ty, double tz, int pre_shift_to_origin_na, int pre_shift_to_origin_nb, int pre_shift_to_origin_nc)
create a new molecule (molecule number is the return value) from imol.
int refine_with_torsion_restraints_state()
return the state of above
int map_is_displayed(int imol)
return the display state of molecule number imol
void add_header_secondary_structure_info(int imol)
add secondary structure info to the internal representation of the model
void set_colour_map_rotation_on_read_pdb_flag(short int i)
shall the hue change step be used?
int handle_cns_data_file(const char *filename, int imol)
read CNS data (currently only a placeholder)
void add_non_auto_load_residue_name(const char *s)
add residue name to the list of residue names that don&#39;t get auto-loaded from the Refmac dictionary...
void set_extra_restraints_prosmart_sigma_limits(int imol, double limit_high, double limit_low)
often we don&#39;t want to see all prosmart restraints, just the (big) violations
void set_ramachandran_plot_background_block_size(float blocksize)
set the ramachandran plot background block size.
void set_auto_updating_sfcalc_genmap(int imol_model, int imol_map_with_data_attached, int imol_updating_difference_map)
As above, calculate structure factors from the model and update the given difference map accordingly ...
int unpathed_backup_file_names_state()
return the state for adding paths to backup file names
PyObject * add_alt_conf_py(int imol, const char *chain_id, int res_no, const char *ins_code, const char *alt_conf, int rotamer_number)
add an alternative conformer to a residue. Add it in conformation rotamer number rotamer_number.
void zalman_stereo_mode()
try to turn on Zalman stereo mode
void set_renderer_show_atoms(int istate)
set the flag to show atoms for the Raster3D representation
int first_small_coords_imol()
molecule number of first small (&lt;400 atoms) molecule.
short int get_show_aniso()
return show-aniso-atoms state
void graphics_to_bonds_no_waters_representation(int imol)
draw molecule number imol with no waters
void set_reorienting_next_residue_mode(int state)
rotate the view so that the next main-chain atoms are oriented in the same direction as the previous ...
void set_rocking_factors(float width_scale, float frequency_scale)
Settings for the inevitable discontents who dislike the default rocking rates (defaults 1 and 1) ...
int save_coordinates(int imol, const char *filename)
save coordinates of molecule number imol in filename
int average_map_scm(SCM map_number_and_scales)
make an average map from the map_number_and_scales (which is a list of pairs (list map-number scale-f...
void set_scroll_wheel_map(int imap)
set the map that is moved by changing the scroll wheel and change_contour_level().
void graphics_to_user_defined_atom_colours_representation(int imol)
draw molecule number imol in CA+Ligands mode coloured by user-defined atom colours ...
int handle_read_draw_molecule_with_recentre(const char *filename, int recentre_on_read_pdb_flag)
read coordinates from filename with option to not recentre.
void recover_session()
recover session
void set_map_sharpening_scale_limit(float f)
set the limit of the b-factor map sharpening slider (default 30)
void set_smooth_scroll_limit(float lim)
do not scroll for distances greater this limit
float get_aniso_probability()
get aniso probability
void print_header_secondary_structure_info(int imol)
simply print secondary structure info to the terminal/console. In future, this could/should return th...
void set_mol_displayed(int imol, int state)
make the coordinates molecule displayed/undisplayed, 0 for off, 1 for on
float model_resolution(int imol)
return the resolution set in the header of the model/coordinates file. If this number is not availabl...
void graphics_to_sec_struct_bonds_representation(int imol)
draw molecule number imol with bonds in secondary structure representation
SCM non_standard_residue_names_scm(int imol)
non-standard residue/monomer names (note HOH is not non-standard).
void baton_build_delete_last_residue()
delete the most recently build CA position
int mutate(int imol, const char *chain_id, int ires, const char *inscode, const char *target_res_type)
mutate a given residue
void set_last_map_sigma_step(float f)
set the sigma step of the last map to f sigma
void set_find_ligand_n_top_ligands(int n)
search the top n sites for ligands.
void set_ligand_search_map_molecule(int imol_map)
set the map molecule for ligand searching
short int do_probe_dots_on_rotamers_and_chis_state()
return the state of if run molprobity for on edit chi angles intermediate atoms?
float max_water_distance(int imol)
return the maximum minimum distance of any water atom to any protein atom - used in validation of mov...
int new_molecule_by_atom_selection(int imol, const char *atom_selection)
create a new molecule that consists of only the atoms specified by the mmdb atoms selection string in...
int go_to_atom_residue_number()
the go-to-atom residue number
int delete_hydrogen_atoms(int imol)
delete all hydrogens in molecule,
void assign_sequence_from_file(int imol, const char *file)
Assign a sequence to a given molecule from (whatever) sequence file.
void set_residue_type_chooser_stub_state(short int istat)
set a flag saying that the residue chosen by mutate or auto-fit mutate should only be added as a stub...
short int get_show_symmetry()
is symmetry master display control on?
void accept_regularizement()
a hideous alias for the above
short int get_active_map_drag_flag()
return the state of the dragged map flag
void set_map_line_width(int w)
draw the lines of the chickenwire density in width w
void set_save_state_file_name(const char *filename)
set the default state file name (default 0-coot.state.scm)
void set_draw_hydrogens(int imol, int istat)
set the hydrogen drawing state. istat = 0 is hydrogens off, istat = 1: show hydrogens ...
float default_new_atoms_b_factor()
return the default temperature factor for newly created atoms
void post_python_scripting_window()
pop-up a scripting window for pythoning
void set_limit_aniso(short int state)
set the aniso atom limit
int add_ligand_delete_residue_copy_molecule(int imol_ligand_new, const char *chain_id_ligand_new, int resno_ligand_new, int imol_current, const char *chain_id_ligand_current, int resno_ligand_current)
Copy a molecule with addition of a ligand and a deletion of current ligand.
void set_refine_ramachandran_restraints_weight(float w)
change the target function weight
int get_sbase_monomer(const char *comp_id)
same as above but using old name for back-compatibility
void start_graphics_interface()
start Gtk (and graphics)
int place_helix_here()
add a helix
void split_water(int imol, const char *chain_id, int res_no, const char *ins_code)
split the given water and fit to map.
int first_molecule_with_symmetry_displayed()
return the molecule number.
int new_molecule_by_residue_specs_scm(int imol, SCM residue_spec_list_scm)
create a new molecule that consists of only the atoms of the specified list of residues ...
void set_molecule_name(int imol, const char *new_name)
set the molecule name of the imol-th molecule
void make_socket_listener_maybe()
try to make socket listener
void set_nsv_canvas_pixel_limit(int cpl)
set the pixel limit for sequence view windows
void set_have_unsaved_changes(int imol)
set the molecule number imol to be marked as having unsaved changes
int esoteric_depth_cue_state()
native depth cueing system
void set_do_GL_lighting(int state)
turn the GL lighting on (state = 1) or off (state = 0)
void print_all_history_in_python()
print the history in python format
int reinterp_map(int map_no, int reference_map_no)
make a new map (a copy of map_no) that is in the cell, spacegroup and gridding of the map in referenc...
void copy_chain(int imol, const char *from_chain, const char *to_chain)
Copy single NCS chain.
void set_last_map_contour_level(float level)
set the contour level of the map with the highest molecule number to level
void add_omega_torsion_restriants()
add restraints on the omega angle of the peptides
PyObject * alignment_mismatches_py(int imol)
do a internal alignment of all the assigned sequences, return a list of mismatches that need to be ma...
SCM het_group_residues_scm(int imol)
get the specs for hetgroups - waters are not counted as het-groups.
void browser_url(const char *url)
try to open given url in Web browser
int make_updating_map(const char *mtz_file_name, const char *f_col, const char *phi_col, const char *weight, int use_weights, int is_diff_map)
make a map molecule from the give file name.
void set_refine_auto_range_step(int i)
change the +/- step for autoranging (default is 1)
int read_phs_and_make_map_using_cell_symm_from_mol(const char *phs_filename, int imol)
read phs file and use a previously read molecule to provide the cell and symmetry information ...
void set_model_fit_refine_place_atom_at_pointer_label(const char *txt)
Allow the changing of Model/Fit/Refine button label from &quot;Place Atom at Pointer&quot;. ...
char * go_to_atom_chain_id()
the go-to-atom chain-id
void turn_on_backup(int imol)
turn on backups for molecule number imol
int import_python_module(const char *module_name, int use_namespace)
import python module
void update_go_to_atom_from_current_position()
update the Go To Atom widget entries to atom closest to screen centre.
char * go_to_atom_alt_conf()
the go-to-atom alt conf
void setup_mutate_auto_fit(short int state)
Mutate then fit to map.
PyObject * non_standard_residue_names_py(int imol)
non-standard residue/monomer names (note HOH is not non-standard).
void coot_real_exit(int retval)
exit from coot, give return value retval back to invoking process.
int reload_dictionary(const char *comp_id)
as above, but dictionary is cleared and re-read if it already exists
int add_terminal_residue(int imol, const char *chain_id, int residue_number, const char *residue_type, int immediate_add)
Add a terminal residue.
SCM apply_lsq_matches(int imol_reference, int imol_moving)
apply the LSQ matches
void set_environment_distances_distance_limits(float min_dist, float max_dist)
min and max distances for the environment distances
float idle_function_rotate_angle()
what is the idle function rotation angle?
int n_atoms(int imol)
return the atoms of residues in the molecule,
int mol_is_active(int imol)
return the active state of molecule number imol
int handle_cns_data_file_with_cell(const char *filename, int imol, float a, float b, float c, float alpha, float beta, float gamma, const char *spg_info)
read CNS data (currently only a placeholder)
float average_temperature_factor(int imol)
return the average temperature factor for the atoms in imol
int dragged_refinement_steps_per_frame()
return the number of steps per frame in dragged refinement
void set_refinement_move_atoms_with_zero_occupancy(int state)
shall atoms with zero occupancy be moved when refining? (default 1, yes)
int read_shelx_ins_file(const char *filename, short int recentre_flag)
read a SHELXL .ins file
void set_symmetry_atom_labels_expanded(int state)
set use expanded symmetry atom labels
int add_extra_geman_mcclure_restraint(int imol, const char *chain_id_1, int res_no_1, const char *ins_code_1, const char *atom_name_1, const char *alt_conf_1, const char *chain_id_2, int res_no_2, const char *ins_code_2, const char *atom_name_2, const char *alt_conf_2, double bond_dist, double esd)
add a user-define GM distance restraint
SCM add_dipole_scm(int imol, const char *chain_id, int res_no, const char *ins_code)
return the dipole number
void set_mutate_auto_fit_do_post_refine(short int istate)
Do you want Coot to automatically run a refinement after every mutate and autofit?
void fill_partial_residues(int imol)
fill all the residues of molecule number imol that have missing atoms.
PyObject * rotamer_graphs_py(int imol)
Activate rotamer graph analysis for molecule number imol.
float residue_density_fit_scale_factor()
return the scale factor for the Residue Density fit analysis
int new_molecule_by_symmetry_with_atom_selection(int imol, const char *name, const char *mmdb_atom_selection_string, double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33, double tx, double ty, double tz, int pre_shift_to_origin_na, int pre_shift_to_origin_nb, int pre_shift_to_origin_nc)
create a new molecule (molecule number is the return value) from imol, but only for atom that match t...
PyObject * chain_id_for_shelxl_residue_number_py(int imol, int resno)
void do_find_ligands_dialog()
display the find ligands dialog
void residue_info_dialog(int imol, const char *chain_id, int resno, const char *ins_code)
show residue info dialog for given residue
void save_previous_map_colour(int imol)
save previous colour map for molecule number imol
void set_main_window_title(const char *s)
set the main window title.
void match_ligand_atom_names(int imol_ligand, const char *chain_id_ligand, int resno_ligand, const char *ins_code_ligand, int imol_reference, const char *chain_id_reference, int resno_reference, const char *ins_code_reference)
Match ligand atom names.
int blob_under_pointer_to_screen_centre()
Put the blob under the cursor to the screen centre. Check only positive blobs. Useful function if bou...
void graphics_to_ca_plus_ligands_representation(int imol)
draw molecule number imol as CA + ligands
int undo_symmetry_view()
Undo symmetry view. Translate back to main molecule from this symmetry position.
int is_solvent_chain_p(int imol, const char *chain_id)
is this a solvent chain? [Raw function]
int n_models(int imol)
return the number of models in molecule number imol
void lengthen_baton()
lengthen the baton
int find_strands()
autobuild strands
void setup_torsion_general(short int state)
beloved torsion general at last makes an entrance onto the Coot scene...
void set_secondary_structure_restraints_type(int itype)
set the type of secondary structure restraints
void set_auto_recontour_map(int state)
turn off (0) or on (1) auto recontouring (on screen centre change) (default it on) ...
void set_esoteric_depth_cue(int istate)
not everone likes coot&#39;s esoteric depth cueing system
void copy_residue_range_from_ncs_master_to_others(int imol, const char *master_chain_id, int residue_range_start, int residue_range_end)
Copy residue range to all related NCS chains.
void coot_clear_backup_or_real_exit(int retval)
exit coot doing clear-backup maybe
void check_for_dark_blue_density()
give a warning dialog if density it too dark (blue)
void set_draw_stick_mode_atoms_default(short int state)
set default for the drawing of atoms in stick mode (default is on (1))
void quanta_buttons()
quanta-like buttons
int read_phs_and_make_map_with_reso_limits(int imol, const char *phs_file_name, float reso_lim_low, float reso_lim_high)
read a phs file and use the cell and symm in molecule number imol and use the resolution limits reso_...
int is_nucleotide_chain_p(int imol, const char *chain_id)
is this a nucleic acid chain? [Raw function]
int watson_crick_pair_for_residue_range(int imol, const char *chain_id, int resno_start, int resno_end)
add base pairs for the given residue range, modify molecule imol by creating a new chain ...
int single_model_view_prev_model_number(int imol)
change the representation to the previous model number to be displayed
int pisa_interaction(int imol_1, int imol_2)
return the molecule number of the interacting residues. Return -1 if no new model was created...
void show_model_toolbar_main_icons()
show only a selection of icons in the modelling toolbar
PyObject * matching_compound_names_from_dictionary_py(const char *compound_name_fragment, short int allow_minimal_descriptions_flag)
return a list of compoundIDs in the dictionary which the given string is a substring of the compound ...
PyObject * ncs_ghosts_py(int imol)
Get the NCS ghosts description.
void set_model_toolbar_docked_position(int state)
to swap sides of the Model/Fit/Refine toolbar 0 (default) is right, 1 is left, 2 is top...
void set_refine_max_residues(int n)
set the heuristic fencepost for the maximum number of residues in the refinement/regularization resid...
void apply_ncs_to_view_orientation(int imol, const char *current_chain, const char *next_ncs_chain)
Given that we are in chain current_chain, apply the NCS operator that maps current_chain on to next_n...
void set_font_colour(float red, float green, float blue)
set the colour of the atom label font - the arguments are in the range 0-&gt;1
void set_baton_mode(short int i)
toggle so that mouse movement moves the baton not rotates the view.
PyObject * calculate_maps_and_stats_py(int imol_model, int imol_map_with_data_attached, int imol_map_2fofc, int imol_map_fofc)
Calculate structure factors and make a 2FoFC map and a Fo-Fc map updating the given molecule numbers ...
int set_unit_cell_and_space_group_using_molecule(int imol, int imol_from)
set the unit cell for a given model molecule using the cell of moecule imol_from
void copy_from_ncs_master_to_others(int imol, const char *chain_id)
Copy chain from master to all related NCS chains.
void set_default_bond_thickness(int t)
set the default thickness for bonds (e.g. in ~/.coot)
void set_iso_level_increment(float val)
set the contour scroll step (in absolute e/A3) for 2Fo-Fc-style maps to val
void clear_pending_picks()
clear pending picks (stop coot thinking that the user is about to pick an atom).
void set_find_ligand_here_cluster(int state)
Allow the user a scripting means to find ligand at the rotation centre.
PyObject * pucker_info_py(int imol, PyObject *residue_spec, int do_pukka_pucker_check)
return False if residue not found, otherwise [[phosphate_distance, puckered_atom, out_of_plane_distan...
void set_show_unit_cell(int imol, short int istate)
set the state of show unit cell for the particular molecule number imol
void set_edit_chi_angles_dialog_position(int x_pos, int y_pos)
set edit chi angles dialog position
void add_refmac_extra_restraints(int imol, const char *file_name)
void set_raster3d_bond_thickness(float f)
set the bond thickness for the Raster3D representation
int atom_spec_to_atom_index(int mol, char *chain, int resno, char *atom_name)
what is the atom index of the given atom?
void set_draw_cis_peptide_markups(int status)
set status of drawing cis-peptide markups
void turn_off_backup(int imol)
turn off backups for molecule number imol
void sharpen(int imol, float b_factor)
Sharpen map imol by b_factor (note (of course) that positive numbers blur the map).
void run_state_file_maybe()
run the state file depending on the state variables
void scale_zoom(float f)
scale the view by f
void set_write_conect_record_state(int state)
set the flag to write (or not) conect records to the PDB file.
void set_go_to_ligand_n_atoms_limit(int n_atom_min)
go to the ligand that has more than n_atom_min atoms
void set_font_size(int i)
set the font size
void set_ligand_search_protein_molecule(int imol)
set the protein molecule for ligand searching
void set_symmetry_colour_by_symop(int imol, int state)
set symmetry colour by symop mode
void set_browser_interface(const char *browser)
set command to open the web browser,
int clear_ball_and_stick(int imol)
clear ball and stick representation of molecule number imol
int accept_reject_dialog_docked_show_state()
what is the accept/reject dialog docked show state?
const char * molecule_name(int imol)
return the name of molecule number imol
int vt_surface_status()
return the mouse view status mode
int ideal_nucleic_acid(const char *RNA_or_DNA, const char *form, short int single_stranged_flag, const char *sequence)
create a molecule of idea nucleotides
int probe_available_p()
Can we run probe (was the executable variable set properly?) (predicate).
int make_updating_model_molecule(const char *filename)
make a model molecule from the give file name.
PyObject * get_pointer_position_frac_py()
return the [x,y] position of the pointer in fractional coordinates.
int prefer_python()
the python-prefered mode.
float get_map_weight()
return the relative weight of the geometric terms to the map terms.
int mtz_file_has_phases_p(const char *mtz_file_name)
does the mtz file have phases?
void set_rotation_centre(float x, float y, float z)
set the rotation centre
void set_contour_by_sigma_step_by_mol(float f, short int state, int imol)
set the contour level step
float get_limit_aniso()
get the aniso radius limit
float get_contour_level_in_sigma(int imol)
get the contour level in rmd above 0.
void set_residue_density_fit_scale_factor(float f)
set the scale factor for the Residue Density fit analysis
int additional_representation_by_attributes(int imol, const char *chain_id, int resno_start, int resno_end, const char *ins_code, int representation_type, int bonds_box_type, float bond_width, int draw_hydrogens_flag)
return the index of the additional representation.
void rigid_body_refine_zone(int reso_start, int resno_end, const char *chain_id, int imol)
setup rigid body refine zone
void pepflip(int imol, const char *chain_id, int resno, const char *inscode, const char *altconf)
pepflip the given residue
void save_views(const char *view_file_name)
save views to view_file_name
void set_graphics_window_position(int x_pos, int y_pos)
set the graphics window position
void handle_read_draw_probe_dots_unformatted(const char *dots_file, int imol, int show_clash_gui_flag)
pass a filename that contains molprobity&#39;s probe output in unformatted format
short int use_graphics_interface_state()
shall we start up the Gtk and the graphics window?
void set_ramachandran_psi_axis_mode(int mode)
set the psi axis for the ramachandran plot. Default (0) from -180 to 180. Alternative (1) from -120 t...
void set_rotamer_check_clashes(int i)
set a flag: 0 is off, 1 is on
void set_do_probe_dots_post_refine(short int state)
shall we run molprobity after a refinement has happened?
void baton_tip_previous()
move the baton tip to the previous position
void remove_dictionary_glob_extension(const char *ext)
remove an extension to be treated as geometry dictionary files
PyObject * symmetry_operators_py(int imol)
return a list of symmetry operators as strings - or Python False if that is not possible.
void change_contour_level(short int is_increment)
change the contour level of the current map by a step
void set_sequence_view_is_docked(short int state)
control where the sequence view is displayed
void set_colour_map_rotation_for_map(float f)
set the colour map rotation (hue change) for maps
void display_maps_scm(SCM maps_list)
maps_list is a list of integers (map molecule numbers).
void set_colour_by_chain(int imol)
colour molecule number imol by chain type
void set_raster3d_font_size(const char *size_in)
set the font size (as a string) for raster3d
void generate_self_restraints(int imol, float local_dist_max)
generate external distance all-molecule self restraints
void lsq_improve(int imol_ref, const char *ref_selection, int imol_moving, const char *moving_selection, int n_res, float dist_crit)
an slightly-modified implementation of the &quot;lsq_improve&quot; algorithm of Kleywegt and Jones (1997)...
int has_unit_cell_state(int imol)
molecule number imol has a unit cell?
void add_map_glob_extension(const char *ext)
add an extension to be treated as geometry map files
void coot_save_state_and_exit(int retval, int save_state_flag)
exit coot, write a state file
void set_use_variable_bond_thickness(short int state)
allow lines that are further away to be thinner
void handle_online_coot_search_request(const char *entry_text)
the search interface
int mask_map_by_atom_selection(int map_mol_no, int coords_mol_no, const char *mmdb_atom_selection, short int invert_flag)
mask map by atom selection
int add_view_here(const char *view_name)
return the view number
void delete_residue_sidechain(int imol, const char *chain_id, int resno, const char *ins_code, short int do_delete_dialog)
delete all atoms in residue that are not main chain or CB
void multi_residue_torsion_scm(int imol, SCM residues_specs_scm)
create a multi-residue torsion dialog (user manipulation of torsions)
void set_ramachandran_plot_contour_levels(float level_prefered, float level_allowed)
set the contour levels for the ramachandran plot, default values are 0.02 (prefered) 0...
void set_refinement_refine_per_frame(int istate)
allow refinement of intermediate atoms after dragging, before displaying (default: 0...
void set_bond_thickness_intermediate_atoms(float t)
set the thickness of the bonds of the intermediate atoms to t pixels
void set_symmetry_whole_chain(int imol, int state)
set symmetry colour for the chain
void set_colour_map_rotation_on_read_pdb_c_only_flag(short int i)
shall the colour map rotation apply only to C atoms?
int go_to_atom_molecule_number()
the go-to-atom molecule number
void set_auto_read_column_labels(const char *fwt, const char *phwt, int is_for_diff_map_flag)
set the expected MTZ columns for Auto-reading MTZ file.
int renumber_residue_range(int imol, const char *chain_id, int start_res, int last_res, int offset)
renumber the given residue range by offset residues
int replace_residues_from_mol_scm(int imol_target, int imol_ref, SCM residue_specs_list_ref_scm)
replace the given residues from the reference molecule to the target molecule
void set_console_display_commands_hilights(short int bold_flag, short int colour_flag, int colour_index)
set a flag to show the text command equivalent of gui commands in the console as they happen in bold ...
void graphics_to_occupancy_representation(int imol)
draw molecule number imol coloured by occupancy
void clear_all_views()
Clear the view list.
void set_ligand_acceptable_fit_fraction(float f)
set the fraction of atoms which must be in positive density after a ligand fit
void set_draw_ncs_ghosts(int imol, int istate)
set drawing state of NCS ghosts for molecule number imol
SCM view_name(int view_number)
return the name of the given view, if view_number does not specify a view return scheme value False ...
void ncs_update_ghosts(int imol)
update ghosts for molecule number imol
int handle_read_draw_molecule_and_move_molecule_here(const char *filename)
read coordinates from filename and recentre the new molecule at the screen rotation centre...
int svn_revision()
an alias to git_revision_count() for backwards compatibility
SCM ccp4i_projects_scm()
return a list of pairs of strings, the project names and the directory. Include aliases.
int het_group_n_atoms(const char *comp_id)
return the number of non-hydrogen atoms in the given het-group (comp-id).
void post_scripting_window()
do nothing - compatibility function
void set_diff_map_iso_level_increment_from_text(const char *text, int imol)
set the difference maps iso-map level increment
void set_scrollable_map(int imol)
return the molecule number to which the mouse scroll wheel is attached
int display_lists_for_maps_state()
return the state of display_lists_for_maps.
int first_coords_imol()
What is the molecule number of first coordinates molecule?
void set_refinement_drag_elasticity(float e)
the elasticity of the dragged atom in refinement mode.
SCM select_atom_under_pointer_scm()
return scheme false or a list of molecule number and an atom spec
SCM cis_peptides(int imol)
return cis_peptide info for imol.
void set_aniso_probability(float f)
set aniso probability
void set_add_ccp4i_projects_to_file_dialogs(short int state)
allow the user to not add ccp4i directories to the file choosers
int smooth_scroll_do_zoom()
return the state of the above system
void save_state()
save the current state to the default filename
float density_at_point(int imol_map, float x, float y, float z)
return the density at the given point for the given map. Return 0 for bad imol
void allow_duplicate_sequence_numbers()
enable reading PDB/pdbx files with duplicate sequence numbers
void do_smiles_gui()
display the SMILES string dialog
SCM rotamer_graphs(int imol)
Activate rotamer graph analysis for molecule number imol.
void set_control_key_for_rotate(int state)
Alternate mode for rotation.
int suck_model_fit_dialog()
reparent the Model/Fit/Refine dialog so that it becomes part of the main window, next to the GL graph...
void set_draw_crosshairs(short int i)
draw the distance crosshairs, 0 for off, 1 for on.
void gln_asn_b_factor_outliers(int imol)
Make a gui for GLN adn ASN B-factor outiers, compairing the O and N temperatur factors difference to ...
int auto_read_do_difference_map_too_state()
return the flag to do a difference map (too) on auto-read MTZ
int use_only_extra_torsion_restraints_for_torsions_state()
return only-use-extra-torsion-restraints-for-torsions state
void do_sequence_view(int imol)
display the sequence view dialog for molecule number imol
void assign_fasta_sequence(int imol, const char *chain_id_in, const char *seq)
Assign a FASTA sequence to a given chain in the molecule.
float refine_ramachandran_restraints_weight()
void set_socket_python_string_waiting(const char *s)
feed the main thread a python script to evaluate
void set_map_sampling_rate_text(const char *text)
sampling rate
void restore_previous_map_colour(int imol)
restore previous colour map for molecule number imol
float get_diff_map_iso_level_increment()
return difference maps iso-map level increment
void delete_chain(int imol, const char *chain_id)
delete the chain
int get_reset_b_factor_moved_atoms_state()
return the state if temperature factors shoudl be reset for moved atoms
void sort_chains(int imol)
sort the chain ids of the imol-th molecule in lexographical order
int apply_undo()
apply undo - the &quot;Undo&quot; button callback
void info_dialog_and_text(const char *txt)
create a dialog with information and print to console
void set_raster3d_shadows_enabled(int state)
turn off shadows for raster3d output - give argument 0 to turn off
int write_pdb_file(int imol, const char *file_name)
write molecule number imol as a PDB to file file_name
void set_refmac_counter(int imol, int refmac_count)
set counter for runs of refmac so that this can be used to construct a unique filename for new output...
std::string mtz_file_name(int imol)
presumes that imol_Refinement_Map has been set
float fit_chain_to_map_by_random_jiggle_and_blur(int imol, const char *chain_id, int n_trials, float jiggle_scale_factor, float map_blur_factor)
jiggle fit the chain to the current refinment map
void graphics_to_bonds_representation(int mol)
draw molecule number imol with normal bonds
void set_draw_zero_occ_markers(int status)
set status of drawing zero occupancy markers.
void place_strand_here_dialog()
show the strand placement gui.
void graphics_to_b_factor_representation(int imol)
draw molecule number imol coloured by B-factor
void show_modelling_toolbar()
show the vertical modelling toolbar in the GTK2 version (the toolbar is shown by default) ...
short int get_show_limit_aniso()
get show the aniso limit
int n_symops(int imol)
return the number of symmetry operators for the given molecule
void delete_extra_restraints_for_residue(int imol, const char *chain_id, int res_no, const char *ins_code)
clear out all the extra/user-defined restraints for this residue in molecule number imol ...
int make_and_draw_map_with_refmac_params(const char *mtz_file_name, const char *a, const char *b, const char *weight, int use_weights, int is_diff_map, short int have_refmac_params, const char *fobs_col, const char *sigfobs_col, const char *r_free_col, short int sensible_f_free_col)
as the above function, execpt set refmac parameters too
int get_ccp4srs_monomer_and_dictionary(const char *comp_id)
return the new molecule number of the monomer.
void fle_view_set_h_bond_dist_max(float h_bond_dist_max)
set the maximum considered hydrogen bond distance
void read_phs_and_coords_and_make_map(const char *pdb_filename)
read phs file use coords to get cell and symm to make map
void delete_residue_range(int imol, const char *chain_id, int resno_start, int end_resno)
delete residue range
void set_show_graphics_ligand_view(int state)
set the graphics ligand view state
void superpose_with_chain_selection(int imol1, int imol2, const char *chain_imol1, const char *chain_imol2, int chain_used_flag_imol1, int chain_used_flag_imol2, short int move_imol2_copy_flag)
chain-based interface to superposition.
int show_paths_in_display_manager_state()
return the internal state
void delete_atom(int imol, const char *chain_id, int resno, const char *ins_code, const char *at_name, const char *altloc)
delete atom in residue
void add_ligand_search_wiggly_ligand_molecule(int imol_ligand)
add a flexible ligand molecule to the list of ligands to search for in ligand searching ...
float fit_chain_to_map_by_random_jiggle(int imol, const char *chain_id, int n_trials, float jiggle_scale_factor)
jiggle fit the chain to the current refinment map. return &lt; -100 if not possible, else return the new...
void set_stop_scroll_iso_map(int i)
create a lower limit to the &quot;2Fo-Fc-style&quot; map contour level changing
double add_geometry_distance(int imol_1, float x_1, float y_1, float z_1, int imol_2, float x_2, float y_2, float z_2)
Add a geometry distance between points in a given molecule.
int additional_representation_by_string(int imol, const char *atom_selection, int representation_type, int bonds_box_type, float bond_width, int draw_hydrogens_flag)
return the index of the additional representation. Return -1 on error
PyObject * origin_pre_shift_py(int imol)
return the pre-shift (the shift that translates the centre of the molecule as close as possible to th...
void graphics_to_ca_representation(int imol)
draw molecule number imol as CAs
void graphics_draw()
draw a frame
void set_show_environment_distances_h_bonds(int state)
show H-bond environment distances. If state is 0, bump distances are turned off, otherwise H-bond dis...
void set_refine_hydrogen_bonds(int state)
add or remove auto H-bond restraints
int get_smooth_scroll()
return the smooth scrolling state
void screendump_image(const char *filename)
dump the current screen image to a file. Format ppm
void fleur_cursor()
fleur cursor
PyObject * add_dipole_for_residues_py(int imol, PyObject *residue_specs)
add a dipole given a set of residues. Return a dipole description.
void ncs_control_change_ncs_master_to_chain(int imol, int ichain)
change the NCS master chain (by number)
void set_keep_map_colour_after_refmac(int istate)
flag to enable above
PyObject * add_target_position_restraint_for_intermediate_atom_py(PyObject *atom_spec, PyObject *position)
add a target position for an intermediate atom and refine
void quanta_like_zoom()
quanta-like zoom buttons
int make_masked_maps_split_by_chain(int imol, int imol_map)
make chain masked maps
int skeletonize_map(int imol, short int prune_flag)
skeletonize molecule number imol
void set_default_initial_contour_level_for_difference_map(float n_sigma)
set the default inital contour for FoFc-style map
void delete_checked_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)
Delete waters that are fail to meet the given criteria.
const char * mtz_hklin_for_map(int imol_map)
return the mtz file that was use to generate the map
void swap_map_colours(int imol1, int imol2)
swap the colours of maps
PyObject * ccp4i_projects_py()
return a list of pairs of strings, the project names and the directory. Include aliases.
SCM alignment_mismatches_scm(int imol)
do a internal alignment of all the assigned sequences, return a list of mismatches that need to be ma...
SCM ncs_master_chains_scm(int imol)
Copy residue range to selected NCS chains.
int make_and_draw_map_with_reso_with_refmac_params(const char *mtz_file_name, const char *a, const char *b, const char *weight, int use_weights, int is_diff_map, short int have_refmac_params, const char *fobs_col, const char *sigfobs_col, const char *r_free_col, short int sensible_f_free_col, short int is_anomalous, short int use_reso_limits, float low_reso_limit, float high_reso_lim)
as the above function, except set expert options too.
int new_molecule_by_residue_type_selection(int imol, const char *residue_type)
create a new molecule that consists of only the residue of type residue_type in molecule number imol ...
void unset_sticky_sort_by_date()
do not sort files in the file selection by date?
int mask_map_by_molecule(int map_mol_no, int coord_mol_no, short int invert_flag)
generate a new map that has been masked by some coordinates
void set_show_strict_ncs(int imol, int state)
set display state of NCS ghost molecules for molecule number imol
void set_clipping_front(float v)
set clipping plane front
float score_residue_range_fit_to_map(int res1, int res2, char *altloc, char *chain_id, int imol, int imol_for_map)
simply score the residue range fit to map
int export_map_fragment(int imol, float x, float y, float z, float radius, const char *filename)
export a fragment of the map about (x,y,z)
void clear_dots(int imol, int dots_handle)
clear dots in imol with dots_handle
int graphics_molecule_bond_type(int imol)
what is the bond drawing state of molecule number imol
void rotate_x_scene(int nsteps, float stepsize)
rotate view round x axis stepsize degrees for nstep such steps
PyObject * ncs_chain_ids_py(int imol)
Return the ncs chains id for the given molecule.
float data_resolution(int imol)
return the resolution of the data for molecule number imol. Return negative number on error...
SCM chain_id_scm(int imol, int ichain)
the chain_id (string) of the ichain-th chain molecule number imol
int graphics_n_molecules()
return the number of molecules (coordinates molecules and map molecules combined) that are currently ...
void translate_molecule_by(int imol, float x, float y, float z)
translate molecule number imol by (x,y,z) in Angstroms
int show_strict_ncs_state(int imol)
return the state of NCS ghost molecules for molecule number imol
SCM pucker_info_scm(int imol, SCM residue_spec, int do_pukka_pucker_check)
get the pucker info for the specified residue
int watson_crick_pair(int imol, const char *chain_id, int resno)
Return a molecule that contains a residue that is the WC pair partner of the clicked/picked/selected ...
int add_action_view(const char *view_name, const char *action_function)
add a view (not add to an existing view) that does something (e.g. displays or undisplays a molecule)...
void delete_residue(int imol, const char *chain_id, int resno, const char *inscode)
delete residue
PyObject * view_name_py(int view_number)
return the name of the given view, if view_number does not specify a view return Python value False ...
void output_atom_info_as_text(int imol, const char *chain_id, int resno, const char *ins_code, const char *atname, const char *altconf)
output to the terminal the Atom Info for the give atom specs
int write_residue_range_to_pdb_file(int imol, const char *chainid, int resno_start, int resno_end, const char *filename)
write molecule number imol&#39;s residue range as a PDB to file file_name
PyObject * cell_py(int imol)
return the parameter that made the map,
float standard_deviation_temperature_factor(int imol)
return the standard deviation of the atom temperature factors for imol
float zoom_factor()
return the current zoom factor
int laplacian(int imol)
Create the &quot;Laplacian&quot; (-ve second derivative) of the given map.