| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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?!?
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.
based on coot_listener_idle_func_proc
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Internal type conversion for LSQ fitting. Return a number according to the symbod match_type_in
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]
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.
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] | [ ? ] |
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)
shelxl refinement with input text
do-shelx-lst-file
ie. create a interesting-things GUI for split (and other things?) in a shelx .lst file.
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] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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
helper function to see if a sequence has been assigned to a chain in imol return True if sequence is there, False otherwise
For Kay Diederichs, autofit without a map (find rotamer with best clash score). This ignores alt conformations and residues with insertion codes.
calculate the average of 20% lowest density at all atom_positions in fragment
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
flash the background different colours in some uninteresting way.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
args not including the output filename
run raster3d
Run either raster3d or povray
image_type is either 'raster3d' or 'povray'
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
Tests file names for spaces. there is certainly on problem on windows not sure about other OS, yet
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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).
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] | [ ? ] |
first make the menu
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Is this true? Dont understand this
needs testing!
return True or False (None on error, maybe should return some Error!?) although if no return, then var becomes None anyway.. FIXME).
First generate a string with no trailing newline.
version_string is something like: "coot-0.6-pre-1-revision-2060"
return success status as a boolean
return as a string, or False
return a string
returns latest installer version in pending-install or empty string "" if no installer for windows use only!
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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] | [ ? ] |
BL says:: just to be consistent with Paul's names map to scheme names:
map to scheme names:
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).
display a GUI for generic objects
Prepare file for probe, i.e. remove 'USER' from file
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.
Update the generic objects probe dots from residues within radius of the screen centre.
Return nothing interesting.
add in the conn files by concatting.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Return a python_mol
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
'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,...],...
'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,...],...
'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,...]]
Pythonize function: return a python boolean.
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
Find the most recently created file from the given glob and dir
return False on no-such-file
Convert a residue_spec to an mmdb atom selection string. FIXME:: to be tested
Return a list of molecules that are maps
Return a list of molecules that are (coordinate) models
Return True(False) if imol is (isn't) a shelx molecule.
Set the virtual trackball behaviour.
trackball type is a string: either 'flat' or 'spherical-surface'
s ls a list of strings? Return True or False
string concat with spaces, ls must be a list of strings.
The screen centre.
return the rotation centre as a 3 membered list of numbers is python list [...] !!!
this is actually not essentail since python has these funtion(s)
Return True or False adapted from find_exe
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
Crude test to see of 2 floats are the same (more or less). Used in a unit test after setting the atom position.
"a.b.res" -> "a.b" file_name_sans_extension
What is the extension of file_name?
"a.pdb" -> "pdb" "" -> ""
e.g. "a.pdb" -> "a-tmp.pdb"
Same function as strip_extension, different name, as per scsh, in fact.
/a/b.t -> b.t d/e.ext -> e.ext file-name-sans-path
does s start with a "/" ? return True or False
for windows return True when drive letter, e.g. C, or even \\ (backslash):
return a string that contains the date/time e.g. "2006-01-02_2216.03"
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
return atom info or False (if atom not found).
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
read_pdb_all reads all the "*.pdb" files in the current directory.
return False if dir_name is a file or we can't do the mkdir
return the view matrix (useful for molscript, perhaps). BL says: like all matrices is a python list [...]
return the transposed view matrix (useful for molscript, perhaps). BL says: like all matrices is a python list [...]
return the view quaternion
Return the view number
Convert a view matrix to a view quaternion to set Coot view internals.
Set the view matrix using matrix->quaternion.
Useful for using a view matrix from another program, perhaps.
Miguel's molecular orientation axes
Return the molecule centre as a list of 3 numbers.
Note: mol_cen could contain values less than -9999.
Move the centre of molecule number imol to the current screen centre
Return a nine-membered list of numbers.
e.g. translation('x',2) -> [2, 0, 0] return False on error
Rotate degrees about screen axis, where axis is either 'x', 'y' or 'z'.
Support for old toggle functions. (consider instead the raw functions use the direct set_displayed functions).
toggle the display of imol
toggle the active state (clickability) of imol
return a python (list) representation of molecule imol, or False if we can't do it (imol is a map, say)
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]]
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
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.
Make the imol-th map brighter.
Scale_factor > 1 makes brighter...
Make all maps brighter
Make all maps darker
return a list of chain ids for given molecule number imol. return empty list on error
convert from interface name to schemisch name to be equivalent to Paul's naming
return True or False
python (schemeyish) interface to eponymous scripting interface function!? return True or False
python (schemeyish) interface to eponymous scripting interface function. return True or False
convenience function (slightly less typing).
Return True or False
python (schemeyish) interface to shelx molecule test
Return True or False
python (schemeyish) interface to the function that returns whether or not a map is a difference map.
Return True or False.
Does residue resno with insertion code ins_code of chain chain_id and in molecule number imol exist?
Return True or False
Return a list of 3 float for the centre of mas of molecule number imol.
on failure return False.
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
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!
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.
Print the sequence of molecule number imol
This is not really a util, perhaps it should be somewhere else?
simple utility function to return the contents of a file as a string.
comma key hook
dot key hook
general key press hook
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]
Return residue specs for all residues in imol (each spec is preceeded by True)
Return a list of all residues that have alt confs: where a residue is specified thusly: [[chain_id, resno, ins_code], [...] ]
Return a list of all the altconfs in the residue. Typically this will return [""] or ["A", "B"]
Return a list of all atoms that have zero occupancy: where an atom is specified thusly: [[chain_id, resno, ins_code, name, altconf], [...] ]
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.
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.
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
A bit of fun
A function for Overlaying ligands. The transformation is applied to all the atoms of the molecule that contains the moving ligand.
Resets alt confs and occupancies of atoms in residue that have orphan alt-loc attributes. Use the active-residue.
save the dialog positions to the coot_dialog_positions.py file in ./coot-preferences
removes a line containg all strings of the given list from file
multiple maps of varying colour from a given map.
hilight-colour is specified in degrees (round the colour wheel - starting at yellow (e.g. 230 is purple))
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).
for easier switching on of GL lighting on surfaces:
and to turn it off
set B-factor to bval for molecule imol
reset B-factor for active residue to default value
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
for running online docs
to reload modules
to make print a function:
to print elements of a list:
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
python command to see if we have pygtk available return True if availabel otherwise False
python command to see if we have pygobject available return True if availabel otherwise False
function to kill a process, given the process pid return True if managed to kill the process otherwise false
some example function for the toolbutton
helper function to test for a number returns True if number, otherwise False
function to merge multiple solvent chains
helper to comvert functions to strings
simplyfy check for windows
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
return a string or False
loop_building_tool is either 'rapper' or 'ARP/wARP'
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
check the directory and get url url_string.
get url_string for data type (string actually) 'pdb' or 'sfs'
Get the pdb and sfs. id is the accession code
Return a molecule number on success or not a number (False) or -1 on error.
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] | [ ? ] |
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)
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")
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).
Return the first master chain id (usually there is only one of course) or False
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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.
The callback from pressing the Go button in the smiles widget, an interface to run libcheck.
smiles GUI
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.
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.
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.
A demo gui to move about to molecules
A BL function to analyse the libcheck log file
old coot test
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]]
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
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
Fill an option menu with maps and return the list of maps
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.
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
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
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.
As above but for maps
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.
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
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
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.
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.
Make an interesting things GUI for residues of molecule number imol that have alternate conformations.
Make an interesting things GUI for residues with missing atoms
Make an interesting things GUI for residues with zero occupancy atoms
Make an interesting things GUI for residues of molecule number imol for the given imol. A generalization of alt-confs gui.
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)
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.
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.
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.
pack a hint text and a molecule chooser option menu into the given vbox.
return the option-menu and model molecule list:
Return an entry, the widget is inserted into the hbox passed to this function
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
The gui for the strand placement function
Cootaneer gui
The gui for saving views
a button is a list of [label, callback, text_description]
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
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.
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
as the dialog_box_of_buttons, but we can put in an extra widget (extra_widget)
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)
nudge screen centre box. Useful when Ctrl left-mouse has been taken over by another function.
This is using the absolute coordinates
nudge screen centre box. Useful when Ctrl left-mouse has been taken over by another function.
This is using the viewing coordinates
as nudge_screen_centre_gui but with clipping and zoom control
A gui to make a difference map (from arbitrarily gridded maps (that's it's advantage))
GUI for ligand superpositioning by graph matching
Cootaneer/sequencing gui modified by BL with ideas from KC based on Paul's cootaneer gui and generic_chooser_entry_and_file_selector
a function to run a pygtk widget in a function as a thread
a master gui to set all kinds of refinement parameters
a simple window to show a progress bar return the window (to be destroyed elsewhere)
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
Associate the contents of a PIR file with a molecule. Select file from a GUI.
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.
Wrapper in that we test if there have been sequence(s) assigned to imol before we look for the sequence mismatches
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).
USER MODS gui
simple rename residue GUI
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
args not including the output filename
Run provray using current displayed image and write .pov file to default filename
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Mutate chain-id of molecule number imol given sequence.
The number of residues in chain-id must match the length of sequence.
an internal function of mutate, This presumes a protein 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).
mutate and auto fit a residue range
This presumes a protein sequence (not nucleic acid).
The sequence is a string of one letter codes
mutate and autofit whole chain
This presumes a protein sequence (not nucleic acid).
a short-hand for mutate-and-auto-fit
return a char (well string in python), return "A" for unknown residue_type
a wrapper for mutate_single_residue_by_seqno (which uses slightly inconvenient single letter code)
Here residue-type is the 3-letter code
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.
Delete (back to the CB stub) the side change in the range resno-start to resno-end
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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] | [ ? ] |
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).
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.
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
this will stop the currently running interuptible fit protein function
Continue with the interruptible fitting
use to completely stop the interruptible fit function
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).
As fit_chain, but only for a residue range from resno_start to resno_end
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)
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
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.
refine each residue with ramachandran restraints
The gui that you see after ligand finding.
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".
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!
Function for keybinding. Speaks for itself
And another one
For just one (this) residue, side-residue-offset is 0.
Sphere refinement (around radius)
Pepflip the active residue - needs a key binding
Another cool function that needs a key binding
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Read in cns coeff-data (given filenames) and a pdb molecule filename to make maps.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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
/a/b/c -> c
BL says: for loggraph we use a function
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.
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]]
returns the major refmac version, i.e. [5, 3] (for 5.3) or False if no refmac found
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
an americanism
an americanism
an americanism
an americanism
an americanism
an americanism
an americanism
an americanism
an americanism
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
put all coot svgs in the default icon set
save a toolbar button to ~/.coot-preferences/coot_toolbuttons.py
remove a toolbar from ~/.coot-preferences/coot_toolbuttons.py
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] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This is full pathname of molprobity's probe program
This is full pathname of molprobity's reduce program
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] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
return a filename which is clean (pisa) xml or False if there was problems
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
given a number and a gtk text widget text (textbuffer!), put tip number n into the widget.
increment the tip number when the user sees a tip
decrement the tip number when the user sees a tip
run the tips gui.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
" 53" -> "53", " " -> ""
conider for coot_utils
consider for coot_utsil
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
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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
a list of tips for Coot
Function to turn off coot tips at start
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [Top] | [Contents] | [Index] | [ ? ] |
| [Top] | [Contents] | [Index] | [ ? ] |
| 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 |