Coot Scripting Interface  7000
Functions
c-interface.h File Reference

Coot Scripting Interface - General. More...

Go to the source code of this file.

Functions

SCM merge_molecules (SCM add_molecules, int imol)
 merge molecules More...
 
SCM cis_peptides (int imol)
 return cis_peptide info for imol. More...
 
PyObject * cis_peptides_py (int imol)
 return cis_peptide info for imol. More...
 
int cis_trans_convert_intermediate_atoms ()
 cis-trans convert the active residue of the active atom in the inermediate atoms, and continue with the refinement
 
int make_and_draw_patterson (const char *mtz_file_name, const char *f_col, const char *sigf_col)
 Make a patterson molecule. More...
 
int make_and_draw_patterson_using_intensities (const char *mtz_file_name, const char *i_col, const char *sigi_col)
 Make a patterson molecule. More...
 
void load_tutorial_model_and_data ()
 load tutorial model and data
 
Startup Functions
void set_prefer_python ()
 tell coot that you prefer to run python scripts if/when there is an option to do so.
 
int prefer_python ()
 the python-prefered mode. More...
 
File System Functions
int make_directory_maybe (const char *dir)
 make a directory dir (if it doesn't exist) and return error code More...
 
void set_show_paths_in_display_manager (int i)
 Show Paths in Display Manager? More...
 
int show_paths_in_display_manager_state ()
 return the internal state More...
 
void add_coordinates_glob_extension (const char *ext)
 add an extension to be treated as coordinate files
 
void add_data_glob_extension (const char *ext)
 add an extension to be treated as data (reflection) files
 
void add_dictionary_glob_extension (const char *ext)
 add an extension to be treated as geometry dictionary files
 
void add_map_glob_extension (const char *ext)
 add an extension to be treated as geometry map files
 
void remove_coordinates_glob_extension (const char *ext)
 remove an extension to be treated as coordinate files
 
void remove_data_glob_extension (const char *ext)
 remove an extension to be treated as data (reflection) files
 
void remove_dictionary_glob_extension (const char *ext)
 remove an extension to be treated as geometry dictionary files
 
void remove_map_glob_extension (const char *ext)
 remove an extension to be treated as geometry map files
 
void set_sticky_sort_by_date ()
 sort files in the file selection by date? More...
 
void unset_sticky_sort_by_date ()
 do not sort files in the file selection by date? More...
 
void set_filter_fileselection_filenames (int istate)
 on opening a file selection dialog, pre-filter the files. More...
 
int filter_fileselection_filenames_state ()
 , return the state of the above variable
 
short int file_type_coords (const char *file_name)
 is the given file name suitable to be read as coordinates?
 
void open_coords_dialog ()
 display the open coordinates dialog
 
void set_file_chooser_selector (int istate)
 this flag set chooser as default for windows, otherwise use selector 0 is selector 1 is chooser
 
int file_chooser_selector_state ()
 
void set_file_chooser_overwrite (int istate)
 
int file_chooser_overwrite_state ()
 
void export_map_gui (short int export_map_fragment)
 
Widget Utilities
void set_main_window_title (const char *s)
 set the main window title. More...
 
void set_show_modelling_toolbar (short int state)
 
MTZ and data handling utilities
void manage_column_selector (const char *filename)
 given a filename, try to read it as a data file More...
 
Molecule Info Functions
int chain_n_residues (const char *chain_id, int imol)
 the number of residues in chain chain_id and molecule number imol More...
 
float molecule_centre_internal (int imol, int iaxis)
 internal function for molecule centre More...
 
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 More...
 
char * insertion_code_from_serial_number (int imol, const char *chain_id, int serial_num)
 the insertion code of the residue. More...
 
PyObject * python_representation_kk (int imol)
 
SCM chain_id_scm (int imol, int ichain)
 the chain_id (string) of the ichain-th chain molecule number imol More...
 
PyObject * chain_id_py (int imol, int ichain)
 
int n_models (int imol)
 return the number of models in molecule number imol More...
 
int n_chains (int imol)
 number of chains in molecule number imol More...
 
int is_solvent_chain_p (int imol, const char *chain_id)
 is this a solvent chain? [Raw function] More...
 
int is_protein_chain_p (int imol, const char *chain_id)
 is this a protein chain? [Raw function] More...
 
int is_nucleotide_chain_p (int imol, const char *chain_id)
 is this a nucleic acid chain? [Raw function] More...
 
int n_residues (int imol)
 return the number of residues in the molecule, More...
 
int n_atoms (int imol)
 return the atoms of residues in the molecule, More...
 
SCM remarks_scm (int imol)
 return a list of the remarks of hte molecule number imol
 
SCM residue_centre_scm (int imol, const char *chain_id, int resno, const char *ins_code)
 
PyObject * remarks_py (int imol)
 
PyObject * residue_centre_py (int imol, const char *chain_id, int resno, const char *ins_code)
 
SCM model_composition_statistics_scm (int imol)
 
PyObject * model_composition_statistics_py (int imol)
 
void sort_chains (int imol)
 sort the chain ids of the imol-th molecule in lexographical order
 
void sort_residues (int imol)
 sort the residues of the imol-th molecule
 
void remarks_dialog (int imol)
 a gui dialog showing remarks header info (for a model molecule).
 
void print_header_secondary_structure_info (int imol)
 simply print secondary structure info to the terminal/console. In future, this could/should return the info.
 
void add_header_secondary_structure_info (int imol)
 add secondary structure info to the internal representation of the model
 
void write_header_secondary_structure_info (int imol, const char *file_name)
 
int copy_molecule (int imol)
 copy molecule imol More...
 
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. More...
 
int exchange_chain_ids_for_seg_ids (int imol)
 Experimental interface for Ribosome People. More...
 
void show_remarks_browswer ()
 show the remarks browser
 
Library and Utility Functions
SCM coot_sys_build_type_scm ()
 
PyObject * coot_sys_build_type_py ()
 
int git_revision_count ()
 return the git revision count for for this build.
 
int svn_revision ()
 an alias to git_revision_count() for backwards compatibility
 
const char * molecule_name (int imol)
 return the name of molecule number imol More...
 
SCM molecule_name_stub_scm (int imol, int include_path_flag)
 return the molecule name without file extension
 
PyObject * molecule_name_stub_py (int imol, int include_path_flag)
 return the molecule name without file extension
 
void set_molecule_name (int imol, const char *new_name)
 set the molecule name of the imol-th molecule
 
gboolean coot_checked_exit (int retval)
 
void coot_real_exit (int retval)
 exit from coot, give return value retval back to invoking process.
 
void coot_no_state_real_exit (int retval)
 exit without writing a state file
 
void coot_clear_backup_or_real_exit (int retval)
 exit coot doing clear-backup maybe
 
void coot_save_state_and_exit (int retval, int save_state_flag)
 exit coot, write a state file
 
void run_clear_backups (int retval)
 run clear-backups
 
void run_clear_backups_py (int retval)
 
int first_coords_imol ()
 What is the molecule number of first coordinates molecule? More...
 
int first_small_coords_imol ()
 molecule number of first small (<400 atoms) molecule. More...
 
int first_unsaved_coords_imol ()
 What is the molecule number of first unsaved coordinates molecule? More...
 
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. More...
 
Graphics Utility Functions
void set_do_anti_aliasing (int state)
 set the bond lines to be antialiased
 
int do_anti_aliasing_state ()
 return the flag for antialiasing the bond lines
 
void set_do_GL_lighting (int state)
 turn the GL lighting on (state = 1) or off (state = 0) More...
 
int do_GL_lighting_state ()
 return the flag for GL lighting
 
short int use_graphics_interface_state ()
 shall we start up the Gtk and the graphics window? More...
 
short int python_at_prompt_at_startup_state ()
 is the python interpreter at the prompt? More...
 
void start_graphics_interface ()
 start Gtk (and graphics) More...
 
int reset_view ()
 "Reset" the view More...
 
int graphics_n_molecules ()
 return the number of molecules (coordinates molecules and map molecules combined) that are currently in coot More...
 
int molecule_has_hydrogens_raw (int imol)
 
int own_molecule_number (int imol)
 
void toggle_idle_spin_function ()
 Spin spin spin (or not)
 
void toggle_idle_rock_function ()
 Rock (not roll) (self-timed)
 
double get_idle_function_rock_target_angle ()
 
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)
 
void set_idle_function_rotate_angle (float f)
 how far should we rotate when (auto) spinning? Fast computer? set this to 0.1
 
float idle_function_rotate_angle ()
 what is the idle function rotation angle?
 
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)
 
int make_updating_model_molecule (const char *filename)
 make a model molecule from the give file name. More...
 
void allow_duplicate_sequence_numbers ()
 enable reading PDB/pdbx files with duplicate sequence numbers
 
void set_convert_to_v2_atom_names (short int state)
 shall we convert nucleotides to match the old dictionary names? More...
 
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. More...
 
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 read_pdb (const char *filename)
 read coordinates from filename
 
int assign_hetatms (int imol)
 some programs produce PDB files with ATOMs where there should be HETATMs. This is a function to assign HETATMs as per the PDB definition.
 
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. More...
 
int residue_has_hetatms (int imol, const char *chain_id, int resno, const char *ins_code)
 residue has HETATMs? More...
 
SCM het_group_residues_scm (int imol)
 
  • get the specs for hetgroups - waters are not counted as het-groups.

 
PyObject * het_group_residues_py (int imol)
 
  • get the specs for hetgroups - waters are not counted as het-groups.

 
int het_group_n_atoms (const char *comp_id)
 return the number of non-hydrogen atoms in the given het-group (comp-id). More...
 
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
 
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 More...
 
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
 
int replace_residues_from_mol_py (int imol_target, int imol_ref, PyObject *residue_specs_list_ref_py)
 
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
 
void screendump_image (const char *filename)
 dump the current screen image to a file. Format ppm More...
 
void check_for_dark_blue_density ()
 give a warning dialog if density it too dark (blue)
 
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 set_draw_map_standard_lines (int imol, short int state)
 toggle for standard lines representation of map. More...
 
void set_solid_density_surface_opacity (int imol, float opacity)
 set the opacity of density surface representation of the given map. More...
 
float get_solid_density_surface_opacity (int imol)
 
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. More...
 
Interface Preferences
void set_scroll_by_wheel_mouse (int istate)
 Some people (like Phil Evans) don't want to scroll their map with the mouse-wheel. More...
 
int scroll_by_wheel_mouse_state ()
 return the internal state of the scroll-wheel map contouring
 
void set_auto_recontour_map (int state)
 turn off (0) or on (1) auto recontouring (on screen centre change) (default it on)
 
int get_auto_recontour_map ()
 return the auto-recontour state
 
void set_default_initial_contour_level_for_map (float n_sigma)
 set the default inital contour for 2FoFc-style map More...
 
void set_default_initial_contour_level_for_difference_map (float n_sigma)
 set the default inital contour for FoFc-style map More...
 
void print_view_matrix ()
 print the view matrix to the console, useful for molscript, perhaps
 
float get_view_matrix_element (int row, int col)
 
float get_view_quaternion_internal (int element)
 internal function to get an element of the view quaternion. The whole quaternion is returned by the scheme function view-quaternion
 
void set_view_quaternion (float i, float j, float k, float l)
 Set the view quaternion.
 
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_ncs_chain, so that the relative view is preserved. For NCS skipping.
 
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 set_fps_flag (int t)
 set show frame-per-second flag
 
int get_fps_flag ()
 set the state of show frames-per-second flag
 
void set_show_origin_marker (int istate)
 set a flag: is the origin marker to be shown? 1 for yes, 0 for no.
 
int show_origin_marker_state ()
 return the origin marker shown? state
 
void hide_modelling_toolbar ()
 hide the vertical modelling toolbar in the GTK2 version
 
void show_modelling_toolbar ()
 show the vertical modelling toolbar in the GTK2 version (the toolbar is shown by default)
 
void hide_main_toolbar ()
 hide the horizontal main toolbar in the GTK2 version
 
void show_main_toolbar ()
 show the horizontal main toolbar in the GTK2 version (the toolbar is shown by default)
 
void show_model_toolbar_all_icons ()
 show all available icons in the modelling toolbar (same as MFR dialog)
 
void show_model_toolbar_main_icons ()
 show only a selection of icons in the modelling toolbar
 
void reattach_modelling_toolbar ()
 reattach the modelling toolbar to the last attached position
 
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, 3 is bottom
 
int suck_model_fit_dialog ()
 reparent the Model/Fit/Refine dialog so that it becomes part of the main window, next to the GL graphics context
 
int suck_model_fit_dialog_bl ()
 
void add_status_bar_text (const char *s)
 Put text s into the status bar. More...
 
void set_model_fit_refine_dialog_stays_on_top (int istate)
 model-fit-refine dialog stays on top
 
int model_fit_refine_dialog_stays_on_top_state ()
 return the state model-fit-refine dialog stays on top
 
void set_accept_reject_dialog_docked (int state)
 
int accept_reject_dialog_docked_state ()
 the accept/reject dialog docked state
 
void set_accept_reject_dialog_docked_show (int state)
 set the accept/reject dialog docked show state
 
int accept_reject_dialog_docked_show_state ()
 what is the accept/reject dialog docked show state?
 
void set_model_toolbar_style (int state)
 
int model_toolbar_style_state ()
 
void set_main_toolbar_style (int state)
 
int main_toolbar_style_state ()
 
Mouse Buttons
void quanta_buttons ()
 quanta-like buttons More...
 
void quanta_like_zoom ()
 quanta-like zoom buttons More...
 
void set_control_key_for_rotate (int state)
 Alternate mode for rotation. More...
 
int control_key_for_rotate_state ()
 return the control key rotate state
 
int blob_under_pointer_to_screen_centre ()
 Put the blob under the cursor to the screen centre. Check only positive blobs. Useful function if bound to a key. More...
 
SCM select_atom_under_pointer_scm ()
 return scheme false or a list of molecule number and an atom spec
 
PyObject * select_atom_under_pointer_py ()
 return Python false or a list of molecule number and an atom spec
 
Cursor Function
void normal_cursor ()
 normal cursor
 
void fleur_cursor ()
 fleur cursor
 
void pick_cursor_maybe ()
 pick cursor maybe
 
void rotate_cursor ()
 rotate cursor
 
void set_pick_cursor_index (int icursor_index)
 let the user have a different pick cursor More...
 
Model/Fit/Refine Functions
void post_model_fit_refine_dialog ()
 display the Model/Fit/Refine dialog
 
void unset_model_fit_refine_dialog ()
 unset model/fit/refine dialog
 
void unset_refine_params_dialog ()
 unset refine params dialog
 
void show_select_map_dialog ()
 display the Display Manager dialog
 
void set_model_fit_refine_rotate_translate_zone_label (const char *txt)
 Allow the changing of Model/Fit/Refine button label from "Rotate/Translate Zone".
 
void set_model_fit_refine_place_atom_at_pointer_label (const char *txt)
 Allow the changing of Model/Fit/Refine button label from "Place Atom at Pointer".
 
void post_other_modelling_tools_dialog ()
 display the Other Modelling Tools dialog
 
void set_refinement_move_atoms_with_zero_occupancy (int state)
 shall atoms with zero occupancy be moved when refining? (default 1, yes)
 
int refinement_move_atoms_with_zero_occupancy_state ()
 return the state of "shall atoms with zero occupancy be moved when refining?"
 
Backup Functions
void make_backup (int imol)
 make backup for molecule number imol
 
void turn_off_backup (int imol)
 turn off backups for molecule number imol
 
void turn_on_backup (int imol)
 turn on backups for molecule number imol
 
int backup_state (int imol)
 return the backup state for molecule number imol More...
 
int apply_undo ()
 apply undo - the "Undo" button callback
 
int apply_redo ()
 apply redo - the "Redo" button callback
 
void set_have_unsaved_changes (int imol)
 set the molecule number imol to be marked as having unsaved changes
 
int have_unsaved_changes_p (int imol)
 does molecule number imol have unsaved changes? More...
 
void set_undo_molecule (int imol)
 set the molecule to which undo operations are done to molecule number imol
 
void show_set_undo_molecule_chooser ()
 show the Undo Molecule chooser - i.e. choose the molecule to which the "Undo" button applies.
 
void set_unpathed_backup_file_names (int state)
 set the state for adding paths to backup file names More...
 
int unpathed_backup_file_names_state ()
 return the state for adding paths to backup file names
 
void set_decoloned_backup_file_names (int state)
 set the state for adding paths to backup file names More...
 
int decoloned_backup_file_names_state ()
 return the state for adding paths to backup file names
 
int backup_compress_files_state ()
 return the state for compression of backup files
 
void set_backup_compress_files (int state)
 set if backup files will be compressed or not using gzip
 
Recover Session Function
void recover_session ()
 recover session More...
 
Map Functions
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 "OK" button there, we call map_from_mtz_by_refmac_calc_phases()
 
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 automatically (first of their type) from the mtz file. More...
 
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. More...
 
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 for those maps - if thase molecule ids are not valid maps, them generate new maps (return the model number information in the returned object)
 
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 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 - but difference map gets updated automatically on modification of the imol_model molecule.
 
gdouble * get_map_colour (int imol)
 
SCM get_map_colour_scm (int imol)
 
PyObject * get_map_colour_py (int imol)
 
void set_scroll_wheel_map (int imap)
 set the map that is moved by changing the scroll wheel and change_contour_level().
 
void set_scrollable_map (int imol)
 return the molecule number to which the mouse scroll wheel is attached More...
 
int scroll_wheel_map ()
 the contouring of which map is altered when the scroll wheel changes?
 
void save_previous_map_colour (int imol)
 save previous colour map for molecule number imol
 
void restore_previous_map_colour (int imol)
 restore previous colour map for molecule number imol
 
void set_active_map_drag_flag (int t)
 set the state of immediate map upate on map drag. More...
 
short int get_active_map_drag_flag ()
 return the state of the dragged map flag
 
void set_last_map_colour (double f1, double f2, double f3)
 set the colour of the last (highest molecule number) map
 
void set_map_colour (int imol, float red, float green, float blue)
 set the colour of the imolth map
 
void set_contour_level_absolute (int imol_map, float level)
 set the contour level, direct control
 
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)
 
float get_contour_level_absolute (int imol)
 get the contour level
 
float get_contour_level_in_sigma (int imol)
 get the contour level in rmd above 0.
 
void set_last_map_sigma_step (float f)
 set the sigma step of the last map to f sigma
 
void set_contour_by_sigma_step_by_mol (float f, short int state, int imol)
 set the contour level step More...
 
float data_resolution (int imol)
 return the resolution of the data for molecule number imol. Return negative number on error, otherwise resolution in A (eg. 2.0)
 
float model_resolution (int imol)
 return the resolution set in the header of the model/coordinates file. If this number is not available, return a number less than 0.
 
int export_map (int imol, const char *filename)
 export (write to disk) the map of molecule number imol to filename. More...
 
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 export_map_fragment_with_text_radius (int imol, const char *radius_text, const char *filename)
 
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)
 
int export_map_fragment_to_plain_file (int imol, float x, float y, float z, float radius, const char *filename)
 tmp interface for Hamish
 
int transform_map_raw (int imol, double r00, double r01, double r02, double r10, double r11, double r12, double r20, double r21, double r22, double t0, double t1, double t2, double pt0, double pt1, double pt2, double box_half_size, const char *ref_space_group, double cell_a, double cell_b, double cell_c, double alpha, double beta, double gamma)
 
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 molecule number. Return -1 on failure.
 
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 reference_map_no. More...
 
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 the input map (a sampling factor of more than 1 makes the output maps smoother)
 
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-factor)) (the scale factors are typically 1.0 of course). 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.
 
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.
 
Density Increment
char * get_text_for_iso_level_increment_entry (int imol)
 
