Changes between Initial Version and Version 1 of ChimeraProgrammingResources


Ignore:
Timestamp:
Dec 21, 2010, 2:20:50 PM (15 years ago)
Author:
Darren Weber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChimeraProgrammingResources

    v1 v1  
     1
     2== Resources ==
     3
     4 * [http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/ Programmer's Guide] (http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/)
     5 * [http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts Example scripts] (http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts)
     6 * IDLE (Tools > General Controls): help(object), dir(object)
     7 * [http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev Chimera developer mailing list] (http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev)
     8 * Source code:
     9   * [http://plato.cgl.ucsf.edu/trac/chimera/browser subversion browser] (http://plato.cgl.ucsf.edu/trac/chimera/browser)
     10   * [http://www.cgl.ucsf.edu/chimera/sourcecode.html download] (http://www.cgl.ucsf.edu/chimera/sourcecode.html)
     11   * C++ headers are available in distributions (see $CHIMERA/include)
     12   * Python source code is included with distributions (see $CHIMERA/share)
     13 * [http://docs.python.org/ Python documentation] (http://docs.python.org/)
     14 * [http://www.scipy.org/Numpy_Example_List_With_Doc Numpy examples] (http://www.scipy.org/Numpy_Example_List_With_Doc)
     15
     16== Chimera Molecular Data ==
     17
     18{{{
     19# a list of open models
     20models = chimera.openModels.list()
     21
     22# restrict list to Molecules
     23molecules = chimera.openModels.list(modelTypes=[chimera.Molecule])
     24
     25# a Molecule's residues, atoms, or bonds
     26if len(molecules):
     27  r = molecules[0].residues
     28  a = molecules[0].atoms
     29  b = molecules[0].bonds
     30}}}
     31
     32=== Residues ===
     33
     34 * type: LYS, HEM, etc.
     35 * id.position / id.chainId / id.insertionCode: number / chain ID / insertion code
     36 * molecule: parent Molecule
     37 * atoms: list of atoms
     38 * atomsMap: dict of {atom-name: [list of atoms]}
     39 * isHelix / isStrand: in helix / strand
     40
     41=== Atoms ===
     42
     43 * name: name
     44 * coord() / xformCoord(): untransformed / transformed coordinates
     45 * residue / molecule: parent Residue / Molecule
     46 * bonds: list of bonds
     47 * neighbors: list of bonded atoms
     48 * primaryBonds() / primaryNeighbors(): same as above but only primary altlocs
     49 * bondsMap: dict of {bonded-atom: bond}
     50 * color: Color
     51 * display: True if shown
     52 * drawMode: one of chimera.Atom.X with X being Dot, Sphere, EndCap, or Ball
     53 * element: chemical element (type chimera.Element, settable with string or number)
     54 * label: label shown in graphics window
     55 * radius: VdW radius
     56
     57=== Bonds ===
     58
     59 * atoms: 2-tuple of atoms
     60 * otherAtom(a): [a is one of the bond's atoms] other atom in bond
     61 * drawMode: one of chimera.Bond.X with X being Wire or Stick
     62 * label: label shown in graphics window
     63 * molecule: parent Molecule
     64 * length(): length
     65
     66=== Molecular Measurements ===
     67
     68chimera module functions use Points, which are returned by Atom's coord() or xformCoord() methods
     69 * distance / sqdistance
     70 * also: a1.coord().[sq]distance(a2.coord()) [similar for xformCoord]
     71 * angle (in degrees)
     72 * dihedral (in degrees)
     73
     74=== Molecular Editing ===
     75
     76Look in {{{$CHIMERA/share/BuildStructure/__init__.py}}} for examples of creating new molecules and residues.
     77
     78Using the {{{chimera.molEdit}}} module:
     79 * addAtom
     80    * if adding in bulk, make sure to specify optional serialNumber keyword
     81 * addBond
     82 * addDihedralAtom -- add atom given a bond length / angle / dihedral
     83
     84=== Setting or Querying Selections ===
     85
     86Using the {{{chimera.selection}}} module:
     87 * currentAtoms / currentBonds / currentResidues / currentMolecules: currently selected Atoms / Bonds / Residues / Molecules
     88 * setCurrent: set current selection to given items
     89 * addCurrent / addImpliedCurrent: add given items to current selection
     90 * the "implied" version also selects endpoint Atoms of added Bonds and connecting Bonds of added Atoms
     91 * removeCurrent: remove items from current selection, if present
     92
     93=== Miscellaneous ===
     94
     95 * chimera.runCommand: execute any command-line command (arg is a string)
     96    * direct Python equivalent usually in Midas module
     97 * chimera.colorTable module:
     98    * getColorByName: get a Color by name
     99 * !OpenSave module:
     100    * osOpen: open a file or HTTP URL, with or without compression
     101 * chimera.extension module
     102    * manager.instances: running dialogs listed at end of Tools menu