biological science libraries - scripps research institute science libraries - an approach to...

42
Biological Science Libraries Biological Science Libraries - An approach to software - An approach to software components for structural components for structural bioinformatics bioinformatics Michel F. Sanner The Scripps Research Institute La Jolla, California The Molecular Graphics Laboratory SciPy’02 CalTech Pasadena CA. Sept. 2002

Upload: nguyencong

Post on 20-Mar-2018

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

Biological Science LibrariesBiological Science Libraries- An approach to software- An approach to softwarecomponents for structuralcomponents for structural

bioinformaticsbioinformatics

Michel F. Sanner

The Scripps Research InstituteLa Jolla, California

The Molecular Graphics Laboratory

SciPy’02

CalTech Pasadena CA. Sept. 2002

Page 2: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

SCHEDULESCHEDULE

o Component-based software? Background and motivation? Re-usable components

o From building blocks to applications? PMV: a molecular visualization program? ADT: setting up and running AutoDock? PVV: interactive volume rendering? ViPEr: a visual programming environment

o Conclusion

Page 3: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Protein-Protein-LigandLigand

Complex AssembliesComplex AssembliesProtein-ProteinProtein-Protein

Molecular SurfacesMolecular SurfacesAutoDockAutoDock

SurfDockSurfDock

SymGenSymGen

MSMSMSMS

HARMONYHARMONY

SymSearchSymSearch

Page 4: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Tangible ModelsTangible Models

Page 5: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

ARToolkitARToolkit 3D tracking 3D tracking

Page 6: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Augmented realityAugmented reality

Page 7: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

VisualizationVisualization

DockingDockingMethodsMethods

FoldingFolding

ProteinProteinEngineeringEngineering

SequenceSequenceAnalysisAnalysis

ModelingModeling

MM - MDMM - MD

Ab InitioAb InitioMethodsMethods

ElectrostaticsElectrostaticsCalculationsCalculations

MolecularMolecularSurfacesSurfaces

Etc ...Etc ...

The challengeThe challenge

Page 8: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

VisualizationVisualization

DockingDockingMethodsMethods

FoldingFolding

ProteinProteinEngineeringEngineering

SequenceSequenceAnalysisAnalysis

ModelingModeling

MM - MDMM - MD

Ab InitioAb InitioMethodsMethods

ElectrostaticsElectrostaticsCalculationsCalculations

MolecularMolecularSurfacesSurfaces

Etc ...Etc ...

“Traditional” solution“Traditional” solution

N2 interfaceslow interoperability

No code Reuse

Page 9: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

High level language as a scripting environmentHigh level language as a scripting environment

MolecularSurfaces

Molecular

MolecularSurfaces

Surfaces

Molecules

Molecules

Molecules

DataBase

DataDataBaseBaseElectrostatics

Electrostatics

Electrostatics

DelaunayDelaunayDelaunay

Homology

Homology

HomologyCSGCSGCSG

3DViewer

3D3DViewerViewer

MM-MDMM-MDMM-MD

NewMethod

NewNewMethodMethod

Your

MethodYourYour

MethodMethod

Python to the rescuePython to the rescue

Interactive

Dynamic

Platformindependent

Page 10: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Writing an applicationWriting an application

o High level codingo Code re-useo modularityo ExtensibleMolecules

Molecules

Molecules3DViewer

3D3DViewer

Viewer

MolecularSurfaces

Molecular

MolecularSurfaces

Surfaces

Electrostatics

Electrostatics

Electrostatics

Page 11: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

PYTHON - FeaturesPYTHON - Features

o Interpreted, High level, Object-Orientedo Flexible and Extensibleo Introspection, self-documentingo Platform Independento Open Sourceo Rapidly gaining acceptance

Page 12: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Why Python ?Why Python ?

o Advanced data structures (> Tcl, Perl)o Object-Oriented AND scripting (> Java)o “Batteries included !”

? Powerfull data-parallel Numeric arrays (> Tcl)o Readbility and modularity (> Perl)o High-level (> C, C++, Fortan)o Platform independence (> C++, Java)o Efficient enough for many things !o Automated tools for wrapping C, C++, Fortran