char * get_text_for_diff_map_iso_level_increment_entry (int imol)
 
void set_iso_level_increment (float val)
 set the contour scroll step (in absolute e/A3) for 2Fo-Fc-style maps to val More...
 
float get_iso_level_increment ()
 
void set_iso_level_increment_from_text (const char *text, int imol)
 
void set_diff_map_iso_level_increment (float val)
 set the contour scroll step for difference map (in absolute e/A3) to val More...
 
float get_diff_map_iso_level_increment ()
 return difference maps iso-map level increment
 
void set_diff_map_iso_level_increment_from_text (const char *text, int imol)
 set the difference maps iso-map level increment
 
void set_map_sampling_rate_text (const char *text)
 sampling rate More...
 
void set_map_sampling_rate (float r)
 set the map sampling rate (default 1.5) More...
 
char * get_text_for_map_sampling_rate_text ()
 
float get_map_sampling_rate ()
 return the map sampling rate
 
void change_contour_level (short int is_increment)
 change the contour level of the current map by a step More...
 
void set_last_map_contour_level (float level)
 set the contour level of the map with the highest molecule number to level
 
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 set_stop_scroll_diff_map (int i)
 create a lower limit to the "Fo-Fc-style" map contour level changing More...
 
void set_stop_scroll_iso_map (int i)
 create a lower limit to the "2Fo-Fc-style" map contour level changing More...
 
void set_stop_scroll_iso_map_level (float f)
 set the actual map level changing limit More...
 
void set_stop_scroll_diff_map_level (float f)
 set the actual difference map level changing limit More...
 
void set_residue_density_fit_scale_factor (float f)
 set the scale factor for the Residue Density fit analysis
 
Density Functions
void set_map_line_width (int w)
 draw the lines of the chickenwire density in width w
 
int map_line_width_state ()
 return the width in which density contours are drawn
 
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) More...
 
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 More...
 
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. More...
 
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. More...
 
void stop_updating_molecule (int imol)
 
SCM refmac_parameters_scm (int imol)
 
PyObject * refmac_parameters_py (int imol)
 
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?
 
int mtz_file_has_phases_p (const char *mtz_file_name)
 does the mtz file have phases?
 
int is_mtz_file_p (const char *filename)
 is the given filename an mtz file?
 
int cns_file_has_phases_p (const char *cns_file_name)
 does the given file have cns phases?
 
void wrapped_auto_read_make_and_draw_maps (const char *filename)
 
void set_auto_read_do_difference_map_too (int i)
 
int auto_read_do_difference_map_too_state ()
 return the flag to do a difference map (too) on auto-read MTZ More...
 
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. More...
 
char * get_text_for_density_size_widget ()
 
void set_density_size_from_widget (const char *text)
 
char * get_text_for_density_size_em_widget ()
 
void set_density_size_em_from_widget (const char *text)
 
void set_map_radius (float f)
 set the extent of the box/radius of electron density contours for x-ray maps
 
void set_map_radius_em (float radius)
 set the extent of the box/radius of electron density contours for EM map
 
void set_density_size (float f)
 another (old) way of setting the radius of the map
 
void set_map_radius_slider_max (float f)
 
void set_display_intro_string (const char *str)
 Give me this nice message str when I start coot.
 
float get_map_radius ()
 return the extent of the box/radius of electron density contours
 
void set_esoteric_depth_cue (int istate)
 not everone likes coot's esoteric depth cueing system More...
 
int esoteric_depth_cue_state ()
 native depth cueing system More...
 
void set_swap_difference_map_colours (int i)
 not everone likes coot's default difference map colouring. More...
 
int swap_difference_map_colours_state ()
 
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 More...
 
int map_is_difference_map (int imol)
 map is difference map?
 
int another_level ()
 Add another contour level for the last added map. More...
 
int another_level_from_map_molecule_number (int imap)
 Add another contour level for the given map. More...
 
float residue_density_fit_scale_factor ()
 return the scale factor for the Residue Density fit analysis
 
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
 
Parameters from map
const char * mtz_hklin_for_map (int imol_map)
 return the mtz file that was use to generate the map More...
 
const char * mtz_fp_for_map (int imol_map)
 return the FP column in the file that was use to generate the map More...
 
const char * mtz_phi_for_map (int imol_map)
 return the phases column in mtz file that was use to generate the map More...
 
const char * mtz_weight_for_map (int imol_map)
 return the weight column in the mtz file that was use to generate the map More...
 
short int mtz_use_weight_for_map (int imol_map)
 return flag for whether weights were used that was use to generate the map More...
 
SCM map_parameters_scm (int imol)
 return the parameter that made the map, More...
 
SCM cell_scm (int imol)
 return the parameter that made the map, More...
 
PyObject * map_parameters_py (int imol)
 return the parameter of the molecule, something like (45 46 47 90 90 120), angles in degress More...
 
PyObject * cell_py (int imol)
 return the parameter that made the map, More...
 
PDB Functions
int write_pdb_file (int imol, const char *file_name)
 write molecule number imol as a PDB to file file_name
 
int write_cif_file (int imol, const char *file_name)
 write molecule number imol as a mmCIF to file file_name
 
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's residue range as a PDB to file file_name
 
int write_chain_to_pdb_file (int imol, const char *chainid, const char *filename)
 
int quick_save ()
 save all modified coordinates molecules to the default names and save the state too.
 
int get_write_conect_record_state ()
 return the state of the write_conect_records_flag.
 
void set_write_conect_record_state (int state)
 set the flag to write (or not) conect records to the PDB file.
 
Info Dialog
void info_dialog (const char *txt)
 create a dialog with information More...
 
void info_dialog_and_text (const char *txt)
 create a dialog with information and print to console More...
 
void info_dialog_with_markup (const char *txt)
 as above, create a dialog with information More...
 
Refmac Functions
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
 
SCM get_refmac_sad_atom_info_scm ()
 
PyObject * get_refmac_sad_atom_info_py ()
 
void swap_map_colours (int imol1, int imol2)
 swap the colours of maps More...
 
void set_keep_map_colour_after_refmac (int istate)
 flag to enable above More...
 
int keep_map_colour_after_refmac_state ()
 the keep-map-colour-after-refmac internal state More...
 
int refmac_runs_with_nolabels (void)
 
Symmetry Functions
char * get_text_for_symmetry_size_widget ()
 
void set_symmetry_size_from_widget (const char *text)
 
void set_symmetry_size (float f)
 set the size of the displayed symmetry
 
double * get_symmetry_bonds_colour (int imol)
 
short int get_show_symmetry ()
 is symmetry master display control on?
 
void set_show_symmetry_master (short int state)
 set display symmetry, master controller
 
void set_show_symmetry_molecule (int mol_no, short int state)
 set display symmetry for molecule number mol_no More...
 
void symmetry_as_calphas (int mol_no, short int state)
 display symmetry as CAs? More...
 
short int get_symmetry_as_calphas_state (int imol)
 what is state of display CAs for molecule number mol_no? More...
 
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 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 imol? More...
 
void set_symmetry_colour_by_symop (int imol, int state)
 set symmetry colour by symop mode
 
void set_symmetry_whole_chain (int imol, int state)
 set symmetry colour for the chain
 
void set_symmetry_atom_labels_expanded (int state)
 set use expanded symmetry atom labels
 
int has_unit_cell_state (int imol)
 molecule number imol has a unit cell? More...
 
void add_symmetry_on_to_preferences_and_apply ()
 
int undo_symmetry_view ()
 Undo symmetry view. Translate back to main molecule from this symmetry position.
 
int first_molecule_with_symmetry_displayed ()
 return the molecule number. More...
 
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 More...
 
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. More...
 
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 the mmdb_atom_selection_string. More...
 
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.
 
int n_symops (int imol)
 return the number of symmetry operators for the given molecule More...
 
int move_reference_chain_to_symm_chain_position ()
 
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 the origin) as a list of ints or scheme false on failure
 
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 the origin) as a list of ints or Python false on failure
 
void setup_save_symmetry_coords ()
 
short int set_space_group (int imol, const char *spg)
 set the space group for a coordinates molecule More...
 
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 More...
 
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 More...
 
void set_symmetry_shift_search_size (int shift)
 set the cell shift search size for symmetry searching. More...
 
File Selection Functions
SCM save_coords_name_suggestion_scm (int imol)
 
PyObject * save_coords_name_suggestion_py (int imol)
 
History Functions
void print_all_history_in_scheme ()
 print the history in scheme format
 
void print_all_history_in_python ()
 print the history in python format
 
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. More...
 
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 and colours. More...
 
State Functions
void save_state ()
 save the current state to the default filename
 
void save_state_file (const char *filename)
 save the current state to file filename
 
void save_state_file_py (const char *filename)
 save the current state to file filename
 
void set_save_state_file_name (const char *filename)
 set the default state file name (default 0-coot.state.scm)
 
SCM save_state_file_name_scm ()
 the save state file name More...
 
PyObject * save_state_file_name_py ()
 the save state file name More...
 
const char * save_state_file_name_raw ()
 
void set_run_state_file_status (short int istat)
 set run state file status More...
 
void run_state_file ()
 run the state file (reading from default filenname)
 
void run_state_file_py ()
 
void run_state_file_maybe ()
 run the state file depending on the state variables
 
The Virtual Trackball
void vt_surface (int mode)
 How should the mouse move the view? More...
 
int vt_surface_status ()
 return the mouse view status mode More...
 
Clipping Functions
void set_clipping_back (float v)
 set clipping plane back
 
void set_clipping_front (float v)
 set clipping plane front
 
Unit Cell interface
short int get_show_unit_cell (int imol)
 return the stage of show unit cell for molecule number imol
 
void set_show_unit_cells_all (short int istate)
 set the state of show unit cell for all molecules More...
 
void set_show_unit_cell (int imol, short int istate)
 set the state of show unit cell for the particular molecule number imol More...
 
void set_unit_cell_colour (float red, float green, float blue)
 
Colour
void set_symmetry_colour_merge (float v)
 
void set_colour_map_rotation_on_read_pdb (float f)
 set the hue change step on reading a new molecule
 
void set_colour_map_rotation_on_read_pdb_flag (short int i)
 shall the hue change step be used? More...
 
void set_colour_map_rotation_on_read_pdb_c_only_flag (short int i)
 shall the colour map rotation apply only to C atoms? More...
 
void set_colour_by_chain (int imol)
 colour molecule number imol by chain type
 
void set_colour_by_chain_goodsell_mode (int imol)
 colour molecule number imol by chain type, goodsell-like colour scheme
 
void set_colour_by_molecule (int imol)
 colour molecule number imol by molecule
 
int get_colour_map_rotation_on_read_pdb_c_only_flag ()
 
void set_symmetry_colour (float r, float g, float b)
 set the symmetry colour base
 
Map colour
void set_colour_map_rotation_for_map (float f)
 set the colour map rotation (hue change) for maps More...
 
void set_molecule_bonds_colour_map_rotation (int imol, float theta)
 set the colour map rotation for molecule number imol More...
 
float get_molecule_bonds_colour_map_rotation (int imol)
 Get the colour map rotation for molecule number imol.
 
Anisotropic Atoms Interface
float get_limit_aniso ()
 get the aniso radius limit
 
short int get_show_limit_aniso ()
 get show the aniso limit
 
short int get_show_aniso ()
 return show-aniso-atoms state
 
void set_limit_aniso (short int state)
 set the aniso atom limit
 
void set_aniso_limit_size_from_widget (const char *text)
 
void set_show_aniso (int state)
 set show aniso atoms
 
char * get_text_for_aniso_limit_radius_entry ()
 
void set_aniso_probability (float f)
 set aniso probability
 
float get_aniso_probability ()
 get aniso probability
 
Display Functions
void set_graphics_window_size (int x_size, int y_size)
 set the window size
 
void set_graphics_window_position (int x_pos, int y_pos)
 set the graphics window position
 
void store_graphics_window_position (int x_pos, int y_pos)
 store the graphics window position
 
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 graphics_draw ()
 draw a frame
 
void zalman_stereo_mode ()
 try to turn on Zalman stereo mode
 
void hardware_stereo_mode ()
 try to turn on stereo mode
 
int stereo_mode_state ()
 what is the stero state? More...
 
void mono_mode ()
 try to turn on mono mode
 
void side_by_side_stereo_mode (short int use_wall_eye_mode)
 turn on side bye side stereo mode
 
void set_dti_stereo_mode (short int state)
 
void set_hardware_stereo_angle_factor (float f)
 how much should the eyes be separated in stereo mode? More...
 
float hardware_stereo_angle_factor_state ()
 return the hardware stereo angle factor
 
void set_model_display_radius (int state, float radius)
 
void set_model_fit_refine_dialog_position (int x_pos, int y_pos)
 set position of Model/Fit/Refine dialog
 
void set_display_control_dialog_position (int x_pos, int y_pos)
 set position of Display Control dialog
 
void set_go_to_atom_window_position (int x_pos, int y_pos)
 set position of Go To Atom dialog
 
void set_delete_dialog_position (int x_pos, int y_pos)
 set position of Delete dialog
 
void set_rotate_translate_dialog_position (int x_pos, int y_pos)
 set position of the Rotate/Translate Residue Range dialog
 
void set_accept_reject_dialog_position (int x_pos, int y_pos)
 set position of the Accept/Reject dialog
 
void set_ramachandran_plot_dialog_position (int x_pos, int y_pos)
 set position of the Ramachadran Plot dialog
 
void set_edit_chi_angles_dialog_position (int x_pos, int y_pos)
 set edit chi angles dialog position
 
void set_rotamer_selection_dialog_position (int x_pos, int y_pos)
 set rotamer selection dialog position
 
Smooth Scrolling
void set_smooth_scroll_flag (int v)
 set smooth scrolling More...
 
int get_smooth_scroll ()
 return the smooth scrolling state
 
void set_smooth_scroll_steps_str (const char *t)
 
void set_smooth_scroll_steps (int i)
 set the number of steps in the smooth scroll More...
 
char * get_text_for_smooth_scroll_steps ()
 
void set_smooth_scroll_limit_str (const char *t)
 
void set_smooth_scroll_limit (float lim)
 do not scroll for distances greater this limit
 
char * get_text_for_smooth_scroll_limit ()
 
Font Parameters
void set_font_size (int i)
 set the font size More...
 
int get_font_size ()
 return the font size More...
 
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->1
 
void set_use_stroke_characters (int state)
 set use stroke characters
 
Rotation Centre
void set_rotation_centre_size_from_widget (const gchar *text)
 
void set_rotation_centre_size (float f)
 set rotoation centre marker size
 
gchar * get_text_for_rotation_centre_cube_size ()
 
short int recentre_on_read_pdb ()
 return the recentre-on-pdb state
 
void set_recentre_on_read_pdb (short int)
 set the recentre-on-pdb state
 
void set_rotation_centre (float x, float y, float z)
 set the rotation centre
 
void set_rotation_centre_internal (float x, float y, float z)
 
float rotation_centre_position (int axis)
 
void go_to_ligand ()
 centre on the ligand of the "active molecule", if we are already there, centre on the next hetgroup (etc)
 
PyObject * go_to_ligand_py ()
 
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_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 - hence side-chain always seems to be "up" - set this mode to 1 for reorientation-mode - and 0 for off (standard translation)
 
Orthogonal Axes
void set_draw_axes (int i)
 
Atom Selection Utilities
int atom_index (int imol, const char *chain_id, int iresno, const char *atom_id)
 
int atom_index_full (int imol, const char *chain_id, int iresno, const char *inscode, const char *atom_id, const char *altconf)
 
int atom_index_first_atom_in_residue (int imol, const char *chain_id, int iresno, const char *ins_code)
 
int atom_index_first_atom_in_residue_with_altconf (int imol, const char *chain_id, int iresno, const char *ins_code, const char *alt_conf)
 
float median_temperature_factor (int imol)
 return the median temperature factor for imol
 
float average_temperature_factor (int imol)
 return the average temperature factor for the atoms in imol
 
float standard_deviation_temperature_factor (int imol)
 return the standard deviation of the atom temperature factors for imol
 
void clear_pending_picks ()
 clear pending picks (stop coot thinking that the user is about to pick an atom).
 
char * centre_of_mass_string (int imol)
 
char * centre_of_mass_string_py (int imol)
 
void set_default_temperature_factor_for_new_atoms (float new_b)
 set the default temperature factor for newly created atoms (initial default 20)
 
float default_new_atoms_b_factor ()
 return the default temperature factor for newly created atoms
 
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 get_reset_b_factor_moved_atoms_state ()
 return the state if temperature factors shoudl be reset for moved atoms
 
void set_temperature_factors_for_atoms_in_residue_scm (int imol, SCM residue_spec_scm, float bf)
 
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. More...
 
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. More...
 
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 set_atom_attributes_py (PyObject *attribute_expression_list)
 
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
 
Skeletonization Interface
void skel_greer_on ()
 
void skel_greer_off ()
 
int skeletonize_map (int imol, short int prune_flag)
 skeletonize molecule number imol More...
 
int unskeletonize_map (int imol)
 undisplay the skeleton on molecule number imol
 
void set_initial_map_for_skeletonize ()
 
void set_max_skeleton_search_depth (int v)
 set the skeleton search depth, used in baton building More...
 
gchar * get_text_for_skeletonization_level_entry ()
 
void set_skeletonization_level_from_widget (const char *txt)
 
gchar * get_text_for_skeleton_box_size_entry ()
 
void set_skeleton_box_size_from_widget (const char *txt)
 
void set_skeleton_box_size (float f)
 the box size (in Angstroms) for which the skeleton is displayed
 
Save Coordinates
int save_coordinates (int imol, const char *filename)
 save coordinates of molecule number imol in filename More...
 
void set_save_coordinates_in_original_directory (int i)
 set save coordinates in the starting directory
 
int save_molecule_number_from_option_menu ()
 
void set_save_molecule_number (int imol)
 
Read Phases File Functions
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 More...
 
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) coordinates file More...
 
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 More...
 
int read_phs_and_make_map_using_cell_symm_from_mol_using_implicit_phs_filename (int imol)
 
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 More...
 
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_lim_high (in Angstroems). More...
 
void graphics_store_phs_filename (const gchar *phs_filename)
 
short int possible_cell_symm_for_phs_file ()
 
gchar * get_text_for_phs_cell_chooser (int imol, char *field)
 
Graphics Move
void undo_last_move ()
 undo last move
 
void translate_molecule_by (int imol, float x, float y, float z)
 translate molecule number imol by (x,y,z) in Angstroms
 
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
 
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,y,z) in Angstroms
 
Go To Atom Widget Functions
void post_go_to_atom_window ()
 Post the Go To Atom Window.
 
int go_to_atom_molecule_number ()
 the go-to-atom molecule number
 
char * go_to_atom_chain_id ()
 the go-to-atom chain-id
 
char * go_to_atom_atom_name ()
 the go-to-atom atom name
 
int go_to_atom_residue_number ()
 the go-to-atom residue number
 
char * go_to_atom_ins_code ()
 the go-to-atom insertion code
 
char * go_to_atom_alt_conf ()
 the go-to-atom alt conf
 
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 More...
 
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 More...
 
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't redraw
 
int set_go_to_atom_chain_residue_atom_name_strings (const gchar *t1, const gchar *t2, const gchar *txt)
 
void update_go_to_atom_from_current_position ()
 update the Go To Atom widget entries to atom closest to screen centre.
 
void update_go_to_atom_residue_list (int imol)
 
int atom_spec_to_atom_index (int mol, char *chain, int resno, char *atom_name)
 what is the atom index of the given atom?
 
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?
 
void update_go_to_atom_window_on_changed_mol (int imol)
 update the Go To Atom window
 
void update_go_to_atom_window_on_new_mol ()
 update the Go To Atom window. This updates the option menu for the molecules.
 
