Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
1
Re-usable components forRe-usable components forstructural structural bioinformaticsbioinformatics
Sophie COON
The Scripps Research InstituteLa Jolla, California
SCHEDULESCHEDULE
o I – Code development strategieso II – Re-usable components
? MolKit, DejaVu, ViewerFramework
o III - From building blocks to applications? PMV
o Conclusion
2
Protein-Protein-LigandLigand
Complex AssembliesComplex AssembliesProtein-ProteinProtein-Protein
Molecular SurfacesMolecular SurfacesAutoDockAutoDock
SurfDockSurfDock
SymGenSymGen
MSMSMSMS
HARMONYHARMONY
SymSearchSymSearch
The challengeThe challenge
VisualizationVisualization
DockingDockingMethodsMethods
FoldingFolding
ProteinProteinEngineeringEngineering
SequenceSequenceAnalysisAnalysis
ModelingModeling
MM - MDMM - MD
Ab InitioAb InitioMethodsMethods
ElectrostaticsElectrostaticsCalculationsCalculations
MolecularMolecularSurfacesSurfaces
Etc ...Etc ...
3
“Traditional” solution“Traditional” solution
VisualizationVisualization
DockingDockingMethodsMethods
FoldingFolding
ProteinProteinEngineeringEngineering
SequenceSequenceAnalysisAnalysis
ModelingModeling
MM - MDMM - MD
Ab InitioAb InitioMethodsMethods
ElectrostaticsElectrostaticsCalculationsCalculations
MolecularMolecularSurfacesSurfaces
Etc ...Etc ...
“Application” centric approach“Application” centric approach
Parsing a moleculefile
Dockingmethods
Molecularsurface
ElectrostaticsCalculations
visualization
Ab Initio Methods
4
Our solutionOur solutionHigh level language as a scripting environmentHigh level language as a scripting environment
MolecularSurfaces
Molecular
MolecularSurfaces
Surfaces
Molecules
Molecules
Molecules
DataBase
DataDataBaseBaseElectrostatics
Electrostatics
Electrostatics
Delaunay
DelaunayDelaunay
Homology
Homology
HomologyCSGCSGCSG
3DViewer
3D3DViewerViewer
MM-MDMM-MDMM-MD
NewMethod
NewNewMethodMethod
Your
MethodYourYour
MethodMethod
Writing an applicationWriting an application
Molecules
Molecules
Molecules3DViewer
3D3DViewerViewer
MolecularSurfaces
Molecular
MolecularSurfaces
Surfaces
Electrostatics
Electrostatics
Electrostatics
oo High level codingHigh level codingoo Code re-useCode re-useoo modularitymodularityoo ExtensibleExtensible
5
II - Re-usable componentsII - Re-usable components
o MolKito DejaVuo ViewerFramework
MolKitMolKit
NumericNumeric
MolKitMolKitTreeNode
.parent
.children
...
TreeNode
adopt(child)
TreeNodeSet(ListSet)
[TreeNode, TreeNode, … ].__getattr__( )
.top
.elementType
TreeNode
[ TreeNode1.attr, TreeNode2.attr, …]returns
.name
6
TreeNodeTreeNode, , TreeNodeSetTreeNodeSet
o TreeNodeSet:? Boolean operation? uniq( )? split( )? sort( )? NodesFromName( )? findChildrenOfType( )? findParentOfType( )? …
o TreeNode:? adopt( ) / remove( )? full_name( )? NodeFromName( )? split( ) / merge( )? getParentOfType( )? findType( )? compare( )? assignUniqIndex( )? isAbove( ) / isBelow( )? …
TreeNode TreeNode and and TreeNodeSet TreeNodeSet specializationspecialization
Residue Chain Protein ...
Molecule Atom
Helix Strand Turn Coil
SecondayStructure ...
TreeNode
ResidueSet ChainSet ProteinSet ...
MoleculeSet AtomSet
HelixSet StrandSet TurnSet CoilSet
SecondayStructureSet ...
TreeNodeSet
7
ParsersParsers
PDBMol2PQR...
Parser
MoleculeSet from MolKit.pdbParser import PdbParserparser = PdbParser(‘1crn.pdb’)mols = parser.parse( )
PDB parser MOL2 parserMolecule
Chain
Residue
Atom
Molecule
Chain
Residue
Atom
Molecule
Residue
Atom
Molecule
Atom
ExamplesExamples>>> from MolKit import Read>>> molecules = Read(‘./1crn.pdb’)>>> mol = molecules[0] # Read returns a ProteinSet
>>> print mol.chains.residues.name>>> print mol.chains.residues.atoms[20:85].full_name()
>>> from MolKit.molecule import Atom>>> allAtoms = mol. findType(Atom)>>> set1 = allAtoms.get(lambda x: x.temperatureFactor >20)
>>> allResidues = allAtoms.parent.uniq()>>> import Numeric>>> for r in allResidues:. . . coords = r.atoms.coords. . . r.geomCenter = Numeric.sum(coords) / len(coords)
8
DejaVuDejaVu
TkinterTkinter
NumericNumericPyOpenGLPyOpenGL
DejaVuDejaVu
from DejaVu import Viewervi = Viewer( )from DejaVu.Spheres import Spherescenters = =[[0,0,0],[3,0,0],[0,3,0]] s = Spheres(‘sph’ , centers = centers)s.Set(quality=10)vi.AddObject(s)
FeaturesFeatures
o OpenGL Lighting and Material modelo Object hierarchy with transformation and
rendering properties inheritanceo Arbitrary clipping planeso Material editoro DepthCueing (fog), global anti-aliasingo glSscissors/magic lenso Multi-level pickingo Extensible set of geometries
9
GeometriesGeometries
Geom
o PolyLineo Pointso Sphereso Labelso Arc3D...
IndexedGeoms
o IndexedPolyLineso IndexedPolygomso Triangle_Stripo Quad_Stripo Cylinders ….
DejaVu DejaVu and and MolKitMolKit
>>> from MolKit import Read>>> molecules = Read(‘./1crn.pdb’)>>> mol = molecules[0] # Read returns a ProteinSet>>> coords = mol.chains.residues.atoms.coords>>> radii = mol.defaultRadii()>>> from DejaVu.Spheres import Spheres>>> from DejaVu import Viewer>>> vi = Viewer()>>> sph = Spheres(‘sph’, centers = coords, radii = radii, quality=10)>>> vi.AddObject(sph)
10
ViewerFrameworkViewerFramework
NumericNumericPyOpenGLPyOpenGL TkinterTkinter
DejaVuDejaVu
IdleIdle
ViewerFrameworkViewerFramework
Design featuresDesign features
o Dynamic loading of commandso Python shell for scriptingo Dual interaction mode (GUI/Shell)o Support for command:
? development, logging, GUI, dependencieso Lightweight commands: Macroso Dynamic commands (introspection)o Extensible set of commands
11
ImplementationImplementation
GeomContainer
VFGUI
VFCommandsGUIGUIcommandsobjectsuserpref
UserPreference
addObject( … )removeObject( … ) addCommand( … )askFileOpen( … )askFileSave( … )getUserInput( … )
VFCommand
Objects
ViewerFramework
III - III - From Building Blocks to applicationsFrom Building Blocks to applications
o PMV: Python molecular viewer
12
PMVPMV
NumericNumeric
PyOpenGLPyOpenGL TkinterTkinter
DejaVuDejaVuIdleIdle
ViewerFrameworkViewerFramework
PynchePynche
PmvPmv
MolKitMolKit
Specializing Specializing ViewerFrameworkViewerFrameworkViewerFramework
geomContainer
molGeomContainer
PMV
VFCommand . vf
MoleculeViewer .Molecules
ViewerFramework .Objects
MVCommand .getNodesByMolecules(nodes) .vf
13
Specializing Specializing ViewerFramework ViewerFramework (cont'd)(cont'd)
VFCommandShellCommand
loadCommandCommand
ExitCommand
helpCommandCommand
Etc...
MVCommand
PDBReader
MoleculeLoader
Mol2Reader
DisplayLines
Etc...
ViewerFrameworkPMV
PMVPMV
NumericNumeric
PyOpenGLPyOpenGL TkinterTkinter
DejaVuDejaVuIdleIdle
ViewerFrameworkViewerFramework
PynchePynche
PmvPmv
MolKitMolKit
DEMODEMO
14
ConclusionConclusion
o Validity of the approacho Availabilityo Future directions
Validity of the approachValidity of the approach
o Set of components? extensible? inter-operable? re-usable? short development cycle
o User base expanding beyond our lab.o Components re-use outside the field
of structural biology
15
AvailabilityAvailability
o Modularity enables fine grainlicensing schemes (a la carte)
o Core modules are freely available
o Online Download site:http://www.scripps.edu/~sanner/Python
Future directionsFuture directions
o Add support for editing molecularstructures (i.e. mutations, deletion,addition)
o Interface with MMTK, Tinker, ….o Enhance documentation and tutorialso Setup a CVS server for programmers
wanting to help !o Too many to list ….
16
AcknowledgmentsAcknowledgments
o Michel Sannero Christian Carrillo, Kevin Chano Ruth Huey, Fariba Fanao Vincenzo Tchinke, Greg Pariso MGL at TSRIo Pat Walters, Matt Stahlo Don Bashfordo Guido van Rossum & Python community