Page 13: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Re-usable componentsRe-usable componentso MolKit:

? read/write/represent/manipulate moleculeso PyBabel:

? Atom hybridization, charges, hydrogen atomso DejaVu:

? General purpose 3D geometry viewero ViewerFramework:

? Visualization application templateo Mslib, PyBabel, PyMead, SFF, Isocontour, ...

(Sophie I. Coon, Michel F. Sanner and Art J. Olson, Re-usable components for structural bioinformatic, 9th Python Conference 2001)

Page 14: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

from MolKit.pdbParser import PdbParserparser = PdbParser(‘1crn.pdb’)mols = parser.parse( )

from MolKit.pdbParser import PdbParserparser = PdbParser(‘1crn.pdb’)mols = parser.parse( )

PDBMol2PQR...

Parser

MoleculeSet

PDB parser MOL2 parserMolecule

Chain

Residue

Atom

Molecule

Chain

Residue

Atom

Molecule

Residue

Atom

Molecule

Atom

MolKitMolKit MolKit

Page 15: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

ExamplesExamples>>> from MolKit import Read>>> molecules = Read(‘./1crn.pdb’) # Read returns a ProteinSet>>> mol = molecules[0]>>> 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)

MolKit

Page 16: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

PyBabelPyBabel

o From Babel v1.6 (mostly)? Atom types and bond order detection? Aromaticity detection? Adding Hydrogen atoms? Computing Gasteiger charges

PyBabel

Page 17: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

TkinterTkinterNumericNumeric

PyOpenGLPyOpenGL

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)

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)

DejaVuDejaVu DejaVu

Page 18: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

FeaturesFeatureso OpenGL Lighting and Material modelo Material editor, transparencyo Arbitrary clipping planeso Multiple light sourceso DepthCueing (fog), global anti-aliasingo glSscissors/magic lenso Object hierarchyo Instanceso Multi-level pickingo Extensible set of geometries

DejaVu

Page 19: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

DejaVu DejaVu and and MolKitMolKit

from MolKit import Readmolecules = Read(‘./1crn.pdb’)coords = molecules.chains.residues.atoms.coordsradii = mol.defaultRadii()from DejaVu import Viewervi = Viewer() # create a viewerfrom DejaVu.Spheres import Spheress=Spheres(‘sph’, centers=coords, radii=radii,quality=10)vi.AddObject(s) # display atomic spheres

from MolKit import Readmolecules = Read(‘./1crn.pdb’)coords = molecules.chains.residues.atoms.coordsradii = mol.defaultRadii()from DejaVu import Viewervi = Viewer() # create a viewerfrom DejaVu.Spheres import Spheress=Spheres(‘sph’, centers=coords, radii=radii,quality=10)vi.AddObject(s) # display atomic spheres

Page 20: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

NumericNumericPyOpenGLPyOpenGL TkinterTkinter

DejaVuDejaVu

IdleIdle

ViewerFrameworkViewerFramework

ViewerFrameworkViewerFramework ViewerFramework

Page 21: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

NumericNumeric

PyOpenGLPyOpenGL TkinterTkinter

DejaVuDejaVuIdleIdle

ViewerFrameworkViewerFramework

MslibMslib

PmvPmv

MolKitMolKit

PMVPMV: From Building Blocks to applications: From Building Blocks to applications

Page 22: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

PMV CapabilitiesPMV Capabilities

o Display/compute:? Lines, CPK, Stick and Balls, Surfaces,

Splines, Ribbons, H-bonds, bond-order,Gasteiger and Kollmann charges

o Editing:? deleting atoms, adding hydrogens

o Electrostatic potential? MEAD*, APBS*

o Molecular Dynamics:? Amber*

Page 23: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

PMVPMV: Architecture: Architecture

Numeric PyOpenGL TkinterDejaVu

ViewerFramework

IdleMolKitMslib

MsmsCommands

Page 24: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Automated docking of a flexible ligand to macromolecules using affinity grids