void update_go_to_atom_window_on_other_molecule_chosen (int imol)
 
void set_go_to_atom_molecule (int imol)
 set the molecule for the Go To Atom More...
 
void unset_go_to_atom_widget ()
 
Map and Molecule Control
void post_display_control_window ()
 display the Display Constrol window
 
void add_map_display_control_widgets ()
 
void add_mol_display_control_widgets ()
 
void add_map_and_mol_display_control_widgets ()
 
void reset_graphics_display_control_window ()
 
void close_graphics_display_control_window ()
 
void set_map_displayed (int imol, int state)
 make the map displayed/undisplayed, 0 for off, 1 for on
 
void set_mol_displayed (int imol, int state)
 make the coordinates molecule displayed/undisplayed, 0 for off, 1 for on
 
void set_display_only_model_mol (int imol)
 from all the model molecules, display only imol More...
 
void set_mol_active (int imol, int state)
 make the coordinates molecule active/inactve (clickable), 0 for off, 1 for on
 
void display_maps_scm (SCM maps_list)
 maps_list is a list of integers (map molecule numbers). More...
 
void display_maps_py (PyObject *pyo)
 
int mol_is_displayed (int imol)
 return the display state of molecule number imol More...
 
int mol_is_active (int imol)
 return the active state of molecule number imol More...
 
int map_is_displayed (int imol)
 return the display state of molecule number imol More...
 
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 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 models.
 
void set_only_last_model_molecule_displayed ()
 only display the last model molecule
 
void display_only_active ()
 display only the active mol and the refinement map
 
SCM space_group_scm (int imol)
 return the spacegroup as a string, return scheme false if unable to do so.
 
PyObject * space_group_py (int imol)
 
char * show_spacegroup (int imol)
 return the spacegroup of molecule number imol . Deprecated. More...
 
SCM symmetry_operators_scm (int imol)
 return a list of symmetry operators as strings - or scheme false if that is not possible.
 
SCM symmetry_operators_to_xHM_scm (SCM symmetry_operators)
 
PyObject * symmetry_operators_py (int imol)
 return a list of symmetry operators as strings - or Python False if that is not possible.
 
PyObject * symmetry_operators_to_xHM_py (PyObject *symmetry_operators)
 
Align and Mutate
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_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
 
SCM alignment_results_scm (int imol, const char *chain_id, const char *seq)
 
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. More...
 
PyObject * alignment_results_py (int imol, const char *chain_id, const char *seq)
 
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 possible
 
Renumber Residue Range
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 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
 
Change Chain ID
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
 
SCM change_chain_id_with_result_scm (int imol, const char *from_chain_id, const char *to_chain_id, short int use_res_range_flag, int from_resno, int to_resno)
 
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)
 
Scripting Interface
int probe_available_p ()
 Can we run probe (was the executable variable set properly?) (predicate). More...
 
int probe_available_p_py ()
 
void post_scripting_window ()
 do nothing - compatibility function
 
void post_scheme_scripting_window ()
 pop-up a scripting window for scheming
 
void post_python_scripting_window ()
 pop-up a scripting window for pythoning
 
void run_command_line_scripts ()
 
void set_guile_gui_loaded_flag ()
 
void set_python_gui_loaded_flag ()
 
void set_found_coot_gui ()
 
void set_found_coot_python_gui ()
 
Monomer
int get_monomer_for_molecule_by_index (int dict_idx, int imol_enc)
 
void run_script (const char *filename)
 run script file
 
void run_guile_script (const char *filename)
 guile run script file
 
void run_python_script (const char *filename)
 run python script file
 
int import_python_module (const char *module_name, int use_namespace)
 import python module
 
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 compound name
 
SCM comp_id_to_name_scm (const char *comp_id)
 return the monomer name More...
 
int auto_load_dictionary (const char *comp_id)
 try to auto-load the dictionary for comp_id from the refmac monomer library. More...
 
int reload_dictionary (const char *comp_id)
 as above, but dictionary is cleared and re-read if it already exists
 
void add_non_auto_load_residue_name (const char *s)
 add residue name to the list of residue names that don't get auto-loaded from the Refmac dictionary.
 
void remove_non_auto_load_residue_name (const char *s)
 remove residue name from the list of residue names that don't get auto-loaded from the Refmac dictionary.
 
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 name
 
PyObject * comp_id_to_name_py (const char *comp_id)
 return the monomer name More...
 
Regularization and Refinement
void do_regularize (short int state)
 
void do_refine (short int state)
 
void do_regularize_kill_delete_dialog ()
 
void add_planar_peptide_restraints ()
 add a restraint on peptides to make them planar More...
 
void remove_planar_peptide_restraints ()
 remove restraints on peptides to make them planar.
 
void make_tight_planar_peptide_restraints ()
 make the planar peptide restraints tight More...
 
int planar_peptide_restraints_state ()
 
void set_use_trans_peptide_restraints (short int on_off_state)
 add a restraint on peptides to keep trans peptides trans More...
 
void add_omega_torsion_restriants ()
 add restraints on the omega angle of the peptides More...
 
void remove_omega_torsion_restriants ()
 remove omega restraints on CIS and TRANS linked residues.
 
void set_refine_hydrogen_bonds (int state)
 add or remove auto H-bond restraints
 
void set_refinement_immediate_replacement (int istate)
 set immediate replacement mode for refinement and regularization. You need this (call with istate=1) if you are scripting refinement/regularization
 
int refinement_immediate_replacement_state ()
 query the state of the immediate replacement mode
 
void set_residue_selection_flash_frames_number (int i)
 set the number of frames for which the selected residue range flashes More...
 
void c_accept_moving_atoms ()
 accept the new positions of the regularized or refined residues More...
 
void accept_regularizement ()
 a hideous alias for the above
 
void clear_up_moving_atoms ()
 
void clear_moving_atoms_object ()
 
short int refinement_already_ongoing_p ()
 If there is a refinement on-going already, we don't want to start a new one. More...
 
SCM refine_residues_scm (int imol, SCM r)
 refine residues, r is a list of residue specs. More...
 
SCM refine_residues_with_alt_conf_scm (int imol, SCM r, const char *alt_conf)
 
SCM refine_residues_with_modes_with_alt_conf_scm (int imol, SCM residues_spec_list_scm, const char *alt_conf, SCM mode_1, SCM mode_2, SCM mode_3)
 
SCM regularize_residues_scm (int imol, SCM r)
 
SCM regularize_residues_with_alt_conf_scm (int imol, SCM r, const char *alt_conf)
 
PyObject * refine_residues_py (int imol, PyObject *r)
 refine the residues in the given residue spec list More...
 
PyObject * refine_residues_with_modes_with_alt_conf_py (int imol, PyObject *r, const char *alt_conf, PyObject *mode_1, PyObject *mode_2, PyObject *mode_3)
 
PyObject * refine_residues_with_alt_conf_py (int imol, PyObject *r, const char *alt_conf)
 
PyObject * regularize_residues_py (int imol, PyObject *r)
 
PyObject * regularize_residues_with_alt_conf_py (int imol, PyObject *r, const char *alt_conf)
 
void stop_refinement_internal ()
 
void set_refinement_use_soft_mode_nbc_restraints (short int flag)
 
void shiftfield_b_factor_refinement (int imol)
 shiftfield B-factor refinement
 
void shiftfield_xyz_factor_refinement (int imol)
 shiftfield xyz refinement
 
void set_refine_with_torsion_restraints (int istate)
 turn on (or off) torsion restraints More...
 
int refine_with_torsion_restraints_state ()
 return the state of above
 
void set_matrix (float f)
 set the relative weight of the geometric terms to the map terms More...
 
float matrix_state ()
 return the relative weight of the geometric terms to the map terms.
 
float get_map_weight ()
 return the relative weight of the geometric terms to the map terms. More...
 
float estimate_map_weight (int imol_map)
 
void set_refine_auto_range_step (int i)
 change the +/- step for autoranging (default is 1) More...
 
void set_refine_max_residues (int n)
 set the heuristic fencepost for the maximum number of residues in the refinement/regularization residue range More...
 
void refine_zone_atom_index_define (int imol, int ind1, int ind2)
 refine a zone based on atom indexing
 
void refine_zone (int imol, const char *chain_id, int resno1, int resno2, const char *altconf)
 refine a zone More...
 
void repeat_refine_zone ()
 repeat the previous (user-selected) refine zone
 
SCM refine_zone_with_score_scm (int imol, const char *chain_id, int resno1, int resno2, const char *altconf)
 
SCM regularize_zone_with_score_scm (int imol, const char *chain_id, int resno1, int resno2, const char *altconf)
 
PyObject * refine_zone_with_score_py (int imol, const char *chain_id, int resno1, int resno2, const char *altconf)
 
PyObject * regularize_zone_with_score_py (int imol, const char *chain_id, int resno1, int resno2, const char *altconf)
 
void refine_auto_range (int imol, const char *chain_id, int resno1, const char *altconf)
 refine a zone using auto-range More...
 
int regularize_zone (int imol, const char *chain_id, int resno1, int resno2, const char *altconf)
 regularize a zone More...
 
void set_dragged_refinement_steps_per_frame (int v)
 set the number of refinement steps applied to the intermediate atoms each frame of graphics. More...
 
int dragged_refinement_steps_per_frame ()
 return the number of steps per frame in dragged refinement
 
void set_refinement_refine_per_frame (int istate)
 allow refinement of intermediate atoms after dragging, before displaying (default: 0, off). More...
 
int refinement_refine_per_frame_state ()
 query the state of the above option
 
void set_refinement_drag_elasticity (float e)
 
  • the elasticity of the dragged atom in refinement mode.
More...
 
void set_refine_ramachandran_angles (int state)
 turn on Ramachandran angles refinement in refinement and regularization More...
 
void set_refine_ramachandran_torsion_angles (int state)
 
void set_refine_ramachandran_restraints_type (int type)
 change the target function type
 
void set_refine_ramachandran_restraints_weight (float w)
 change the target function weight More...
 
float refine_ramachandran_restraints_weight ()
 
void set_torsion_restraints_weight (double w)
 
void set_refine_rotamers (int state)
 set the state for using rotamer restraints "drive" mode More...
 
void set_refinement_geman_mcclure_alpha_from_text (int combobox_item_idx, const char *t)
 
void set_refinement_lennard_jones_epsilon_from_text (int combobox_item_idx, const char *t)
 
void set_refinement_ramachandran_restraints_weight_from_text (int combobox_item_idx, const char *t)
 
void set_refinement_overall_weight_from_text (const char *t)
 
void set_refinement_torsion_weight_from_text (int combobox_item_index, const char *t)
 
void set_refine_params_dialog_more_control_frame_is_active (int state)
 
int refine_ramachandran_angles_state ()
 
void set_numerical_gradients (int istate)
 
void set_debug_refinement (int state)
 
void set_fix_chiral_volumes_before_refinement (int istate)
 correct the sign of chiral volumes before commencing refinement? More...
 
void check_chiral_volumes (int imol)
 query the state of the above option
 
SCM chiral_volume_errors_scm (int imol)
 
PyObject * chiral_volume_errors_py (int imol)
 
void set_show_chiral_volume_errors_dialog (short int istate)
 For experienced Cooters who don't like Coot nannying about chiral volumes during refinement.
 
void set_secondary_structure_restraints_type (int itype)
 set the type of secondary structure restraints More...
 
int secondary_structure_restraints_type ()
 return the secondary structure restraints type
 
int imol_refinement_map ()
 the molecule number of the map used for refinement More...
 
int set_imol_refinement_map (int imol)
 set the molecule number of the map to be used for refinement/fitting. More...
 
int does_residue_exist_p (int imol, char *chain_id, int resno, char *inscode)
 Does the residue exist? (Raw function) More...
 
int delete_restraints (const char *comp_id)
 delete the restraints for the given comp_id (i.e. residue name) More...
 
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 More...
 
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 More...
 
int add_extra_bond_restraints_scm (int imol, SCM extra_bond_restraints_scm)
 
int add_extra_bond_restraints_py (int imol, PyObject *extra_bond_restraints_py)
 
int add_extra_angle_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, const char *chain_id_3, int res_no_3, const char *ins_code_3, const char *atom_name_3, const char *alt_conf_3, double torsion_angle, double esd)
 
int add_extra_torsion_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, const char *chain_id_3, int res_no_3, const char *ins_code_3, const char *atom_name_3, const char *alt_conf_3, const char *chain_id_4, int res_no_4, const char *ins_code_4, const char *atom_name_4, const char *alt_conf_4, double torsion_angle, double esd, int period)
 
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)
 
int add_extra_target_position_restraint (int imol, const char *chain_id, int res_no, const char *ins_code, const char *atom_name, const char *alt_conf, float x, float y, float z, float weight)
 
void delete_all_extra_restraints (int imol)
 clear out all the extra/user-defined restraints for molecule number imol
 
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
 
void delete_extra_restraints_for_residue_spec_scm (int imol, SCM residue_spec_in)
 
void delete_extra_restraints_for_residue_spec_py (int imol, PyObject *residue_spec_in_py)
 
void delete_extra_restraints_worse_than (int imol, float n_sigma)
 
void add_refmac_extra_restraints (int imol, const char *file_name)
 
void set_show_extra_restraints (int imol, int state)
 
int extra_restraints_are_shown (int imol)
 
void set_extra_restraints_prosmart_sigma_limits (int imol, double limit_high, double limit_low)
 often we don't want to see all prosmart restraints, just the (big) violations
 
void generate_local_self_restraints (int imol, const char *chain_id, float local_dist_max)
 generate external distance local self restraints
 
void generate_self_restraints (int imol, float local_dist_max)
 generate external distance all-molecule self restraints
 
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
 
void generate_local_self_restraints_by_residues_py (int imol, PyObject *residue_specs, float local_dist_max)
 
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 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 More...
 
void set_show_parallel_plane_restraints (int imol, int state)
 
int parallel_plane_restraints_are_shown (int imol)
 
void add_parallel_plane_restraint (int imol, const char *chain_id_1, int re_no_1, const char *ins_code_1, const char *chain_id_2, int re_no_2, const char *ins_code_2)
 
void set_extra_restraints_representation_for_bonds_go_to_CA (int imol, short int state)
 
void delete_extra_restraint_scm (int imol, SCM restraint_spec)
 
SCM list_extra_restraints_scm (int imol)
 
void delete_extra_restraint_py (int imol, PyObject *restraint_spec)
 
PyObject * list_extra_restraints_py (int imol)
 
void set_use_only_extra_torsion_restraints_for_torsions (short int state)
 set use only extra torsion restraints for torsions
 
int use_only_extra_torsion_restraints_for_torsions_state ()
 return only-use-extra-torsion-restraints-for-torsions state
 
void clear_all_atom_pull_restraints ()
 
void set_auto_clear_atom_pull_restraint (int state)
 
int get_auto_clear_atom_pull_restraint_state ()
 
void show_restraints_editor (const char *monomer_type)
 show restraints editor
 
void show_restraints_editor_by_index (int menu_item_index)
 show restraints editor using residue type index
 
void write_restraints_cif_dictionary (const char *monomer_type, const char *file_name)
 write cif restraints for monomer
 
Simplex Refinement Interface
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
 
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
 
Nomenclature Errors
int fix_nomenclature_errors (int imol)
 fix nomenclature errors in molecule number imol More...
 
void set_nomenclature_errors_on_read (const char *mode)
 set way nomenclature errors should be handled on reading coordinates. More...
 
Atom Info Interface
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
 
Residue Info
void do_residue_info_dialog ()
 
void output_residue_info_dialog (int imol, int atom_index)
 
void residue_info_dialog (int imol, const char *chain_id, int resno, const char *ins_code)
 show residue info dialog for given residue
 
int residue_info_dialog_is_displayed ()
 
void output_residue_info_as_text (int atom_index, int imol)
 
void do_distance_define ()
 
void do_angle_define ()
 
void do_torsion_define ()
 
void residue_info_apply_all_checkbutton_toggled ()
 
void clear_residue_info_edit_list ()
 
void unset_residue_info_widget ()
 
void clear_simple_distances ()
 
void clear_last_simple_distance ()
 
Edit Fuctions
void do_edit_copy_molecule ()
 
void do_edit_copy_fragment ()
 
void do_edit_replace_residue ()
 
void do_edit_replace_fragment ()
 
Residue Environment Functions
void set_show_environment_distances (int state)
 show environment distances. If state is 0, distances are turned off, otherwise distances are turned on.
 
void set_show_environment_distances_bumps (int state)
 show bumps environment distances. If state is 0, bump distances are turned off, otherwise bump distances are turned on.
 
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 distances are turned on.
 
int show_environment_distances_state ()
 show the state of display of the environment distances
 
void set_environment_distances_distance_limits (float min_dist, float max_dist)
 min and max distances for the environment distances
 
void set_show_environment_distances_as_solid (int state)
 show the environment distances with solid modelling
 
void set_environment_distances_label_atom (int state)
 Label the atom on Environment Distances start/change.
 
void label_neighbours ()
 Label the atoms in the residues around the central residue.
 
void label_atoms_in_residue ()
 Label the atoms in the central residue.
 
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. More...
 
double add_atom_geometry_distance_scm (int imol_1, SCM atom_spec_1, int imol_2, SCM atom_spec_2)
 
double add_atom_geometry_distance_py (int imol_1, PyObject *atom_spec_1, int imol_2, PyObject *atom_spec_2)
 
Pointer Position Function
PyObject * get_pointer_position_frac_py ()
 return the [x,y] position of the pointer in fractional coordinates. More...
 
Pointer Functions
void set_show_pointer_distances (int istate)
 turn on (or off) the pointer distance by passing 1 (or 0).
 
int show_pointer_distances_state ()
 show the state of display of the pointer distances
 
Zoom Functions
void scale_zoom (float f)
 scale the view by f More...
 
void scale_zoom_internal (float f)
 
float zoom_factor ()
 return the current zoom factor
 
void set_smooth_scroll_do_zoom (int i)
 set smooth scroll with zoom More...
 
int smooth_scroll_do_zoom ()
 return the state of the above system
 
float smooth_scroll_zoom_limit ()
 
void set_smooth_scroll_zoom_limit (float f)
 
void set_zoom (float f)
 
CNS Data Functions
int handle_cns_data_file (const char *filename, int imol)
 read CNS data (currently only a placeholder)
 
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) More...
 
mmCIF Functions
int auto_read_cif_data_with_phases (const char *filename)
 
int read_cif_data_with_phases_sigmaa (const char *filename)
 
int read_cif_data_with_phases_diff_sigmaa (const char *filename)
 
int read_cif_data (const char *filename, int imol_coords)
 
int read_cif_data_2fofc_map (const char *filename, int imol_coords)
 
int read_cif_data_fofc_map (const char *filename, int imol_coords)
 
int read_cif_data_with_phases_fo_fc (const char *filename)
 
int read_cif_data_with_phases_2fo_fc (const char *filename)
 
int read_cif_data_with_phases_nfo_fc (const char *filename, int map_type)
 
int read_cif_data_with_phases_fo_alpha_calc (const char *filename)
 
int handle_cif_dictionary (const char *filename)
 
int read_cif_dictionary (const char *filename)
 
int handle_cif_dictionary_for_molecule (const char *filename, int imol_enc, short int new_molecule_from_dictionary_cif_checkbutton_state)
 
int write_connectivity (const char *monomer_name, const char *filename)
 
void open_cif_dictionary_file_selector_dialog ()
 open the cif dictionary file selector dialog
 
SCM non_standard_residue_names_scm (int imol)
 non-standard residue/monomer names (note HOH is not non-standard).
 
PyObject * non_standard_residue_names_py (int imol)
 non-standard residue/monomer names (note HOH is not non-standard).
 
void import_all_refmac_cifs ()
 
