used in Extensions -> Representation -> Ball & Stick
fix typo of set-find-hydrogen-torsions (backward compatibility in case anyone was using that)
rigid body refine using residue ranges. Takes 2 arguments, the first is the molecule number, the second is a list of residue-ranges. A residue range is
(listchain-id resno-start resno-end).
add terminal residue is the normal thing we do with an aligned sequence, but also we can try ton find the residue type of a residue in the middle of the chain that is modelled as an ALA, say.
Return a list of molecule numbers (closed and open) The elements of the returned list need to be tested against is-valid-model-molecule?
first n fields of ls. if length ls is less than n, return ls. if ls is not a list, return ls. If n is negative, return ls.
Test for prefix-dir (1) being a string (2) existing (3) being a directory (4) modifiable by user (ie. u+rwx). prefix-dir must be a string.
Return #t or #f.
return the directory component of file-name, leave "/" on, if it's there. Note "x", "", "/" -> ""
Convert a residue-spec to an mmdb atom selection string.
Set the virtual trackball behaviour.
trackball type is a symbol: either 'flat or 'spherical-surface.
The screen centre.
return the rotation centre as a 3 membered list of numbers
ls must be a list of strings, atom must be a string.
return either #t or #f.
range: works like the eponymous python function e.g. (range 3) -> '(0, 1, 2) e.g. (range 1 3) -> '(1, 2)
code from thi <ttn at mingle.glug.org>
run command and put the output into a string and return it. (c.f.
run-command/strings)
run cmd putting output to file-name and reading commands data from the list of strings data-list.
Is the command f in the path? return #t or #f.
Thank you for this, rixed at happyleptic.org
Where cmd is e.g. "refmac" args is (list "HKLIN" "thing.mtz") log-file-name is "refmac.log" data-list is (list "HEAD" "END")
Return the exist status e.g. 0 or 1.
run commands from an input file.
Return the strings screen output of cmd or #f if command was not found
Crude test to see of 2 floats are the same (more or less). Used in a greg test after setting the atom position.
Same function as strip-extension, different name, as per scsh, in fact.
simple scheme functions to concat the strings in ls (ls must contain only strings)
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 3 6 8)(every-nth '(0 1 2 3 4 5 6 7 8) 3)-> '(0 3 6)n must be positive
Return an atom info or #f (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" ".")
In a laughable attempt to minimise system dependence.
Similarly attempting to minimise system dependence.
return #t or #f depending on if file-name (which must be a string) is a directory.
The following functions from PLEAC (guile version thereof of course).
Return: a list of files in the given directory
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.
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
e.g. (translation 'x 2) -> '(2 0 0) Return: "scheme 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).
return a scheme representation of molecule imol, or #f if we can't do it (imol is a map, say).
transform a coordinates molecule by a coot-rtop (which is a SCM expression of a clipper::RTop), i.e. a list of a 9-element list and a 3 element list. e.g. (list (list 1 0 0 0 1 0 0 0 1) (list 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 translationor
(transform-map imol trans radius)when using the default rotation-centre as the about-pt
return then NCS master of the first molecule that has ncs.
return "" on fail to find an ncs chain
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.
Return a list of chain ids for given molecule number imol. return empty list on error
convert from interface name to schemish name
Return #t or #f.
schemey interface to eponymous scripting interface function. Return scheme true or false
schemey interface to eponymous scripting interface function. Return scheme true or false.
Does residue resno with insertion code ins-code of chain chain-id and in molecule number imol exist?
Return #t or #f.
Does the residue contain hetatoms? Return #t or #f.
Return a list of 3 float for the centre of mas of molecule number imol.
on faiure return #f.
Return as a list the occupancy temperature-factor element x y z coordinates of the given atom. (the x,y,z are in Cartesian Angstroms).
on error (e.g. atom not found) return #f
return a guess at the map to be refined (usually called after imol-refinement-map returns -1)
Ian Tickle says (as far as I can understand) that the target rmsd should be 0.25 or thereabouts. You can over-ride it now.
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.
Associate the contents of a PIR file with a molecule.
a list of (code key name thunk) e.g. '(103 "g" "Goto Blob" (blob-under-pointer-to-screen-centre))
Add a key binding
with a given name, key (e.g. "x" or "S") and the function to run (a thunk) when that key is pressed.
Function requested by Mark White.
read XtalView (and maybe other) .vu files and convert them into generic objects.
Pass the filename and an object name e.g. (read-vu-file "axes.vu" "axes")
Returns: nothing interesting.
Return a list of residues, each of which has a return value at the start, ie. (list return-value chain-id res-no ins-code)
Return residue specs for all residues in imol (each spec is preceeded by #t)
Return a list of all residues that have alt confs: where a residue is specified thusly: (list chain-id resno ins-code)
Return a list of all the altconfs in the residue. Typically this will return (list "") or (list "A" "B")
Return #f 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.
change chain ids with residue range for the PTY
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.
Resets alt confs and occupancies of atoms in residue that have orphan alt-loc attributes. Use the active-residue.
hilight-colour is specified in degrees (round the colour wheel - starting at yellow (e.g. 230 is purple))
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).
Run libcheck to convert from SMILES string
Generate restraints from the residue at the centre of the screen using PRODRG. Delete hydrogens from the residue because PRODRG has anomalous hydrogens.
Here we construct the url that contains the latest (pre) release info adding in "pre-release" if this binary is a pre-release. args ends up as something like: ("-s" "xxx/phone-home.scm" "pre-release" "binary" "Linux-1386-fedora-10-python-gtk2" "command-line" "/home/xx/coot/bin/coot")
Get the binary (i.e. the action that happens when the download button is pressed). This is run in a thread, so it can't do any graphics stuff.
return #t if tar file was successfully downloaded and untared and #f if not.
e.g. input: "coot-0.6.2-pre-1-revision-2765\n" output: "coot-0.6.2-pre-1-revision-2765"
In the first case the sequence is assigned to the closest match (model sequence to target sequence), subsequently only chains without a sequence associated with them are candidates for matching. The protein sequence has to have at least 95% sequence identity with the target sequence in "default.seq"
keep a copy of the old directories around in a directory named after expiration time.