AutoDockAutoDock fundamentals fundamentals

Page 25: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

AutoDock ToolKit AutoDock ToolKit ((ADTADT))

o AutoTors : ligand preparation

o AutoGpf : grid definition

o AutoDpf : docking parameters definition

o AutoStart : job launching and monitoring

o AutoAnalyze : docking results analysis

AutoDockTools

Page 26: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

ADT: extending PMVADT: extending PMV

Page 27: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

ADTADT: Architecture: Architecture

Numeric PyOpenGL TkinterDejaVu

ViewerFramework

IdleMolKitMslib

MsmsCommands

AutoTors, AutoGpfAutoDpf, AutoLaunch

AutoAnalyze

Page 28: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Interactive Volume RenderingInteractive Volume Rendering

o VolumePro™ 500 Key Features? Renders a 2563 volume up to 30 frames per second? 256MB of volume memory? Real-time parameter changes? Full phong based lighting model on per sample basis? (8, 8, 8, 12) bit voxels? One oblique cut plane with thickness? Six box cropping planes

? 4k color lookup table with high precision alpha blending

? Support for anisotropic and gantry tilted volume data

Page 29: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

VolPro VolPro and and DejaVuDejaVu

o VLI? C++ library driving the VolPro card? Wrapped for Python using SWIG

o VLIGeom? Subclasses DejaVu.Geom? Ties the Geometry transformation to

the VLI Camera position? Display the result of a volume rendering

operation in the DejaVu OpenGL context

VLI

Page 30: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

VV componentVV component VV

Set of ViewerFramework commands exposing the VLI API

Page 31: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Large Large DatasetDataset: Mesh: Mesho Mesh Toolkit

? PyMesh: wrapped for Python using SWIGo Zoom command

Mesh

Page 32: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Software Volume RenderingSoftware Volume Rendering

OmniORBo UT Austin volserv.idlo OmniORB

? C++ ORB with Python mappingsUT Austin

VolRenCORBA

Page 33: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

PVVPVV: Architecture: Architecture

Numeric PyOpenGL TkinterDejaVu

ViewerFramework

IdleMolKitVLI

VolView

Page 34: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

ViPErViPEr: a visual programming: a visual programming

o Basics, Architecture, Librarieso Nodes, Execution Flowo Demos

(Michel F. Sanner, Daniel Stoffler and Arthur J. Olson, ViPEr, a VisualProgramming Environment for Python, 10th Python Conference 2002)

Page 35: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

AVS-5: AVS-5: Advanced Visualization System Inc.Advanced Visualization System Inc.

Enabling scientists (non-programmers)to build computational networksEnabling scientists (non-programmers)to build computational networks

Page 36: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

ViPErViPEr: visual programming: visual programming

Page 37: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

NetworEditor

ViPEr

Architecture OverviewArchitecture Overview

Page 38: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Standard 3D Viewer Misc.MolKitSymServerImageLibCCP4…

DejaVu

MolKitsymservPIL

ViPER Libraries Python Packages

Libraries / code reuseLibraries / code reuse

Page 39: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

Why Python worked !Why Python worked !

o Promotes better coding:? readability? high level? modular

o Software “Lego”

Page 40: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

What could be betterWhat could be better

o Handling of platform dependent andplatform independent code

o Version managmento Distribution of sets of compatible

modules

Page 41: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

ConclusionConclusion

o Software components used in:? PMV: flexible and extensible molecular

visualization environment? ADT: AutoDock front/back end? ViPEr: General Purpose Visual

Programming Environmento Python promotes modularityo Code reuse

Page 42: Biological Science Libraries - Scripps Research Institute Science Libraries - An approach to software components for structural bioinformatics Michel F. Sanner The Scripps Research

SciPy’02, © M.Sanner, TSRI

AcknowledgmentsAcknowledgments

o Molecular Graphics Lab. at TSRIo NBCR, NIH, NSFo Swiss National Science Foundationo Daniel Stoffler (SymServer, AUM)o Sophie Coon, Ruth Huey

Available at:http://www.scripps.edu/~sanner/python