int read_small_molecule_cif (const char *file_name)
 
int read_small_molecule_data_cif (const char *file_name)
 
int read_small_molecule_data_cif_and_make_map_using_coords (const char *file_name, int imol_coords)
 
SHELXL Functions
int read_shelx_ins_file (const char *filename, short int recentre_flag)
 read a SHELXL .ins file
 
int write_shelx_ins_file (int imol, const char *filename)
 write a SHELXL .ins file for molecule number imol
 
int handle_shelx_fcf_file_internal (const char *filename)
 
SCM chain_id_for_shelxl_residue_number (int imol, int resno)
 
int is_shelx_molecule (int imol)
 
PyObject * chain_id_for_shelxl_residue_number_py (int imol, int resno)
 
void add_shelx_string_to_molecule (int imol, const char *string)
 
Validation Functions
void deviant_geometry (int imol)
 
short int is_valid_model_molecule (int imol)
 
short int is_valid_map_molecule (int imol)
 
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 More...
 
void set_difference_map_peaks_max_closeness (float m)
 
float difference_map_peaks_max_closeness ()
 
void clear_diff_map_peaks ()
 
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 the distribution of temperature factors from the other atoms.
 
void gln_asn_b_factor_outliers_py (int imol)
 
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 of the map peaks. Return a list of 3d cartestian coordinates or Python False if imol_map is not suitable for peak picking.
 
PyObject * map_peaks_near_point_py (int imol_map, float n_sigma, float x, float y, float z, float radius)
 
PyObject * map_peaks_near_point_from_list_py (int imol_map, PyObject *peak_list, float x, float y, float z, float radius)
 
PyObject * map_peaks_around_molecule_py (int imol_map, float sigma, int negative_also_flag, int imol_coords)
 
PyObject * screen_vectors_py ()
 
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 of the map peaks. Return a list of 3d cartestian coordinates or scheme false if imol_map is not suitable for peak picking.
 
SCM map_peaks_near_point_scm (int imol_map, float n_sigma, float x, float y, float z, float radius)
 
SCM get_torsion_scm (int imol, SCM atom_spec_1, SCM atom_spec_2, SCM atom_spec_3, SCM atom_spec_4)
 
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 degrees).
 
void multi_residue_torsion_scm (int imol, SCM residues_specs_scm)
 create a multi-residue torsion dialog (user manipulation of torsions)
 
PyObject * get_torsion_py (int imol, PyObject *atom_spec_1, PyObject *atom_spec_2, PyObject *atom_spec_3, PyObject *atom_spec_4)
 
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 degrees).
 
void multi_residue_torsion_py (int imol, PyObject *residues_specs_py)
 create a multi-residue torsion dialog (user manipulation of torsions)
 
void clear_multi_residue_torsion_mode ()
 
void set_multi_residue_torsion_reverse_mode (short int mode)
 
void show_multi_residue_torsion_dialog ()
 
void setup_multi_residue_torsion ()
 
float atom_overlap_score (int imol)
 
Ramachandran Plot Functions
void do_ramachandran_plot (int imol)
 Ramachandran plot for molecule number imol.
 
void set_kleywegt_plot_n_diffs (int n_diffs)
 set the number of biggest difference arrows on the Kleywegt plot.
 
void add_on_rama_choices ()
 
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.002 (allowed)
 
void set_ramachandran_plot_background_block_size (float blocksize)
 set the ramachandran plot background block size. More...
 
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 to 240.
 
int ramachandran_psi_axis_mode ()
 
void set_moving_atoms (double phi, double psi)
 
void accept_phi_psi_moving_atoms ()
 
void setup_edit_phi_psi (short int state)
 
void setup_dynamic_distances (short int state)
 
void destroy_edit_backbone_rama_plot ()
 
void ramachandran_plot_differences (int imol1, int imol2)
 2 molecule ramachandran plot (NCS differences) a.k.a. A Kleywegt Plot.
 
void ramachandran_plot_differences_by_chain (int imol1, int imol2, const char *a_chain, const char *b_chain)
 A chain-specific Kleywegt Plot.
 
Sequence View Interface
void do_sequence_view (int imol)
 display the sequence view dialog for molecule number imol
 
void nsv (int imol)
 display the sequence view for molecule number imol
 
void set_sequence_view_is_docked (short int state)
 control where the sequence view is displayed More...
 
void set_nsv_canvas_pixel_limit (int cpl)
 set the pixel limit for sequence view windows
 
void sequence_view_old_style (int imol)
 show old style sequence view
 
void update_sequence_view_current_position_highlight_from_active_atom ()
 update the sequnce view current position highlight based on active atom
 
void add_on_sequence_view_choices ()
 
Atom Labelling
int add_atom_label (int imol, char *chain_id, int iresno, char *atom_id)
 
int remove_atom_label (int imol, char *chain_id, int iresno, char *atom_id)
 
void remove_all_atom_labels ()
 
void set_label_on_recentre_flag (int i)
 
int centre_atom_label_status ()
 
void set_brief_atom_labels (int istat)
 use brief atom names for on-screen labels More...
 
int brief_atom_labels_state ()
 the brief atom label state
 
void set_seg_ids_in_atom_labels (int istat)
 set if brief atom labels should have seg-ids also
 
Screen Rotation
void rotate_y_scene (int nsteps, float stepsize)
 rotate view round y axis stepsize degrees for nstep such steps
 
void rotate_x_scene (int nsteps, float stepsize)
 rotate view round x axis stepsize degrees for nstep such steps
 
void rotate_z_scene (int nsteps, float stepsize)
 rotate view round z axis stepsize degrees for nstep such steps
 
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. More...
 
Screen Translation
void translate_scene_x (int nsteps)
 translate rotation centre relative to screen axes for nsteps
 
void translate_scene_y (int nsteps)
 translate rotation centre relative to screen axes for nsteps
 
void translate_scene_z (int nsteps)
 translate rotation centre relative to screen axes for nsteps
 
Views Interface
int add_view_here (const char *view_name)
 return the view number
 
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
 
void play_views ()
 
void remove_this_view ()
 
int remove_named_view (const char *view_name)
 the view with the given name
 
void remove_view (int view_number)
 the given view number
 
int go_to_first_view (int snap_to_view_flag)
 
int go_to_view_number (int view_number, int snap_to_view_flag)
 
int add_spin_view (const char *view_name, int n_steps, float degrees_total)
 
void add_view_description (int view_number, const char *description)
 Add a view description/annotation to the give view number.
 
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) rather than move the graphics. More...
 
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 More...
 
int n_views ()
 
void save_views (const char *view_file_name)
 save views to view_file_name
 
float views_play_speed ()
 
void set_views_play_speed (float f)
 
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
 
SCM view_description (int view_number)
 
void go_to_view (SCM view)
 
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
 
PyObject * view_description_py (int view_number)
 
void go_to_view_py (PyObject *view)
 
void clear_all_views ()
 Clear the view list.
 
Movies Interface
void set_movie_file_name_prefix (const char *file_name)
 
void set_movie_frame_number (int frame_number)
 
SCM movie_file_name_prefix ()
 
PyObject * movie_file_name_prefix_py ()
 
int movie_frame_number ()
 
void set_make_movie_mode (int make_movies_flag)
 
Background Colour
void set_background_colour (double red, double green, double blue)
 set the background colour More...
 
void redraw_background ()
 re draw the background colour when switching between mono and stereo
 
int background_is_black_p ()
 is the background black (or nearly black)? More...
 
Ligand Fitting Functions
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_ligand_cluster_sigma_level (float f)
 set the default sigma level that the map is searched to find potential ligand sites
 
void set_ligand_flexible_ligand_n_samples (int i)
 set the number of conformation samples More...
 
void set_ligand_verbose_reporting (int i)
 
void set_find_ligand_n_top_ligands (int n)
 search the top n sites for ligands. More...
 
void set_find_ligand_do_real_space_refinement (short int state)
 
void set_find_ligand_multi_solutions_per_cluster (float lim_1, float lim_2)
 allow multiple ligand solutions per cluster. More...
 
void set_find_ligand_mask_waters (int istate)
 how shall we treat the waters during ligand fitting? More...
 
void set_ligand_search_protein_molecule (int imol)
 set the protein molecule for ligand searching
 
void set_ligand_search_map_molecule (int imol_map)
 set the map molecule for ligand searching
 
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 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
 
void set_find_ligand_here_cluster (int state)
 Allow the user a scripting means to find ligand at the rotation centre.
 
void execute_ligand_search ()
 
SCM execute_ligand_search_scm ()
 
PyObject * execute_ligand_search_py ()
 
void add_ligand_clear_ligands ()
 
void ligand_expert ()
 this sets the flag to have expert option ligand entries in the Ligand Searching dialog
 
void do_find_ligands_dialog ()
 display the find ligands dialog More...
 
SCM overlap_ligands (int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref)
 Overlap residue with "template"-based matching. More...
 
SCM analyse_ligand_differences (int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref)
 
SCM compare_ligand_atom_types_scm (int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref)
 
void match_ligand_torsions (int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref)
 
PyObject * overlap_ligands_py (int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref)
 
PyObject * analyse_ligand_differences_py (int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref)
 
PyObject * compare_ligand_atom_types_py (int imol_ligand, int imol_ref, const char *chain_id_ref, int resno_ref)
 
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. More...
 
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) More...
 
int exchange_ligand (int imol_lig, const char *chain_id_lig, int resno_lig, const char *ins_code_lig)
 
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. Immediate replacement (like flip peptide).
 
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)
 
Water Fitting Functions
void wrapped_create_find_waters_dialog ()
 create a dialog for water fitting
 
void renumber_waters (int imol)
 Renumber the waters of molecule number imol with consecutive numbering.
 
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 find_waters (int imol_for_map, int imol_for_protein, short int new_waters_mol_flag, float rmsd_cut_off, short int show_blobs_dialog)
 
int move_waters_to_around_protein (int imol)
 move waters of molecule number imol so that they are around the protein. More...
 
void move_hetgroups_to_around_protein (int imol)
 move all hetgroups (including waters) of molecule number imol so that they are around the protein.
 
float max_water_distance (int imol)
 return the maximum minimum distance of any water atom to any protein atom - used in validation of move_waters_to_around_protein() funtion.
 
char * get_text_for_find_waters_sigma_cut_off ()
 
void set_value_for_find_waters_sigma_cut_off (float f)
 
void set_water_check_spherical_variance_limit (float f)
 set the limit of interesting variance, above which waters are listed (otherwise ignored) More...
 
void set_ligand_water_to_protein_distance_limits (float f1, float f2)
 set ligand to protein distance limits More...
 
void set_ligand_water_n_cycles (int i)
 set the number of cycles of water searching
 
void set_write_peaksearched_waters ()
 
void execute_find_blobs (int imol_model, int imol_for_map, float cut_off, short int interactive_flag)
 find blobs
 
void split_water (int imol, const char *chain_id, int res_no, const char *ins_code)
 split the given water and fit to map. More...
 
Bond Representation
void set_default_bond_thickness (int t)
 set the default thickness for bonds (e.g. in ~/.coot)
 
void set_bond_thickness (int imol, float t)
 set the thickness of the bonds in molecule number imol to t pixels
 
void set_bond_thickness_intermediate_atoms (float t)
 set the thickness of the bonds of the intermediate atoms to t pixels
 
void set_use_variable_bond_thickness (short int state)
 allow lines that are further away to be thinner
 
void set_bond_colour_rotation_for_molecule (int imol, float f)
 set bond colour for molecule
 
void set_draw_stick_mode_atoms_default (short int state)
 set default for the drawing of atoms in stick mode (default is on (1))
 
float get_bond_colour_rotation_for_molecule (int imol)
 get the bond colour for molecule. More...
 
void set_unbonded_atom_star_size (float f)
 
void set_default_representation_type (int type)
 set the default representation type (default 1).
 
int get_default_bond_thickness ()
 get the default thickness for bonds
 
void set_draw_zero_occ_markers (int status)
 set status of drawing zero occupancy markers. More...
 
void set_draw_cis_peptide_markups (int status)
 set status of drawing cis-peptide markups More...
 
void set_draw_hydrogens (int imol, int istat)
 set the hydrogen drawing state. istat = 0 is hydrogens off, istat = 1: show hydrogens
 
int draw_hydrogens_state (int imol)
 the state of draw hydrogens for molecule number imol. More...
 
void set_draw_stick_mode_atoms (int imol, short int state)
 draw little coloured balls on atoms More...
 
void set_draw_missing_residues_loops (short int state)
 set the state for drawing missing resiude loops More...
 
void graphics_to_ca_representation (int imol)
 draw molecule number imol as CAs
 
void graphics_to_ca_plus_ligands_representation (int imol)
 draw molecule number imol as CA + ligands
 
void graphics_to_ca_plus_ligands_and_sidechains_representation (int imol)
 draw molecule number imol as CA + ligands + sidechains
 
void graphics_to_bonds_no_waters_representation (int imol)
 draw molecule number imol with no waters
 
void graphics_to_bonds_representation (int mol)
 draw molecule number imol with normal bonds
 
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 graphics_to_sec_struct_bonds_representation (int imol)
 draw molecule number imol with bonds in secondary structure representation
 
void graphics_to_rainbow_representation (int imol)
 draw molecule number imol in Jones' Rainbow
 
void graphics_to_b_factor_representation (int imol)
 draw molecule number imol coloured by B-factor
 
void graphics_to_b_factor_cas_representation (int imol)
 draw molecule number imol coloured by B-factor, CA + ligands
 
void graphics_to_occupancy_representation (int imol)
 draw molecule number imol coloured by occupancy
 
void graphics_to_user_defined_atom_colours_representation (int imol)
 draw molecule number imol in CA+Ligands mode coloured by user-defined atom colours
 
void graphics_to_user_defined_atom_colours_all_atoms_representation (int imol)
 draw molecule number imol all atoms coloured by user-defined atom colours
 
int graphics_molecule_bond_type (int imol)
 what is the bond drawing state of molecule number imol
 
int set_b_factor_bonds_scale_factor (int imol, float f)
 scale the colours for colour by b factor representation
 
void change_model_molecule_representation_mode (int up_or_down)
 change the representation of the model molecule closest to the centre of the screen
 
void set_use_grey_carbons_for_molecule (int imol, short int state)
 make the carbon atoms for molecule imol be grey
 
void set_grey_carbon_colour (int imol, float r, float g, float b)
 set the colour for the carbon atoms More...
 
void set_draw_moving_atoms_restraints (int state)
 
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 More...
 
int clear_ball_and_stick (int imol)
 clear ball and stick representation of molecule number imol
 
void set_show_additional_representation (int imol, int representation_number, int on_off_flag)
 
void set_show_all_additional_representations (int imol, int on_off_flag)
 
void all_additional_representations_off_except (int imol, int representation_number, short int ball_and_sticks_off_too_flag)
 
void delete_additional_representation (int imol, int representation_number)
 
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
 
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. More...
 
SCM additional_representation_info_scm (int imol)
 
PyObject * additional_representation_info_py (int imol)
 
void set_flev_idle_ligand_interactions (int state)
 
void toggle_flev_idle_ligand_interactions ()
 
Dots 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 More...
 
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 More...
 
void unset_dots_colour (int imol)
 no longer set the dots of molecule imol to a single colour More...
 
void clear_dots (int imol, int dots_handle)
 clear dots in imol with dots_handle
 
void clear_dots_by_name (int imol, const char *dots_object_name)
 clear the first dots object for imol with given name
 
int n_dots_sets (int imol)
 return the number of dots sets for molecule number imol
 
Pep-flip Interface
void do_pepflip (short int state)
 
void pepflip (int imol, const char *chain_id, int resno, const char *inscode, const char *altconf)
 pepflip the given residue
 
int pepflip_intermediate_atoms ()
 
int pepflip_intermediate_atoms_other_peptide ()
 
SCM pepflip_using_difference_map_scm (int imol_coords, int imol_difference_map, float n_sigma)
 
PyObject * pepflip_using_difference_map_py (int imol_coords, int imol_difference_map, float n_sigma)
 
Rigid Body Refinement Interface
void do_rigid_body_refine (short int state)
 
void rigid_body_refine_zone (int reso_start, int resno_end, const char *chain_id, int imol)
 setup rigid body refine zone More...
 
void rigid_body_refine_by_atom_selection (int imol, const char *atom_selection_string)
 
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).
 
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 execute_rigid_body_refine (short int auto_range_flag)
 
void set_rigid_body_fit_acceptable_fit_fraction (float f)
 set rigid body fraction of atoms in positive density More...
 
Dynamic Map
void toggle_dynamic_map_display_size ()
 
void toggle_dynamic_map_sampling ()
 
void set_dynamic_map_size_display_on ()
 
void set_dynamic_map_size_display_off ()
 
int get_dynamic_map_size_display ()
 
void set_dynamic_map_sampling_on ()
 
void set_dynamic_map_sampling_off ()
 
int get_dynamic_map_sampling ()
 
void set_dynamic_map_zoom_offset (int i)
 
Add Terminal Residue Functions
void do_add_terminal_residue (short int state)
 
void set_add_terminal_residue_n_phi_psi_trials (int n)
 
void set_add_terminal_residue_add_other_residue_flag (int i)
 
void set_add_terminal_residue_do_rigid_body_refine (short int v)
 
void set_terminal_residue_do_rigid_body_refine (short int v)
 
void set_add_terminal_residue_debug_trials (short int debug_state)
 
int add_terminal_residue_immediate_addition_state ()
 
void set_add_terminal_residue_immediate_addition (int i)
 set immediate addition of terminal residue More...
 
int add_terminal_residue (int imol, const char *chain_id, int residue_number, const char *residue_type, int immediate_add)
 Add a terminal residue. More...
 
int add_nucleotide (int imol, const char *chain_id, int res_no)
 Add a terminal nucleotide. More...
 
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. More...
 
void set_add_terminal_residue_default_residue_type (const char *type)
 set the residue type of an added terminal residue.
 
void set_add_terminal_residue_do_post_refine (short int istat)
 set a flag to run refine zone on terminal residues after an addition.
 
int add_terminal_residue_do_post_refine_state ()
 what is the value of the previous flag?
 
SCM find_terminal_residue_type (int imol, const char *chain_id, int resno)
 
PyObject * find_terminal_residue_type_py (int imol, const char *chain_id, int resno)
 
Add A Residue Functions
int add_residue_with_atoms_py (int imol, PyObject *residue_spec, const std::string &res_name, PyObject *list_of_atoms)
 
Delete Residues
void delete_atom_by_atom_index (int imol, int index, short int do_delete_dialog)
 
void delete_residue_by_atom_index (int imol, int index, short int do_delete_dialog)
 
void delete_residue_hydrogens_by_atom_index (int imol, int index, short int do_delete_dialog)
 
void delete_residue_range (int imol, const char *chain_id, int resno_start, int end_resno)
 delete residue range
 
void delete_residue (int imol, const char *chain_id, int resno, const char *inscode)
 delete residue
 
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 delete_residues_scm (int imol, SCM residue_specs_scm)
 delete residues in the residue spec list
 
void delete_residues_py (int imol, PyObject *residue_specs_py)
 delete residues in the residue spec list
 
void delete_residue_hydrogens (int imol, const char *chain_id, int resno, const char *inscode, const char *altloc)
 delete hydrogen atoms in residue
 
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 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
 
int delete_hydrogen_atoms (int imol)
 delete all hydrogens in molecule, More...
 
int delete_hydrogens (int imol)
 delete all hydrogens in molecule, More...
 
int delete_waters (int imol)
 delete all waters in molecule, More...
 
void delete_chain (int imol, const char *chain_id)
 delete the chain
 
void delete_sidechains_for_chain (int imol, const char *chain_id)
 delete the side chains in the chain
 
