The Python Molecule Viewer (PMV) has been developed on top of the following
independent and re-usable packages
MolKit
and
DejaVu
ViewerFramework
This viewer has most of the features
usually expected in a molecule viewer:
stick and cpk representation
different coloring schemes (by atom, by residue type, by chain, by
molecule,
by propreties, etc...)
measuring tools
atom identification by picking
support for multiple molecules
secondary structure representation
user definable sets of atoms, residues,
chains and molecules etc....
In addition to these traditional
features it is dynamically extensible, i.e. new commands can be developed
independently and placed in libraries. The Viewer inherits from the ViewerFramework
the capability to dynamically import these commands as needed. In fact,
all commands in that viewer have been developed based on this principle.
This provides a way to add features to the application that is incremental
and well suited for team development. In addition this approach avoids
the "feature overload" problem, i.e overloaded menus cluttered with commands
that are irrelevant for the problem at hands.
Customization files allow, among
other things, to specify which commands should be loaded when the application
starts. This allows to define a number of molecular viewing applications
just by creating different customization files, each loading different
sets of commands.
from MolKit.protein
import Protein, Chain, Residue
from MolKit.molecule
import Molecule, Atom, AtomSet
loadCommand('fileCommands','readPDB','Pmv')
loadCommand('displayCommands','lines','Pmv')
loadModule('selectionCommands','Pmv')
loadModule('secondaryStructureCommands','Pmv')
self.readPDB("/tsri/pdb/struct/4phv.pdb")
We have written a surface calculation
command and one to selectively display pieces of a surface corresponding
to a sub set of atoms. In fact in this viewer all geometries relate to
the underlying molecules, therefore a subset of atoms can be used to: partially
displayed/ undisplay;selectively labeled; locally colored using different
schemes; any of the geometries. And vice-versa, picking done on any geometry
(molecule, surface, secondary structure) is mapped back onto the molecule.