[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
1.0 remote_control  
1.1 group_settings  
1.2 coot_lsq  
1.3 shelx  
1.4 unittest_extensions  
1.5 gap  
1.6 background_demo  
1.7 raster3d  
1.8 clear_backup  
1.9 python_coot_docs  
1.10 check_for_updates  
1.11 filter  
1.12 generic_objects  
1.13 bones_reader  
1.14 exercise_python_mol  
1.15 hello  
1.16 shelx_extensions  
1.17 coot_utils  
1.18 a_rapper_gui  
1.19 get_ebi  
1.20 ncs  
1.21 create_server  
1.22 coot_gui  
1.23 povray  
1.24 mutate  
1.25 libcheck  
1.26 fitting  
1.27 extensions  
1.28 brute_lsqman  
1.29 cns2coot  
1.30 refmac  
1.31 americanisms  
1.32 coot_toolbuttons  
1.33 create_input_server  
1.34 coot_load_modules  
1.35 test  
1.36 parse_pisa_xml  
1.37 example_python_mol_representation  
1.38 tips_gui  
1.39 what_check  
1.40 test_internal  
1.41 tips  
1.42 local_code  

1.0 remote_control

procedure: open_coot_listener_socket (port_number, host_name):

Open a coot listener socket, return nothing much, but do set! %coot-listener-socket.

Hmmm... why make a side-effect like that? Why not return %coot-listener-socket so that the caller can set it? There may be a reason...

And the reason is that I can then call coot-listener-idle-function-proc without having to use a c++ variable.

BL says: this almost does what it should! it breaks the scripting window however! Or for that matter all python scripting which is not comming from the socket! Baeh! May need to thread it after all, but how?!?

procedure: open_coot_listener_socket_with_timeout (port_number, host_name):

yet another go to make a coot port reader work. This time, we use a gtk-timer to read stuff from the socket.

The gtk-timer function must return True to be called again. When we want to close the socket reader, simply make the function return False.

procedure: coot_socket_timeout_func ():

based on coot_listener_idle_func_proc

procedure: coot_listener_idle_function_procbbbbbb ():

procedure: coot_listener_error_handler (key, args=""):

procedure: coot_listener_idle_function_proc ():

procedure: listen_coot_listener_socket (soc):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 group_settings


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2 coot_lsq

procedure: lsq_match_type_symbol (match_type_in):

Internal type conversion for LSQ fitting. Return a number according to the symbod match_type_in

procedure: set_match_element (m):

Create matchers, 7 elements: [ref_start_resno, ref_end_resno, ref_chain_id, imol_ref, mov_start_resno, mov_end_resno, mov_chain_id, imol_mov, match_type]

procedure: lsq_match (imol_ref,imol_moving,match_list):

The scripting interface to LSQ matching. Pass molecule numbers for the reference (imol_ref) and moving (imol_moving) molecules and a match list. The match list format is described in the manual.

procedure: simple_lsq_match (ref_start_resno, ref_end_resno, ref_chain_id, imol_ref, mov_start_resno, mov_end_resno, mov_chain_id, imol_mov, match_type):

Simple interface to LSQ fitting. More often than not this is what you will want, I imagine, e.g. simple_lsq_match(940, 950, "A", 0, 940, 950, "A", 1, "main")


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3 shelx

procedure: handle_shelx_fcf_file (filename):

procedure: convert_shelx_fcf_to_cif (fcf_filename,cif_filename):

procedure: remove_time_extensions (str):

procedure: shelxl_refine (imol, hkl_file_in_maybe=False, shelxh_flag=False):

BL says: shelxl_refine can have 3 arguments here:

first: imol

second: orig hkl file

third: shelxh_flag , i.e. use shelxh instead of shelxl (in absenc of hkl inputfile this has to be written as: shelxh_flag=YOURSETTING True: use shelxh False: use shelxl (default)

procedure: shelxl_refine_primitive (imol, ins_text, hkl_file_in_maybe=False, shelxh_flag=False):

shelxl refinement with input text

procedure: shelxl_refine_inner (imol, hkl_file_in_maybe, func, shelxh_flag):

procedure: read_shelx_lst_file (file_name, imol):

do-shelx-lst-file

ie. create a interesting-things GUI for split (and other things?) in a shelx .lst file.

procedure: read_shelx_project (file_name):

Read a shelx project (i.e. the .res file, the .lst file and the .fcf.cif file (if it exists (else read the .fcf file (if it exists)))

If the file-name has an extension of .lst .res .ins .fcf .log .hkl then strip that off before adding new extensions.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.4 unittest_extensions

procedure: exec_file (filename):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.5 gap

procedure: fit_gap (imol, chain_id, start_resno, stop_resno, sequence="", use_rama_restraints=1):

procedure: fit_gap_generic (imol, chain_id, start_resno, stop_resno, sequence=""):

Fit missing loop in protein.

direction is either 'forwards' or 'backwards'

start-resno is higher than stop-resno if we are building backwards

fit_gap_generic(0,"A",23,26) ; we'll build forwards

fit_gap_generic(0,"A",26,23) ; we'll build backwards

procedure: has_sequence_qm (imol, chain_id_ref):

helper function to see if a sequence has been assigned to a chain in imol return True if sequence is there, False otherwise

procedure: de_clash (imol,chain_id,resno_start,resno_end):

For Kay Diederichs, autofit without a map (find rotamer with best clash score). This ignores alt conformations and residues with insertion codes.

procedure: low_density_average (imol_map, imol, chain_id, start_resno, stop_resno):

calculate the average of 20% lowest density at all atom_positions in fragment


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.6 background_demo

procedure: background_demo ():

flash the background different colours in some uninteresting way.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.7 raster3d

procedure: povray_args ():

args not including the output filename

procedure: render_image ():

run raster3d

procedure: raytrace (image_type, source_file_name, image_file_name, x_size, y_size):

Run either raster3d or povray

image_type is either 'raster3d' or 'povray'

procedure: ppm2bmp (ppm_file_name):

Converts a ppm file to a bmp file (for windows users) and opens in browser or viewer actually dont use ppm any more but png, so not needed as such any more keep for backwards compatibility

procedure: check_file_names_for_space_and_move (image_file_name,source_file_name):

Tests file names for spaces. there is certainly on problem on windows not sure about other OS, yet


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.8 clear_backup

procedure: delete_coot_backup_files (action_type):

procedure: clear_backup_gui ():

Make a GUI

return True or False depending on if the GUI dialog was shown (it isn't shown if there are no files to delete).

procedure: clear_backups_maybe ():

return a status, True or False, did the gui run?

Note that clear-backup-gui returns either true or False too.

If this function returns False, then coot_real_exit() just exits with coot_real_exit(). Otherwise we wait for the GUI.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.9 python_coot_docs

procedure: is_empty_file (file_name):

procedure: make_texi_file (python_file, doc_file):

procedure: make_section_file (section_file, base_name):

procedure: append_file (master_file_name, append_file_name):

procedure: remove_file (file_name):

procedure: make_menu (file_name):

first make the menu


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.10 check_for_updates

procedure: get_stable_release_from_server_string (stri):

Is this true? Dont understand this

procedure: get_stable_release_from_coot_version ():

needs testing!

procedure: new_version_on_server (stri, is_pre_release):

return True or False (None on error, maybe should return some Error!?) although if no return, then var becomes None anyway.. FIXME).

procedure: notify_of_new_version (stri):

First generate a string with no trailing newline.

procedure: download_binary_dialog (version_string):

version_string is something like: "coot-0.6-pre-1-revision-2060"

procedure: install_coot_tar_file (tar_file_name, use_tar = False):

return success status as a boolean

procedure: directory_is_modifiable_qm (dir_in):

procedure: get_target_md5_string (file_name):

return as a string, or False

procedure: get_md5sum_string (file_name):

return a string

procedure: match_md5sums (tar_file_name, target_md5sum_file_name):

procedure: restart_dialog (extra_text=""):

procedure: check_for_updates_gui ():

procedure: get_latest_pending_version ():

returns latest installer version in pending-install or empty string "" if no installer for windows use only!


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.11 filter

procedure: filter (fn,ls):

Basic python function, filter the objects in list ls by function fn. e.g. filter(lambda x: not x%2, [0,1,2,3]) -> [0,2]


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.12 generic_objects

procedure: generic_object_is_displayed_qm

BL says:: just to be consistent with Paul's names map to scheme names:

procedure: is_closed_generic_object_qm

map to scheme names:

procedure: generic_object_with_name (obj_name):

return a new generic object number for the given object obj-name. If there is no such object with name obj-name, then create a new one. (Maybe you want the generic object to be cleaned if it exists before returning, this function does not do that).

procedure: generic_objects_gui ():

display a GUI for generic objects

procedure: probe (imol):
run molprobity (well reduce and probe) to make generic objects (and display the generic objects gui)

procedure: prepare_file_for_probe (file_in, file_out):

Prepare file for probe, i.e. remove 'USER' from file

procedure: interactive_probe (x_cen, y_cen, z_cen, radius, chain_id, res_no):

run "probe" interactively, which in the current implementation, means that this function can run during a edit-chi angles manipulation, or after a real space refine zone.

Thus function presumes that there are 2 pdb files in the current directory, one of which is the reference pdb file and the other is a pdb file containing the tmp/moving atom set.

The function takes arguments for the centre of the probe dots and the radius of the probe dots sphere. The chain id and residue number are also needed to pass as arguments to probe.

procedure: get_probe_dots_from (pdb_file_name, point, radius):

procedure: probe_local_sphere (imol, radius):

Update the generic objects probe dots from residues within radius of the screen centre.

Return nothing interesting.

procedure: write_pdb_file_for_molprobity (imol, pdb_name):

add in the conn files by concatting.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.13 bones_reader

procedure: generic_object_from_bones (bones_file):

procedure: bones_it (map_file_name):

procedure: bonesing_func (imol):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.14 exercise_python_mol

procedure: jiggled_mol (reference_mol, current_mol, traj_frac):

Return a python_mol

procedure: disrupt (reference_mol, biggness):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.15 hello

procedure: first_non_trivial_name (str_list):

Primarily for Indian Names.

Say we are given str: (list "M." "D." "Albert" "Dorkins"). We want to return ""Albert" not "M.") We reject names that are one character long and names that are 2 characters long that end in ".". So, "M." is rejected, but "Ma" is not.

An excercise for the committed is to also reject run-together dotted initials such as "D.K.". I was sufficiently committed. BL says: I'll try to too! Although I dont think this is a valuable (Win)Coot function, but fun though...


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.16 shelx_extensions

procedure: add_plugin_shelx ():

procedure: shelx_ins_strings (imol):

procedure: shelxl_refine_gui (imol, hkl_file_name_maybe=False):

procedure: editable_shelx_gui (imol, hklin_file_name):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.17 coot_utils

procedure: with_no_backups (imol, *funcs):

'Macro' to tidy up a a setup of functions to be run with no backup for a particular molecule.

funcs is a normal set of functions (not a thunk), here i.e. a list of functions with function as a list with func name and args, e.g.: [centre_of_mass, 0], [func_name, arg1, arg2,...],...

procedure: with_auto_accept (*funcs):

'Macro' to tidy up a set of functions to be run with automatic accepting of the refinement returns the result of last function run...

funcs is a normal set of functions (not a thunk), here i.e. a list of functions with function as a list with func name and args, e.g.: [centre_of_mass, 0], [func_name, arg1, arg2,...],...

procedure: using_active_atom (funcs):

'Macro' to run funcs on an active atom funcs is a list of functions, active_atom specifiers and extra args [[func1, ["aa_imol", "aa_chain_id",...], [extra_arg1, extra arg2, ..]], [func2,...]]

procedure: molecule_has_hydrogens (imol):

Pythonize function: return a python boolean.

procedure: molecule_number_list ():

return a list of molecule numbers (closed and open) The elements of the returned list need to be tested against is_valid_model_molecule_qm

procedure: most_recently_created_file (glob_str, dir):

Find the most recently created file from the given glob and dir

return False on no-such-file

procedure: residue_spec2atom_selection_string (centre_residue_spec):

Convert a residue_spec to an mmdb atom selection string. FIXME:: to be tested

procedure: map_molecule_list ():

Return a list of molecules that are maps

procedure: model_molecule_list ():

Return a list of molecules that are (coordinate) models

procedure: shelx_molecule_qm (imol):

Return True(False) if imol is (isn't) a shelx molecule.

procedure: set_virtual_trackball_type (type):

Set the virtual trackball behaviour.

trackball type is a string: either 'flat' or 'spherical-surface'

procedure: list_of_strings_qm (ls):

s ls a list of strings? Return True or False

procedure: string_append_with_spaces (ls):

string concat with spaces, ls must be a list of strings.

procedure: rotation_centre ():

The screen centre.

return the rotation centre as a 3 membered list of numbers is python list [...] !!!

procedure: number_list (a,b):

this is actually not essentail since python has these funtion(s)

procedure: command_in_path_qm (cmd):

Return True or False adapted from find_exe

procedure: popen_command (cmd, args, data_list, log_file, screen_flag=False):
k_thread_return_value = None Where cmd is e.g. "refmac" args is ["HKLIN","thing.mtz"] log_file_name is "refmac.log" data_list is ["HEAD","END"] screen_flag True/False to display or not in shell window

Return the exist status e.g. 0 or 1. Or False if cmd not found.

uses os.popen if python version < 2.4 otherwise subprocess

procedure: close_float_qm (x1, x2):

Crude test to see of 2 floats are the same (more or less). Used in a unit test after setting the atom position.

procedure: strip_extension (s):

"a.b.res" -> "a.b" file_name_sans_extension

procedure: file_name_extension (file_name):

What is the extension of file_name?

"a.pdb" -> "pdb" "" -> ""

procedure: add_tmp_extension_to (file_name):

e.g. "a.pdb" -> "a-tmp.pdb"

procedure: file_name_sans_extension (s):

Same function as strip_extension, different name, as per scsh, in fact.

procedure: strip_path (s):

/a/b.t -> b.t d/e.ext -> e.ext file-name-sans-path

procedure: slash_start_qm (s):

does s start with a "/" ? return True or False

for windows return True when drive letter, e.g. C, or even \\ (backslash):

procedure: unique_date_time_str ():

return a string that contains the date/time e.g. "2006-01-02_2216.03"

procedure: every_nth (ls, n):

return a list that has only every-nth members; e.g. every_nth ([0,1,2,3,4,5,6,7,8],2) -> [0,2,4,6,8] every_nth ([0,1,2,3,4,5,6,7,8],3) -> [0,3,6]

n must be positive

procedure: get_atom (imol, chain_id, resno, ins_code, atom_name, alt_conf_internal=""):

return atom info or False (if atom not found).

procedure: residue_info_dialog_displayed_qm ():

procedure: multi_read_pdb (glob_pattern, dir):

multi_read pdb reads all the files matching glob_pattern in directory dir. Typical usage of this might be: multi_read_pdb("a*.pdb",".") BL says: in windows dir needs the 'C:/' pattern, '/c/'won't work

procedure: read_pdb_all ():

read_pdb_all reads all the "*.pdb" files in the current directory.

procedure: coot_mkdir (dir_name):

return False if dir_name is a file or we can't do the mkdir

procedure: view_matrix ():

return the view matrix (useful for molscript, perhaps). BL says: like all matrices is a python list [...]

procedure: view_matrix_transp ():

return the transposed view matrix (useful for molscript, perhaps). BL says: like all matrices is a python list [...]

procedure: view_quaternion ():

return the view quaternion

procedure: add_view (position, quaternion, zoom, view_name):

Return the view number

procedure: matrix2quaternion (m00, m10, m20, m01, m11, m21, m02, m12, m22):

Convert a view matrix to a view quaternion to set Coot view internals.

procedure: set_view_matrix (m00, m10, m20, m01, m11, m21, m02, m12, m22):

Set the view matrix using matrix->quaternion.

Useful for using a view matrix from another program, perhaps.

procedure: miguels_axes ():

Miguel's molecular orientation axes

procedure: molecule_centre (imol):

Return the molecule centre as a list of 3 numbers.

Note: mol_cen could contain values less than -9999.

procedure: move_molecule_to_screen_centre (imol):

Move the centre of molecule number imol to the current screen centre

procedure: move_molecule_here
(rotate_centre[2]-molecule_centre(imol)[2])) This is a short name for the above.

procedure: identity_matrix ():

Return a nine-membered list of numbers.

procedure: translation (axis,length):

e.g. translation('x',2) -> [2, 0, 0] return False on error

procedure: rotate_about_screen_axis (axis,degrees):

Rotate degrees about screen axis, where axis is either 'x', 'y' or 'z'.

procedure: toggle_display_map (imol, idummy):

Support for old toggle functions. (consider instead the raw functions use the direct set_displayed functions).

procedure: toggle_display_mol (imol):

toggle the display of imol

procedure: toggle_active_mol (imol):

toggle the active state (clickability) of imol

procedure: python_representation (imol):

return a python (list) representation of molecule imol, or False if we can't do it (imol is a map, say)

procedure: reorder_chains (imol):

procedure: transform_coords_molecule (imol, rtop):

transform a coordinates molecule by a coot-rtop (which is a Python expression of a clipper::RTop), i.e. a list of a 9-element list and a 3 element list, e.g. [[1, 0, 0, 0, 1, 0, 0, 0, 1], [4.5, 0.4, 1.2]]

procedure: transform_map (*args):

transform_map(imol, mat, trans, about_pt, radius, space_group, cell)

where space_group is a HM-symbol and cell is a list of 6 parameters, where the cell angles are in degrees.

or transform_map(imol, trans, about_pt, radius) for a simple translation

or transform_map(imol, trans, radius) when using the default rotation-centre as the about-pt

returns new map mol number or None if no map could be transformed/created

procedure: transform_map_using_lsq_matrix (imol_ref, ref_chain, ref_resno_start, ref_resno_end,

Define a map transformation function that obeys Lapthorn's Law of NCS Handling Programs

typical usage: transform_map_using_lsq_matrix(1, "A", 10, 30, 0, "A", 10, 30, 2, rotation_centre(), 6)

Remember, that now the about-pt is the "to" point, i.e. the maps are brought from somewhere else and generated about the about-pt.

procedure: brighten_map (imol, scale_factor):

Make the imol-th map brighter.

Scale_factor > 1 makes brighter...

procedure: brighten_maps ():

Make all maps brighter

procedure: darken_maps ():

Make all maps darker

procedure: chain_ids (imol):

return a list of chain ids for given molecule number imol. return empty list on error

procedure: is_solvent_chain_qm (imol,chain_id):

convert from interface name to schemisch name to be equivalent to Paul's naming

return True or False

procedure: valid_model_molecule_qm (imol):

python (schemeyish) interface to eponymous scripting interface function!? return True or False

procedure: valid_map_molecule_qm (imol):

python (schemeyish) interface to eponymous scripting interface function. return True or False

procedure: valid_refinement_map_qm ():

convenience function (slightly less typing).

Return True or False

procedure: shelx_molecule_qm (imol):

python (schemeyish) interface to shelx molecule test

Return True or False

procedure: is_difference_map_qm (imol_map):

python (schemeyish) interface to the function that returns whether or not a map is a difference map.

Return True or False.

procedure: residue_exists_qm (imol,chain_id,resno,ins_code):

Does residue resno with insertion code ins_code of chain chain_id and in molecule number imol exist?

Return True or False

procedure: centre_of_mass (imol):

Return a list of 3 float for the centre of mas of molecule number imol.

on failure return False.

procedure: atom_specs (imol, chain_id, resno, ins_code, atom_name, alt_conf):

Return as a list the occupancy, temperature_factor, x y z coordinates of the given atom. (the x,y,z are in Cartesian Angstroms).

on error (e.g. atom not found) return False

procedure: guess_refinement_map ():

return a guess at the map to be refined (usually called after imol_refinement_map returns -1)

Basically uses the first not difference map we find!

procedure: auto_weight_for_refinement ():

Set the refinement weight (matrix) by iterating the refinement and varying the weight until the chi squares (not including the non-bonded terms) reach 1.0 =/- 10%. It uses sphere refinement. The refinement map must be set!! At the end show the new weight in the status bar. Seems to take about 5 rounds.

procedure: print_sequence (imol):

Print the sequence of molecule number imol

This is not really a util, perhaps it should be somewhere else?

procedure: pir_file_name2pir_sequence (pir_file_name):

simple utility function to return the contents of a file as a string.

procedure: associate_pir_file (imol, chain_id, pir_file_name):
Associate the contents of a PIR file with a molecule.

procedure: graphics_comma_key_pressed_hook ():

comma key hook

procedure: graphics_dot_key_pressed_hook ():

dot key hook

procedure: decode_key (key_val_name):

procedure: add_key_binding (name, key, thunk):

procedure: graphics_general_key_press_hook (key):

general key press hook

procedure: residues_matching_criteria (imol, residue_test_func):

residue_test_func is a function that takes 4 arguments, the chain_id, resno, inscode and residue_serial_number (should it be needed) and returns either False or return something interesting (e.g. text for a button label).

Return a list of residues, each of which has a return value at the start, ie. [return_value, chain_id, res_no, ins_code]

procedure: all_residues (imol):

Return residue specs for all residues in imol (each spec is preceeded by True)

procedure: residues_with_alt_confs (imol):

Return a list of all residues that have alt confs: where a residue is specified thusly: [[chain_id, resno, ins_code], [...] ]

procedure: residue_alt_confs (imol, chain_id, res_no, ins_code):

Return a list of all the altconfs in the residue. Typically this will return [""] or ["A", "B"]

procedure: atoms_with_zero_occ (imol):

Return a list of all atoms that have zero occupancy: where an atom is specified thusly: [[chain_id, resno, ins_code, name, altconf], [...] ]

procedure: residue_spec2atom_for_centre (imol, chain_id, res_no, ins_code):

Return False if no atom can be found given the spec else return a list consisting of the atom name and alt-conf specifier.

Choose an atom that is called " CA ". Failing that choose the first atom.

procedure: update_go_to_atom_from_current_atom ():

procedure: flip_active_ligand ():

procedure: delete_atom_by_active_residue ():

Typically one might want to use this on a water, but it deletes the nearest CA currently... Needs a re-think. Should active-atom just return the nearest atom and not be clever about returning a CA.

procedure: mutate_by_overlap (imol, chain_id, resno, tlc):

general mutate

typically:

overlay PTY onto given TYR

delete speced TYR

merge molecules PTY molecule int molecule number imol

change resno of PTY to that of the speced TYR

change chain id of PTY to that of speced TYR

change chain ids with residue range for the PTY

procedure: phosphorylate_active_residue ():

A bit of fun

procedure: overlay_my_ligands (imol_mov, chain_id_mov, resno_mov,

A function for Overlaying ligands. The transformation is applied to all the atoms of the molecule that contains the moving ligand.

procedure: label_all_CAs (imol):

procedure: label_all_atoms_in_residue (imol, chain_id, resno, inscode):

procedure: label_all_active_residue_atoms ():

procedure: sanitise_alt_confs (atom_info, atom_ls):
graphics_draw() Resets alt confs and occupancies of atoms in residue that have orphan alt-loc attributes

procedure: sanitise_alt_confs_in_residue (imol, chain_id, resno, inscode):

procedure: sanitise_alt_confs_active_residue ():

Resets alt confs and occupancies of atoms in residue that have orphan alt-loc attributes. Use the active-residue.

procedure: print_molecule_names ():

procedure: save_dialog_positions_to_init_file ():

save the dialog positions to the coot_dialog_positions.py file in ./coot-preferences

procedure: save_string_to_file (string, filename, overwrite=False):
saves a string to a file! if the string is already present dont do anything optional arg: overwrite False - default True - overwrite file

procedure: remove_line_containing_from_file (remove_str_ls, filename):

removes a line containg all strings of the given list from file

procedure: multi_chicken (imol, n_colours = False):

multiple maps of varying colour from a given map.

procedure: BALL_AND_STICK (): return 2

procedure: hilight_binding_site (imol, centre_residue_spec, hilight_colour, radius):

hilight-colour is specified in degrees (round the colour wheel - starting at yellow (e.g. 230 is purple))

procedure: pukka_puckers_qm (imol):

Function based on Davis et al. (2007) Molprobity: all atom contacts and structure validation for proteins and nucleic acids, Nucleic Acids Research 35, W375-W383.

"RNA sugar puckers (C3'endo or C2'endo) is strongly correlated to the perpendicular distance between the following (3') phosphate and either the plane of the base or the C1'-N1/9 glycosidic bond vector. [] .. a sugar pucker is very difficult to determine directly from the electron density at resolutions typical for RNAs."

To paraphrase: The distance of the plane of the base to the following phosphate is highly correlated to the pucker of the ribose.

An analysis of the structures in RNADB2005 shows that a critical distance of 3.3A provides a partition function to separate C2' from C3' endo puckering. Not all ribose follow this rule. There may be some errors in the models comprising RNADB2005. So we check the distance of the following phosphate to the plane of the ribose and record the riboses that are inconsitent. We also report puckers that are not C2' or C3'. The puckers are determined by the most out-of-plane atom of the ribose (the rms deviation of the 4 atoms in the plane is calculated, but not used to determine the puckering atom).

procedure: add_annotation_here (text):

procedure: add_annotation_at_click (text):

procedure: save_annotations (file_name):

procedure: load_annotations (file_name):

procedure: using_gui ():

procedure: GL_light_on ():

for easier switching on of GL lighting on surfaces:

procedure: GL_light_off ():

and to turn it off

procedure: set_b_factor_molecule (imol, bval):

set B-factor to bval for molecule imol

procedure: reset_b_factor_molecule (imol):
reset B-factor for molecule imol to default value

procedure: reset_b_factor_active_residue ():

reset B-factor for active residue to default value

procedure: find_exe (*args):

BL module to find exe files we need this for popen as it requires the full path of the exe file we use arguments (min 1, no max?!:

1.) program_name : name of exe to find

2-x.) path_names : path name to search (usually "PATH", then maybe CCP4_BIN, ..., can be a single path as well)

then we search everywhere

on OS where which is available we use this first, rather than searching in PATH etc. (FIXME) returns full path of exe when successful, False otherwise

procedure: open_url (url):

for running online docs

procedure: reload_module (name):

to reload modules

procedure: printf (*args):

to make print a function:

procedure: printl (ls):

to print elements of a list:

procedure: run_concurrently (cmd, args=[], data_list=None, logfile=None, screen_flag=False):
Where cmd is e.g. "bltwish" args is list, e.g. [loggraph, "refmac.log"]

in python < 2.4 (and if no logfile)

Returns the pid or False if failed.

in python >= 2.4 (and with logfile)

Returns the process and the open log file object

uses os.spawn if python version < 2.4 otherwise subprocess

procedure: coot_has_pygtk ():

python command to see if we have pygtk available return True if availabel otherwise False

procedure: coot_has_gobject ():

python command to see if we have pygobject available return True if availabel otherwise False

procedure: kill_process (pid):

function to kill a process, given the process pid return True if managed to kill the process otherwise false

procedure: stereo_mono_toggle ():

some example function for the toolbutton

procedure: side_by_side_stereo_mono_toggle ():

procedure: zalman_stereo_mono_toggle ():

procedure: switch_stereo_sides ():

procedure: isNumber (num):

helper function to test for a number returns True if number, otherwise False

procedure: merge_solvent_chains (imol):

function to merge multiple solvent chains

procedure: cmd2str (*args):

helper to comvert functions to strings

procedure: is_windows ():

simplyfy check for windows


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.18 a_rapper_gui

procedure: rapper_process ():

procedure: rename_dir_by_date (dir_name):

procedure: sequence_string (imol, chain_id, resno_start, resno_end):

return a string or False

procedure: rapper_it (imol, chain_id, start_resno, end_resno, sequence, number_of_models):

procedure: stop_rapper ():

procedure: cancel_dialog_func (widget, window):

procedure: a_rapper_gui (loop_building_tool):

loop_building_tool is either 'rapper' or 'ARP/wARP'


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.19 get_ebi

procedure: check_dir_and_get_url (dir,file_name,url_string):

check the directory and get url url_string.

procedure: get_url_str (id, url_string, data_type, imol_coords_arg_list):

get url_string for data type (string actually) 'pdb' or 'sfs'

procedure: get_ebi_pdb_and_sfs (id):

Get the pdb and sfs. id is the accession code

procedure: get_ebi_pdb (id):

Return a molecule number on success or not a number (False) or -1 on error.

procedure: get_eds_pdb_and_mtz (id):

Get data and pdb for accession code id from the Electron Density Server.

id is the accession code.

returns imol of read pdb or False on error.

20050725 EDS code


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.20 ncs

procedure: find_first_model_molecule ():

procedure: skip_to_next_ncs_chain (direction):

Skip the residue in the next chain (typically of a molecule with NCS) with the same residue number. If on the last chain, then wrap to beginning. If it can't find anything then don't move (and put a message in the status bar)

procedure: single_manual_ncs_ghosts (imol, resno_start, resno_end, ref_chain, peer_chain):

A function inspired by a question from Bill Scott. He wanted to RNA ghosts. Because RNA does not work with SSM, we need to define the matrix manually. Let's make a copy of given imol and get the rtop from that. Typical usage manual_ncs_ghosts(0, 1, 10, "A", "C")

procedure: manual_ncs_ghosts (imol, resno_start, resno_end, chain_id_list):

chain-id-list is ["A", "B", "C", "D"], i.e. the reference/target/master chain-id first and then the peers. This allows us to add many peers at the same time (unlike above function).

procedure: ncs_master_chain_id (imol):

Return the first master chain id (usually there is only one of course) or False

procedure: ncs_ligand (imol_protein, ncs_master_chain_id, imol_ligand, chain_id_ligand, resno_ligand_start, resno_ligand_stop):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.21 create_server

procedure: connection_proc (port, hostname):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.22 coot_gui

procedure: coot_gui ():

Fire up the coot scripting gui. This function is called from the main C++ code of coot. Not much use if you don't have a gui to type functions in to start with.

procedure: handle_smiles_go (tlc_entry, smiles_entry):

The callback from pressing the Go button in the smiles widget, an interface to run libcheck.

procedure: smiles_gui ():

smiles GUI

procedure: generic_single_entry (function_label, entry_1_default_text, go_button_label, handle_go_function):

Generic single entry widget

Pass the hint labels of the entries and a function that gets called when user hits "Go". The handle-go-function accepts one argument that is the entry text when the go button is pressed.

procedure: generic_double_entry (label_1, label_2,

generic double entry widget, now with a check button ...and returns teh widget if requested

pass a the hint labels of the entries and a function (handle-go-function) that gets called when user hits "Go" (which takes two string aguments and the active-state of the check button (either True of False).

if check-button-label not a string, then we don't display (or create, even) the check-button. If it *is* a string, create a check button and add the callback handle-check-button-function which takes as an argument the active-state of the the checkbutton.

procedure: generic_multiple_entries_with_check_button (entry_info_list, check_button_info, go_button_label, handle_go_function):

generic double entry widget, now with a check button

OLD

pass a the hint labels of the entries and a function (handle-go-function) that gets called when user hits "Go" (which takes two string aguments and the active-state of the check button (either True of False).

if check-button-label not a string, then we don't display (or create, even) the check-button. If it *is* a string, create a check button and add the callback handle-check-button-function which takes as an argument the active-state of the the checkbutton.

procedure: molecule_centres_gui ():

A demo gui to move about to molecules

procedure: check_libcheck_logfile (logfile_name):

A BL function to analyse the libcheck log file

procedure: old_coot_qm ():

old coot test

procedure: interesting_things_gui (title,baddie_list):

We can either go to a place (in which case the element is a list of button label (string) and 3 numbers that represent the x y z coordinates) or an atom (in which case the element is a list of a button label (string) followed by the molecule-number chain-id residue-number ins-code atom-name altconf)

e.g. interesting_things_gui( "Bad things by Analysis X", [["Bad Chiral",0,"A",23,"","CA","A"], ["Bad Density Fit",0,"B",65,"","CA",""], ["Interesting blob",45.6,46.7,87.5]]

procedure: interesting_things_with_fix_maybe (title, baddie_list):

In this case, each baddie can have a function at the end which is called when the fix button is clicked. And extra string arguments can give the name of the button and a tooltip as these two are ambigious, they can only be: 1 extra string: button name 2 extra strings: button name and tooltip

procedure: fill_option_menu_with_mol_options (menu, filter_function):

Fill an option menu with the "right type" of molecules. If filter_function returns True then add it. Typical value of filter_function is valid-model-molecule_qm

procedure: fill_option_menu_with_map_mol_options (menu):

Fill an option menu with maps and return the list of maps

procedure: fill_option_menu_with_coordinates_mol_options (menu):

Helper function for molecule chooser. Not really for users.

Return a list of models, corresponding to the menu items of the option menu.

The returned list will not contain references to map or closed molecules.

procedure: fill_option_menu_with_number_options (menu, number_list, default_option_value):

procedure: get_option_menu_active_molecule (option_menu, model_mol_list):

Helper function for molecule chooser. Not really for users.

return the molecule number of the active item in the option menu, or return False if there was a problem (e.g. closed molecule)

BL says:: we do it for gtk_combobox instead! option_menu is deprecated

procedure: get_option_menu_active_item (option_menu, item_list):

BL says:: we do it for gtk_combobox instead! option_menu is deprecated Here we return the active item in an option menu of generic items

procedure: molecule_chooser_gui_generic (chooser_label, callback_function, option_menu_fill_function):

procedure: molecule_chooser_gui (chooser_label,callback_function):

Fire up a molecule chooser dialog, with a given label and on OK we call the call_back_fuction with an argument of the chosen molecule number.

chooser-label is a directive to the user such as "Choose a Molecule"

callback-function is a function that takes a molecule number as an argument.

procedure: map_molecule_chooser_gui (chooser_label,callback_function):

As above but for maps

procedure: generic_chooser_and_entry (chooser_label,entry_hint_text,default_entry_text,callback_function):

A pair of widgets, a molecule chooser and an entry. The callback_function is a function that takes a molecule number and a text string.

procedure: generic_chooser_entry_and_file_selector (chooser_label, chooser_filter, entry_hint_text, default_entry_text, file_selector_hint, callback_function):

A pair of widgets, a chooser entry and a file selector. The callback_function is a function that takes a molecule number and a text string (e.g. chain_id and file_name)

chooser_filter is typically valid_map_molecule_qm or valid_model_molecule_qm

procedure: generic_chooser_and_file_selector (chooser_label, chooser_filter, file_selector_hint, default_file_name, callback_function):

A pair of widgets, a molecule chooser and a file selector. The callback_function is a function that takes a molecule number and a file_name

chooser_filter is typically valid_map_molecule_qm or valid_model_molecule_qm

procedure: coot_menubar_menu (menu_label):

If a menu with label menu-label is not found in the coot main menubar, then create it and return it. If it does exist, simply return it.

procedure: add_simple_coot_menu_menuitem (menu,menu_item_label,activate_function):

Given that we have a menu (e.g. one called "Extensions") provide a cleaner interface to adding something to it:

activate_function is a thunk.

procedure: alt_confs_gui (imol):

Make an interesting things GUI for residues of molecule number imol that have alternate conformations.

procedure: missing_atoms_gui (imol):

Make an interesting things GUI for residues with missing atoms

procedure: zero_occ_atoms_gui (imol):

Make an interesting things GUI for residues with zero occupancy atoms

procedure: interesting_residues_gui (imol, title, interesting_residues):

Make an interesting things GUI for residues of molecule number imol for the given imol. A generalization of alt-confs gui.

procedure: coot_toolbar_button (*args):
If a toolbutton with label button_label is not found in the coot main toolbar, then create it and return it. If it does exist, the icon will be overwritten. The callback function wont! [NOTE: if its a Coot internal Toolbar you can only add a function but not overwrite its internal function!!!]

return False if we cannot create the button and/or wrong no of arguments

we accept 3 arguments: button_label callback_function (is String!!!) gtk-stock-item (or icon_widget, whatever that is)

procedure: toolbar_label_list ():
returns a list of existing toolbar buttons [[label, toolbutton],[]...] or False if coot_python is not available

procedure: generic_button_dialog (dialog_name, button_list):

button-list is a list of pairs (improper list) the first item of which is the button label text the second item is a lambda function, what to do when the button is pressed.

procedure: generic_interesting_things (imol,gui_title_string,residue_test_func):

Generic interesting things gui: user passes a function that takes 4 args: the chain-id, resno, inscode and residue-serial-number (should it be needed) and returns either #f or something interesting (e.g. a label/value). It is the residue-test-func of the residue-matching-criteria function.

procedure: generic_number_chooser (number_list, default_option_value, hint_text, go_button_label, go_function):

procedure: entry_do_button (vbox, hint_text, button_label, button_press_func):

vbox is the vbox to which this compound widget should be added. button-press-func is the lambda function called on pressing return or the button, which takes one argument, the entry.

Add this widget to the vbox here.

procedure: generic_molecule_chooser (hbox, hint_text):

pack a hint text and a molecule chooser option menu into the given vbox.

return the option-menu and model molecule list:

procedure: file_selector_entry (hbox, hint_text):

Return an entry, the widget is inserted into the hbox passed to this function

procedure: file_chooser_entry (hbox, hint_text):

This is the same as the file_selector_entry, but using the modern FileChooser Return an entry, the widget is inserted into the hbox passed to this function

procedure: place_strand_here_gui ():

The gui for the strand placement function

procedure: cootaneer_gui (imol):

Cootaneer gui

procedure: view_saver_gui ():

The gui for saving views

procedure: add_view_to_views_panel (view_name, view_number):

procedure: dialog_box_of_buttons (window_name, geometry, buttons, close_button_label):

a button is a list of [label, callback, text_description]

procedure: dialog_box_of_buttons_with_check_button (window_name, geometry,

geometry is an improper list of ints

return the h_box of the buttons

a button is a list of [label, callback, text_description] where callback is a string or list of strings to be evaluated

If check_button_label is False, don't make one, otherwise create with the given label and "on" state

Note: - if label is "HSep" a horizontal separator is inserted instead of a button - the description is optional

procedure: add_button_info_to_box_of_buttons_vbox (button_info, vbox):

This is exported outside of the box-of-buttons gui because the clear_and_add_back function (e.g. from using the check button) needs to add buttons - let's not dupicate that code.

procedure: dialog_box_of_pairs_of_buttons (imol, window_name, geometry, buttons, close_button_label):

geometry is an improper list of ints buttons is a list of: [[["button_1_label, button_1_action], ["button_2_label, button_2_action]], [next pair of buttons]] The button_1_action function is a string The button_2_action function is a string

procedure: dialog_box_of_buttons_with_widget (window_name, geometry, buttons, extra_widget, close_button_label):

as the dialog_box_of_buttons, but we can put in an extra widget (extra_widget)

procedure: dialog_box_of_radiobuttons (window_name, geometry, buttons,

A dialog box with radiobuttons e.g. to cycle thru loops

the button list shall be in the form of: [[button_label1, "button_function1"], [button_label2, "button_function2"]]

function happens when toggled obs: button_functions are strings, but can be tuples for multiple functions go_function is string too! selected button is the button to be toggled on (default is first)

procedure: views_panel_gui ():
ews_dialog_vbox = False A gui showing views

procedure: nudge_screen_centre_paule_gui ():

nudge screen centre box. Useful when Ctrl left-mouse has been taken over by another function.

This is using the absolute coordinates

procedure: nudge_screen_centre_gui ():

nudge screen centre box. Useful when Ctrl left-mouse has been taken over by another function.

This is using the viewing coordinates

procedure: nudge_screen_centre_extra_gui ():

as nudge_screen_centre_gui but with clipping and zoom control

procedure: make_difference_map_gui ():

A gui to make a difference map (from arbitrarily gridded maps (that's it's advantage))

procedure: cis_peptides_gui (imol):

procedure: transform_map_using_lsq_matrix_gui ():

procedure: ncs_ligand_gui ():

procedure: superpose_ligand_gui ():

GUI for ligand superpositioning by graph matching

procedure: key_bindings_gui ():

procedure: coot_news_info (*args):

procedure: whats_new_dialog ():

procedure: cootaneer_gui_bl ():

Cootaneer/sequencing gui modified by BL with ideas from KC based on Paul's cootaneer gui and generic_chooser_entry_and_file_selector

procedure: run_with_gtk_threading (function, *args):

a function to run a pygtk widget in a function as a thread

procedure: generic_check_button (vbox, label_text, handle_check_button_function):

procedure: refinement_options_gui ():

a master gui to set all kinds of refinement parameters

procedure: show_progressbar (text):

a simple window to show a progress bar return the window (to be destroyed elsewhere)

procedure: python_thread_sleeper ():
port threading helper function to push the python threads this only runs python threads for 20ms every 50ms

procedure: run_python_thread (function, args, sleep_time=20):

function to run a python thread with function using args which is a tuple optionally pass sleep time in ms (default is 20) - usefull for computationally expensive threads which may have run longer N.B. requires gobject hence in coot_gui.py

procedure: map_sharpening_gui (imol):

procedure: associate_pir_with_molecule_gui (do_alignment=False):

Associate the contents of a PIR file with a molecule. Select file from a GUI.

procedure: alignment_mismatches_gui (imol):

Make a box-of-buttons GUI for the various modifications that need to be made to match the model sequence to the assigned sequence(s).

Call this when the associated sequence(s) have been read in already.

procedure: wrapper_alignment_mismatches_gui (imol):

Wrapper in that we test if there have been sequence(s) assigned to imol before we look for the sequence mismatches

procedure: residue_range_gui (func, function_text, go_button_label):
ved_residue_ranges = []

procedure: solvent_ligand_list ():

procedure: solvent_ligands_gui ():

add solvent molecules

Change the translation jiggle-factor to 1.0, so the ligand doesn't move so far and get sucked into protein density (this is just a temporary hack, it would be better to mask the enviroment of the ligand by the surrounding atoms of the molecule to which the ligand is added - that is much harder).

procedure: user_mods_gui (imol, pdb_file_name):

USER MODS gui

procedure: rename_residue_gui_simple ():

procedure: average_map_gui ():

procedure: rename_residue_gui ():

simple rename residue GUI


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.23 povray

procedure: povray_args ():

args not including the output filename

procedure: povray_image ():

Run provray using current displayed image and write .pov file to default filename


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.24 mutate

procedure: mutate_chain (imol,chain_id,sequence):

Mutate chain-id of molecule number imol given sequence.

The number of residues in chain-id must match the length of sequence.

procedure: multi_mutate (mutate_function,imol,start_res_no,chain_id,sequence):

an internal function of mutate, This presumes a protein sequence

procedure: mutate_residue_range (imol,chain_id,start_res_no,stop_res_no,sequence):

The stop-res-no is inclusive, so usage e.g. mutate_resiude_range(0,"A",1,2,"AC")

This presumes a protein sequence (not nucleic acid).

procedure: mutate_and_autofit_residue_range (imol,chain_id,start_res_no,stop_res_no,sequence):

mutate and auto fit a residue range

This presumes a protein sequence (not nucleic acid).

The sequence is a string of one letter codes

procedure: mutate_and_auto_fit (residue_number,chain_id,mol,mol_for_map,residue_type):

mutate and autofit whole chain

This presumes a protein sequence (not nucleic acid).

procedure: maf (*args):

a short-hand for mutate-and-auto-fit

procedure: three_letter_code2single_letter (residue_type):

return a char (well string in python), return "A" for unknown residue_type

procedure: mutate_nucleotide_range (imol, chain_id, resno_start, resno_end, sequence):

procedure: mutate_residue_redundant (residue_number,chain_id,imol,residue_type,insertion_code):

a wrapper for mutate_single_residue_by_seqno (which uses slightly inconvenient single letter code)

Here residue-type is the 3-letter code

procedure: poly_ala (imol, res_type = False):

Prompted by Tim Gruene's email to CCP4bb 20060201. Turn all residues (including GLY) of imol to ALA.

type is an optional argument. if type is 'SER' then build polySer, if type is 'GLY', build polyGly.

1 or 2 args are:

1.) imol

2.) [optional] type, if type is "SER" then build polySer, if type is "GLY", build polyGly.

procedure: delete_sidechain_range (imol, chain_id, resno_start, resno_end):

Delete (back to the CB stub) the side change in the range resno-start to resno-end


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.25 libcheck

procedure: monomer_molecule_from_3_let_code (code, dict_cif_libin, ccp4i_project_dir = ""):

Where code is e.g. "3GP" and ccp4i-project-dir is an optional arg which is the directory to which the libcheck log files and pdb file will go.

Return -2 on code is not a string Return -3 on libcheck failure Return -4 on refmac failure Return imol on success Return handle-read-draw-molecule error code on failure to read resultant pdb file

Actually, it would be nice to know if this code represented a full description - or a minimal one... perhaps we can parse the log file and call a pop-up that will tell us.

dict_cif_libin should be a string. If it is "" then it is ignored. If it is not "" then it is used to create input to libcheck (not a command line argument) so that bespoke dictionary libraries can produce coords using "Get Monomer".

might not do all above mentioned things in python, yet


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.26 fitting

procedure: fit_protein (imol):

For each residue in the protein (molecule number imol), do a rotamer fit and real-space refinement. Update the graphics and rotate the scene at each residue for eye candy goodness.

Note that residue with alt confs do not undergo auto-fit-rotamer. This is because that autofit-rotamer then refine will tend to put both rotamers into the same place. Not good. It seems a reasonable expectation that residues with an alternate conformation are already resonably well-fitted. So residues with alternate conformations undergo only real space refinement.

This is simple-minded and outdated now we have the interruptible version (below).

procedure: fit_protein_make_specs (imol, chain_specifier):

Return a list of residue specs

chain-specifier can be a string, where it is the chain of interest. or 'all-chains, where all chains are chosen.

procedure: fit_protein_fit_function (res_spec, imol_map):

procedure: fit_protein_stepped_refine_function (res_spec, imol_map, use_rama = False):

procedure: fit_protein_rama_fit_function (res_spec, imol_map):

procedure: interruptible_fit_protein (imol, func):

func is a refinement function that takes 2 args, one a residue spec, the other the imol_refinement_map. e.g. fit_protein_fit_function

procedure: stop_interruptible_fit_protein ():

this will stop the currently running interuptible fit protein function

procedure: continue_interruptible_fit_protein ():

Continue with the interruptible fitting

procedure: cancel_interruptible_fit_protein ():

use to completely stop the interruptible fit function

procedure: fit_chain (imol,chain_id):

For each residue in chain chain-id of molecule number imol, do a rotamer fit and real space refinement of each residue. Don't update the graphics while this is happening (which makes it faster than fit-protein, but much less interesting to look at).

procedure: fit_residue_range (imol, chain_id, resno_start, resno_end):

As fit_chain, but only for a residue range from resno_start to resno_end

procedure: fit_waters (imol, animate_qm = False):

For each residue in the solvent chains of molecule number imol, do a rigid body fit of the water to the density.

BL says: we pass *args where args[0]=imol and args[1]=animate_qm (if there)

procedure: fit_waters_range (imol, chain_id, start, end):

BL thingy: as fit_waters, but will only fit a range of waters (start to end). speeds things up when refining a lot of waters

procedure: stepped_refine_protein (imol, res_step = 2):

Step through the residues of molecule number imol and at each step do a residue range refinement (unlike fit-protein for example, which does real-space refinement for every residue).

The step is set internally to 2.

procedure: stepped_refine_protein_for_rama (imol):

refine each residue with ramachandran restraints

procedure: stepped_refine_protein_with_refine_func (imol, refine_func, res_step):

procedure: post_ligand_fit_gui ():

The gui that you see after ligand finding.

procedure: molecules_matching_criteria (test_func):

test_func is a function given one argument (a molecule number) that returns either False if the condition is not satisfied or something else if it is. And that "something else" can be a list like [label, x, y, z] or ["Bad Chiral", 0, "A", 23, "", "CA", "A"]

It is used in the create a button label and "what to do when the button is pressed".

procedure: refine_active_residue_generic (side_residue_offset):

This totally ignores insertion codes. A clever algorithm would need a re-write, I think. Well, we'd have at this end a function that took a chain_id res_no_1 ins_code_1 res_no_2 ins_code_2

And refine-zone would need to be re-written too, of course. So let's save that for a rainy day (days... (weeks)).

BL says:: this seems to ignore backup!

procedure: refine_active_residue ():

Function for keybinding. Speaks for itself

procedure: refine_active_residue_triple ():

And another one

procedure: manual_refine_residues (side_residue_offset):

For just one (this) residue, side-residue-offset is 0.

procedure: sphere_refine (radius=3.0):

Sphere refinement (around radius)

procedure: pepflip_active_residue ():

Pepflip the active residue - needs a key binding

procedure: auto_fit_rotamer_active_residue ():

Another cool function that needs a key binding


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.27 extensions

procedure: add_coot_menu_separator (menu):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.28 brute_lsqman

procedure: brute_lsqman (pdb1_imol, pdb2_imol):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.29 cns2coot

procedure: cns2coot (twofofc_coeffs, fofc_coeffs, model_pdb):

Read in cns coeff-data (given filenames) and a pdb molecule filename to make maps.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.30 refmac

procedure: refmac_extra_params

Extra parameters can be passed to refmac using either a file "refmac-extra-params" or by setting the variable refmac-extra-params. The LABIN line should not be part those extra parameters, of course - Coot takes care of that. refmac_extra_params should be a list, like refmac_extra_params = ['NCYC 0', 'WEIGHT 0.2']

if refmac_extra_params is given we use that! Otherwise we check for a refmac-extra-params.txt file also params given in .coot.py are considered very first, so check is:

1.) .coot.py (needs to include: global refmac_extra_params)

2.) whatever is written here

3.) refmac-extra-params.txt

procedure: split_label (label):

/a/b/c -> c

procedure: run_loggraph (logfile):

BL says: for loggraph we use a function

procedure: run_refmac_by_filename (pdb_in_filename, pdb_out_filename, mtz_in_filename, mtz_out_filename,

procedure: post_run_refmac (imol_refmac_count, swap_map_colours_post_refmac_p,

procedure: extra_params_include_weight_p (params_list):
Return True if the list of strings params_list contains a string beginning with "WEIGHT". If not return False

procedure: get_refmac_extra_params ():

If refmac-extra-params is defined (as a list of strings), then return that, else read the file "refmac-extra-params.txt"

Return a list a list of strings.

procedure: run_refmac_for_phases (imol, mtz_file_name, f_col, sig_f_col):

procedure: refmac_for_phases_and_make_map (mtz_file_name, f_col, sig_f_col):

procedure: read_refmac_log (imol, refmac_log_file):

This will read a refmac log file and extract information in interesting_things_gui format, i.e. a list with either coorinates or residues to be flagged as interesting

the list of extracted information may look like: [[0, "A", 43, [bond_deviations, [atom, value],[atom2, value2]], [vdw_deviation, [atoms, value]], [more deviations]], next res]

e.g. interesting_things_gui( "Bad things by Analysis X", [["Bad Chiral",0,"A",23,"","CA","A"], ["Bad Density Fit",0,"B",65,"","CA",""], ["Interesting blob",45.6,46.7,87.5]]

procedure: get_refmac_version ():

returns the major refmac version, i.e. [5, 3] (for 5.3) or False if no refmac found


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.31 americanisms

procedure: set_rotation_center

an americanism

procedure: handle_read_draw_molecule_with_recenter

an americanism

procedure: set_rotation_center_size

an americanism

procedure: center_atom_label_status

an americanism

procedure: set_last_map_color

an americanism

procedure: center_of_mass

an americanism

procedure: set_font_color

an americanism

procedure: rotation_center

an americanism

procedure: move_molecule_to_screen_center

an americanism


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.32 coot_toolbuttons

procedure: register_coot_icons ():

put all coot svgs in the default icon set

procedure: save_toolbar_to_init_file (button_label, callback_function, icon=None):

save a toolbar button to ~/.coot-preferences/coot_toolbuttons.py

procedure: remove_toolbar_from_init_file (button_label):

remove a toolbar from ~/.coot-preferences/coot_toolbuttons.py

procedure: list_of_toolbar_functions ():

returns a list with pre-defined toolbar-functions (stock-id is optional) format: [[Group1,[toolbarname1, callbackfunction1, description1], [toolbarname2, callbackfunction2, description2, stock-id2],...], [Group2]....] OBS: callbackfunction is a string!


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.33 create_input_server

procedure: make_server_for_remote_control ():


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.34 coot_load_modules

procedure: probe_command

This is full pathname of molprobity's probe program

procedure: reduce_command

This is full pathname of molprobity's reduce program

procedure: do_coot_tips_flag

This has be be here (in a general place) because tips_gui (where it used to be is conditionally loaded). (default to tips_gui displayed is True).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.35 test


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.36 parse_pisa_xml

procedure: clean_xml_file (filename):

return a filename which is clean (pisa) xml or False if there was problems

procedure: parse_pisa (imol, entity):

procedure: pisa_assemblies (imol):


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.37 example_python_mol_representation


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.38 tips_gui

procedure: show_coot_tip_from_list (n, text):

given a number and a gtk text widget text (textbuffer!), put tip number n into the widget.

procedure: increment_coot_tip_number ():

increment the tip number when the user sees a tip

procedure: decrease_coot_tip_number ():

decrement the tip number when the user sees a tip

procedure: tips_gui ():

run the tips gui.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.39 what_check

procedure: strip_leading_spaces (str):

" 53" -> "53", " " -> ""

procedure: go_to_residue_by_spec (imol, spec):

conider for coot_utils

procedure: residue_spec2string (spec):

consider for coot_utsil

procedure: get_flip_residue (line):

make this internal

where line is something like " 53 HIS ( 53 ) A12" ignore xxxxI Cyy xxxx is 4char resno, I insertion code, C chain id, yy is model number

return a residue spec, or False

procedure: convert_to_button_info (problemed_res_list):

procedure: problem_residues2dialog (imol, problemed_res_list_list):

A problemed-res-list is improper pair where the car is a pair of string, one describing the problem, and the other being the "fix it" button label. The cdr is a list of residue specs.

A problemed_flip_list_list is a list of those things.

procedure: parse_check_db (imol, file_name, action):
action is either 'gui' (then we get a gui) or 'apply-actions', then the model modifications are automatically applied.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.40 test_internal


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.41 tips

procedure: tip_list ():

a list of tips for Coot

procedure: no_coot_tips ():

Function to turn off coot tips at start


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.42 local_code


[Top] [Contents] [Index] [ ? ]

Table of Contents


[Top] [Contents] [Index] [ ? ]

About this document

This document was generated by Bernhard Lohkamp on February, 9 2010 using texi2html

The buttons in the navigation panels have the following meaning:

Button Name Go to From 1.2.3 go to
[ < ] Back previous section in reading order 1.2.2
[ > ] Forward next section in reading order 1.2.4
[ << ] FastBack previous or up-and-previous section 1.1
[ Up ] Up up section 1.2
[ >> ] FastForward next or up-and-next section 1.3
[Top] Top cover (top) of document  
[Contents] Contents table of contents  
[Index] Index concept index  
[ ? ] About this page  

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:

This document was generated by Bernhard Lohkamp on February, 9 2010 using texi2html