void post_delete_item_dialog ()
 
void set_delete_atom_mode ()
 
void set_delete_residue_mode ()
 
void set_delete_residue_zone_mode ()
 
void set_delete_residue_hydrogens_mode ()
 
void set_delete_water_mode ()
 
void set_delete_sidechain_mode ()
 
void set_delete_sidechain_range_mode ()
 
void set_delete_chain_mode ()
 
short int delete_item_mode_is_atom_p ()
 
short int delete_item_mode_is_residue_p ()
 
short int delete_item_mode_is_water_p ()
 
short int delete_item_mode_is_sidechain_p ()
 
short int delete_item_mode_is_sidechain_range_p ()
 
short int delete_item_mode_is_chain_p ()
 
void clear_pending_delete_item ()
 
void clear_delete_item_widget ()
 
void store_delete_item_widget_position ()
 
short int delete_item_widget_is_being_shown ()
 
short int delete_item_widget_keep_active_on ()
 
void delete_object_handle_delete_dialog (short int do_delete_dialog)
 
Mainchain Building Functions
void do_db_main (short int state)
 
int db_mainchain (int imol, const char *chain_id, int iresno_start, int iresno_end, const char *direction)
 CA -> mainchain conversion. More...
 
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. More...
 
Close Molecule Functions
void close_molecule (int imol)
 close the molecule
 
Rotamer Functions
void set_rotamer_search_mode (int mode)
 set the mode of rotamer search, options are (ROTAMERSEARCHAUTOMATIC), (ROTAMERSEARCHLOWRES) (aka. "backrub rotamers"), (ROTAMERSEARCHHIGHRES) (with rigid body fitting)
 
int rotamer_search_mode_state ()
 
void setup_rotamers (short int state)
 
void do_rotamers (int atom_index, int imol)
 
void show_rotamers_dialog (int imol, const char *chain_id, int resno, const char *ins_code, const char *altconf)
 
void set_rotamer_lowest_probability (float f)
 For Dunbrack rotamers, set the lowest probability to be considered. Set as a percentage i.e. 1.00 is quite low. For Richardson Rotamers, this has no effect.
 
void set_rotamer_check_clashes (int i)
 set a flag: 0 is off, 1 is on
 
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. More...
 
void set_auto_fit_best_rotamer_clash_flag (int i)
 set the clash flag for rotamer search More...
 
float rotamer_score (int imol, const char *chain_id, int res_no, const char *insertion_code, const char *alt_conf)
 
void setup_auto_fit_rotamer (short int state)
 
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.
 
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.
 
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. More...
 
SCM get_rotamer_name_scm (int imol, const char *chain_id, int resno, const char *ins_code)
 
PyObject * get_rotamer_name_py (int imol, const char *chain_id, int resno, const char *ins_code)
 
void fill_partial_residues (int imol)
 fill all the residues of molecule number imol that have missing atoms. More...
 
void fill_partial_residue (int imol, const char *chain_id, int resno, const char *inscode)
 
void simple_fill_partial_residues (int imol)
 Fill amino acid residues. More...
 
SCM missing_atom_info_scm (int imol)
 
PyObject * missing_atom_info_py (int imol)
 
SCM rotamer_graphs (int imol)
 Activate rotamer graph analysis for molecule number imol. More...
 
PyObject * rotamer_graphs_py (int imol)
 Activate rotamer graph analysis for molecule number imol. More...
 
180 Flip Side chain
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
 
void setup_180_degree_flip (short int state)
 
int side_chain_flip_180_intermediate_atoms ()
 
Mutate Functions
void setup_mutate (short int state)
 
void setup_mutate_auto_fit (short int state)
 Mutate then fit to map. More...
 
void do_mutation (const char *type, short int is_stub_flag)
 
void mutate_active_residue ()
 display a dialog that allows the choice of residue type to which to mutate
 
short int progressive_residues_in_chain_check (const char *chain_id, int imol)
 
int mutate (int imol, const char *chain_id, int ires, const char *inscode, const char *target_res_type)
 mutate a given residue More...
 
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.
 
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)
 
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? More...
 
int mutate_auto_fit_do_post_refine_state ()
 what is the value of the previous flag?
 
void set_rotamer_auto_fit_do_post_refine (short int istate)
 Do you want Coot to automatically run a refinement after every rotamer autofit? More...
 
int rotamer_auto_fit_do_post_refine_state ()
 what is the value of the previous flag?
 
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. More...
 
int mutate_single_residue_by_seqno (int ires, const char *inscode, const char *chain_id, int imol, char target_res_type)
 
void do_base_mutation (const char *type)
 
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 (mainchain + CB)
 
void handle_residue_type_chooser_entry_chose_type (const char *entry_text, short int stub_mode)
 
Alternative Conformation
short int alt_conf_split_type_number ()
 
void set_add_alt_conf_split_type_number (short int i)
 
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. More...
 
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. More...
 
void unset_add_alt_conf_dialog ()
 
void unset_add_alt_conf_define ()
 
void altconf ()
 
void set_add_alt_conf_new_atoms_occupancy (float f)
 
float get_add_alt_conf_new_atoms_occupancy ()
 
void set_show_alt_conf_intermediate_atoms (int i)
 
int show_alt_conf_intermediate_atoms_state ()
 
void zero_occupancy_residue_range (int imol, const char *chain_id, int ires1, int ires2)
 
void fill_occupancy_residue_range (int imol, const char *chain_id, int ires1, int ires2)
 
void set_occupancy_residue_range (int imol, const char *chain_id, int ires1, int ires2, float occ)
 
void set_b_factor_residue_range (int imol, const char *chain_id, int ires1, int ires2, float bval)
 
void reset_b_factor_residue_range (int imol, const char *chain_id, int ires1, int ires2)
 
Pointer Atom Functions
void place_atom_at_pointer ()
 
void place_atom_at_pointer_by_window ()
 
void place_typed_atom_at_pointer (const char *type)
 
void set_pointer_atom_is_dummy (int i)
 
void display_where_is_pointer ()
 
int create_pointer_atom_molecule_maybe ()
 Return the current pointer atom molecule, create a pointer atom molecule if necessary (i.e. when the user has not set it).
 
int pointer_atom_molecule ()
 Return the current pointer atom molecule.
 
void set_pointer_atom_molecule (int imol)
 
Baton Build Interface Functions
void set_baton_mode (short int i)
 toggle so that mouse movement moves the baton not rotates the view.
 
int try_set_draw_baton (short int i)
 draw the baton or not
 
void accept_baton_position ()
 accept the baton tip position - a prime candidate for a key binding
 
void baton_tip_try_another ()
 move the baton tip position - another prime candidate for a key binding
 
void baton_tip_previous ()
 move the baton tip to the previous position
 
void shorten_baton ()
 shorten the baton length
 
void lengthen_baton ()
 lengthen the baton
 
void baton_build_delete_last_residue ()
 delete the most recently build CA position
 
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 "forwards" or "backwards"
 
Terminal OXT Atom
short int add_OXT_to_residue (int imol, const char *chain_id, int reso, const char *insertion_code)
 
Crosshairs Interface
void set_draw_crosshairs (short int i)
 draw the distance crosshairs, 0 for off, 1 for on.
 
short int draw_crosshairs_state ()
 
Edit Chi Angles
void setup_edit_chi_angles (short int state)
 
void rotate_chi (float am)
 
void set_find_hydrogen_torsions (short int state)
 show torsions that rotate hydrogens in the torsion angle manipulation dialog. Note that this may be needed if, in the dictionary cif file torsion which have as a 4th atom both a hydrogen and a heavier atom bonding to the 3rd atom, but list the 4th atom as a hydrogen (not a heavier atom).
 
void set_graphics_edit_current_chi (int ichi)
 
void unset_moving_atom_move_chis ()
 
void set_moving_atom_move_chis ()
 
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 More...
 
int set_show_chi_angle_bond (int imode)
 
void set_edit_chi_angles_reverse_fragment_state (short int istate)
 
void setup_torsion_general (short int state)
 beloved torsion general at last makes an entrance onto the Coot scene...
 
void toggle_torsion_general_reverse ()
 
void setup_residue_partial_alt_locs (short int state)
 
Backrubbing function
int backrub_rotamer (int imol, const char *chain_id, int res_no, const char *ins_code, const char *alt_conf)
 
int backrub_rotamer_intermediate_atoms ()
 apply rotamer backrub to the active atom of the intermediate atoms
 
Masks
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 More...
 
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 make_masked_maps_split_by_chain (int imol, int imol_map)
 make chain masked maps More...
 
void set_map_mask_atom_radius (float rad)
 set the atom radius for map masking
 
float map_mask_atom_radius ()
 get the atom radius for map masking
 
check Waters Interface
void set_check_waters_b_factor_limit (float f)
 
void set_check_waters_map_sigma_limit (float f)
 
void set_check_waters_min_dist_limit (float f)
 
void set_check_waters_max_dist_limit (float f)
 
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.
 
void check_waters_by_difference_map (int imol_waters, int imol_diff_map, int interactive_flag)
 
float check_waters_by_difference_map_sigma_level_state ()
 
void set_check_waters_by_difference_map_sigma_level (float f)
 
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 at least coordination_number of other atoms at distances less than or equal to dist_max. Return scheme false on not able to make a list, otherwise a list of atoms and neighbours. Can return scheme false if imol is not a valid molecule.
 
SCM metal_coordination_scm (int imol, float dist_max)
 
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 of other atoms at distances less than or equal to dist_max. Return Python false on not able to make a list, otherwise a list of atoms and neighours. can return Python False if imol is not a valid molecule.
 
PyObject * metal_coordination_py (int imol, float dist_max)
 
Least-Squares matching
void clear_lsq_matches ()
 
void add_lsq_match (int reference_resno_start, int reference_resno_end, const char *chain_id_reference, int moving_resno_start, int moving_resno_end, const char *chain_id_moving, int match_type)
 
void add_lsq_atom_pair_scm (SCM atom_spec_ref, SCM atom_spec_moving)
 
void add_lsq_atom_pair_py (PyObject *atom_spec_ref, PyObject *atom_spec_moving)
 
SCM apply_lsq_matches (int imol_reference, int imol_moving)
 apply the LSQ matches More...
 
SCM get_lsq_matrix_scm (int imol_reference, int imol_moving)
 
PyObject * apply_lsq_matches_py (int imol_reference, int imol_moving)
 
PyObject * get_lsq_matrix_py (int imol_reference, int imol_moving)
 
int apply_lsq_matches_simple (int imol_reference, int imol_moving)
 
void setup_lsq_deviation (int state)
 
void setup_lsq_plane_define (int state)
 
void unset_lsq_plane_dialog ()
 
void remove_last_lsq_plane_atom ()
 
Trim
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 (absolute) level.
 
External Ray-Tracing
void raster3d (const char *rd3_filename)
 create a r3d file for the current view
 
void povray (const char *filename)
 
void renderman (const char *rib_filename)
 
void make_image_raster3d (const char *filename)
 
void make_image_povray (const char *filename)
 
void make_image_raster3d_py (const char *filename)
 
void make_image_povray_py (const char *filename)
 
void set_raster3d_bond_thickness (float f)
 set the bond thickness for the Raster3D representation
 
void set_raster3d_atom_radius (float f)
 set the atom radius for the Raster3D representation
 
void set_raster3d_density_thickness (float f)
 set the density line thickness for the Raster3D representation
 
void set_renderer_show_atoms (int istate)
 set the flag to show atoms for the Raster3D representation
 
void set_raster3d_bone_thickness (float f)
 set the bone (skeleton) thickness for the Raster3D representation
 
void set_raster3d_shadows_enabled (int state)
 turn off shadows for raster3d output - give argument 0 to turn off
 
void set_raster3d_water_sphere (int istate)
 set the flag to show waters as spheres for the Raster3D representation. 1 show as spheres, 0 the usual stars.
 
void set_raster3d_font_size (const char *size_in)
 set the font size (as a string) for raster3d
 
void raster_screen_shot ()
 run raster3d and display the resulting image.
 
void raster_screen_shot_py ()
 
Superposition (SSM)
void superpose (int imol1, int imol2, short int move_imol2_flag)
 simple interface to superposition. More...
 
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. More...
 
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. More...
 
NCS
void set_draw_ncs_ghosts (int imol, int istate)
 set drawing state of NCS ghosts for molecule number imol
 
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 or no ghosts.
 
void set_ncs_ghost_bond_thickness (int imol, float f)
 set bond thickness of NCS ghosts for molecule number imol
 
void ncs_update_ghosts (int imol)
 update ghosts for molecule number imol
 
int make_dynamically_transformed_ncs_maps (int imol_model, int imol_map, int overwrite_maps_of_same_name_flag)
 make NCS map
 
void make_ncs_ghosts_maybe (int imol)
 
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 clear_ncs_ghost_matrices (int imol)
 
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 More...
 
int add_strict_ncs_from_mtrix_from_self_file (int imol)
 
int show_strict_ncs_state (int imol)
 return the state of NCS ghost molecules for molecule number imol
 
void set_show_strict_ncs (int imol, int state)
 set display state of NCS ghost molecules for molecule number imol
 
void set_ncs_homology_level (float flev)
 At what level of homology should we say that we can't see homology for NCS calculation? (default 0.8)
 
void copy_chain (int imol, const char *from_chain, const char *to_chain)
 Copy single NCS chain.
 
void copy_from_ncs_master_to_others (int imol, const char *chain_id)
 Copy chain from master to all related NCS chains.
 
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. More...
 
SCM ncs_master_chains_scm (int imol)
 Copy residue range to selected NCS chains. More...
 
void copy_residue_range_from_ncs_master_to_chains_scm (int imol, const char *master_chain_id, int residue_range_start, int residue_range_end, SCM chain_id_list)
 
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.
 
PyObject * ncs_master_chains_py (int imol)
 
void copy_residue_range_from_ncs_master_to_chains_py (int imol, const char *master_chain_id, int residue_range_start, int residue_range_end, PyObject *chain_id_list)
 
void copy_from_ncs_master_to_chains_py (int imol, const char *master_chain_id, PyObject *chain_id_list)
 
void ncs_control_change_ncs_master_to_chain (int imol, int ichain)
 change the NCS master chain (by number)
 
void ncs_control_change_ncs_master_to_chain_id (int imol, const char *chain_id)
 change the NCS master chain (by chain_id)
 
void ncs_control_display_chain (int imol, int ichain, int state)
 display the NCS master chain
 
void set_ncs_matrix_type (int flag)
 
int get_ncs_matrix_state ()
 
SCM ncs_chain_differences_scm (int imol, const char *master_chain_id)
 
SCM ncs_chain_ids_scm (int imol)
 Return the ncs chains id for the given molecule. More...
 
PyObject * ncs_chain_differences_py (int imol, const char *master_chain_id)
 
PyObject * ncs_chain_ids_py (int imol)
 Return the ncs chains id for the given molecule. More...
 
SCM ncs_ghosts_scm (int imol)
 get the NCS ghost description More...
 
PyObject * ncs_ghosts_py (int imol)
 Get the NCS ghosts description. More...
 
Helices and Strands
int place_helix_here ()
 add a helix More...
 
int place_strand_here (int n_residues, int n_sample_strands)
 add a strands More...
 
void set_place_helix_here_fudge_factor (float ff)
 
void place_strand_here_dialog ()
 show the strand placement gui. More...
 
int find_helices ()
 autobuild helices More...
 
int find_strands ()
 autobuild strands More...
 
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 More...
 
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 More...
 
Nucleotides
int find_nucleic_acids_local (float radius)
 autobuild nucleic acid chains More...
 
New Molecule by Section Interface
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 More...
 
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 molecule number imol More...
 
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 position. More...
 
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 More...
 
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 More...
 
RNA/DNA
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 More...
 
SCM pucker_info_scm (int imol, SCM residue_spec, int do_pukka_pucker_check)
 get the pucker info for the specified residue More...
 
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_distance, plane_distortion], chain_id, resno, ins_code] More...
 
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 residue.
 
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
 
void setup_base_pairing (int state)
 
Sequence (Assignment)
void print_sequence_chain (int imol, const char *chain_id)
 Print the sequence to the console of the given molecule.
 
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
 
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.
 
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 chain assigned to it, then this will overwrite that old assignment with the new one.
 
void assign_sequence (int imol_model, int imol_map, const char *chain_id)
 
void assign_sequence_from_file (int imol, const char *file)
 Assign a sequence to a given molecule from (whatever) sequence file.
 
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.
 
void delete_all_sequences_from_molecule (int imol)
 Delete all the sequences from a given 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 sequence_info (int imol)
 return the sequence info that has been assigned to molecule number imol. return as a list of dotted pairs (list (cons chain-id seq)). To be used in constructing the cootaneer gui. Return Scheme False when no sequence has been assigned to imol.
 
SCM alignment_mismatches_scm (int imol)
 do a internal alignment of all the assigned sequences, return a list of mismatches that need to be made to model number imol to match the input sequence. More...
 
PyObject * sequence_info_py (int imol)
 return the sequence info that has been assigned to molecule number imol. return as a list of dotted pairs [[chain-id, seq]]. To be used in constructing the cootaneer gui. Return False when no sequence has been assigned.
 
PyObject * alignment_mismatches_py (int imol)
 do a internal alignment of all the assigned sequences, return a list of mismatches that need to be made to model number imol to match the input sequence. More...
 
Surface Interface
void do_surface (int imol, int istate)
 draw surface of molecule number imol More...
 
int molecule_is_drawn_as_surface_int (int imol)
 
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. More...
 
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
 
void set_electrostatic_surface_charge_range (float v)
 
float get_electrostatic_surface_charge_range ()
 
void set_transparent_electrostatic_surface (int imol, float opacity)
 simple on/off screendoor transparency at the moment, an opacity > 0.0 will turn on screendoor transparency (stippling).
 
float get_electrostatic_surface_opacity (int imol)
 return 1.0 for non transparent and 0.5 if screendoor transparency has been turned on.
 
FFFearing
int fffear_search (int imol_model, int imol_map)
 fffear search model in molecule number imol_model in map number imol_map
 
void set_fffear_angular_resolution (float f)
 set and return the fffear angular resolution in degrees
 
float fffear_angular_resolution ()
 return the fffear angular resolution in degrees
 
Remote Control
void make_socket_listener_maybe ()
 try to make socket listener
 
void set_coot_listener_socket_state_internal (int sock_state)
 
void set_socket_string_waiting (const char *s)
 feed the main thread a scheme script to evaluate
 
void set_socket_python_string_waiting (const char *s)
 feed the main thread a python script to evaluate
 
void set_remote_control_port (int port_number)
 
int get_remote_control_port_number ()
 
void set_tip_of_the_day_flag (int state)
 
Display Lists for Maps
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) - depends on graphics card and drivers. Pass 1 for on, 0 for off.
 
int display_lists_for_maps_state ()
 return the state of display_lists_for_maps.
 
void update_maps ()
 
Browser Interface
void browser_url (const char *url)
 try to open given url in Web browser
 
void set_browser_interface (const char *browser)
 set command to open the web browser, More...
 
void handle_online_coot_search_request (const char *entry_text)
 the search interface More...
 
Molprobity Interface
void handle_read_draw_probe_dots (const char *dots_file)
 pass a filename that contains molprobity's probe output in XtalView format
 
void handle_read_draw_probe_dots_unformatted (const char *dots_file, int imol, int show_clash_gui_flag)
 pass a filename that contains molprobity's probe output in unformatted format
 
void set_do_probe_dots_on_rotamers_and_chis (short int state)
 shall we run molprobity for on edit chi angles intermediate atoms?
 
short int do_probe_dots_on_rotamers_and_chis_state ()
 return the state of if run molprobity for on edit chi angles intermediate atoms?
 
