Scripts Page
Updated: Tue Jan 24 18:02:56 PST 2006
runapbs.sh
apbs_geninp.py
Updated: Tue Jan 24 18:02:56 PST 2006 (update for 0.4.0)
scripts for running APBS.
apbs_geninp.py generates a .inp file for APBS (using something like
"apbs_geninp.py file.pqr") while runapbs.sh will use apbs_geninp.py to
take a pdb file and spit out an OpenDX .dx file for viewing (using
"runapbs.sh file.pdb"). Both files must be located in the PATH, as should
pdb2pqr.py (from APBS) for everything to work properly. Tested with APBS
0.4.0.
pdb_aniso.py
script for drawing isoprobability ellipsoids in PyMOL. Requires MMTK and numerical python. Load pymol,
then do:
run pdb_aniso.py
cmd.load_callback(anisouCallback(pdbfile='file.pdb'), 'object_name')
there are a few options for the callback:
anisouCallback(pdbfile='file.pdb', crit=50, transparency=0.0, segments=10, color=[1.0,1.0,1.0], drawprin=False)
where:
- pdbfile: name of pdbfile to read in
- crit: isoprobability value (valid range: 1-100)
- transparency: transparency of the ellipsoid (valid range: 0.0-1.0)
- segments: how much detail to draw the ellipsoid with
- color: color of ellipsoids/principal axes
- drawprin: use True to draw principal axes
examples:
- use all defaults (run with
cmd.load_callback(anisouCallback(pdbfile='phe.pdb'), 'anisou')): Image 1
- run with cmd.load_callback(anisouCallback(pdbfile='phe.pdb'),
transparency=0.5, color=[0.8,0.6,0.4], drawprin=True), 'anisou'): Image 2
Limitations:
- If you really want to raytrace anisotropic ellipsoids, try povscript+
- Since PyMOL currently doesn't even read in ANISOU records, MMTK is
required - therefore, selections aren't allowed (yet) - just entire PDB
files.
- Since the script uses PyOpenGL, the results won't work with PyMOL's
bizarre built-in raytracer.
- I've used PyMOL for a total of 5 minutes, so this script probably
reflects that. Let me know of errors/improvements.
regexp for changing between CNS and PDB standard file format (useful
mostly for alternate conformers):
convert CNS to PDB standard:
\( \)\([A-Z][A-Z][A-Z] \)\([ ,A-Z]\)\(.\{50\}\)\([A-Z]\)\([A-Z]\)
\6\2\5\4\5
inverse:
\([ ,1-2]\)\([A-Z]\)\([A-Z][A-Z][A-Z] \)\([A-Z]\)\(.\{50\}[A-Z]\)\( \)
\1 \3\4\5\2
Or just use this shell script.
scale_mult.sh:
Standard scalepack script juiced up to run multiple cycles until the
number of rejected reflections stays constant. Outputs all logfiles in a
fashion of scale.[num].log for each cycle of scaling. Can be called with a
"noreject" flag to only run once without performing any rejections. Just
make the script executable, edit the variables in the script and run.
cns2shelx.py:
Converts cns input files to shelx reflection files - written mostly in
order to preserve the cross validation flag and output the
reflections as intensities, *not* amplitudes, while preserving
negative values in the transition (which is tricky to do using other
standard scripts).
fixit.py:
Updated: Wed Dec 22 19:45:41 PST 2004 (fix a minor integer determination bug)
Does it ever drive you bonkers when you try to convert a CNS file to
an mtz file, and have f2mtz complain about numbers like
"0.134250E+06"? This script converts CNS files to a single line
format that should have no problems being converted to an mtz.
Usage: fixit.py [# lines to ignore] [# lines to concatenate] [filename]
e.g. fixit.py 19 4 filename.cns
will skip first 19 lines and merge 4 lines per reflection from filename.cns
The output is dumped to stdout, so just redirect it to a file.
pdbvariance.py:
Updated: Tue Apr 13 19:13:21 PDT 2004
This script is meant to determine the overall variance between a set
of PDB files (already superpositioned by some means) and express the
variance as an ANISOU tensor. It simply calculates the average of all
the structures, then looks for nearby atoms (or residues - the script
allows either to be used as the search basis) within each given PDB file,
and finally generates the ANISOU tensor as:
xx = average of variance in X + a "padding" factor
yy = average of variance in Y + a "padding" factor
zz = average of variance in Z + a "padding" factor
xy = xx*yy
yz = yy*zz
xz = xx*zz
The Ueq value can be expressed as:
1) the m.s.d. among the ensemble + a padding factor (default)
2) the average Ueq among the ensemble
(the padding factor is given as a B factor, or can be taken as the
Ueq from each PDB file)
Credits:
- Konrad Hinsen - MMTK and friends
- Mark Wilson - original CNS script for pdbvariance.py
Questions/Comments:
Email