void set_do_probe_dots_post_refine (short int state)
 shall we run molprobity after a refinement has happened?
 
short int do_probe_dots_post_refine_state ()
 show the state of shall we run molprobity after a refinement has happened?
 
void set_do_coot_probe_dots_during_refine (short int state)
 
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, perhaps).
 
void set_interactive_probe_dots_molprobity_radius (float r)
 set the radius over which we can run interactive probe, bigger is better but slower. More...
 
float interactive_probe_dots_molprobity_radius ()
 return the radius over which we can run interactive probe.
 
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)
 
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)
 
Map Sharpening Interface
void sharpen (int imol, float b_factor)
 Sharpen map imol by b_factor (note (of course) that positive numbers blur the map).
 
void sharpen_with_gompertz_scaling (int imol, float b_factor, short int try_gompertz, float gompertz_factor)
 
void set_map_sharpening_scale_limit (float f)
 set the limit of the b-factor map sharpening slider (default 30)
 
Intermediate Atom Manipulation Interface
SCM drag_intermediate_atom_scm (SCM atom_spec, SCM position)
 
PyObject * drag_intermediate_atom_py (PyObject *atom_spec, PyObject *position)
 
PyObject * add_target_position_restraint_for_intermediate_atom_py (PyObject *atom_spec, PyObject *position)
 add a target position for an intermediate atom and refine
 
PyObject * add_target_position_restraints_for_intermediate_atoms_py (PyObject *atom_spec_position_list)
 
Marking Fixed Atom Interface
SCM mark_atom_as_fixed_scm (int imol, SCM atom_spec, int state)
 
int mark_multiple_atoms_as_fixed_scm (int imol, SCM atom_spec_list, int state)
 
PyObject * mark_atom_as_fixed_py (int imol, PyObject *atom_spec, int state)
 
int mark_multiple_atoms_as_fixed_py (int imol, PyObject *atom_spec_list, int state)
 
void setup_fixed_atom_pick (short int ipick, short int is_unpick)
 
void clear_all_fixed_atoms (int imol)
 clear all fixed atoms
 
void clear_fixed_atoms_all ()
 
void set_debug_atom_picking (int istate)
 
Partial Charges
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)
 
EM interface
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.012 1.012 1.012). Return error status, 1 means it worked, 0 means it did not work.
 
void segment_map (int imol_map, float low_level)
 
void segment_map_multi_scale (int imol_map, float low_level, float b_factor_inc, int n_rounds)
 
void map_histogram (int imol_map)
 
CCP4mg Interface
SCM ccp4i_projects_scm ()
 return a list of pairs of strings, the project names and the directory. Include aliases.
 
PyObject * ccp4i_projects_py ()
 return a list of pairs of strings, the project names and the directory. Include aliases.
 
void set_add_ccp4i_projects_to_file_dialogs (short int state)
 allow the user to not add ccp4i directories to the file choosers More...
 
void write_ccp4mg_picture_description (const char *filename)
 write a ccp4mg picture description file
 
Dipoles
void delete_dipole (int imol, int dipole_number)
 
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
 
SCM add_dipole_scm (int imol, const char *chain_id, int res_no, const char *ins_code)
 return the dipole number
 
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.
 
PyObject * add_dipole_for_residues_py (int imol, PyObject *residue_specs)
 add a dipole given a set of residues. Return a dipole description.
 
Aux functions
int laplacian (int imol)
 Create the "Laplacian" (-ve second derivative) of the given map.
 
PKGDATADIR
PyObject * get_pkgdatadir_py ()
 
SCM get_pkgdatadir_scm ()
 
SMILES
void do_smiles_gui ()
 display the SMILES string dialog
 
PHENIX Support
void set_button_label_for_external_refinement (const char *button_label)
 set the button label of the external Refinement program
 
Graphics Text
int place_text (const char *text, float x, float y, float z, int size)
 Put text at x,y,z. More...
 
void remove_text (int text_handle)
 Remove "3d" text item.
 
void edit_text (int text_handle, const char *new_text)
 
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, then return -1
 
PISA Interaction
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. Old, not very useful.
 
SCM handle_pisa_interfaces_scm (SCM interfaces_description_scm)
 
SCM pisa_molecule_record_residues (SCM molecule_record_1)
 
SCM pisa_molecule_record_chain_id (SCM molecule_record_1)
 
void add_pisa_interface_bond_scm (int imol_1, int imol_2, SCM pisa_bond_scm, int interface_number)
 
void pisa_clear_interfaces ()
 
PyObject * handle_pisa_interfaces_py (PyObject *interfaces_description_py)
 
void add_pisa_interface_bond_py (int imol_1, int imol_2, PyObject *pisa_bond_py, int interface_number)
 
Jiggle Fit
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 < -100 if not possible, else return the new best fit for this residue.
 
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 < -100 if not possible, else return the new best fit for this molecule.
 
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 < -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
 
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 < -100 if not possible, else return the new best fit for this chain.
 
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 More...
 
SBase interface
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 name
 
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 name
 
int get_ccp4srs_monomer_and_dictionary (const char *comp_id)
 return the new molecule number of the monomer. More...
 
int get_sbase_monomer (const char *comp_id)
 same as above but using old name for back-compatibility
 
FLE-View
void fle_view_internal (int imol, const char *chain_id, int res_no, const char *ins_code, int imol_ligand_fragment, const char *prodrg_output_flat_mol_file_name, const char *prodrg_output_flat_pdb_file_name, const char *prodrg_output_3d_pdb_file_name, const char *prodrg_output_dict_cif_file_name)
 
void fle_view_internal_to_png (int imol, const char *chain_id, int res_no, const char *ins_code, int imol_ligand_fragment, const char *prodrg_output_flat_mol_file_name, const char *prodrg_output_flat_pdb_file_name, const char *prodrg_output_3d_pdb_file_name, const char *prodrg_output_dict_cif_file_name, int output_to_png_file_flag, const char *png_file_name)
 
void fle_view_with_rdkit (int imol, const char *chain_id, int res_no, const char *ins_code, float residues_near_radius)
 
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)
 
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)
 
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)
 
void fle_view_set_water_dist_max (float dist_max)
 set the maximum considered distance to water More...
 
void fle_view_set_h_bond_dist_max (float h_bond_dist_max)
 set the maximum considered hydrogen bond distance More...
 
int sprout_hydrogens (int imol, const char *chain_id, int res_no, const char *ins_code)
 Add hydrogens to specificied residue. More...
 
LSQ-improve
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 "lsq_improve" algorithm of Kleywegt and Jones (1997). More...
 
single-model view
void single_model_view_model_number (int imol, int imodel)
 put molecule number imol to display only model number imodel
 
int single_model_view_this_model_number (int imol)
 the current model number being displayed More...
 
int single_model_view_next_model_number (int imol)
 change the representation to the next model number to be displayed More...
 
int single_model_view_prev_model_number (int imol)
 change the representation to the previous model number to be displayed More...
 
graphics 2D ligand view
void set_show_graphics_ligand_view (int state)
 set the graphics ligand view state More...
 
Experimental
void add_ligand_builder_menu_item_maybe ()
 
void start_ligand_builder_gui ()
 display the ligand builder dialog
 
SCM all_molecule_rotamer_score (int imol)
 
SCM all_molecule_ramachandran_score (int imol)
 
PyObject * all_molecule_rotamer_score_py (int imol)
 
PyObject * all_molecule_ramachandran_score_py (int imol)
 
PyObject * all_molecule_ramachandran_region_py (int imol)
 
void globularize (int imol)
 globularize the molecule. More...
 
void user_defined_click_scm (int n_clicks, SCM func)
 run a user defined function More...
 
void user_defined_click_py (int n_clicks, PyObject *func)
 

Detailed Description

Coot Scripting Interface - General.

Here is a list of all the scripting interface functions. They are described/formatted in c/python format.

Usually coot is compiled with the guile interpreter, and in this case these function names and usage are changed a little, e.g.:

c-format: chain_n_residues("A", 1)

scheme format: (chain-n-residues "A" 1)

Note the prefix usage of the parenthesis and the lack of comma to separate the arguments.

Function Documentation

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) rather than move the graphics.

Returns
the view number for this (new) view.
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.

Return the new alt_conf chain_id on sucess, python False on fail

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.

Return the new alt_conf chain_id on sucess, scheme false on fail

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

this extra restraint is used when the given atoms are selected in refinement or regularization.

Returns
the index of the new restraint.
-1 when the atoms were not found and no extra bond restraint was stored.
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

this extra restraint is used when the given atoms are selected in refinement or regularization.

Returns
the index of the new restraint.
-1 when the atoms were not found and no extra bond restraint was stored.
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.

Returns
the distance between the points
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.

This function is used when adding a new (modified) ligand to a structure. It creates a new molecule that is a copy of the current molecule except that the new ligand is added and the current ligand/residue is deleted.

int add_nucleotide ( int  imol,
const char *  chain_id,
int  res_no 
)

Add a terminal nucleotide.

No fitting is done

void add_omega_torsion_restriants ( )

add restraints on the omega angle of the peptides

(that is the torsion round the peptide bond). Omega angles that are closer to 0 than to 180 will be refined as cis peptides (and of course if omega is greater than 90 then the peptide will be refined as a trans peptide (this is the normal case).

void add_planar_peptide_restraints ( )

add a restraint on peptides to make them planar

This adds a 5 atom restraint that includes both CA atoms of the peptide. Use this rather than editting the mon_lib_list.cif file.

void add_refmac_extra_restraints ( int  imol,
const char *  file_name 
)

read in prosmart (typically) extra restraints

void add_status_bar_text ( const char *  s)

Put text s into the status bar.

use this to put info for the user in the statusbar (less intrusive than popup).

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

for CNS strict NCS usage: expand like normal symmetry does

int add_terminal_residue ( int  imol,
const char *  chain_id,
int  residue_number,
const char *  residue_type,
int  immediate_add 
)

Add a terminal residue.

residue type can be "auto" and immediate_add is recommended to be 1.

Returns
0 on failure, 1 on success
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.

Returns
the success status, 0 on failure, 1 on success
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.

Returns
-1 on error.
PyObject* alignment_mismatches_py ( int  imol)

do a internal alignment of all the assigned sequences, return a list of mismatches that need to be made to model number imol to match the input sequence.

Return a list of mutations deletions insetions. Return False on failure to align (e.g. not assigned sequence) and the empty list on no alignment mismatches.

SCM alignment_mismatches_scm ( int  imol)

do a internal alignment of all the assigned sequences, return a list of mismatches that need to be made to model number imol to match the input sequence.

Return a list of mutations deletions insetions. Return scheme false on failure to align (e.g. not assigned sequence) and the empty list on no alignment mismatches.

int another_level ( )

Add another contour level for the last added map.

Currently, the map must have been generated from an MTZ file.

Returns
the molecule number of the new molecule or -1 on failure
int another_level_from_map_molecule_number ( int  imap)

Add another contour level for the given map.

Currently, the map must have been generated from an MTZ file.

Returns
the molecule number of the new molecule or -1 on failure
SCM apply_lsq_matches ( int  imol_reference,
int  imol_moving 
)

apply the LSQ matches

Returns
an rtop pair (proper list) on good match, else false
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.

return the score, for some not very good reason. clash_flag determines if we use clashes with other residues in the score for this rotamer (or not). It would be cool to call this from a script that went residue by residue along a (newly-built) chain (now available).

int auto_load_dictionary ( const char *  comp_id)

try to auto-load the dictionary for comp_id from the refmac monomer library.

return 0 on failure. return 1 on successful auto-load. return 2 on already-read.

int auto_read_do_difference_map_too_state ( )

return the flag to do a difference map (too) on auto-read MTZ

Returns
0 means no, 1 means yes.
int background_is_black_p ( )

is the background black (or nearly black)?

Returns
1 if the background is black (or nearly black), else return 0.
int backup_state ( int  imol)

return the backup state for molecule number imol

return 0 for backups off, 1 for backups on, -1 for unknown

int blob_under_pointer_to_screen_centre ( )

Put the blob under the cursor to the screen centre. Check only positive blobs. Useful function if bound to a key.

The refinement map must be set. (We can't check all maps because they are not (or may not be) on the same scale).

Returns
1 if successfully found a blob and moved there. return 0 if no move.
void c_accept_moving_atoms ( )

accept the new positions of the regularized or refined residues

If you are scripting refinement and/or regularization, this is the function that you need to call after refine-zone or regularize-zone.

PyObject* cell_py ( int  imol)

return the parameter that made the map,

Returns
False or something like [45, 46, 47, 90, 90, 120], angles in degress
SCM cell_scm ( int  imol)

return the parameter that made the map,

Returns
false or a list like (45 46 47 90 90 120), angles in degress
SCM chain_id_for_shelxl_residue_number ( int  imol,
int  resno 
)
Returns
the chain id for the given residue.
false if can't do it/fail.
PyObject* chain_id_for_shelxl_residue_number_py ( int  imol,
int  resno 
)
Returns
the chain id for the given residue. Return Py_False if can't do it/fail.
SCM chain_id_scm ( int  imol,
int  ichain 
)

the chain_id (string) of the ichain-th chain molecule number imol

Returns
the chain-id
int chain_n_residues ( const char *  chain_id,
int  imol 
)

the number of residues in chain chain_id and molecule number imol

Returns
the number of residues
void change_contour_level ( short int  is_increment)

change the contour level of the current map by a step

if is_increment=1 the contour level is increased. If is_increment=0 the map contour level is decreased.

SCM cis_peptides ( int  imol)

return cis_peptide info for imol.

Return a SCM list object of (residue1 residue2 omega)

PyObject* cis_peptides_py ( int  imol)

return cis_peptide info for imol.

Return a Python list object of [residue1, residue2, omega]

PyObject* comp_id_to_name_py ( const char *  comp_id)

return the monomer name

return python false if not found

SCM comp_id_to_name_scm ( const char *  comp_id)

return the monomer name

return scheme false if not found

int copy_molecule ( int  imol)

copy molecule imol

Returns
the new molecule number. Return -1 on failure to copy molecule (out of range, or molecule is closed)
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

resno_range_start and resno_range_end are inclusive.

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.

If the target residues do not exist in the peer chains, then create them.

int db_mainchain ( int  imol,
const char *  chain_id,
int  iresno_start,
int  iresno_end,
const char *  direction 
)

CA -> mainchain conversion.

direction is either "forwards" or "backwards"

See also the function below.

return the new molecule number

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.

Both directions are built. This is the modern interface.

int delete_hydrogen_atoms ( int  imol)

delete all hydrogens in molecule,

Returns
number of hydrogens deleted.
int delete_hydrogens ( int  imol)

delete all hydrogens in molecule,

Returns
number of hydrogens deleted.
int delete_restraints ( const char *  comp_id)

delete the restraints for the given comp_id (i.e. residue name)

Returns
success status (0 is failed, 1 is success)
int delete_waters ( int  imol)

delete all waters in molecule,

Returns
number of waters deleted.
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

peaks within max_closeness (2.0 A typically) of a larger peak are not listed.

the flag around_model_only_flag limits the peak list to those only within 4A of the selected model (useful for maps with molecular symmetry).

void display_maps_scm ( SCM  maps_list)

maps_list is a list of integers (map molecule numbers).

This interface is uses so that we don't get flashing when a map is turned off (using set_mol_displayed).

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.

residue_specs must not contain spec for waters (you wouldn't want to surface over waters anyway).

void do_find_ligands_dialog ( )

display the find ligands dialog

if maps, coords and ligands are available, that is.

void do_surface ( int  imol,
int  istate 
)

draw surface of molecule number imol

if state = 1 draw the surface (normal representation goes away)

if state = 0 don't draw surface

int does_residue_exist_p ( int  imol,
char *  chain_id,
int  resno,
char *  inscode 
)

Does the residue exist? (Raw function)

Returns
0 on not-exist, 1 on does exist.
int dots ( int  imol,
const char *  atom_selection_str,
const char *  dots_object_name,
float  dot_density,
float  sphere_size_scale 
)

display dotted surface

return a generic objects handle (which can be used to remove later)

int draw_hydrogens_state ( int  imol)

the state of draw hydrogens for molecule number imol.

return -1 on bad imol.

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

return a status of 0 if it failed to fined the residue, return a value of 1 if it worked.

int esoteric_depth_cue_state ( )

native depth cueing system

return the state of the esoteric depth cueing flag

int exchange_chain_ids_for_seg_ids ( int  imol)

Experimental interface for Ribosome People.

Ribosome People have many chains in their pdb file, they prefer segids to chainids (chainids are only 1 character). But coot uses the concept of chain ids and not seg-ids. mmdb allow us to use more than one char in the chainid, so after we read in a pdb, let's replace the chain ids with the segids. Will that help?

int export_map ( int  imol,
const char *  filename 
)

export (write to disk) the map of molecule number imol to filename.

Return 0 on failure, 1 on success.

void export_map_fragment_with_text_radius ( int  imol,
const char *  radius_text,
const char *  filename 
)

convenience function, called from callbacks.c

void fill_partial_residues ( int  imol)

fill all the residues of molecule number imol that have missing atoms.

To be used to remove the effects of chainsaw.

int find_helices ( )

autobuild helices

Find secondary structure in the current map. Add to a molecule called "Helices", create it if needed.

Returns
the index of the new molecule.
int find_nucleic_acids_local ( float  radius)

autobuild nucleic acid chains

Find secondary structure local to current view in the current map. Add to a molecule called "NuclAcid", create it if needed.

Returns
the index of the new molecule.
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

Find secondary structure in the current map. Add to a molecule called "SecStruc", create it if needed.

Returns
the index of the new molecule.
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

Find secondary structure local to current view in the current map. Add to a molecule called "SecStruc", create it if needed.

Returns
the index of the new molecule.
int find_strands ( )

autobuild strands

Find secondary structure in the current map. Add to a molecule called "Strands", create it if needed.

Returns
the index of the new molecule.
int first_coords_imol ( )

What is the molecule number of first coordinates molecule?

return -1 when there is none.

int first_molecule_with_symmetry_displayed ( )

return the molecule number.

Returns
-1 if there is no molecule with symmetry displayed.
int first_small_coords_imol ( )

molecule number of first small (<400 atoms) molecule.

return -1 on no such molecule

int first_unsaved_coords_imol ( )

What is the molecule number of first unsaved coordinates molecule?

return -1 when there is none.

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

Use a map that is blurred by the give factor for fitting.

Returns
< -100 if not possible, else return the new best fit for this chain.
int fix_nomenclature_errors ( int  imol)

fix nomenclature errors in molecule number imol

Returns
the number of resides altered.
void fle_view_set_h_bond_dist_max ( float  h_bond_dist_max)

set the maximum considered hydrogen bond distance

default 3.9 A.

void fle_view_set_water_dist_max ( float  dist_max)

set the maximum considered distance to water

default 3.25 A.

float get_bond_colour_rotation_for_molecule ( int  imol)

get the bond colour for molecule.

Return -1 on err (bad molecule number)

int get_ccp4srs_monomer_and_dictionary ( const char *  comp_id)

return the new molecule number of the monomer.

The monomer will have chainid "A" and residue number 1.

Return -1 on failure to get monomer.

int get_font_size ( )

return the font size

Returns
1 (small) 2 (medium, default) 3 (large)
float get_map_weight ( )

return the relative weight of the geometric terms to the map terms.

A more sensible name for the matrix_state() function)

PyObject* get_pointer_position_frac_py ( )

return the [x,y] position of the pointer in fractional coordinates.

the origin is top-left. may return false if pointer is not available

short int get_symmetry_as_calphas_state ( int  imol)

what is state of display CAs for molecule number mol_no?

return state=0 for off, state=1 for on

void globularize ( int  imol)

globularize the molecule.

This is not guaranteed to generate the correct biological entity, but will bring together molecules (chains/domains) that are dispersed throughout the unit cell.

int graphics_n_molecules ( )

return the number of molecules (coordinates molecules and map molecules combined) that are currently in coot

Returns
the number of molecules (closed molecules are not counted)
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)

a, b,c are in Angstroems. alpha, beta, gamma are in degrees. spg is the space group info, either ;-delimited symmetry operators or the space group name

void handle_online_coot_search_request ( const char *  entry_text)

the search interface

find words, construct a url and open it.

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.

set recentre_on_read_pdb_flag to 0 if you don't want the view to recentre on the new coordinates.

int has_unit_cell_state ( int  imol)

molecule number imol has a unit cell?

Returns
1 on "yes, it has a cell", 0 for "no"
int have_unsaved_changes_p ( int  imol)

does molecule number imol have unsaved changes?

Returns
-1 on bad imol, 0 on no unsaved changes, 1 on has unsaved changes
int het_group_n_atoms ( const char *  comp_id)

return the number of non-hydrogen atoms in the given het-group (comp-id).

Return -1 on comp-id not found in dictionary.

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.

Return 1 on atoms changes, 0 on not. Return -1 if residue not found.

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

use the given sequence (single letter code)

RNA_or_DNA is either "RNA" or "DNA"

form is either "A" or "B"

Returns
the new molecule number or -1 if a problem
int imol_refinement_map ( )

the molecule number of the map used for refinement

Returns
the map number, if it has been set or there is only one map, return -1 on no map set (ambiguous) or no maps.
void info_dialog ( const char *  txt)

create a dialog with information

create a dialog with information string txt. User has to click to dismiss it, but it is not modal (nothing in coot is modal).

void info_dialog_and_text ( const char *  txt)

create a dialog with information and print to console

as info_dialog but print to console as well.

void info_dialog_with_markup ( const char *  txt)

as above, create a dialog with information

This dialog is left-justified and can use markup such as angled bracketted tt or i

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

Returns
the view number for this (new) view.
char* insertion_code_from_serial_number ( int  imol,
const char *  chain_id,
int  serial_num 
)

the insertion code of the residue.

Returns
NULL (scheme False) on failure.
int is_nucleotide_chain_p ( int  imol,
const char *  chain_id 
)

is this a nucleic acid chain? [Raw function]

This is a raw interface function, you should generally not use this, but instead use (is-nucleicacid-chain? imol chain-id)

Returns
-1 on error, 0 for no, 1 for is "a nucleicacid chain". We wouldn't want to be doing rotamer searches and the like on such a chain.

This wraps the mmdb function isNucleotideChain(). For completeness.

int is_protein_chain_p ( int  imol,
const char *  chain_id 
)

is this a protein chain? [Raw function]

This is a raw interface function, you should generally not use this, but instead use (is-protein-chain? imol chain-id)

Returns
-1 on error, 0 for no, 1 for is "a protein chain". We wouldn't want to be doing rotamer searches and the like on such a chain.

This wraps the mmdb function isAminoacidChain().

int is_solvent_chain_p ( int  imol,
const char *  chain_id 
)

is this a solvent chain? [Raw function]

This is a raw interface function, you should generally not use this, but instead use (is-solvent-chain? imol chain-id)

Returns
-1 on error, 0 for no, 1 for is "a solvent chain". We wouldn't want to be doing rotamer searches and the like on such a chain.

This wraps the mmdb function isSolventChain().

int keep_map_colour_after_refmac_state ( )

the keep-map-colour-after-refmac internal state

Returns
1 for "yes", 0 for "no"
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 "lsq_improve" algorithm of Kleywegt and Jones (1997).

Note that if a residue selection is specified in the residue selection(s), then the first residue of the given range must exist in the molecule (if not, then mmdb will not select any atoms from that molecule).

Kleywegt and Jones set n_res to 4 and dist_crit to 6.0.

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)

given mtz file mtz_file_name and F column f_col and phases column phi_col and optional weight column weight_col (pass use_weights=0 if weights are not to be used). Also mark the map as a difference map (is_diff_map=1) or not (is_diff_map=0) because they are handled differently inside coot.

Returns
-1 on error, else return the new molecule number
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

pass along the refmac column labels for storage (not used in the creation of the map)

Returns
-1 on error, else return imol
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 make_and_draw_patterson ( const char *  mtz_file_name,
const char *  f_col,
const char *  sigf_col 
)

Make a patterson molecule.

Returns
a new molecule number or -1 on failure
int make_and_draw_patterson_using_intensities ( const char *  mtz_file_name,
const char *  i_col,
const char *  sigi_col 
)

Make a patterson molecule.

Returns
a new molecule number or -1 on failure
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

e.g. (make-ball-and-stick 0 "/1" 0.15 0.25 1)

int make_directory_maybe ( const char *  dir)

make a directory dir (if it doesn't exist) and return error code

If it can be created, create the directory dir, return the success status like mkdir: mkdir

Returns
zero on success, or -1 if an error occurred. If dir already exists as a directory, return 0 of course.
int make_masked_maps_split_by_chain ( int  imol,
int  imol_map 
)

make chain masked maps

needs to return a list of values

void make_tight_planar_peptide_restraints ( )

make the planar peptide restraints tight

Useful when refining models with cryo-EM maps

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.

If the file updates, then the map will be updated.

int make_updating_model_molecule ( const char *  filename)

make a model molecule from the give file name.

If the file updates, then the model will be updated.

void manage_column_selector ( const char *  filename)

given a filename, try to read it as a data file

We try as .phs and .cif files first

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.

Returns
the new molecule number.
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 automatically (first of their type) from the mtz file.

Returns
the new molecule number, -1 on a problem.
int map_is_displayed ( int  imol)

return the display state of molecule number imol

Returns
1 for on, 0 for off
PyObject* map_parameters_py ( int  imol)

return the parameter of the molecule, something like (45 46 47 90 90 120), angles in degress

return the parameter that made the map,

Returns
False or something like ["xxx.mtz", "FPH", "PHWT", "", False]
SCM map_parameters_scm ( int  imol)

return the parameter that made the map,

Returns
false or a string like ("xxx.mtz" "FPH" "PHWT" "" False)
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

(mask-map-by-molecule map-no mol-no invert?) creates and displays a masked map, cuts down density where the coordinates are (invert is 0). If invert? is 1, cut the density down where there are no atoms atoms.

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.

By using graph matching, make the names of the atoms of the given ligand/residue match those of the reference residue/ligand as closely as possible - where there would be an atom name clash, invent a new atom name.

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)

By using graph matching, make the names of the atoms of the given ligand/residue match those of the reference ligand from the geometry store as closely as possible. Where there would be an atom name clash, invent a new atom name.

This doesn't create a new dictionary for the selected ligand - and that's a big problem (see match_residue_and_dictionary).

SCM merge_molecules ( SCM  add_molecules,
int  imol 
)

merge molecules

Returns
a pair, the first item of which is a status (1 is good) the second is a list of merge-infos (one for each of the items in add_molecules). If the molecule of an add_molecule item is just one residue, return a spec for the new residue, if it is many residues return a chain id.

the first argument is a list of molecule numbers and the second is the target molecule into which the others should be merged

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.

Return 1 on success. Return 0 on a file without Rfree, return -1 on complete failure to write a file.

int mol_is_active ( int  imol)

return the active state of molecule number imol

Returns
1 for on, 0 for off
int mol_is_displayed ( int  imol)

return the display state of molecule number imol

Returns
1 for on, 0 for off
float molecule_centre_internal ( int  imol,
int  iaxis 
)

internal function for molecule centre

Returns
status, less than -9999 is for failure (eg. bad imol);
const char* molecule_name ( int  imol)

return the name of molecule number imol

Returns
0 if not a valid name ( -> False in scheme) e.g. "/a/b/c.pdb" for "d/e/f.mtz FWT PHWT"
int move_waters_to_around_protein ( int  imol)

move waters of molecule number imol so that they are around the protein.

Returns
the number of moved waters.
const char* mtz_fp_for_map ( int  imol_map)

return the FP column in the file that was use to generate the map

return 0 when there is no mtz file associated with that map (it was generated from a CCP4 map file say).

Caller should dispose of returned pointer.

const char* mtz_hklin_for_map ( int  imol_map)

return the mtz file that was use to generate the map

return 0 when there is no mtz file associated with that map (it was generated from a CCP4 map file say).

const char* mtz_phi_for_map ( int  imol_map)

return the phases column in mtz file that was use to generate the map

return 0 when there is no mtz file associated with that map (it was generated from a CCP4 map file say). Caller should dispose of returned pointer.

short int mtz_use_weight_for_map ( int  imol_map)

return flag for whether weights were used that was use to generate the map

return 0 when no weights were used or there is no mtz file associated with that map.

const char* mtz_weight_for_map ( int  imol_map)

return the weight column in the mtz file that was use to generate the map

return 0 when there is no mtz file associated with that map (it was generated from a CCP4 map file say) or no weights were used. Caller should dispose of returned pointer.

int mutate ( int  imol,
const char *  chain_id,
int  ires,
const char *  inscode,
const char *  target_res_type 
)

mutate a given residue

target_res_type is a three-letter-code.

Return 1 on a good mutate.

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.

Returns
1 on success, 0 on failure

ires-ser is the serial number of the residue, not the seqnum There 2 functions don't make backups, but mutate() does - CHECKME Hence mutate() is for use as a "one-by-one" type and the following 2 by wrappers that muate either a residue range or a whole chain

Note that the target_res_type is a char, not a string (or a char *). So from the scheme interface you'd use (for example) hash backslash A for ALA.

int n_atoms ( int  imol)

return the atoms of residues in the molecule,

return -1 if this is a map or closed.

int n_chains ( int  imol)

number of chains in molecule number imol

Returns
the number of chains
int n_models ( int  imol)

return the number of models in molecule number imol

useful for NMR or other such multi-model molecules.

return the number of models or -1 if there was a problem with the given molecule.

int n_residues ( int  imol)

return the number of residues in the molecule,

return -1 if this is a map or closed.

int n_symops ( int  imol)

return the number of symmetry operators for the given molecule

return -1 on no-symmetry for molecule or inappropriate imol number

PyObject* ncs_chain_ids_py ( int  imol)

Return the ncs chains id for the given molecule.

return something like: [["A", "B"]] or [["A", "C", "E"], ["B", "D", "F"]]. The master chain goes in first.

If imol does not have NCS ghosts, return python False.

SCM ncs_chain_ids_scm ( int  imol)

Return the ncs chains id for the given molecule.

return something like: '(("A" "B")) or '(("A" "C" "E") ("B" "D" "F")). The master chain goes in first.

If imol does not have NCS ghosts, return scheme false.

PyObject* ncs_ghosts_py ( int  imol)

Get the NCS ghosts description.

Returns
False on bad imol or a list of ghosts on good imol. Can include NCS rtops if they are available, else the rtops are False
SCM ncs_ghosts_scm ( int  imol)

get the NCS ghost description

Returns
false on bad imol or a list of ghosts on good imol. Can include NCS rtops if they are available, else the rtops are False
SCM ncs_master_chains_scm ( int  imol)

Copy residue range to selected NCS chains.

If the target residues do not exist in the peer chains, then create them.

return a list of NCS masters or scheme false

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.

Returns
scheme false if not possible
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 molecule number imol

Returns
the new molecule number, -1 means an error.
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

Returns
the new molecule number, -1 means an error.
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

Returns
the new molecule number, -1 means an error.
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

Returns
the new molecule number, -1 means an error.
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 position.

Returns
the new molecule number, -1 means an error.
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.

The rotation/translation matrix components are given in orthogonal coordinates.

Allow a shift of the coordinates to the origin before symmetry expansion is aplied.

Pass "" as the name-in and a name will be constructed for you.

Return -1 on failure.

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 the mmdb_atom_selection_string.

The rotation/translation matrix components are given in orthogonal coordinates.

Allow a shift of the coordinates to the origin before symmetry expansion is aplied.

Pass "" as the name-in and a name will be constructed for you.

Return -1 on failure.

SCM overlap_ligands ( int  imol_ligand,
int  imol_ref,
const char *  chain_id_ref,
int  resno_ref 
)

Overlap residue with "template"-based matching.

Overlap the first residue in imol_ligand onto the residue specified by the reference parameters. Use graph matching, not atom names.

Returns
success status, False = failed to find residue in either imol_ligand or imo_ref. If success, return the RT operator.
int place_helix_here ( )

add a helix

Add a helix somewhere close to this point in the map, try to fit the orientation. Add to a molecule called "Helix", create it if needed. Create another moecule called "Reverse Helix" if the helix orientation isn't completely unequivocal.

Returns
the index of the new molecule.
int place_strand_here ( int  n_residues,
int  n_sample_strands 
)

add a strands

Add a strand close to this point in the map, try to fit the orientation. Add to a molecule called "Strand", create it if needed. n_residues is the estimated number of residues in the strand.

n_sample_strands is the number of strands from the database tested to fit into this strand density. 8 is a suggested number. 20 for a more rigourous search, but it will be slower.

Returns
the index of the new molecule.
void place_strand_here_dialog ( )

show the strand placement gui.

Choose the python version in there, if needed. Call scripting function, display it in place, don't return a widget.

int place_text ( const char *  text,
float  x,
float  y,
float  z,
int  size 
)

Put text at x,y,z.

Returns
a text handle

size variable is currently ignored.

int prefer_python ( )

the python-prefered mode.

This is available so that the scripting functions know whether on not to put themselves onto in as menu items.

If you consider using this, consider in preference use_gui_qm == 2, which is used elsewhere to stop python functions adding to the gui, when guile-gtk functions have alread done so. We should clean up this (rather obscure) interface at some stage.

return 1 for python is prefered, 0 for not.

int probe_available_p ( )

Can we run probe (was the executable variable set properly?) (predicate).

Returns
1 for yes, 2 for no
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_distance, plane_distortion], chain_id, resno, ins_code]

(where plane_distortion is for the other 4 atoms in the plane (I think)).

and if there is no following residue, then the phosphate distance cannot be calculated, so the (inner) list is null (not filled).

SCM pucker_info_scm ( int  imol,
SCM  residue_spec,
int  do_pukka_pucker_check 
)

get the pucker info for the specified residue

Returns
scheme false if residue not found, otherwise (list (list phosphate-distance puckered-atom out-of-plane-distance plane-distortion) chain-id resno ins-code)

(where plane-distortion is for the other 4 atoms in the plane (I think)).

and if there is no following residue, then the phosphate distance cannot be calculated, so the (inner) list is null (not filled).

short int python_at_prompt_at_startup_state ( )

is the python interpreter at the prompt?

Returns
1 for yes, 0 for no.
void quanta_buttons ( )

quanta-like buttons

Note, when you have set these, there is no way to turn them of again (other than restarting).

void quanta_like_zoom ( )

quanta-like zoom buttons

Note, when you have set these, there is no way to turn them of again (other than restarting).

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

uses pending data to make the map.

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

in degrees

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

Returns
the new molecule number, return -1 if problem creating the map (e.g. not phs data, file not found etc).
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) coordinates file

For use with phs data filename provided on the command line

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_lim_high (in Angstroems).

Parameters
imolis the molecule number of the reference (coordinates) molecule from which the cell and symmetry can be obtained.
phs_file_nameis the name of the phs data file.
reso_lim_highis the high resolution limit in Angstroems.
reso_lim_lowthe low resoluion limit (currently ignored).
void recover_session ( )

recover session

After a crash, we provide this convenient interface to restore the session. It runs through all the molecules with models and looks at the coot backup directory looking for related backup files that are more recent that the read file. (Not very good, because you need to remember which files you read in before the crash - should be improved.)

void refine_auto_range ( int  imol,
const char *  chain_id,
int  resno1,
const char *  altconf 
)

refine a zone using auto-range

presumes that imol_Refinement_Map has been set

float refine_ramachandran_restraints_weight ( )
ramachandran restraints weight
Returns
weight as a float
PyObject* refine_residues_py ( int  imol,
PyObject *  r 
)

refine the residues in the given residue spec list

Returns
the refinement summary statistics
SCM refine_residues_scm ( int  imol,
SCM  r 
)

refine residues, r is a list of residue specs.

Returns
refinement results, which consists of

1 - an information string (in case of error)

2 - the progress variable (from GSL)

3 - refinement results for each particular geometry type (bonds, angles etc.)

void refine_zone ( int  imol,
const char *  chain_id,
int  resno1,
int  resno2,
const char *  altconf 
)

refine a zone

presumes that imol_Refinement_Map has been set

short int refinement_already_ongoing_p ( )

If there is a refinement on-going already, we don't want to start a new one.

The is the means to ask if that is the case. This needs a scheme wrapper to provide refinement-already-ongoing? The question is translated to "are the intermediate atoms being displayed?" so that might be a more accurate function name than the current one.

Returns
1 for yes, 0 for no.
int regularize_zone ( int  imol,
const char *  chain_id,
int  resno1,
int  resno2,
const char *  altconf 
)

regularize a zone

Returns
a status, whether the regularisation was done or not. 0 for no, 1 for yes.
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 reference_map_no.

Return the new map molecule number - return -1 on failure

int reset_view ( )

"Reset" the view

return 1 if we moved, else return 0.

centre on last-read molecule with zoom 100. If we are there, then go to the previous molecule, if we are there, then go to the origin.

int residue_has_hetatms ( int  imol,
const char *  chain_id,
int  resno,
const char *  ins_code 
)

residue has HETATMs?

return 1 if all atoms of the specified residue are HETATMs, else, return 0. If residue not found, return -1.

void rigid_body_refine_zone ( int  reso_start,
int  resno_end,
const char *  chain_id,
int  imol 
)

setup rigid body refine zone

where we set the atom selection holders according to the arguments and then call execute_rigid_body_refine()

SCM rotamer_graphs ( int  imol)

Activate rotamer graph analysis for molecule number imol.

Return rotamer info - function used in testing.

PyObject* rotamer_graphs_py ( int  imol)

Activate rotamer graph analysis for molecule number imol.

Return rotamer info - function used in testing.

int rotamer_search_mode_state ( )

\ brief get the mode of rotamer search

int save_coordinates ( int  imol,
const char *  filename 
)

save coordinates of molecule number imol in filename

Returns
status 1 is good (success), 0 is fail.
PyObject* save_state_file_name_py ( )

the save state file name

Returns
the save state file name
SCM save_state_file_name_scm ( )

the save state file name

Returns
the save state file name
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

Allow a shift of the coordinates to the origin before symmetry expansion is apllied (this is how symmetry works in Coot internals).

void scale_zoom ( float  f)

scale the view by f

external (scripting) interface (with redraw)

Parameters
fthe smaller f, the bigger the zoom, typical value 1.3
void screendump_image ( const char *  filename)

dump the current screen image to a file. Format ppm

You can use this, in conjunction with spinning and view moving functions to make movies

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

Returns
< -9999 on failure
void set_active_map_drag_flag ( int  t)

set the state of immediate map upate on map drag.

By default, it is on (t=1). On slower computers it might be better to set t=0.

void set_add_ccp4i_projects_to_file_dialogs ( short int  state)

allow the user to not add ccp4i directories to the file choosers

use state=0 to turn it off

void set_add_terminal_residue_immediate_addition ( int  i)

set immediate addition of terminal residue

call with i=1 for immediate addtion

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.

Attributes can be "x", "y","z", "B", "occ" and the attribute val is a floating point number

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.

Attributes can be "atom-name", "alt-conf", "element" or "segid".

void set_auto_fit_best_rotamer_clash_flag ( int  i)

set the clash flag for rotamer search

And this functions for [pre-setting] the variables for auto_fit_best_rotamer called interactively (using a graphics_info_t function). 0 off, 1 on.

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.

Not every program uses the default refmac labels ("FWT"/"PHWT") for its MTZ file. Here we can tell coot to expect other labels so that coot can "Auto-open" such MTZ files.

e.g. (set-auto-read-column-labels "2FOFCWT" "PH2FOFCWT" 0)

void set_background_colour ( double  red,
double  green,
double  blue 
)

set the background colour

red, green and blue are numbers between 0.0 and 1.0

void set_brief_atom_labels ( int  istat)

use brief atom names for on-screen labels

call with istat=1 to use brief labels, istat=0 for normal labels

void set_browser_interface ( const char *  browser)

set command to open the web browser,

examples are "open" or "mozilla"

void set_colour_map_rotation_for_map ( float  f)

set the colour map rotation (hue change) for maps

default: for maps is 14 degrees.

void set_colour_map_rotation_on_read_pdb_c_only_flag ( short int  i)

shall the colour map rotation apply only to C atoms?

Parameters
i0 for no, 1 for yes
void set_colour_map_rotation_on_read_pdb_flag ( short int  i)

shall the hue change step be used?

Parameters
i0 for no, 1 for yes
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 and colours.

colour_flag: pass 1 for on, 0 for off.

colour_index 0 to 7 inclusive for various different colourings.

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.

1 for on, 0 for off.

void set_contour_by_sigma_step_by_mol ( float  f,
short int  state,
int  imol 
)

set the contour level step

set the contour level step of molecule number imol to f and variable state (setting state to 0 turns off contouring by sigma level)

void set_control_key_for_rotate ( int  state)

Alternate mode for rotation.

Prefered by some, including Dirk Kostrewa. I don't think this mode works properly yet

void set_convert_to_v2_atom_names ( short int  state)

shall we convert nucleotides to match the old dictionary names?

Usually (after 2006 or so) we do not want to do this (given current Coot architecture). Coot should handle the residue synonyms transparently.

default off (0).

void set_decoloned_backup_file_names ( int  state)

set the state for adding paths to backup file names

by default directories names are added into the filename for backup (with / to _ mapping). call this with state=1 to turn off directory names

void set_default_initial_contour_level_for_difference_map ( float  n_sigma)

set the default inital contour for FoFc-style map

in sigma

void set_default_initial_contour_level_for_map ( float  n_sigma)

set the default inital contour for 2FoFc-style map

in sigma

void set_diff_map_iso_level_increment ( float  val)

set the contour scroll step for difference map (in absolute e/A3) to val

The is only activated when scrolling by sigma is turned off

void set_display_only_model_mol ( int  imol)

from all the model molecules, display only imol

This stops flashing/delayed animations with many molecules

void set_do_GL_lighting ( int  state)

turn the GL lighting on (state = 1) or off (state = 0)

slows down the display of simple lines

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

r,g,b are values between 0.0 and 1.0

void set_dragged_refinement_steps_per_frame ( int  v)

set the number of refinement steps applied to the intermediate atoms each frame of graphics.

smaller numbers make the movement of the intermediate atoms slower, smoother, more elegant.

Default: 80.

void set_draw_cis_peptide_markups ( int  status)

set status of drawing cis-peptide markups

default status is 1.

void set_draw_map_standard_lines ( int  imol,
short int  state 
)

toggle for standard lines representation of map.

This turns off/on standard lines representation of map. transparent surface is another representation type.

If you want to just turn off a map, don't use this, use set_map_displayed().

void set_draw_missing_residues_loops ( short int  state)

set the state for drawing missing resiude loops

For taking screenshots, we often don't want to see them.

void set_draw_stick_mode_atoms ( int  imol,
short int  state 
)

draw little coloured balls on atoms

turn off with state = 0

turn on with state = 1

void set_draw_zero_occ_markers ( int  status)

set status of drawing zero occupancy markers.

default status is 1.

void set_esoteric_depth_cue ( int  istate)

not everone likes coot's esoteric depth cueing system

Pass an argument istate=1 to turn it off

(this function is currently disabled).

void set_filter_fileselection_filenames ( int  istate)

on opening a file selection dialog, pre-filter the files.

set to 1 to pre-filter, [0 (off, non-pre-filtering) is the default

void set_find_ligand_mask_waters ( int  istate)

how shall we treat the waters during ligand fitting?

pass with istate=1 for waters to mask the map in the same way that protein atoms do.

void set_find_ligand_multi_solutions_per_cluster ( float  lim_1,
float  lim_2 
)

allow multiple ligand solutions per cluster.

The first limit is the fraction of the top scored positions that go on to correlation scoring (closer to 1 means less and faster - default 0.7).

The second limit is the fraction of the top correlation score that is considered interesting. Limits the number of solutions displayed to user. Default 0.9.

There is currently no chi-angle set redundancy filtering - I suspect that there should be.

Nino-mode.

void set_find_ligand_n_top_ligands ( int  n)

search the top n sites for ligands.

Default 10.

void set_fix_chiral_volumes_before_refinement ( int  istate)

correct the sign of chiral volumes before commencing refinement?

Do we want to fix chiral volumes (by moving the chiral atom to the other side of the chiral plane if necessary). Default yes (1). Note: doesn't work currently.

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.

Default is 1 (on.

void set_font_size ( int  i)

set the font size

Parameters
i1 (small) 2 (medium, default) 3 (large)
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

It seems important for swig that the char * arguments are const char *, not const gchar * (or else we get wrong type of argument error on (say) "A"

Returns
the success status of the go to. 0 for fail, 1 for success.
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

It seems important for swig that the char * arguments are const char *, not const gchar * (or else we get wrong type of argument error on (say) "A"

Returns
the success status of the go to. 0 for fail, 1 for success.
void set_go_to_atom_molecule ( int  imol)

set the molecule for the Go To Atom

For dynarama callback sake. The widget/class knows which molecule that it was generated from, so in order to go to the molecule from dynarama, we first need to the the molecule - because set_go_to_atom_chain_residue_atom_name() does not mention the molecule (see "Next/Previous Residue" for reasons for that). This function simply calls the graphics_info_t function of the same name.

Also used in scripting, where go-to-atom-chain-residue-atom-name does not mention the molecule number.

20090914-PE set-go-to-atom-molecule can be used in a script and it should change the go-to-atom-molecule in the Go To Atom dialog (if it is being displayed). This does mean, of course that using the ramachandran plot to centre on atoms will change the Go To Atom dialog. Maybe that is surprising (maybe not).

void set_grey_carbon_colour ( int  imol,
float  r,
float  g,
float  b 
)

set the colour for the carbon atoms

can be not grey if you desire, r, g, b in the range 0 to 1.

void set_hardware_stereo_angle_factor ( float  f)

how much should the eyes be separated in stereo mode?

Parameters
fthe angular difference (in multiples of 4.5 degrees)
int set_imol_refinement_map ( int  imol)

set the molecule number of the map to be used for refinement/fitting.

Returns
imol on success, -1 on failure
void set_interactive_probe_dots_molprobity_radius ( float  r)

set the radius over which we can run interactive probe, bigger is better but slower.

default is 6.0

void set_iso_level_increment ( float  val)

set the contour scroll step (in absolute e/A3) for 2Fo-Fc-style maps to val

The is only activated when scrolling by sigma is turned off

void set_keep_map_colour_after_refmac ( int  istate)

flag to enable above

call this with istate=1

void set_ligand_flexible_ligand_n_samples ( int  i)

set the number of conformation samples

big ligands require more samples. Default 10.

void set_ligand_water_to_protein_distance_limits ( float  f1,
float  f2 
)

set ligand to protein distance limits

f1 is the minimum distance, f2 is the maximum distance

void set_main_window_title ( const char *  s)

set the main window title.

function added for Lothar Esser

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

Returns
success status, 0 -> failure (imol does not have a map)
void set_map_sampling_rate ( float  r)

set the map sampling rate (default 1.5)

Set to something like 2.0 or 2.5 for more finely sampled maps. Useful for baton-building low resolution maps.

void set_map_sampling_rate_text ( const char *  text)

sampling rate

find the molecule for which the single map dialog applies and set the contour level and redraw

void set_matrix ( float  f)

set the relative weight of the geometric terms to the map terms

The default is 60.

The higher the number the more weight that is given to the map terms but the resulting chi squared values are higher). This will be needed for maps generated from data not on (or close to) the absolute scale or maps that have been scaled (for example so that the sigma level has been scaled to 1.0).

void set_max_skeleton_search_depth ( int  v)

set the skeleton search depth, used in baton building

For high resolution maps, you need to search deeper down the skeleton tree. This limit needs to be increased to 20 or so for high res maps (it is 10 by default)

void set_molecule_bonds_colour_map_rotation ( int  imol,
float  theta 
)

set the colour map rotation for molecule number imol

theta is in degrees

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?

1 for yes, 0 for no.

void set_nomenclature_errors_on_read ( const char *  mode)

set way nomenclature errors should be handled on reading coordinates.

mode should be "auto-correct", "ignore", "prompt". The default is "prompt"

void set_pick_cursor_index ( int  icursor_index)

let the user have a different pick cursor

sometimes (the default) GDK_CROSSHAIR is hard to see, let the user set their own

void set_ramachandran_plot_background_block_size ( float  blocksize)

set the ramachandran plot background block size.

Smaller is smoother but slower. Should be divisible exactly into

  1. Default value is 10.
void set_refine_auto_range_step ( int  i)

change the +/- step for autoranging (default is 1)

Auto-ranging alow you to select a range from one button press, this allows you to set the number of residues either side of the clicked residue that becomes the selected zone

void set_refine_max_residues ( int  n)

set the heuristic fencepost for the maximum number of residues in the refinement/regularization residue range

Default is 20

void set_refine_ramachandran_angles ( int  state)

turn on Ramachandran angles refinement in refinement and regularization

name consistent with set_refine_with_torsion_restraints() !?

void set_refine_ramachandran_restraints_weight ( float  w)

change the target function weight

a big number means bad things

void set_refine_rotamers ( int  state)

set the state for using rotamer restraints "drive" mode

1 in on, 0 is off (off by default)

void set_refine_with_torsion_restraints ( int  istate)

turn on (or off) torsion restraints

Pass with istate=1 for on, istate=0 for off.

void set_refinement_drag_elasticity ( float  e)

  • the elasticity of the dragged atom in refinement mode.

Default 0.33

Bigger numbers mean bigger movement of the other atoms.

void set_refinement_refine_per_frame ( int  istate)

allow refinement of intermediate atoms after dragging, before displaying (default: 0, off).

An attempt to do something like xfit does, at the request of Frank von Delft.

Pass with istate=1 to enable this option.

void set_residue_selection_flash_frames_number ( int  i)

set the number of frames for which the selected residue range flashes

On fast computers, this can be set to higher than the default for more aesthetic appeal.

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.

(rotamer names are the Richardson rotamer names.)

return value is 0 if atoms were not moved (e.g. because rotamer-name was not know)

void set_rigid_body_fit_acceptable_fit_fraction ( float  f)

set rigid body fraction of atoms in positive density

Parameters
fin the range 0.0 -> 1.0 (default 0.75)
void set_rotamer_auto_fit_do_post_refine ( short int  istate)

Do you want Coot to automatically run a refinement after every rotamer autofit?

1 for yes, 0 for no.

void set_run_state_file_status ( short int  istat)

set run state file status

0: never run it 1: ask to run it 2: run it, no questions

void set_scroll_by_wheel_mouse ( int  istate)

Some people (like Phil Evans) don't want to scroll their map with the mouse-wheel.

To turn off mouse wheel recontouring call this with istate value of 0

void set_scrollable_map ( int  imol)

return the molecule number to which the mouse scroll wheel is attached

set the map that has its contour level changed by the scrolling the mouse wheel to molecule number imol (same as set_scroll_wheel_map()).

void set_secondary_structure_restraints_type ( int  itype)

set the type of secondary structure restraints

0 no sec str restraints

1 alpha helix restraints

2 beta strand restraints

void set_sequence_view_is_docked ( short int  state)

control where the sequence view is displayed

in the main application or a new dialog

void set_show_graphics_ligand_view ( int  state)

set the graphics ligand view state

(default is 1 (on)).

void set_show_modelling_toolbar ( short int  state)

function to show or hide the vertical modelling toolbar

void set_show_paths_in_display_manager ( int  i)

Show Paths in Display Manager?

Some people don't like to see the full path names in the display manager here is the way to turn them off, with an argument of 1.

void set_show_symmetry_molecule ( int  mol_no,
short int  state 
)

set display symmetry for molecule number mol_no

pass with state=0 for off, state=1 for on

void set_show_unit_cell ( int  imol,
short int  istate 
)

set the state of show unit cell for the particular molecule number imol

1 for displayed 0 for undisplayed

void set_show_unit_cells_all ( short int  istate)

set the state of show unit cell for all molecules

1 for displayed 0 for undisplayed

void set_smooth_scroll_do_zoom ( int  i)

set smooth scroll with zoom

Parameters
i0 means no, 1 means yes: (default 0)
void set_smooth_scroll_flag ( int  v)

set smooth scrolling

Parameters
vuse v=1 to turn on smooth scrolling, v=0 for off (default on).
void set_smooth_scroll_steps ( int  i)

set the number of steps in the smooth scroll

Set more steps (e.g. 50) for more smoothness (default 10).

void set_solid_density_surface_opacity ( int  imol,
float  opacity 
)

set the opacity of density surface representation of the given map.

0.0 is totally transparent, 1.0 is completely opaque and (because the objects are no longer depth sorted) considerably faster to render. 0.3 is a reasonable number.

short int set_space_group ( int  imol,
const char *  spg 
)

set the space group for a coordinates molecule

for shelx FA pdb files, there is no space group. So allow the user to set it. This can be initted with a HM symbol or a symm list for clipper.

This will only work on model molecules.

Returns
the success status of the setting (1 good, 0 fail).
void set_sticky_sort_by_date ( )

sort files in the file selection by date?

some people like to have their files sorted by date by default

void set_stop_scroll_diff_map ( int  i)

create a lower limit to the "Fo-Fc-style" map contour level changing

(default 1 on)

void set_stop_scroll_diff_map_level ( float  f)

set the actual difference map level changing limit

(default 0.0)

void set_stop_scroll_iso_map ( int  i)

create a lower limit to the "2Fo-Fc-style" map contour level changing

(default 1 on)

void set_stop_scroll_iso_map_level ( float  f)

set the actual map level changing limit

(default 0.0)

void set_swap_difference_map_colours ( int  i)

not everone likes coot's default difference map colouring.

Pass an argument i=1 to swap the difference map colouring so that red is positive and green is negative.

void set_symmetry_shift_search_size ( int  shift)

set the cell shift search size for symmetry searching.

When the coordinates for one (or some) symmetry operator are missing (which happens sometimes, but rarely), try changing setting this to 2 (default is 1). It slows symmetry searching, which is why it is not set to 2 by default.

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

Angles in degress, cell lengths in Angstroms.

Returns
the success status of the setting (1 good, 0 fail).
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

This will only work on model molecules.

Returns
the success status of the setting (1 good, 0 fail).
void set_unpathed_backup_file_names ( int  state)

set the state for adding paths to backup file names

by default directories names are added into the filename for backup (with / to _ mapping). call this with state=1 to turn off directory names

void set_use_trans_peptide_restraints ( short int  on_off_state)

add a restraint on peptides to keep trans peptides trans

i.e. omega in trans-peptides is restraints to 180 degrees.

void set_water_check_spherical_variance_limit ( float  f)

set the limit of interesting variance, above which waters are listed (otherwise ignored)

default 0.12.

void setup_mutate_auto_fit ( short int  state)

Mutate then fit to map.

that we have a map define is checked first

int show_paths_in_display_manager_state ( )

return the internal state

What is the internal flag?

Returns
1 for "yes, display paths" , 0 for not
char* show_spacegroup ( int  imol)

return the spacegroup of molecule number imol . Deprecated.

Returns
"No Spacegroup" when the spacegroup of a molecule has not been set.
void simple_fill_partial_residues ( int  imol)

Fill amino acid residues.

do backrub rotamer search for residues, but don't do refinement

int single_model_view_next_model_number ( int  imol)

change the representation to the next model number to be displayed

return 0 on non-multimodel-molecule.

int single_model_view_prev_model_number ( int  imol)

change the representation to the previous model number to be displayed

return 0 on non-multimodel-molecule.

int single_model_view_this_model_number ( int  imol)

the current model number being displayed

return 0 on non-multimodel-molecule.

int skeletonize_map ( int  imol,
short int  prune_flag 
)

skeletonize molecule number imol

the prune_flag should almost always be 0.

NOTE:: The arguments to have been reversed for coot 0.8.3 and later (now the molecule number comes first).

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.

spin, zoom and translate.

where axis is either x,y or z, stepsize is in degrees, zoom_by and x_rel etc are how much zoom, x,y,z should have changed by after nstep steps.

void split_water ( int  imol,
const char *  chain_id,
int  res_no,
const char *  ins_code 
)

split the given water and fit to map.

If refinement map is not defined, don't do anything.

If there is more than one atom in the specified resiue, don't do anything.

If the given atom does not have an alt conf of "", don't do anything.

int sprout_hydrogens ( int  imol,
const char *  chain_id,
int  res_no,
const char *  ins_code 
)

Add hydrogens to specificied residue.

Returns
success status.

use RDKit for enterprise version

void start_graphics_interface ( )

start Gtk (and graphics)

This function is useful if it was not started already (which can be achieved by using the command line argument –no-graphics).

An interface for Ralf

int stereo_mode_state ( )

what is the stero state?

Returns
1 for in hardware stereo, 2 for side by side stereo, else return 0.
void superpose ( int  imol1,
int  imol2,
short int  move_imol2_flag 
)

simple interface to superposition.

Superpose all residues of imol2 onto imol1. imol1 is reference, we can either move imol2 or copy it to generate a new molecule depending on the vaule of move_imol2_flag (1 for copy 0 for move).

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.

Superpose the given atom selection (specified by the mmdb atom selection strings) of imol2 onto imol1. imol1 is reference, we can either move imol2 or copy it to generate a new molecule depending on the vaule of move_imol2_flag (1 for move 0 for copy).

Returns
the index of the superposed molecule - which could either be a new molecule (if move_imol2_flag was 1) or the imol2 or -1 (signifying failure to do the SMM superposition).
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.

Superpose the given chains of imol2 onto imol1. imol1 is reference, we can either move imol2 or copy it to generate a new molecule depending on the vaule of move_imol2_flag (1 for move 0 for copy).

void swap_map_colours ( int  imol1,
int  imol2 
)

swap the colours of maps

swap the colour of maps imol1 and imol2. Useful to some after running refmac, so that the map to be build into is always the same colour

void symmetry_as_calphas ( int  mol_no,
short int  state 
)

display symmetry as CAs?

pass with state=0 for off, state=1 for on

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 imol?

return state=0 for off, state=1 for on

void unset_dots_colour ( int  imol)

no longer set the dots of molecule imol to a single colour

i.e. go back to element-based colours.

void unset_sticky_sort_by_date ( )

do not sort files in the file selection by date?

removes the sorting of files by date

short int use_graphics_interface_state ( )

shall we start up the Gtk and the graphics window?

if passed the command line argument –no-graphics, coot will not start up gtk itself.

An interface function for Ralf.

user_defined_click_scm ( int  n_clicks,
SCM  func 
)

run a user defined function

20100616 This doesn't get into the doxygen documentation for some reason I can't figure out.

Define a function func which runs after the user has made n_clicked atom picks. func is called with a list of atom specifiers - with leading molecule number.

void vt_surface ( int  mode)

How should the mouse move the view?

mode=1 for "Flat", mode=2 for "Spherical Surface"

int vt_surface_status ( )

return the mouse view status mode

mode=1 for "Flat", mode=2 for "Spherical Surface"

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

interpolation_mode is currently dummy - in due course I will addd torion angle interpolation.