2012 t 01 biogeometry

156
INTRODUCTION TO BIO-GEOMETRY Herbert Edelsbrunner Departments of Computer Science and Mathematics Duke University

Upload: mohamed-ali-sayed

Post on 02-Nov-2014

328 views

Category:

Documents


16 download

TRANSCRIPT

INTRODUCTION

TO BIO-GEOMETRY

Herbert EdelsbrunnerDepartments of Computer Science and Mathematics

Duke University

Table of Contents

PROLOGUE i

I BIO-MOLECULES 1II GEOMETRIC MODELS 17

III SURFACE MESHING 35IV CONNECTIVITY 53V SHAPE FEATURES 71

VI DENSITY MAPS 89VII MATCH AND FIT 101

VIII DEFORMATION 117IX MEASURES 125X DERIVATIVES 141

SUBJECT INDEX 147AUTHOR INDEX 149

Preface

[Mention the pioneers who early on recognized the im-portance of geometry in structural molecular biology: FredRichards, Michael Levitt, Michael Connolly]

[Mention that my book on the “Geometry and Topologyfor Mesh Generation” is complementary/a prerequisite tothis book. In particular, it covers the construction of Delau-nay triangulations in detail, and it describes the simulationof simplicity as a general idea to deal with non-generic sit-uations.]

[This book is really about alpha shapes in a broad sense.It might be useful to describe the history of that research inshort.

1981. Vancouver. Conception of idea with Kirkpatrick andSeidel.

1985-89. Graz and Urbana. SoS, Delaunay software, Al-pha Shape software with Ernst Mucke, Harald Rosen-berger, and Patrick Moran.

1990-93. Urbana and Berlin. Surface triangulations, Bettinumbers, inclusion-exclusion, CAVE with Ping Fu,Ernst Mucke, Cecil Delfinado, Nataraj Akkiraju, andJiang Qian.

1994-95. Hong Kong. Morphing, molecular skin, with PingFu, Siu-Wing Cheng, Ka-Po Lam, and Ho-Lun Cheng.

1995-98. Urbana. Flow and pockets, skin surfaces with Ho-Lun Cheng, Tamal Dey, Michael Facello, Jie Liang,Shankar Subramaniam, Claire Woodworth.

1999-2001. Duke. Skin triangulation, hierarchy, Morsecomplexes with Ho-Lun Cheng, Alper Ungor, AfraZomorodian, David Letscher, John Harer, VijayNatarajan.

2002-2003. Duke and Livermore. Docking, Reeb graphs,Jacobian manifolds with Johannes Rudolph, SergeiBespamyatnikh, Vicky Choi, John Harer, Valerio Pas-cucci, Vijay Natarajan, Ajith Mascarenhas.

2000-2005. ITR Project. Derivatives, interfaces, softwarewith Robert Bryant, Patrice Koehl, Michael Levitt, An-drew Ban, Johannes Rudolph, Lutz Kettner, RachelBrady, and Daniel Filip.

]

[This book is based on notes developed during teachingthe courses on “Sphere Geometry” in the Spring of 2000,

and on “Bio-geometric Modeling” in the Spring of 2001 andthe Fall of 2002, all at Duke University. These courses wereeither taken for credit or audited at least occasionally byLuis von Ahn, Tammy Bailey, Yih-En (Andrew) Ban, RobertBryant, Ho-Lun Cheng, Vicky Choi, Anne Collins, AbhijitGuria, Tingting Jiang, Looren Looger, Ajith Mascarenhas,Gopi Meenakshisundaram, Nabil Mustafa, Vijay Natarajan,Xiuwen Ouyang, Anindya Patthak, Ken Roberts, ApratimRoy, Scott Schmidler, Xiaobai Sun, Yusu Wang, ShuminWu, Alper Ungor, Peng Yin and Afra Zomorodian.]

Herbert EdelsbrunnerDurham, North Carolina, 2002

To do or think about (March 15, 2004).

General � Fix the software for creating the index andglossary.

� Should the Exercise sections be labeled so thepage heading is more uniform?

Chapter III � Section III.3: mention new results onscheduling.

� Exercises: add a few more questions.

Chapter V � Should Section V.2 on Topological Per-sistence be reorganized by first presenting thealgebra and second the algorithm?

� In Section V.3: replace 23- by 03-, 13- and 23-collapses.

� Add the interface software description to Sec-tion V.4.

Chapter VI � Write Section VI.3 on Constructionand Simplification.

� Write Section VI.4 on Simultaneous CriticalPoints.

� Exercises: come up with questions.

Chapter VII � In Section VII.2: find out about find-ing the best bi-chromatic matching in

���.

Chapter VIII Write the introduction to Deformation.

� Write Section VIII.1 on Molecular Dynamics.� Write Section VIII.2 on Spheres in Motion.� Write Section VIII.3 on Rigidity.� Write Section VIII.4 on Shape Space.� Exercises: come up with questions.

Chapter IX � Exercises: come up with questions.

Chapter X Write a new chapter on area and volumederivatives and related topics.

� Write a section on the Weighted Area Deriva-tive.

� Write a section on the Weighted VolumeDerivative.

� Exercises: come up with questions.

Chapter I

Bio-molecules

This chapter discusses the three main classes of organicmacromolecules involved in the hereditary and life main-tenance mechanisms of living beings: DNA, RNA, andproteins. According to the central dogma of biology, pro-teins are created in two steps from DNA, which carries thegenetic information:

Proteintranscription translation

replication

RNADNA

We talk briefly about the processes indicated by the threearrows and focuses on the structure of the players in-volved. DNA is the stuff that genetic material is made of.RNA is mostly but not entirely an intermediate productcopying portions of the DNA (transcription) and turningthis information into working proteins (translation). Pro-teins act like machines that define the cell cycle as an on-going process. Each cell is like a society whose mem-bers have specialized tasks, which they accomplish in acomplicated net of interactions. All mentioned moleculesare between large and huge. They are relatively simplelocally but exceedingly complicated in their totality. Be-cause of the complexity and the large variety, it shouldnot be surprising that there are exceptions to almost ev-erything meaningful that can be said about them. Perhapsit is more surprising that anything of broad validity can besaid at all.

We begin by describing the chemical structure of DNAand RNA in Section I.1. We then explain the translationfrom RNA to proteins in Section I.2 and talk about thestructural organization of proteins in Section I.3. Finally,we present some of the fundamental premises and resultsof molecular mechanics in Section I.4.

I.1 DNA and RNAI.2 Proteins and Amino AcidsI.3 Structural OrganizationI.4 Molecular Mechanics

Exercises

1

2 I BIO-MOLECULES

I.1 DNA and RNA

DNA (or deoxyribonucleic acid) is the material that formsthe genome, which is a complete set of the genetic mate-rial of a living organism. As discovered by Watson andCrick in 1953, DNA consists of two strands of nucleotidestwisted into the shape of a double helix, as depicted in Fig-ure I.1. We begin by looking at the small level and work

Figure I.1: A short piece of the DNA double-helix, with atomsshown as tightly packed and partially overlapping spheres.

our way up the multi-scale structure of DNA. Comparedto standard genomics texts, the treatment of DNA in thissection is coarse and lacking of many important details.

Chemical structure of DNA. DNA has three chemicalcomponents: phosphate, deoxyribose sugar, and four ni-trogenous bases, namely adenine, guanine, cytosine, andthymine. The first two bases are double-ring and the lasttwo are single-ring structures. The chemical componentsare arranged in groups called nucleotides, each composedof a phosphate group, a deoxyribose sugar, and one of thefour bases. A nucleotide is conveniently referred to bythe first letter of its base. Figure I.2 sketches the chem-ical structure of the nucleotide A and shows the chemi-cal structures of the remaining three bases. We obtain thenucleotides G, C and T by substituting the correspondingbase for adenine in Figure I.2. We use boldface edges toconnect atoms that are joined by two covalent bonds. Thecovalent bonding in the ring structures of the nitrogenousbases is more interesting. All atoms in the ring share elec-trons as a group and we draw some double bonds just to

indicate the total number of extra shared electrons. For ex-ample, the hexagonal ring of cytosine has a total of eightcovalent bonds, which we may think of as four thirds of acovalent bond between every contiguous pair.

O

O

O H

O

C

H

OH

C

H

C

O

H

2CHP

C

N

H

N

NH

O

HCC

N

C

2

NH2

N

C

NHN

C

N

O

3CH

C

C

phosphate

deoxyribose sugar

cytosine thymineguanine

C

HC

adenine

NN

CH

NC

HC

HC CO

C

HC CO

NH2

N NHC

Figure I.2: The chemical structure of the DNA nucleotide withadenine as the nitrogenous basis above, and the chemical struc-ture of the other three nitrogenous bases below.

Double helix. The two strands of DNA are held togetherby weak hydrogen bonds between complementary bases,forming the structure of a spiraling staircase. The back-bone of each strand is a repeating phosphate-deoxyribosesugar polymer. The phosphate and the sugar groups in thebackbone are connected by phosphodiester bonds. The at-tachment of these bonds to the sugar groups is illustratedin Figure I.3. The carbons of the sugar group are num-bered from ��� to ��� . One part of the phosphodiester bond isbetween the phosphate and the � � -carbon, and the other isbetween the phosphate and the � � -carbon. We think of thebackbone as oriented in the direction of the path that startsat the � � -carbon, passes through the � � -carbon, and ends atthe � � -carbon. In the double stranded DNA molecule, thetwo backbones are in opposite, or anti-parallel, orienta-tion.

The bases are attached to the 1-carbons. Interactionsbetween base pairs hold the two strands together. Adenineinteracts with thymine and guanine with cytosine. The twobases of a pair are said to be complementary. This impliesthat the sequence of bases along one strand determines the

I.1 DNA and RNA 3

3’3’

3’3’

O

OOP

O

P

O

O

P

O

O

H

N

O

OO HN

O

HN

O

N

O

O

OOP

O

2

NH

OP

2

NH

O

H

2

H

2

O

H

O

HNH

O

P

O

OO

O

O

T A

G C

O

2’

4’

O

1’

5’

H

2’

4’

5’

1’

1’

2’

4’O

5’

1’

2’

H

4’

5’

Figure I.3: Chemical structure of a very short segment of DNA.The numbers ��� to ��� order the carbon atoms of each sugar group,giving each strand an orientation. The dotted connections be-tween the nitrogenous bases indicate hydrogen bonds.

sequence of bases along the other: reverse the reading di-rection and replace each basis by its complement,

5’ ��� AATCGCGTACGCG ��� 3’

3’ � TTAGCGCATGCGC � 5’ �

Replication is based on this simple rule of complementar-ity and makes essential use of the relatively weak bondsbetween the two strands. A protein machine builds newDNA strands by separating the two old strands and com-plementing each by a new anti-parallel strand.

Chromosomes. Each cell of an organism contains acopy of the entire genome. In the case of a human cell,this amounts to about two meters of DNA partitioned intotwenty-three pairs of chromosomes per cell. The body hasabout � ��� � cells, totaling about ��� �����

�meters of DNA,

which is more than a hundred times the distance betweenthe earth and the sun. Since humans are small relative tothat distance, this implies that the DNA must be thin andefficiently packed. Indeed, each chromosome is a longthread (a double-strand) that is densely folded around pro-tein scaffolds.

How is a long thread of DNA converted into the rel-atively thick and worm-like structure visible through theelectron microscope? On the lowest level, the DNA iswrapped twice around a configuration of eight histones (a

special protein). The beads of wrapped histones assume acoiled structure (a solenoid) stabilized by another type ofhistone that runs along its central axis. It takes one morelevel of packaging to convert the solenoid into the three-dimensional structure we call a chromosome. This higherlevel uses a core scaffold made of another enzyme, topoi-somerase II. This enzyme has the ability to pass a strandof DNA through another, which is a much needed oper-ation during packing and unpacking the DNA. The bestevidence suggests that the solenoid arranges in loops em-anating from the scaffold, which itself assume the form ofa spiral.

Chemical structure of RNA. A gene is a subsequenceof the DNA capable of being transcribed to produce afunctional RNA molecule. Note that this definition de-pends on the rather complicated process of transcription,which can fail for a variety of reasons. We begin by look-ing at the chemical features of RNA. There are three maindifferences to DNA.

1. RNA is a single-stranded nucleotide chain and cantherefore assume a much greater variety of geometricshapes than DNA.

2. RNA has ribose sugar in its nucleotides, which dif-fers from deoxyribose sugar by one additional oxy-gen atom.

3. RNA nucleotides carry the bases adenine, guanine,and cytosine, but substitute uracil for thymine foundin DNA. Uracil forms hydrogen bonds with adeninejust as thymine does.

Figure I.4 illustrates the chemical difference betweenRNA and DNA by showing a ribonucleotide containinguracil.

O

O

O HH

OH

HCC

O

H

C C

OH

O2CHP

ribose sugar

phosphate

uracil

C

CO

NHHC

HCN

O

Figure I.4: Chemical structure of the RNA nucleotide with uracilas the nitrogenous basis.

4 I BIO-MOLECULES

RNA is classified into different types depending on theirfunction. The vast majority is messenger RNA (or mRNA),which acts as an intermediary structure in the synthesisof proteins. There is also functional RNA produced by asmall number of genes, which is not translated into pro-tein. Examples are transfer RNA (or tRNA), which bringsamino acids to the mRNA during the translation process,and ribosomal RNA (or rRNA), which helps coordinatingthe assembly of amino acids to proteins.

Transcription. The transcription process, which makesRNA, is similar to the replication process of DNA. Dur-ing the transcription of a gene, the two strands of DNAare separated locally, and one strand acts as a template forRNA synthesis. Free ribonucleotides align along the DNAtemplate. The process is catalyzed by another protein ma-chine, the RNA polymerase complex, which moves alongthe DNA adding ribonucleotides to the growing RNA, assketched in Figure I.5. The resulting RNA sequence is

PSP S

A

P S P S P S

PSPSPS

A

UT C

G C

G

5’

3’ 5’

3’

Figure I.5: The RNA grows in the 5’ to 3’ direction, in this caseby adding a nucleotide carrying uracil to the chain.

the same as the non-template sequence of the gene, exceptthat U replaces T. Electron microscope pictures show thatthe transcription of DNA to RNA is a highly parallel pro-cess in which a row of RNA polymerase complexes followeach other along the gene and produce RNA concurrently.Each individual transcription works in three steps.

Initiation. RNA polymerase binds to a promoter segmentof DNA located in front of the gene. It then un-winds the DNA and begins the synthesis of an RNAmolecule.

Elongation. RNA polymerase moves along the DNA,maintaining a transcription bubble to expose the tem-plate strand. It compares free ribonucleotides withthe next exposed DNA basis and adds a complemen-tary match.

Termination. Specific sequences in the DNA signal thechain termination by triggering the release of theRNA strand and the polymerase.

A gene is thus not only marked but indeed defined by thepromoter segment preceding and the terminating sequencesucceeding it.

Bibliographic notes. The idea that traits are hereditaryis old, but the detailed mechanism how it comes aboutstarted to unfold only recently. The groundwork for ourcurrent understanding was laid in the nineteenth centuryby Gregor Mendel, when he discovered the basic rules ofthe hereditary mechanism [2]. An English translation ofthis work can be found in [3]. It was long known thatDNA is critically involved in that mechanism, but it tookuntil the work of Watson and Crick in 1953 to discover thechemical structure of DNA [5, 6]. The book by Watson [4]is an enjoyable personal account of the years preceding thediscovery of that structure. Today there are many books onthe subject, and most of the material in this section is takenfrom [1, Chapters 2 and 3].

[1] A. J. F. GRIFFITH, W. M. GELBART, J. H. MILLER AND

R. C. LEWONTIN. Modern Genetic Analysis. Freeman,New York, 1999.

[2] G. MENDEL. Versuche uber Pflanzen-Hybriden. Verhand-lungen des naturforschenden Vereines, Abhandlungen,Brunn 4 (1866), 3–47.

[3] C. STERN AND E. R. SHERWOOD. The Origin of Genetics:A Mendel Source Book. Freeman, 1966.

[4] J. D. WATSON. The Double Helix. Antheneum, New York,1981.

[5] J. D. WATSON AND F. H. C. CRICK. Molecular structureof nucleic acid. A structure for deoxyribose nucleic acid.Nature 171 (1953), 737–738.

[6] J. D. WATSON AND F. H. C. CRICK. Genetic implica-tions of the structure of deoxyribonucleic acid. Nature 171(1953), 964–967.

I.2 Proteins and Amino Acids 5

I.2 Proteins and Amino Acids

Proteins are polypeptide chains obtained by translationfrom strands of messenger RNA. In this section, we sketchthe translation process and discuss the chemical structureof proteins.

Chemical structure. A protein is a linear sequence ofamino acids connected to each other by peptide bonds.Each amino acid consists of a central carbon atom, the � -carbon, linked to an amino group, a carboxyl group, onehydrogen atom, and a side-chain. Amino acids that arelinked into a polypeptide chain are referred to as residues.Different residues are distinguished by their side-chains.As shown in Figure I.6, two amino acids are linked by apeptide bond whose creation releases water. The result-ing repeating sequence of nitrogen, � -carbon and carbonatoms is the backbone of the protein.

+

HH

H

N C

H R

H

R

H

OH

H

CN

H R

C

R

N

OH

O

HH

H

N

2OH

C

OH

O O

C C

CC

O

Figure I.6: Two amino acid residues joined by a peptide bond.

The four neighbors of an � -carbon, C � , are at the vertexpositions of a tetrahedron around C � . This tetrahedron hastwo orientations, one being the mirror image of the other,as illustrated in Figure I.7. The two oriented forms arereferred to as isomers and distinguished by letters L andD. Only L-amino acids occur in nature as building blocksof proteins.

L D

Cαα

2

C

NH2COOH

R

COOH

R

NH

HH

Figure I.7: The two isomers of an amino acid.

Amino acids. Among a much larger variety of aminoacids, nature uses only twenty to build proteins. Welist their names together with their three-letter codes andsingle-letter abbreviations in Table I.1. As can be seen in

Alanine Ala A Methionine Met MCysteine Cys C Asparagine Asn NAspartate Asp D Proline Pro PGlutamate Glu E Glutamine Gln QPhenylalanine Phe F Arginine Arg RGlycine Gly G Serine Ser SHistidine His H Threonine Thr TIsoleucine Ile I Valine Val VLysine Lys K Tryptophan Trp WLeucine Leu L Tyrosine Tyr Y

Table I.1: Names, codes and abbreviations of the twenty aminoacids that occur as building blocks of natural proteins.

Figures I.8 and I.9, residues differ widely in size and struc-ture. The fifteen amino acids sketched in Figure I.8 maybe viewed as trees rooted at the � -carbon, which is partof the backbone. Most of the internal nodes are carbonatoms, with rare occurrences of oxygen, nitrogen and sul-fur atoms. As before, we mark double and partially dou-ble bonds by boldface edges. Four of the five amino acids

Glycine

Alanine

Isoleucine

AsparagineLeucine

Valine

Threonine

Aspartate Serine Cysteine

GlutamateMethionineLysineArginine Glutamine

NO

O

O O

O S

OO

S

NNN

N

O N

Figure I.8: The fifteen amino acids without cycle in their chemi-cal structure. The shaded circle is the � -carbon on the backbone.All unlabeled nodes are either carbon or hydrogen atoms.

sketched in Figure I.9 have pentagonal and hexagonal ring

6 I BIO-MOLECULES

structures. The fifth amino acid is proline, which forms acycle by having its chain connect back to the nitrogen nextto the � -carbon along the backbone. This unique featurelocally restricts the flexibility of the backbone, as will bediscussed in Section I.3.

Phenylalanine Histidine

Tryptophan

Proline

Tyrosine

N

N

N

N

O

O

Figure I.9: The five amino acids with cyclic chemical structure.

Genetic code. The translation process is more involvedthan transcription because it converts information betweentwo languages that use different alphabets. The sequenceof nucleotides is read consecutively in groups of three,called codons. Since there are four different types of nu-cleotides, we have � ����� � codons. There are only twentyresidues, which implies that the map is not injective butuses redundancy to reduce the number of outcomes. Thecomplete map is shown in Table I.2. The codon XYZ is

A G C U

A Lys Lys Arg Arg Thr Thr Ile MetAsn Asn Ser Ser Thr Thr Ile Ile

G Glu Glu Gly Gly Ala Ala Val ValAsp Asp Gly Gly Ala Ala Val Val

C Gln Gln Arg Arg Pro Pro Leu LeuHis His Arg Arg Pro Pro Leu Leu

U Trp Ser Ser Leu LeuTyr Tyr Cys Cys Ser Ser Phe Phe

Table I.2: The genetic code. The start codon is AUG and maps tomethionine. Empty entries correspond to the stop codons, whichare UAA, UAG, and UGA.

mapped to one of the residues in the row of X and the col-umn of Y. The four positions inside that slot correspond toA, G in the first row and C, U in the second row.

The translation is accomplished by transfer RNAmolecules that recognize codons through the same bindingmechanism used for replication and transcription. Someresidues correspond to more codons than others. The re-dundancy is in part due to multiple tRNA molecules car-rying the same residue and in part because there is flexi-bility in how the tRNA reads the codons. In many cases,an accurate match at the first two positions suffices and amismatch at the third position can be tolerated. This ex-plains the relative uniformity among the four residues inany one slot of Table I.2.

Since codons are triplets of nucleotides, there are ap-parently three possible reading frames, each producing anentirely different residue sequence. The correct readingframe is identified by starting the translation always at astart codon, AUG. The initiator tRNA is a specific transferRNA that recognizes this sequence and binds to methion-ine. Incidentally, it differs from the tRNA that binds to theAUG codon in the middle of the sequence, although thatone also binds to methionine.

Translation. As mentioned above, the tRNA moleculesare instrumental in translating codons into residues. EachtRNA is a short sequence of about 80 nucleotides. Com-plementary subsequences form double-helix substructuresthat further fold up to characteristic ‘clover leaf’ forma-tions, one of which is sketched in Figure I.10. A tRNA

GCUC

GCGGAU A

UCCGC

CGAG

CAG

GGUC

C A C

G U G

AUG

C U

A

C

aminoacid

G A Aanti−codon

5’

3’

Figure I.10: Transfer RNA with anti-codon at the bottom, cova-lently attached amino acid at the top, and complementary sub-strings shown.

I.2 Proteins and Amino Acids 7

molecule matches the exposed codon of the mRNA withits anti-codon and contributes its residue to the polypep-tide chain that grows at the other end. The codon and anti-codon are matched in anti-parallel orientation, as always.

The translation process is facilitated by the ribosome,which is a large complex made from more than 50 dif-ferent proteins and several RNA molecules. It consistsof a small subunit and a large subunit, which come to-gether around an mRNA strand with the help of the ini-tiator tRNA that contributes the first residue. The ribo-some scans through the strand like a tape reader. For eachcodon, it finds a tRNA with matching anti-codon and ap-pends its amino acid as a residue to the carboxyl end of thegrowing polypeptide chain. The orientation of the mRNAstrand from the 5- to the 3-end is thus preserved by theorientation of the polypeptide chain from the amino groupof the first to the carboxyl group of the last residue. Thetranslation process ends when a stop codon is read. Theprotein chain and the mRNA are released and the ribo-some dissociates into its two subunits.

Similar to transcription, the translation of an mRNAstrand into a protein happens in parallel, with several ri-bosomes working concurrently and in sequence along thestrand. In some cases, the translation even starts duringtranscription, before the mRNA strand is complete.

Bibliographic notes. Most of the twenty amino acidsthat occur in proteins have been identified in the nineteenthcentury. After the determination of the DNA structure in1953, it took only a few years for the community to agreeon the central dogma, and a few more years to decipher thegenetic code on which the dogma is based. The geomet-ric structure of the ribosome has recently been resolved byx-ray crystallography [2]. The material of this section istaken from [1, 3, 6], all three of which are comprehensivetexts in their respective fields. Considerably shorter andmore focussed descriptions of proteins and protein struc-tures can be found in [4, 5].

[1] B. ALBERTS, D. BRAY, A. JOHNSON, J. LEWIS, M.RAFF, K. ROBERTS AND P. WALTER. Essential Cell Bi-ology. An Introduction to the Molecular Biology of the Cell.Garland, New York, 1998.

[2] N. BAN, P. NIESSEN, J. HANSEN, P. B. MOORE AND T.A. STEITZ. The complete atomic structure of the large ribo-somal subunit at ��� � A resolution. Science 11 (2000), 878–879.

[3] T. E. CREIGHTON. Proteins: Structures and MolecularProperties. Second edition, Freeman, New York, 1993.

[4] N. J. DARBY AND T. E. CREIGHTON. Protein Structure.Oxford Univ. Press, England, 1993.

[5] P. C. E. MOODY AND A. J. WILKINSON. Protein Engi-neering. Oxford Univ. Press, England, 1990.

[6] L. STRYER. Biochemistry. Third edition, Freeman, NewYork, 1988.

8 I BIO-MOLECULES

I.3 Structural Organization

We cannot hope to understand proteins without a goodgrasp of their multi-level structural organization. Mostsurprisingly, same proteins fold up to same shapes, andthis is really the reason why geometry plays an importantrole in their study.

Bond rotation. Consider the three bonds from one � -carbon to the next along a protein backbone, and refer to itas a peptide unit. Figure I.6 shows its chemical and FigureI.11 its geometric structure. Because of partial double-

αC

αC

βC

αC

ψ

φ

O

CN

C

N

O

H

HH

Figure I.11: The planarity of a peptide bond is caused by itspartial double-bond character. The � and � angles measure rota-tions around the bonds preceding and succeeding every � -carbonatom.

bond character, there is no freedom to rotate around thepeptide bond, which is the link between the carbon and thenitrogen atoms. There are however two possibly planarconfigurations: the trans form, in which C � -C-N-C � isrelatively stretched (zig-zag), and the cis form, in whichit curves in one direction (zig-zig). The two forms aredistinguished by the rotation angle along the C-N bond,� , which by convention is ��� ��� for the trans and ��� forthe cis form. In contrast, the links between the � -carbonand the carbon and nitrogen atoms are single bonds withone-dimensional rotational degrees of freedom. As shownin Figure I.11, � measures the rotation around the N-C �

bond, and measures the rotation around the C � -C bond.Again by convention, � � �� ��� and � ��� ��� for the twocoplanar trans forms.

Ramachandran plot. The conformation of the back-bone is completely determined when � , � , and are spec-ified for each residue in the chain. A given residue pro-hibits some angles because of steric hindrances, which

are physically prohibited collisions between atoms. Alarger residue will generally prohibit a larger range ofangles than a smaller one. The realizable angle pairsare visualized as a subset of the square of angle pairs,�� �� ��� � ��� ������� . This so-called Ramachandran plot for

glycine is sketched in Figure I.12. The side-chain of

ψ

φ

Figure I.12: The square represents all angle pairs ��������� and theshading indicates the region of disallowed pairs for glycine.

glycine is only H, which is the reason that a relativelylarge portion of the square of angle pairs is realizable. Aninteresting residue in this respect is proline, which differsfrom all others because it binds back to the backbone, andin this way restricts the rotational degree of freedom to asmall region.

Two common motifs. A motif that is commonly ob-served in proteins is the � -helix, whose backbone formsa right-handed helix. Contiguous � -carbons are separatedby about � � ��� in the rotation direction and � � � A rise,which is measured along the axis. A rotation takes about� � � residues and produces an axial separation of about� � � A. The structure is stabilized by hydrogen bonds be-tween every CO group and the NH group four residueslater. All side-chains lie outside the helix structure. Thecharacteristic dihedral angles for a right-handed � -helixare roughly � � � ����� and � � ����� . Cartoon repre-sentations of protein structures usually draw � -helices astubes. In Figure I.13 the tubes are visible as spiral sectionsof the ribbon.

Another recurring motif are � -sheets, which are flat andmade up of several strands. A strand can be obtained bystretching the � -helix until the axial distance between twocontiguous � -carbons reaches about � � � A. The stabilizinghydrogen bonds are between neighboring strands, whichcan run in the same direction (parallel) or in opposite di-rections (anti-parallel). They combine strands to sheets.

I.3 Structural Organization 9

Figure I.13: Ribbon diagrams visualize proteins by emphasizingthe backbones as it winds its way through the structure.

Both options are illustrated in Figure I.14.

NH OC

HN

NH

CO

OC

CO CO

NH

NH

CO

CO

C

OC

α

HN

OC

HN

α

C

OC

α

CO

C

NH

HN

Cα C

αC

NH

α

α α

NH

OC

HN

C

C

Figure I.14: Two parallel � -strands to the left and two anti-parallel ones to the right. The dotted edges represent stabilizinghydrogen bonds.

Protein architecture and function. It is common todistinguish four levels of organization in the descriptionof protein architecture:

Primary structure refers to the sequence of residues alongthe oriented polypeptide chain.

Secondary structure refers to the spatial arrangement ofresidues that are near each other along the chain.

Tertiary structure refers to the spatial arrangement ofresidues that are far from each other along the chain.

Quaternary structure refers to the spatial arrangement ofsubunits of a protein.

A single protein may indeed contain more than onepolypeptide chain. Each chain forms what we call a sub-unit, and quaternary structure addresses questions abouttheir relative position and interaction. The descriptionof quaternary structure includes the rather weak van derWaals forces, which affect atoms in short distance (withinabout � � � A). Although this force is weak compared to oth-ers, its accumulated influence is significant if two subunitshave geometrically complementary shapes that permit alarge number of atom pairs within the reach of the force.This accumulated effect thus prefers interactions betweengeometrically complementary shapes. In biology, this factis expressed by saying that the van der Waals force createsspecificity in the interaction. That specificity plays a dom-inant role also in protein-protein and in protein-ligand in-teractions. A protein typically has a few regions embeddedin its surface, so-called active sites, that are specific to in-teractions with other molecules. While active sites usuallyoccupy only a small fraction of the surface, they decideprotein function. Evidence for that claim can be providedby mutating a protein and distinguishing between muta-tions that preserve and that change the active sites.

Structure determination. Even though proteins arelarge molecules that typically consist of a few thousandatoms, they are not visible under an electron microscope.How do we then know anything about the structural or-ganization of proteins? The primary source today are x-ray diffractions from protein crystals, but there are othersand most notably images generated from nuclear magneticresonance (or NMR) experiments. Both methods are com-plicated and laborious. We only scratch the surface by ex-plaining the principle steps in the reconstruction of proteinstructures from x-ray diffractions:

1. Prepare a protein crystal.

2. Expose the crystal to x-ray beams and collect thediffractions.

3. Compute the electron density and from it derive thestructure.

The x-ray experiment does not determine the elementidentities of the atoms, which have to be obtained from theknown chemical structure threaded into the density. Sincethere are probably hundreds of thousands of different pro-teins, it would be desirable to automate the process. Itseems that Step 1 is the main obstacle in reaching this goal,

10 I BIO-MOLECULES

in part because some proteins are not known to form crys-tals at all. Step 2 requires an x-ray source, a device to ro-tate the crystal by small angles ( � � � � � or less), and a detec-tion device. For each angle, we get a two-dimensional pic-ture of diffractions. The three-dimensional electron den-sity is computed from a whole array of such pictures. Atypical level surface of an electron density is shown in Fig-ure I.15. The main mathematical tool in the construction

Figure I.15: The so-called chicken wire representation of a levelsurface of a three-dimensional density.

of the electron density is the Fourier transform. A fun-damental difficulty in this step is that only the amplitudes(intensities) of the waveforms are observable, while thephase information must be obtained by different means.

Protein data banks. After completing the structuralstudy of a crystallized protein, investigators usually sendtheir results to the Protein Data Base, which is a publicrepository of protein structures described in so-called PDBfiles. At the beginning of each file we find ancillary infor-mation, including the header, the name of the protein, theauthor, the reference to the corresponding journal article,etc. There is also information about non-standard compo-nents and about secondary structure elements. The mainbody of the file lists the coordinates of the observed atoms.They are always given in an orthonormal coordinate sys-tem, in which the length unit is one angstrom. Table I.3illustrates the format by showing a small portion of a PDBfile for hemoglobin, listing the coordinates of the atomsof an arginine residue. Note that there are no hydrogenatoms, since they are too small to be resolved by an x-rayexperiment.

ATOM N ARG ����� ����� ������� � ��� � � � ���ATOM CA ARG ����������� ��� ����� ���� ��� �ATOM C ARG ����� � � � ���� � � � ���� ����ATOM O ARG ����� � ��� ���� ����� ���� � ��ATOM CB ARG ����� � � ��� ��� � ���� � � �ATOM CG ARG ����� ����� ��� ����� ���� � � �ATOM CD ARG ����� ����� ��� � ��� � ����� ��� ATOM NE ARG ��� ���� ��� � ����� ����� ��� �ATOM CZ ARG �� ������� ������� ���� �����ATOM NH1 ARG �� ����� ��� � ���� ���� �����ATOM NH2 ARG ��� � � � ���� ����� ���� � ���

Table I.3: Incomplete records of the atoms that belong to an argi-nine residue. CA is the � -carbon atom, CB the � -carbon, etc.

Bibliographic notes. The Ramachandran plot for real-izable bond rotations goes back to work by Ramachan-dran and Sasisekharan [6]. The � -helix has been sug-gested as a common motif in proteins by Pauling and col-laborators in 1951 [4], and in the same year they alsoidentified the � -sheet [3]. This was a few years beforethese motifs had been observed in x-ray experiments. Inthe late 1950s, Max Perutz reconstructed the structureof hemoglobin from x-ray diffraction data [5], and JohnKendrew did the same for myoglobin. A classic text onthe x-ray crystallography method is [2]. The material onx-ray crystallography and PDB files presented in this sec-tion is taken from [1].

[1] L. J. BANASZAK. Foundations of Structural Biology. Aca-demic Press, San Diego, California, 2000.

[2] T. BLUNDELL AND L. JOHNSON. Protein Crystallography.Academic Press, New York, 1976.

[3] L. PAULING AND R. B. COREY. Configurations of poly-peptide chains with favored orientations around singlebonds: two new pleated sheets. Proc. Natl. Acad. Sci. USA37 (1951), 729–740.

[4] L. PAULING, R. B. COREY AND H. R. BRONSON. Thestructure of proteins: two hydrogen-bonded helical configu-rations of the polypeptide chain. Proc. Natl. Acad. Sci. USA37 (1951), 205–211.

[5] M. F. PERUTZ. X-ray analysis of hemoglobin. Lex Prix No-bel, Stockholm, 1963.

[6] G. N. RAMACHANDRAN AND V. SASISEKHARAN. Stereo-chemistry of polypeptide chain configurations. J. Mol. Biol.7 (1963), 95–99.

I.4 Molecular Mechanics 11

I.4 Molecular Mechanics

After a protein has been created by translation, it foldsinto a shape, or conformation, that is determined by itssequence of residues. The folding process is a reaction toa multitude of forces that simultaneously act on every partof the protein. This section presents some of the currentknowledge and efforts to model these forces. We beginby studying atoms and discuss covalent and non-covalentforces.

Atoms. Each atom has a positively charged massivenucleus, which is surrounded by a cloud of negativelycharged electrons. The nucleus consists of protons, eachcontributing a unit positive charge, and of electronicallyneutral neutrons. The electrons are held in orbit by elec-trostatic attraction to the nucleus. Each electron has oneunit of negative charge, which exactly neutralizes the pos-itive charge of one proton. In total, we have the samenumber of protons and electrons and thus an electroni-cally neutral atom, as illustrated in Figure I.16. Different

-

+

-

- -

+

-

-

-

+

+ +++

Figure I.16: A schematic picture of a hydrogen atom to the leftand a carbon atom to the right.

elements consist of atoms with different numbers of pro-tons. The atomic number is by definition the number ofprotons, which is also the number of electrons. The num-ber of neutrons is usually about the same because too fewor too many neutrons destabilize the nucleus. The atomicweight is the ratio of its mass over the mass of a singlehydrogen atom. Because the mass of an electron is negli-gible, the atomic weight is almost exactly the number ofprotons plus the number of neutrons.

Avogadro’s number is useful in translating from theminiscule world of single atoms into a humanly more ac-cessible scale. It is the number of hydrogen atoms in onegram of hydrogen, which is roughly

�� � ��� � . The mass

of one hydrogen atom is therefore �� � � ��� � � gram which,by definition, is one dalton. One mole of an element is

the Avogadro’s number of its atoms. In other words, if themass of one atom of that element is � daltons then themass of one mole is � grams. Table I.4 lists properties ofelements that are commonly found in organic matter.

element #p #n electron shells

Hydrogen H 1 0 .Carbon C 6 6 .. ....Nitrogen N 7 7 .. .....Oxygen O 8 8 .. ......Sodium Na 11 12 .. ........ .Magnesium Mg 12 12 .. ........ ..Phosphorus P 15 16 .. ........ .....Sulfur S 16 16 .. ........ ......Chlorine Cl 17 18 .. ........ .......Potassium K 19 20 .. ........ ........ .Calcium Ca 20 20 .. ........ ........ ..

Table I.4: Some elements together with their numbers of pro-tons, neutrons and electrons distributed in the shells around thenucleus.

Covalent bonds. According to the Born model, elec-trons live in shells around the nucleus and populate in-ner shells before using outer ones. The first three shellsfrom inside out can hold up to 2, 8 and 8 electrons, as in-dicated in Table I.4. The chemical properties of an atomare defined by the tendency to either empty or completeits partially incomplete shell, if any. One way of doingthat is by sharing electrons. The shared electrons com-plete the outermost non-empty shells of both atoms in-volved. According to Table I.4, carbon, nitrogen and oxy-gen need four, three and two electrons to fill their outershells. As illustrated in Figure I.17, this can for exam-ple be done by covalently binding to the same numberof hydrogen atoms. We can now define a molecule as a

--

+

+ ++

+

Figure I.17: The geometry of covalent bonding for carbon, nitro-gen, and oxygen.

connected component of the graph whose vertices are theatoms and whose edges are the covalent bonds. When anatom covalently bonds to more than one other atom, thenthere is a preferred angle between pairs of bonds. For ex-

12 I BIO-MOLECULES

ample for carbon, this angle is what we get by connectingthe centroid of a regular tetrahedron with two of the ver-tices. Using elementary geometry we find this angle is��� �

���������� �� ����� ��� � ����� � ��� � � � � � . Two atoms canalso form a covalent double bond, which forces the nu-clei closer together and is stronger than the correspondingsingle bond. It also prevents any torsional rotation aroundthat bond, which is possible for single bonds. We needa sequence of four atoms and three covalent bonds to de-fine the torsional angle of the middle bond. It is gener-ally parametrized such that ��� ��� corresponds to the trans(zig-zag) coplanar configuration. For example for H � C-CH � , we have three bonds on each side of the middlebond. There is an energetic preference for staggering thecovalent bonds on the two sides, which corresponds to tor-sional angles of

���� , �� ��� , and � � ��� .

When two atoms that covalently bond are of differenttype then they generally attract the shared electron to dif-ferent degrees. The shared electrons will therefore have abias towards one end of the structure or another. We thenhave a polar structure in which the positive charge is con-centrated on one end and the negative charge on the other.Examples of polar covalent bonds are between hydrogenand oxygen and between hydrogen and nitrogen, as illus-trated in Figure I.17. In contrast, the bond between hy-drogen and carbon has the electrons attracted much moreequally and is relatively non-polar.

Non-covalent bonds. An atom can also donate an elec-tron to another atom and thus create a complete outershell. An example is sodium donating the only electronin its third shell to chlorine, which uses it to complete itsthird shell. As a result we get positively charged sodiumcations and negatively charged chloride anions. Both areattracted to each other by electrostatic force and form aregular grid packing, in which each sodium cation is sur-rounded by six chloride anions, and vice versa. Thesearrangements are known as table salt. A weaker inter-action, also based on electrostatic force, is generated bypolar molecules. A prime example is water, which is par-tially positively charged at the two hydrogen ends. Wa-ter molecules thus tend to aggregate in small semi-regularstructures, but this force is weak and bonds of this kindare constantly formed and broken. The polarity of wa-ter molecules is the basis for the difference between hy-drophilic molecules, that are polar and therefore attractwater, and hydrophobic molecules, that are non-polar anddo not attract water.

Another non-covalent force is responsible for the van

der Waals interaction. Experimental observations point toa potential energy function roughly as graphed in FigureI.18. The corresponding force is the negative derivative,

distance

ener

gy

Figure I.18: The van der Waals force is obtained by adding the at-tractive force (derivative of dashed curve) and the repulsive force(derivative of the dotted curve).

which is interpreted as a balance between an attractiveand a repulsive force. The attraction is due to a disper-sive force that can be explained using quantum mechanics.The repulsion also has a quantum mechanical explanationin terms of the Pauli principle, which prohibits any twoelectrons from having the same set of quantum numbers.

It is useful to keep the relative strengths of the variousforces in mind. Table I.5 gives estimates of the amount ofenergy necessary to break one mole of bonds.

bond type strength invacuum water

covalent 90.0 90.0ionic 90.0 3.0hydrogen 4.0 1.0van der Waals 0.1 0.1

Table I.5: Relative strength measured in kilo-calories per molenecessary to break the bonds. Water molecules interfere withionic and hydrogen bonds, which are therefore considerablyweaker in a solution than in a vacuum.

Force field. To get a handle on how molecules move,we define the potential energy of a system of atoms. Thegeneral assumption is that the system develops towards aminimum. To model the potential energy accurately, wewould have to work with quantum mechanics, which isbeyond the scope of this book and also beyond the capabil-ities of current computations for large organic molecules.The alternative is molecular mechanics, which uses classi-cal mechanics to model the forces that act on atoms. The

I.4 Molecular Mechanics 13

simplest such model sums five contributions to the poten-tial energy, three accounting for covalent bonds and twofor non-covalent bonds. We use a vector ��� � ���

to de-scribe the state of a system of � atoms and define the po-tential energy as a function ��� �����

��

. In its simplestform, that energy is written as� �� � �

bonds � � � � � �� �� � � �� angles � � � � � � � � ��� � � �� torsions � � � ��� ��� � � � ��� � �� atoms ����� � � � ���� � �� atoms ����� � � �!� "$# � �!�� �!�&% � � �

# � � �� � �'%�)(

This formula contains various constants that depend on thetype of atom or interaction involved. We briefly look ateach one of the five terms.

Bond length. The first sum approximates the energypenalty for differing from the reference length, �� � ,by a quadratic function. The strength

� � is relativelylarge, namely several hundred kilo-calories per mole.

Bond angle. The second sum approximates the energypenalty for differing from the reference angle,

� ��� � ,again by a quadratic function. The strength,

� � , isconsiderably less than for bond length, namely aboutone one-hundredth or even less.

Torsional rotation. The third sum approximates the en-ergy for different torsional angles around a bond. An-gles that lead to staggered arrangements of bonds atboth sides are energetically preferred. This prefer-ence is modeled by a cosine function with � � minimaand the same number of maxima.

Electrostatic interaction. The forth sum adds the electro-static potential between every pair of atoms in thesystem. The constants � � and � � are the charges,

�is

the dielectric constant of the medium, and� � � is the

distance between the two atoms.

Van der Waals interaction. The fifth sum approximatesthe van der Waals potential by the Lennard-Jones 12-6 function. The collision constant,

� �!� , marks wherethe function crosses the zero line, and �

� � � is thevalue at the unique minimum. As before,

� � � is thedistance between the two atoms.

It is clear that � as defined is only a rough approxima-tion of the real potential energy that drives the behaviorof the system. Whether or not that approximation sufficesdepends on what we use it for.

Molecular dynamics. One of the applications of forcefields is the simulation of molecular motion. Let *+� � � ��

be the trajectory of a point with mass � . Its location attime , is * �, � , its velocity is -* �, � ��.0/.21 ��, � , and its momen-tum is �3-* �, � . Recall Newton’s three laws of motion:

1. A body continues to move in a straight line at con-stant velocity unless a force acts upon it.

2. The rate of change of the momentum equals the force.

3. To every action there is an equal and opposing reac-tion.

The rate of change of the velocity is also referred to asthe acceleration, 4 �, � �65* �, � �7.98:/.01 8 �, � . Newton’s sec-ond law can now be written as �;4 ��, � � � /=<>1? , where� /@<>1? � � �

is the force acting upon * ��, � . Suppose wewrite the force as the negative gradient of a potential func-tion: � / � �BAC� / , for some �D� � � �

�. Using this

notation, Newton’s second law is expressed by the differ-ential equation �

5* �, � � �BAE� /=<>1? . A trajectory is a so-lution to this equation. In simple cases, the trajectory canbe computed analytically. For example, if the potential isstationary and equal to one over the norm, � ��* � � ���GFH*IF ,then � / � �BAC� / � �J* �GFH*KF � . In this case, the generictrajectory is an ellipse with one focus at the origin, as illus-trated in Figure I.19. Both the gravitational and the elec-trostatic potentials have this form.

Figure I.19: A generic trajectory when the magnitude of the at-traction to the origin decreases with the square distance.

The problem in molecular dynamics is significantlymore involved. We have � bodies (atoms) and the energypotential and force depend on the momentary locations of

14 I BIO-MOLECULES

all bodies. As before, we represent the collection of �atoms by a point � � �����

. The energy potential is thefunction � � � ���

��

defined earlier, and the force act-ing on � is � � � �BAC� � . Newton’s second law of motioncan now be written as

��� 5� ��BAC� � �

where the mass vector � � �����multiplies each compo-

nent of the acceleration vector with the mass of the corre-sponding atom. The classic two-body problem is the spe-cial case in which � � � and � is the sum of the twocorresponding gravitational potentials. In this case, thegeneric trajectories are again ellipses. Already for threebodies, there is no analytic solution and one has to resortto numerical methods to approximate the trajectories. Theproblem in molecular dynamics is even more difficult be-cause the potential function is considerably more compli-cated than a sum of gravitational potentials. The currentlyavailable numerical solutions are inadequate to simulatethe entire folding process even for small proteins. One ofthe difficulties in the simulation is the near cancellation oflarge forces so that relatively weak residuals gain a deci-sive influence. Even small inaccuracies in the model or thecomputation can lead to false decisions and possibly spoilthe entire remainder of the simulation.

Bibliographic notes. The first half of this section is ahighly simplified introduction of atoms and bonds. Thematerial on force fields is taken from Leach [4]. The vander Waals potential derives its name from the work of vander Waals, who quantified the deviation of rare gas fromideal gas behavior. The origin of the force is a fluctuationof electrostatic charge in atoms, and we refer to physicstexts such as [1, Chapters 19 and 20] for further details.The explanation of the dispersive contribution in terms ofquantum mechanics is due to London [5].

To determine the constants needed to parametrize themathematical formulation of a force field is far from triv-ial. The definition of the van der Waals radii used toparametrize the Lennard-Jones functions is just one ex-ample. There are various approaches to determine theseradii. Bondi [2] looks for the distances of closest ap-proach between atoms to determine van der Waals radii.Jorgensen and Tirado-Rives [3] derive parameters in an at-tempt to reproduce thermodynamic properties in computersimulations. Finally, Tsai et al. [7] analyse the most com-mon distances between atoms in small molecule crystalsin the Cambridge Structural Database. Simulating motionwith molecular dynamics is an important topic in com-

putational biology. Numerical algorithms for moleculardynamics can be found in Leach [4] and Schlick [6].

[1] N. W. ASHCROFT AND N. D. MERMIN. Solid StatePhysics. Harcourt Brace, Orlando, Florida, 1976.

[2] A. BONDI. Molecular Crystals, Liquids and Glasses. Wiley,New York, 1968.

[3] W. L. JORGENSEN AND J. TIRADO-RIVES. The OPLS po-tential functions for proteins. Energy minimization for crys-tals of cyclic peptides and crambin. J. Amer. Chem. Soc. 110(1988), 1657-1666.

[4] A. R. LEACH. Molecular Modeling. Principles and Appli-cations. Longman, Harlow, England, 1996.

[5] F. LONDON. Zur Theorie und Systematik der Moleku-larkrafte. Zeitschrift fur Physik 63 (1930), 245–279.

[6] T. SCHLICK. Molecular Modeling and Simulation.Springer-Verlag, New York, 2002.

[7] J. TSAI, R. TAYLOR, C. CHOTHIA AND M. GERSTEIN.The packing density in proteins: standard radii and volumes.J. Mol. Biol. 290 (1999), 253–266.

Exercises 15

Exercises

1. Palindromic Sequences. Call a single strand ofDNA a palindromic sequence if it the same as thethe complementary strand read backwards.

(i) Given a strand, how would you determinewhether or not it is a palindromic sequence?

(ii) Give an algorithm that finds the longest subse-quence that is palindromic.

2. Counting strings. A double-strand of DNA has nopreferred direction, but we can orient it so one direc-tion is forward and the other is backward. In eitherdirection, we read the strand in the � � to � � direction,as usual. Call two linear or cyclic pieces of double-stranded DNA the same if they can be oriented so weread the same string of nucleotides in the two forwarddirections.

(i) How many different linear pieces of double-stranded DNA of length � are there?

(ii) How many different cyclic pieces of double-stranded DNA of length � are there?

[Beware of palindromic sequences.]

3. Amino Acids. Draw the graph whose nodes are theacyclic amino acids that has an arc connecting twonodes iff one amino acid can be obtained from theother by the replacement or addition of a single atom.

(i) Is the graph connected?

(ii) Does every connected component have a paththat passes through every node exactly once?

4. Lattices. The arrangement of atoms in a folded pro-tein is often compared to that in a crystal lattices.Sketch two such lattices by drawing the atoms aspoints and connecting neighboring atoms by straightedges.

(i) The face-centered cube (or FCC) lattice con-sisting of all points with integer coordinateswhose sum is even: �* ��� ��� � ��� � such that* � � � � � ��� .

(ii) The body-centered cube (or BCC) lattice con-sisting of all points will all even or all oddinteger coordinates: ��* ��� ��� � ��� � such that* ��� ��� � ��� or * � ����� � ����� � � � ��� .

5. Structure Repositories. Descriptions of proteinstructures are publically available at the Protein Data

Base (www.rcsb.org/pdb) and the Swiss Bioin-formatics Center (expasy.hcuge.ch).

(i) Download a PDB file from either data base andextract the string of single-letter abbreviationsdescribing the amino acid sequence.

(ii) Is the relative frequency of amino acids you ob-serve related to the relative number of codonsthat encode them?

6. Ramachandran Plot. Download a PDB file and ex-tract the sequence of � and angles along the back-bone. Draw the result in form of a Ramachandranplot.

7. Regular Tetrahedron. A regular tetrahedron hasfour equilateral triangles as faces, which meet alongsix equally long edges.

(i) Determine the dihedral angle formed by twofaces meeting along a common edge.

(ii) Determine the solid angle formed by three facesmeeting at a common vertex.

[By convention, the full dihedral angle is � , whichis the length of the unit circle, and the full solid angleis �� , which is the area of the unit sphere.]

8. Elliptic Trajectory. Let the energy potential � �� �

��

be defined by � ��* � � FH*IF . The force itexerts on a point * � � �

is � / � �BAC� / � �J* �GFH*KF .Prove that the generic trajectory in this force field isan ellipse centered at the origin.

16 I BIO-MOLECULES

Chapter II

Geometric Models

A surprising finding in the research on proteins is theimportance of geometric shape in their functioning. Byand large, the shape seems to determine how proteins in-teract with each other and with other molecules. This find-ing is usually expressed as a causal chain of responsibili-ties:

SEQUENCE���

SHAPE���

FUNCTION �

A protein is a peptide chain of amino acids that folds upand forms a shape. In a natural environment, like proteinsfold up to same shapes, but this might be a result of evolu-tionary selection. The details of that shape in terms of itscavities, protrusions, dynamics, and energetics determinehow it interacts with other molecules.

At the current stage of our biological knowledge, thereis an overwhelming accumulation of sequence informa-tion, which is due, in part, to the near completion of sev-eral large-scale genome projects. Although the numberof proteins for which the three-dimensional structure hasbeen resolved and is stored in the Protein Data Base is inthe thousands, this is only a small fraction of the wealth ofavailable sequence information. The goal of studying thegeometry of proteins is therefore two-fold: the develop-ment of new computational tools to help determine or re-fine structure information and understanding the relation-ship between shape and function.

In this chapter, we introduce some of the basic geomet-ric models useful in representing molecular shape. Wehave seen the bio-chemist’s view in Chapter I, who aimsat pruning the immense variety by limiting attention tophysically or chemically likely configurations. The restof this books takes a complementary view by concentrat-ing on mathematical models and computational data struc-tures that arise in the study of proteins. In Section II.1, weintroduce space-filling diagrams as the primary geometricmodel of molecules. In Section II.2, we use Voronoi dia-grams to decompose space-filling diagrams, and in doing

so, we develop a language suitable for studying details ofour models. In Section II.3, we introduce alpha shapes,which are dual to space-filling diagrams and are our pre-ferred computational representation. Finally in SectionII.4, we talk about the Alpha Shape software and discusshow it can be used.

II.1 Space-filling DiagramsII.2 Power DiagramsII.3 Alpha ShapesII.4 Alpha Shape Software

Exercises

17

18 II GEOMETRIC MODELS

II.1 Space-filling Diagrams

A space-filling diagram associates a molecule with a por-tion of the three-dimensional space it occupies. The tacitassumption in constructing such a diagram is that the loca-tions of the atoms in three-dimensional space are known.An atom is represented by a ball (a solid sphere) and amolecule is the union of balls of its atoms. We study suchunions first in the plane and then in space.

Union of disks. Let � be a finite set of disks in the Eu-clidean plane, which we denote as

� � . We specify eachdisk � � � � � � � � � � by its center � � � � � and its radius� � � �

. An example is shown in Figure II.1. The union

Figure II.1: Union of disks in the plane. Four of the eight diskscontribute two arcs each to the boundary.

of the disks, ��� , has a boundary that consists of circulararcs meeting at common vertices. It is also possible thatan arc is an entire circle, which has no endpoints. A singledisk � � can contribute any non-negative number of arcs.The total number of arcs is however rather limited. If thereare � disks whose union is a simply connected region, asin Figure II.1, then the number of arcs cannot exceed � � .Even if we allow more general configurations, we cannotget more than

� � arcs. Hints towards proving the �@� up-per bound can be found among the exercises at the endof this chapter. The

� � upper bound is a consequence ofthe relationship between arcs in the boundary of the unionand angles in the Delaunay triangulation, which will beexplained in Section II.2.

Rolling circle. We can make the boundary of the diskunion smoother by substituting blending curves for thevertices where the circular arcs meet. To this end weroll a circle of radius

�on the outside about the bound-

ary. At any moment during the motion, the circle touchesthe boundary but never intersects the interior. The cen-

ter of the circle thus traces out a curve at distance�

awayfrom the boundary. This curve is the boundary of �����obtained by growing every disk � � ��� to radius

� � � �.

The construction is illustrated in Figure II.2. The front of

Figure II.2: On the outside, the boundary of the union of uni-formly grown disks, and on the inside the rounded boundary ofthe original union.

the rolling circle describes the rounded boundary, whichconsists of convex and reflex circular arcs. More formally,this new curve is the boundary of the portion of � ��� thatis not covered by any placement of the open disk boundedby the rolling circle. We can imagine creating that portionwith a milling machine whose material removing stylushas the shape of the rolling circle.

We note that the rounded boundary of � � is by andlarge tangent continuous but can have cusps at placeswhere the rolling circle cannot quite squeeze through twodisks. There are no cusps in Figure II.2, but there would beif the two disks to the lower left were just a little smaller.In cases where tangent continuity is important, we mayturn the cusps into crossings by adding arcs connectingthe cusps. We thus obtain a tangent continuous immersionof a curve in

� � .

Union of balls. Let now � be a finite set of balls (solidspheres) in three-dimensional Euclidean space, which wedenote as

� �. Similar to the two-dimensional case, we

specify each ball � � � � � � � � � � by its center � � � � �and

its radius� � � �

. Figure II.3 shows the union of balls thatrepresent gramicidin, which is a small protein of barelymore than 300 atoms. To understand the structure of theboundary of the union, ��� , we study the portion con-tributed by a single sphere. The sphere bounding � � in-tersects the other balls in a finite collection of caps. Theinterior of each cap lies in the interior of the union, andthe portion of the sphere not covered by any cap is the

II.1 Space-filling Diagrams 19

Figure II.3: A union of balls representation of the gramicidinprotein.

contribution of the sphere to the boundary of the union.The caps form the same structure as the disks discussedearlier, only that they live on a (two-dimensional) sphereinstead of

� � . The structural description of a finite unionof balls is thus recursive in the dimension. The same typeof symmetry can also be observed in dimensions beyondthree.

The number of arcs and vertices in the boundary of aunion of � balls in

���can be quite a bit higher than the

same numbers for a union of � disks in� � . To count the

faces, arcs and vertices, we first note that a single sphereintersects the other balls in fewer than � caps. By analogyto disks in the plane, the number of arcs in the bound-ary of the union of caps is less than

� � . Since each archas at most two endpoints (if it is a full circle then it hasno endpoints) and each endpoint belongs to two arcs, wealso have no more than

� � vertices. To count the facescontributed by our sphere, we recall that these are theconnected components of the complement of the union ofcaps. We will see that these components are related to thetriangles of the Delaunay triangulation, which implies thatthere are fewer than � � faces on this one sphere. To getbounds on the total number of faces, arcs and vertices, wemultiply by � and note that each arc belongs to at leasttwo and each vertex belongs to at least three spheres. Weconclude that there are fewer than � � � faces, fewer than�@� � arcs, and fewer than � � � vertices. It can be shownthat for each value of � , there are configurations of � ballswith at least some constant times � � faces, edges and ver-tices. This shows that the upper bounds are asymptoti-

cally tight. However, the numbers for well packed sets ofspheres, which are common for proteins, are much smallerand typically only a constant times � .

Rolling sphere. We can again get a smoother bound-ary by rolling a sphere of radius

�about � � . The cen-

ter of that sphere moves along the boundary of the unionof grown balls, � ��� , and its front sweeps out blend-ing surfaces that cover cusps and crevices of the origi-nal boundary. Figure II.4 shows such a rounded surfacerepresentation of gramicidin. Relative to that surface, thespheres in Figure II.3 have radii

� � � �. There are convex

sphere patches that correspond to faces of ��� � , reflextorus patches that correspond to arcs of � � � , and reflexsphere patches that correspond to vertices of ��� � . Theunion of convex patches is sometimes referred to as thecontact surface because that is where the rolling spheretouches � � . Similarly, the union of reflex patches (toriand spheres) is referred to as the re-entrant surface. Whenwe look carefully, can can detect a self-intersection of thesurface in Figure II.4. There is a hole whose rounded sur-face penetrates through the outer surface roughly in themiddle of the picture. This happens because the tunnelconnecting the hole to the outside is slightly too narrowfor the rolling sphere to squeeze through.

Figure II.4: A molecular surface representation of the gramicidinprotein.

In the application of space-filling diagrams to biology,the radii of the balls � � are usually the van der Waals radiiof the atoms, and the boundary of � � is referred to asthe van der Waals surface. The radius

�is chosen so that

the rolling sphere approximates a water molecule, and theboundary of � ��� is referred to as the solvent accessible

20 II GEOMETRIC MODELS

surface. The rounded surface is usually referred to as themolecular surface.

Uniform growth. The boundary of ��� and of ��� � donot necessarily have the same combinatorial structure. Wecan understand structural changes by observing how theyare introduced while we continuously grow the balls. Eachface of the boundary sweeps out a (three-dimensional) cellin� �

, each arc sweeps out a (two-dimensional) membraneseparating two cells, and each vertex sweeps out a curvededge in the common boundary of generically three mem-branes and three cells.

We describe the same complex as a Voronoi diagram ofthe set of points � � with weights

� � . Define the weighteddistance of a point *�� � �

from � � equal to the Euclideandistance minus the weight:

� � ��* � � FH* � � � F � � � . Thecell of � � is the set of points at least as close to � � as to anyother weighted point,� � � � * � � ��� � � �* ��� � � �* � ����� �Figure II.5 illustrates the definition in two dimensions.Consider the case of two weighted points, � � and � � , and

Figure II.5: Two-dimensional Voronoi diagram generated by uni-formly growing the disks.

let� �!� be the set of points with

� � �* ��� � � ��* � . If oneball is contained in the interior of the other then its cellis empty. Otherwise, we have two non-empty cells sep-arated by a two-dimensional membrane. The points * ofthis membrane satisfyF�* � � � F � F�* � � � F � � � � � � �which is the equation of one sheet of a two-sheeted hy-perboloid. Observe that for every point � � � � � , the linesegment connecting � and � � lies entirely in

� � � . In ge-ometry, this property is expressed by saying that

� � � is

star-shaped and that � � lies in its kernel. Since� � is the

common intersection of the� � � ,

� � �� ���� � � � � , this im-plies that

� � is also star-shaped and that � � lies also in itskernel. It follows in particular that

� � is a connected cell.Since the membranes bounding the

� � � are all sheets oftwo-sheeted hyperboloids, the boundary of

� � consists ofpatches of such hyperboloids. All these patches are visiblein their entirety if viewed from � � .

We get the boundary of � � by drawing the spherebounding each ball � � only inside its own Voronoi cell,which is

� � . By construction, the arcs of the patches meetup in pairs along the membranes and in triplets along thecurved edges of the Voronoi diagram. The same is true for� � � and every

�. We can now see how structural differ-

ences between ��� and ��� � arise: when we grow theballs, the boundary of the union sweeps out the Voronoidiagram, and we get a structural re-arrangement wheneverwe sweep over a vertex of the Voronoi diagram.

Bibliographic notes. Space-filling diagrams have a longtradition in biochemistry and are similar to the CPK me-chanical models named after Corey, Pauling and Koltun[5, chapter 1]. The variations of these models discussedin this section have been introduced by Lee and Richards[6, 7]. The molecular surface is sometimes referred to asthe Connolly surface, named after Michael Connolly whowrote early software constructing this surface [3]. The sol-vent accessible surface in Figure II.3 and the molecularsurface in Figure II.4 are computed using the software de-scribed in [1].

Increasing all radii of a set of circles or spheres contin-uously and at the same rate is referred to as the Johnson-Mehl model of growth [4]. It leads to the Voronoi diagramof this section, which is sometimes referred to as the addi-tively weighted Voronoi diagram. We refer to Aurenham-mer [2] for a survey of Voronoi diagrams, their algorithmsand applications. An algorithm that computes cells of theadditively weighted Voronoi diagram in

� �has been de-

veloped and implemented by Will [8].

[1] N. AKKIRAJU, H. EDELSBRUNNER, P. FU AND J. QIAN.Viewing geometric protein structures from inside a CAVE.IEEE Comput. Graphics Appl. 16 (1996), 58–61.

[2] F. AURENHAMMER. Voronoi diagrams — a study of a fun-damental geometric data structure. ACM Comput. Surveys23 (1991), 345–405.

[3] M. L. CONNOLLY. Analytic molecular surface calculation.J. Appl. Crystallogr. 6 (1983), 548–558.

II.1 Space-filling Diagrams 21

[4] W. A. JOHNSON AND R. F. MEHL. Reaction kinetics inprocesses of nucleation and growth. Trans. Am. Inst. MiningMetall. AIMME 135 (1939), 416–458.

[5] A. R. LEACH. Molecular Modeling. Principles and Appli-cations. Longman, Harlow, England, 1996.

[6] B. LEE AND F. M. RICHARDS. The interpretation of pro-tein structures: estimation of static accessibility. J. Mol.Biol. 55 (1971), 379–400.

[7] F. M. RICHARDS. Areas, volumes, packing and proteinstructures. Ann. Rev. Biophys. Bioeng. 6 (1977), 151–176.

[8] H.-M. WILL. Computation of Additively Weighted VoronoiCells for Applications in Molecular Biology. Diss. ETH13188, ETH Zurich, Switzerland, 1999.

22 II GEOMETRIC MODELS

II.2 Power Diagrams

If we grow the square radii of a finite collection of spheresor balls, we get a decomposition of space into convexpolyhedra. This decomposition is known as the power di-agram and has a variety of applications in molecular mod-eling.

Growing square radii. As in Section II.1, we let � bea finite set of balls � � � � � � � � � � . The square of the radius,� �� , is sometimes referred to as the weight of the point � � .We grow each ball to radius � � �� � , at time , � �

. Theset of balls at time , is denoted as � 1 . The Taylor seriesexpansion of the radius as a function of time is� � �� � , � � � � ,

�� � � , �

� � �� � � � �

The first order approximation of the growth is one half theinverse of the radius. Hence, larger balls grow slower thansmaller ones. Of course, smaller balls never really catchup except in the limit:

� ���1���� � �� � ,� �� � , � � �

We are interested in the surface swept out by the intersec-tion of the spheres bounding � � and � � and claim it is aplane. The points * that belong to both spheres at time ,satisfy F�* � � � F � � � � �� � , � � FH*� � � F � � � � �� � , � � � .Varying , has the same effect as dropping the requirementthat the two expressions vanish. Instead we just requirethat they both be equal, so we get

�� FH* � � � F � � � � �� � , � � FH* � � � F � � � � �� � , �� *� � � �:* � � �� � � �� � * � � � �:*� � �� � � ���

� * ��� � � � � � F � � F � � F � � F � � � �� � � �� �

We see the circle at which the two spheres intersect sweepsout a plane. If follows that the membranes swept out bythe arcs of � � 1 are pieces of planes.

Power distance. We can describe the decomposition ofspace implied by the square radius growth model as aVoronoi diagram for yet another weighted distance func-tion. The appropriate function in this case is the powerdistance of a point * from a ball � � defined as the squaredistance from the center minus the weight, � ��* � �

FH* � � � F � � � �� . We have

� ��* �� � ��� ���� �

� �� if * lies

� � insideon boundary of

outside

� �� � � �

If * lies outside � � , the power distance of * is the squarelength of a tangent line segment from * to the boundingsphere. Using the same algebraic manipulations as above,we can show that the set of points with equal power dis-tance from two balls form a plane. The two planes areindeed the same. As indicated in Figure II.6, this planemay separate the two bounding spheres, intersect both, orlie on the same side of both. Think of the three configura-

Figure II.6: The line of equal power distance separates if thetwo circles are disjoint and not nested, it passes through theirintersection if that is non-empty, and it passes outside if the twocircles are nested.

tions as snap-shots in an animation in which the center ofthe small circle moves towards the center of the large cir-cle. At first, the line moves in the same direction but thencomes to a halt and reverses its direction moving awayfrom the center of the large circle.

Power diagram. The power or (weighted) Voronoi cellof a ball � � under the power distance is the set of points atleast as close to � � as to any other ball,� � � � * � � � � � ��* � � � ��* � ��� �� �If we denote by

� � � the set of points * whose power dis-tance from � � is at most as large as the power distance from� � then

� � � ���� � � �!� . In words,� � is the intersection of

a finite number of half-spaces and thus a convex polyhe-dron. This polyhedron may be bounded or unbounded,and it is even possible that it is empty. The power or(weighted) Voronoi diagram of � is the collection of cells� � together with the polygons, edges, and vertices sharedby the cells. Every polygon is shared by two cells, and inthe generic case every edge is shared by exactly three andevery vertex is shared by exactly four cells. Figure II.7 il-lustrates the definitions in two dimensions by showing theVoronoi diagram of the same eight disks used in earlierfigures.

II.2 Power Diagrams 23

Figure II.7: Power or weighted Voronoi diagram of eight disksin the plane.

Delaunay triangulation. The (weighted) Delaunay tri-angulation of � is dual to the (weighted) Voronoi dia-gram. It is obtained by connecting � � and � � by an edgeif the cells

� � and� � share a common polygon. Similarly,

� � , � � and � � are connected by a triangle if� � , � � and

� �share a common edge, and � � , � � , � � and ��� are connectedby a tetrahedron if

� � , � � ,� � and

�� share a common ver-

tex. Assuming the balls in � are in general position, thisexhausts all possible types of overlap among the Voronoicells. Since complexes of tetrahedra are difficult to draw,we illustrate the definitions by showing a two-dimensionalDelaunay triangulation in Figure II.8. If the balls are notin general position, we can perturb them ever so slightlyto move them into general position.

Figure II.8: Delaunay triangulation drawn over the dual Voronoidiagram of eight disks in the plane. The Delaunay triangles aretransparent so they do not obstruct the structure of the Voronoidiagram underneath.

Observe that we reverse dimensions when we go fromthe Voronoi diagram to the Delaunay triangulation: cellsbecome vertices, polygons become edges, edges become

triangles, and vertices become tetrahedra. Similarly, wereverse the inclusion direction. For example, a Voronoipolygon belongs to a Voronoi cell iff the correspondingDelaunay edge contains the corresponding Delaunay ver-tex.

Number of simplices. We refer to an element of a De-launay triangulation as a simplex, which can be a vertex,an edge, a triangle or a tetrahedron. We can count the sim-plices using the Euler relation, which says that the alter-nating sum of simplices is always equal to 1. Writing

�,� , � and

�for the numbers of vertices, edges, triangles

and tetrahedra, we have�� � � � �

� � � �

Before counting the simplices in three dimensions, let uswarm up to the challenge by counting the simplices of atwo-dimensional Delaunay triangulation. The Euler rela-tion here is

���� � � � � . Observe that every triangle

has three edges and every edge belongs to at most two tri-angles, hence � � �

�@� . Combining this inequality withthe Euler relation implies � � � � and � � �

�. The

number of vertices is at most the number of disks, hence� � � , � � �@� and � � �@� .

In three dimensions, we note that each tetrahedron hasfour triangles and each triangle belongs to at most twotetrahedra, hence � � �

�@� . Combining this with the Eu-ler relation implies � � � �

� � �=� and� � �

� � � . Thenumber of vertices is at most the number of balls,

� � � ,and the number of edges is at most the number of pairs ofvertices, � ��� �

�� � �� � � � � � � . Hence� � ���� � � � � ���� � � � �

� � � � � � �There are Delaunay triangulations that have almost thismany simplices, but they require a placement of the ballsthat would be rather unlike the configurations we observefor proteins. Typically, each atom is surrounded by itsneighbors in the Delaunay triangulation. The neighborsare near the central atom and are therefore packed in asmall amount of space, implying there can only be a smallconstant number of them. It follows that the number ofedges in the Delaunay triangulation is at most some con-stant times � , and as a consequence, also the number oftriangles and tetrahedra are at most some constant times� .

24 II GEOMETRIC MODELS

Orthospheres. Suppose for a moment that the balls � �all have zero radius. Then each Voronoi vertex is equallyfar from four points � � and coincides with the center of thecircumsphere of these points. We will use the concept oforthogonality to generalize this property to the case wherethe � � have not necessarily zero and not necessarily equalradii. Two spheres or balls � � � � � � � � � � and � � � � � � � � � �are orthogonal ifF � � � � � F � � � �� � � �� �The name is justified because the two tangent planes de-fined at any point common to the bounding spheres of � �and � � form a right angle between them.

Let now * be a vertex of the Voronoi diagram of � .Assuming the generic case, * has equal power distancefrom four balls, � � , � � , � � and � � , and larger power distancefrom all others. Let � � �* � � � be the sphere with center* and weight

� � � � �* � � � ��* � � � �* � � � ��* � .Algebraically, there is no difficulty at all if

� � is negativeand

�is therefore imaginary. That sphere is orthogonal to

� � , � � , � � and � � , and we refer to it as the orthosphere ofthe four balls. If the four balls had zero radius, � would betheir circumsphere. Note that � is further than orthogonalfrom all other balls, that is, F�*� � � F � � � � � � �� for all�

���� � ����� �: . This property can be used to characterizeDelaunay tetrahedra for a generic set of balls. Specifically,a tetrahedron connecting points � � , � � , � � and ��� belongsto the Delaunay triangulation of � iff the orthosphere of� � , � � , � � and � � is further than orthogonal from all otherballs in � .

Acyclicity. Given a fixed viewpoint, we can order twotetrahedra if one lies in front of the other one, as seen fromthe viewpoint. We call this the visibility ordering with re-spect to the given viewpoint. It turns out that this relationcan in general have cycles but is acyclic for Delaunay tri-angulations. We need some notation. Let ��� � �

be theviewpoint and write ���� if there is a half-line that em-anates from � and passes through the interior of the De-launay tetrahedron � before it passes through the interiorthe Delaunay tetrahedron . We use orthospheres to provethat the relation � is acyclic.

ACYCLICITY LEMMA. The visibility ordering of the De-launay tetrahedra with respect to any fixed viewpointis acyclic.

PROOF. Let �� be a half-line that emanates from � andpasses through the interiors of � and . We may assume

that �� does not intersect any edge of the Delaunay triangu-lation. The half-line passes through a sequence of Delau-nay tetrahedra, � � ��� � � � � � ��� � , and we have � � � � and � � � for some � � . Any two consecutive tetrahedra� � ��� ��� � share a triangle. It follows that the orthospheres� � of � � and � ��� � of � ��� � are orthogonal to the three ballswhose centers span that triangle. The plane of points withequal power distance from � � and � ��� � thus contains theshared triangle. The viewpoint � is on � � ’s side of thatplane, which implies that the power distance of � from � �is less than that from � ��� � . By transitivity, the power dis-tance of � from the orthosphere of � � is less than its powerdistance from the orthosphere of � � , whenever � � , andthe same is true for � and . In other words, the powerdistance increases along chains of the relation �� . Sincereal numbers are totally ordered, we conclude that � isacyclic.

Bibliographic notes. Power diagrams of discrete sets ofweighted points have been studied by Carl Friedrich Gaussmore than 150 years ago in the context of quadratic forms[6]. In reference to subsequent work by Dirichlet [3] andVoronoi [8], these diagram are often referred to a Dirichlettessellations or Voronoi diagrams. The dual triangulationshave been introduced considerably later by Boris Delau-nay (also Delone) [2]. It is common to reserve the nameDelaunay triangulation for unweighted points and to referto the duals of power diagrams as regular triangulations [1]or coherent triangulations [7]. We prefer to be economi-cal with terms and refer to them as (weighted) Delaunaytriangulations. Algorithms for constructing weighted De-launay triangulations in

� � and� �

are discussed in [4,Chapters I and V]. That reference also explains how tocomputationally cope with ambiguities in the constructioncaused by non-generic input sets. Upper bounds on thenumber of Delaunay simplices for “well-spaced” points in� �

can be found in [5].

[1] L. J. BILLERA AND B. STURMFELS. Fiber polytopes. Ann.Math. 135 (1992), 527–549.

[2] B. DELAUNAY. Sur la sphere vide. Izv. Akad. Nauk SSSR,Otdelenie Matematicheskii i Estestvennyka Nauk 7 (1934),793–800.

[3] P. G. L. DIRICHLET. Uber die Reduktion der positivenquadratischen Formen mit drei unbestimmten ganzen Zahl-en. J. Reine Angew. Math. 40 (1850), 209–227.

[4] H. EDELSBRUNNER Geometry and Topology for MeshGeneration. Cambridge Univ. Press, England, 2001.

II.2 Power Diagrams 25

[5] J. ERICKSON. Dense point sets have sparse Delaunay tri-angulations. In “Proc. 13th Ann. ACM-SIAM Sympos. Dis-crete Alg., 2002”, 125–134.

[6] C. F. GAUSS. Recursion der Untersuchungen uber dieEigenschaften der positiven ternaren quadratischen Formenvon Ludwig August Seeber. J. Reine Angew. Math. 20(1840), 312–320.

[7] I. M. GELFAND, M. M. KAPRANOV AND A. V. ZELE-VINSKY. Discriminants, Resultants and MultidimensionalDeterminants. Birkhauser, Boston, 1994.

[8] G. VORONOI. Nouvelles applications des parametres con-tinus a la theorie des formes quadratiques. J. Reine Angew.Math. 133 (1907), 97–178, and 134 (1908), 198–287.

26 II GEOMETRIC MODELS

II.3 Alpha Shapes

Recall that the Delaunay triangulation is the dual of theVoronoi diagram. In this section, we generalize this con-struction and consider the dual of the Voronoi diagram re-stricted to within the union of the defining balls.

Dual complex. Observe that the Voronoi cells decom-pose the union of balls in � into convex cells � � ������ � � � � � � � � . Let � be a subset of the index set.The dual complex records the non-empty common inter-sections among these cells,

� � � ��� ���� � � � ���� ��where � � is the convex hull of the centers of the balls withindex in � . Equivalently, � � � � iff the common inter-section of Voronoi cells has a non-empty intersection withthe union of balls: � � � �� � � � ����

. Note that thisis just a more formal way of explaining the duality trans-formation we used in the last section to construct the De-launay triangulation from the Voronoi diagram. The un-derlying space is the set of points contained in simplicesof�

. In this context, we refer to it as the dual shape of� . Figure II.9 illustrates the definition for the set of disksused in many of the previous figures.

Figure II.9: The dual complex is drawn on top of the Voronoidecomposition of the union of disks. The nine edges correspondto the pairwise intersections and the two triangles to the triple-wise intersections of the clipped Voronoi cells.

In the special case, in which the balls have non-emptypairwise but no non-empty triple-wise intersections,

�looks like the ball-and-stick diagram common in chem-istry and biology. There, each stick represents a covalentbond, while here, it represents the geometric overlap be-tween two balls.

Independence. Recall that a simplex belongs to the dualcomplex iff the corresponding clipped balls (the � � � � � )have a non-empty common intersection. This conditionhas an interesting consequence on how the � � themselvesmay intersect. In a nut-shell, there can be at most fourballs (one more than the dimension of the space), andthey can form only one combinatorially distinct intersec-tion pattern. We first discuss this pattern for general setsthat are not necessarily balls. Call of a collection � of setsindependent if for every subcollection ����� there is apoint inside every set in � and outside every set not in � :

� � ��� �� ��� � �� ��

A collection of size � � � has � � � � subcollections. For thiscollection to be independent, there must be � � � � pointswhose patterns of inclusion in the � � � sets are pairwisedifferent. We use the pigeonhole principle to show thatthe maximum number of independent disks in the plane isthree. Let

� � � � � � be the maximum number of regionswe can get by drawing � � � circles in the plane. We have� � � � � � and

� � � � � � � � � � � � � � because the � � � � � -stcircle intersects the other � circles in at most two pointseach. These points cut the � � � � � -st circle into at most � �arcs, and each arc cuts at most one region into two. Thenumber of regions is therefore

� � � � � � �� � �

� � � � � � � � �

#� � �� % �

Hence,� � � � � � � � � � , which implies that at most three

disks can be independent. For each � � � � ��� � � � thereis a (combinatorially) unique independent configurationshown in Figure II.10. The same argument also works

Figure II.10: The independent configurations of one, two, andthree disks in the plane.

in three dimensions, where it can be used to show thatthe maximum number of independent balls is four. Again,there is only one possible intersection pattern for four in-dependent balls.

II.3 Alpha Shapes 27

Independent simplices. Recall that each simplex in theDelaunay triangulation is spanned by the centers of a smallcollection of balls, four for a tetrahedron, three for a trian-gle, and so on. In discussions of combinatorial properties,we sometimes forget the difference and think of the sim-plex as this collection of balls. In this spirit, we call thesimplex independent if the collection of balls is indepen-dent. We will prove shortly that all simplices in the dualcomplex are independent. This is a fairly strong statementsince it limits the balls to a single intersection pattern. Thefollowing lemma is the key to proving that all simplices inthe dual complex are independent. The lemma holds inany dimension, and can be proved by induction over thedimension. To avoid the complications of a discussion forgeneral dimensions, we assume the lemma for disks (orrather for caps on a sphere) and prove it for balls in

� �.

INDEPENDENCE LEMMA. A collection � of four balls in� �

is independent iff the (unique) vertex � of thecorresponding Voronoi diagram is contained in theunion: � � � � .

PROOF. Assume first that ������� , for example �

�� � �� . There sphere � bounding � intersects the other ballsin three caps. The circles bounding these caps lie in thethree planes bounding the Voronoi cell of � , and because� lies outside � , the three caps are not independent. Aparticular such configuration is illustrated in Figure II.11.So there exists a subset � � � �

� �� not represented by

u

Figure II.11: The planes bounding the Voronoi cell intersect thesphere in three circles. The three planes meet at � , and because� lies outside the sphere, the three caps are not independent.

any point on the sphere, that is, � � � � � . It can stillbe that there is a point outside � contained in

� , but then� � � ��� . In other words, � is not independent.

To prove the reverse, we assume that � is not indepen-dent. Then � intersects the other three balls in three non-

independent caps. But this implies that the Voronoi vertexlies outside the sphere: �

�� � .As mentioned above, the Independence Lemma also

holds for three disks in the plane. Given three balls, we getthree disks of maximum size by intersecting them with theplane that passes through the centers. This plane intersectsthe Voronoi diagram of the balls in the Voronoi diagram ofthe disks. But this implies that three balls are independentiff the (unique) line in the corresponding Voronoi diagramhas a non-empty intersection with the union of the threeballs. Similarly, two balls are independent iff the (unique)plane in the corresponding Voronoi diagram has a non-empty intersection with their union. But this is exactly thecriterion for a simplex to belong to the dual complex. Itfollows that each simplex in

�is independent, as claimed.

Filtration. We return to the idea of growing the ballscontinuously and watch how the union changes. We lettime go from ��� to

� � and grow the weight of each ball� � to

� �� � , at time , . Each � � has zero weight at time , ��

� �� and negative weight and therefore imaginary radiusbefore that time. By construction, the Voronoi cells of theballs are unchanged at all times. It follows that the dualcomplexes that arise throughout time are subcomplexes ofone and the same Delaunay triangulation. Furthermore,since the portions of the Voronoi cells covered by the ballscan only grow, the dual complexes can also only get largerin time.

Instead of time, we use the square root, �� � , , as the

index for time varying sets. The main reason for this con-vention is that for

� � � � , the radius of the ball � � at time ,is � . We need some notation. Let � � be the collection ofballs and

�� the dual complex of � � at time , � �

. Werefer to

�� as the � -complex and to its underlying space

as the � -shape of � . For small enough (large enough neg-ative) time, all radii are imaginary, � � �

� �, and the

dual complex is empty. For large enough time, � � � cov-ers all Voronoi vertices, and the dual complex is equal tothe Delaunay triangulation. We thus have a sequence ofcomplexes that begins with the empty complex and endswith the Delaunay triangulation,

� � � � � ��� � �,

for every ��� � � � � � � � � . There are onlyfinitely many simplices and therefore only finitely manysubcomplexes of

�that arise as dual complexes during the

growth process. We refer to this sequence as a filtration ofthe Delaunay triangulation,

� � � �� � � � � � � � � � � �

.Figure II.12 illustrates the construction by showing threecomplexes in the filtration generated by eight disks in theplane. To translate between continuous time and discrete

28 II GEOMETRIC MODELS

Figure II.12: Three unions of disks and the corresponding dualcomplexes. The first complex contains all vertices but only twoedges and no triangles. From the first to the third complex, theedges become thinner and the triangles become lighter.

rank, we define a function � � � � � such that�

�� � � if� � � � � � � .

Ordering simplices. We can sort the Delaunay sim-plices in the order in which they enter the dual complex.Define the birth-time of a simplex � � �

as the minimumtime , � � �� such that ��� � � for all � � � , . The differ-ence between two contiguous complexes in the filtrationconsists of all simplices whose birth-time coincides withthe creation of the second complex,

� ��� � � � � � � � � � �� �� � � � � � � � � � �

Often two contiguous complexes� � and

� ��� � differ byonly one simplex, � . In this case, the birth-time of � coin-cides with the time it becomes independent. Let the ortho-sphere of � be the smallest sphere orthogonal to all ballswhose centers are vertices of � . The time � becomes in-dependent is also the time the orthosphere of � dies orshrinks to a point. Geometrically, this case is characterizedby a non-empty common intersection between the affinehull of � and the Voronoi cells of its vertices. Sometimes,however, the difference between

� � and� ��� � consists of

two or more simplices. In the generic case, all these sim-plices are faces of a single simplex, � , that also belongsto the difference. All these simplices are born at the sametime, , � � � � � � � � � . In the absence of any degeneracy,their orthospheres die at different times, with the ortho-sphere of � dying last at time , . Figure II.13 illustratesthis case. The triangle connecting all three centers andthe edge connecting the centers of the two larger disks areborn at the same time, namely when all three disks reach

the shared Voronoi vertex. This is also the time whenthe three disks become independent, but the pair of largerdisks became independent earlier.

Figure II.13: The two larger disks are independent, but the dualedge does not belong to the dual complex because their commonintersection is disjoint from the corresponding Voronoi edge.

We represent the filtration by sorting the Delaunay sim-plices by birth-time, and in case of a tie by dimension.Remaining ties are broken arbitrarily. Every dual com-plex

� � is a prefix of this ordering, and because of the tiebreaking rule, every prefix is a complex, even if it doesnot coincide with a dual complex. This property of the or-dering will be crucial for the algorithm in Chapter IV thatcomputes the connectivity of the

� � .Bibliographic notes. Alpha shapes and alpha com-plexes have been introduced by Edelsbrunner, Kirkpatrickand Seidel [3] in 1983 for finite sets of points in the plane.About a decade later, the concept has been generalized tothree dimensions and made available as a software pack-age with graphical user interface [4]. The unexpectedpopularity of that software in structural biology triggeredthe development of further geometric concepts useful instructural biology, some of which are explained in thisbook. The main reason for the popularity is the dualitybetween space-filling diagrams and alpha shapes as ex-plained in this and the two preceding sections. To fullydevelop that duality, alpha shapes had to be extended totake into account weights, and this has been described incomplete generality in [2]. That generalization benefit-ted from adopting the language of simplicial complexes,which has been developed decades earlier in the area ofcombinatorial topology [1, 5].

[1] P. S. ALEXANDROV. Combinatorial Topology. Dover, NewYork, 1998 (republication of translation of the original Rus-sian edition from 1947).

[2] H. EDELSBRUNNER. The union of balls and its dual shape.Discrete Comput. Geom. 13 (1995), 415–440.

II.3 Alpha Shapes 29

[3] H. EDELSBRUNNER, D. G. KIRKPATRICK AND R. SEI-DEL. On the shape of a set of points in the plane. IEEETrans. Inform. Theory IT-29 (1983), 551–559.

[4] H. EDELSBRUNNER AND E. P. MUCKE. Three-dimen-sional alpha shapes. ACM Trans. Graphics 13 (1994), 43–72.

[5] P. J. GIBLIN. Graphs, Surfaces and Homology. Second edi-tion, Chapman and Hall, London, 1981.

30 II GEOMETRIC MODELS

II.4 Alpha Shape Software

This section introduces the basic Alpha Shape softwareand explains how to go from a standard descriptions ofprotein structures to the visualization of their alpha shapes.The discussion is more descriptive and less analyticalthan in the previous three sections. Given a pdb-file,name.pdb, we take four steps to construct and visualizealpha shapes in an interactive graphical user interface:

> pdb2alf name.pdb name> delcx name> mkalf name> alvis name

The details of the discussion apply to Version 4.1 of theAlpha Shape software executed on an SGI workstationrunning under the UNIX operating system and may differfor other versions and platforms.

Data format. The main public source for structural pro-tein data is the Protein Data Bank (pbd) mentioned in Sec-tion I.3. Only a fraction of the information is needed toconstruct alpha shapes. Specifically, for each atom weonly need its coordinates in three-dimensional space andits radius. The coordinates are explicitely given in the file,but the radius must be inferred from the atom type. Thisis done according to published translation tables that mapatoms to van der Waals radii. Unfortunately, there is nouniversally agreed upon table. Some differences are dueto different methods used to derive radii, including mea-surements of closest approach, molecular mechanics cal-culations, etc. One of the most problematic elements ishydrogen (H), which accounts for almost 50% of the num-ber of atoms found in organic matter. Hydrogen atomssometimes donate their electrons to complete the shells ofother atoms and thus can exist without any shell and ra-dius to speak of. Hydrogen atoms are generally not repre-sented in pdb-files, but can be inferred to some accuracyfrom the types and relative positions of the other atoms inthe protein. In the common unified atom model, the vander Waals radii of larger atoms are adjusted to include thebonded hydrogen atoms.

We can extract the coordinates and the radii using soft-ware that is part of the Alpha Shapes distribution. Specif-ically, we call

> pdb2alf -r 1.4 name.pdb name

to read name.pdb and create a new file name that con-

tains a line for each atom listing its three coordinates andthe van der Waals radius. The -r option allows for thespecification of a radius increment that is applied to everyatom in the file. In our example, this radius increment is1.4 A, which is the most common approximation used forthe size of water molecules. The resulting set of balls thusdefines the solvent accessible diagram representing the in-teraction with the surrounding water; see Section II.1.

Delaunay triangulation. The first step towards comput-ing alpha shapes is to construct the Delaunay triangulationof the set of balls. This is accomplished by the command

> delcx name

The ����aunay � omple � program creates a file name.dt

that represents the Delaunay triangulation. The efficientand robust construction of the Delaunay triangulation in� �

is not entirely straightforward. We briefly mention thealgorithmic ingredients used. The basic strategy is incre-mental, adding one ball at a time to the triangulation. Us-ing an arbitrary ordering of the � balls, we write � � for theset of the first

�balls and

� � for the Delaunay triangulationof � � , for �

� � � � . With this notation, the algorithmcan be written as follows.� � ���

;for

� � � to � do� � � INSERT � � � � � � � � � endfor.

The�-th ball is inserted through a sequence of flip opera-

tions. The flips are performed depending on the outcomesof only two types of primitive tests needed in the construc-tion of the Delaunay triangulation:

ORTHOGONALITY: decide whether a ball is closer or fur-ther than orthogonal to the orthosphere of four otherballs.

ORIENTATION: decide whether a ball center is on the pos-itive or negative side of the oriented plane spanned bythree other ball centers.

Both tests reduce to the sign of the determinant of a smallmatrix and can be decided without computing intermedi-ate geometric information. The operations are ambiguousif the balls are in non-generic position, and so is the De-launay triangulation. To cope with the related robustnessproblem, we use exact arithmetic and simulated perturba-tion. Exact arithmetic guarantees the correct execution offlips in all generic and therefore unambiguous cases, and

II.4 Alpha Shape Software 31

simulated perturbation reduces ambiguous cases in a con-sistent manner to unambiguous ones. The use of exactrather than floating-point arithmetic poses a challenge tothe efficiency of the code. A common remedy is to useso-called floating-point filters: calculate in floating-pointarithmetic, bound the error, and redo the computation inexact arithmetic if the error is too large to guarantee a cor-rect decision.

Another challenge to the efficiency of the code is theinherent size of the Delaunay triangulation. As mentionedin Section II.2, the Delaunay triangulation in

� �can have

a number of simplices that is quadratic in � . For exam-ple, if the centers of the balls lie on the moment curveand all radii are equal, then every pair of vertices formsan edge in the Delaunay triangulation, as shown in Fig-ure II.14. Fortunately, the balls of organic molecules are

Figure II.14: Edge-skeleton of the Delaunay triangulation oftwenty one points on the moment curve in � � .usually well packed and have Delaunay triangulations ofsize at most proportional to � . The danger remains thatone of the intermediate triangulations is large. Then wespend a lot of time constructing that triangulation, only todestroy most of it before arriving at the final triangulation.This danger is quite real as systematic enumerations ofthe data tend to generate subconfigurations with relativelylarge Delaunay triangulations. The remedy here is to addthe balls in a random sequence. In other words, we applya random permutation to the input sequence and constructthe Delaunay triangulation following this permutation.

Filtration. As explained in Section II.3, dual complexesobtained by growing the square radii form a nested se-quence of subcomplexes of the Delaunay triangulation,� � � ��� �

��� � �

� � � � �. This is the filtration

of � -complexes, for ��� � � � � � . We represent thefiltration by the sequence of Delaunay simplices orderedby birth-time. The sequence is generated by calling

> mkalf name

The � a � e � � pha shape � iltration program reads the Delau-nay triangulation in name.dt and generates a new file,name.alf, that stores the filtration along with some aux-iliary data structures.

The software refers to the sorted sequence of simplicesas the ‘masterlist’. It stores each simplex � � �

severaltimes, marking when � is born, when � becomes a faceof another simplex, and when � becomes interior to thealpha complex. Suppose the three events happen at times, � � , � � , � . Then

� is ������ not in

�� if � � � , � �

singular if , � � � � � , � �regular if , � � � � � , � �interior if , � � � � �

The combinatorial topology term for being singular isprincipal and means that � is not a face of any other sim-plex. The simplex � is regular if it belongs to the bound-ary but is not principal, and it is interior if it is completelysurrounded by other simplices. Some of the three eventsmay coincide. For example, a tetrahedron is interior assoon as it is born, so , � � , � � , � . A simplex � in theboundary of

�can never become interior, so , � � � .

Finally, a simplex whose orthosphere dies strictly beforethe simplex is born is never singular, so , � � , � . Themain reason for recording all this information is to deter-mine how to draw � in the graphical interface, but thereare others. Figure II.15 shows four alpha complexes of therelatively small gramicidin protein. In each case, we onlyshow the singular simplices together with the regular tri-angles. Given a value of � , we need quick access to thesimplices of the various types in

�� . For this purpose, we

store the existence intervals in a number of intervals trees.Each such tree stores some number � of intervals in spaceO( � ), and for a given moment , � � � , it enumerates the �simplices whose intervals contain , in time O(

� ��� � � � ).

Visualization. We finally discuss the visualization inter-face of the Alpha Shapes software. The necessary supportstructures are computed and the graphics user interface isopened by executing

> alvis name

The � � pha shape �� ualization program uses both the De-launay triangulation file, name.dt, and the filtration file,name.alf. The interface consists of a visualizationpanel, and scene panel, and a signature panel. All alpha

32 II GEOMETRIC MODELS

Figure II.15: Four alpha complexes of gramicidin.

complexes are shown in the first but which complex isshown and how it is shown is decided in the other twopanels. The visualized complex

� � is selected in the sig-nature panel. To support that selection, the panel displaysa variety of functions (or signatures) that illustrate howthe complexes change with time. For example, the threedefault signatures map each index

�to the number of sin-

gular edges, the area of the boundary, and the volume ofthe underlying space of

� � . Figure II.16 shows the signa-ture panel and the three default signatures for gramicidin.All signatures that count rather than measure are displayedin log-scale. Instead of mapping the time , to a property of�

� , the signatures map the index� � � ��, � to the property

of� � � � � . To facilitate the reconstruction of the map

from time, the panel contains a signature that maps the in-dex to time. Specifically, it shows the log-scale graph of� � � . A particular index,

�, is selected by the position of a

vertical bar in the signature panel and by clicking the Al-pha Shape button in the scene panel, as shown in FigureII.17. The buttons in the middle of the scene panel providecontrol over how simplices are drawn: colored, shaded, inwireframe, seamless, or with gaps created through a slowexplosion. The matrix on the right hand side can be usedto select the types of displayed simplices. By default, onlythe singular vertices, edges, triangles and the regular trian-gles are shown. Different settings can be used to highlightdifferent aspects of an alpha complex. For example, the

Figure II.16: Signature panel of the Alpha Shape visualizer.

Figure II.17: Scene panel of the Alpha Shape visualizer.

1-skeleton of the Delaunay triangulation shown in FigureII.14 is obtained by drawing all edges of the last alphacomplex while suppressing the display of all triangles andtetrahedra.

Bibliographic notes. The Alpha Shape software wascreated by Ernst M ucke as part of his doctoral work atUrbana-Champaign. The best documentation of the algo-rithm and data structures used in the software are still histhesis [6] and the original paper on the topic [4]. After aperiod of rapid development directed by Ping Fu at the Na-tional Center for Supercomputing Applications, the soft-ware reached version 4.1 in 1996, which is still the mostrecent version distributed on the web [7]. The Delaunaytriangulation software in the Alpha Shapes distribution isbased on a variety of algorithmic techniques described ina recent text by Edelsbrunner [3]. The interval tree usedfor fast retrieval of simplices is explained in [2].

As mentioned earlier, the largest resource for structuralprotein data is the Protein Data Bank [1], which can beaccessed via the web [8]. A survey of geometric measure-

II.4 Alpha Shape Software 33

ments of proteins including a discussion of different tablesfor van der Waals radius assignment can be found in [5].

[1] H. M. BERMAN, J. WESTBROOK, Z. FENG, G. GILLI-LAND, T. N. BHAT, H. WEISSIG, I. N. SHINDYALOV AND

P. E. BOURNE. The Protein Data Bank. Nucleic Acids Res.28 (2000), 235–242.

[2] H. EDELSBRUNNER. A new approach to rectangle intersec-tions – part I. Internat. J. Comput. Math. 13 (1983), 209–219.

[3] H. EDELSBRUNNER. Geometry and Topology for MeshGeneration. Cambridge Univ. Press, England, 2001.

[4] H. EDELSBRUNNER AND E. P. MUCKE. Three-dimension-al alpha shapes. ACM Trans. Graphics 13 (1994), 43–72.

[5] M. GERSTEIN AND F. M. RICHARDS. Protein geometry:distances, areas, and volumes. Chapter 22 in The Interna-tional Tables for Crystallography, Vol. F, M. G. Rossmannand E. Arnold (eds.), Kluwer, Dordrecht, the Netherlands,2001, 531–539.

[6] E. P. MUCKE. Shapes and Implementations in Three-dimensional Geometry. Rept. UIUCDCS-R-93-1836, Dept.Comput. Sci., Univ. Illinois, Urbana, 1993.

[7] Alpha Shapes web-site at www.alpha-shapes.org; see also the software collection inbiogeometry.duke.edu.

[8] Protein Data Bank web-site at www.rcsb.org/pdb.

34 II GEOMETRIC MODELS

Exercises

1. Tree-like sequences. Given an alphabet of � � �letters, form a sequence but refrain from placing anyletter twice in a row. The sequence is tree-like ifthere are no two letters 4 �� � that alternate morethan twice. In other words, subsequences of the form� � 4$4�� � and � � 4�� � � � � 4�� � � � � are prohibited. Examples oftree-like sequences of four letters are 4 � � � � �H4 and4 �H4 � 4 � 4 .

(i) Prove that a tree-like sequence over an alphabetof � letters has length at most �@� � � . Is thisbound tight?

(ii) Define a tree-like cyclic sequence by pro-hibiting cyclic subsequences of the form� � 4�� � � � � 4�� � � � � . Prove that a tree-like cyclic se-quence over an alphabet of � letters has lengthat most �@� � � . Is this bound tight?

2. Number of arcs. Let � be a set of � � � disks inthe plane. The boundary of the union of the disksconsists of circular arcs contributed by the � circles.

(i) Assuming the boundary of � � is a singleclosed curve, use tree-like cyclic sequences toprove that it consists of at most �@� � � (maxi-mal) circular arcs. Is this bound tight?

(ii) Prove that in general the number of (maximal)circular arcs in the boundary of the union is atmost

� � � ��� . Is this bound tight?

3. Empty Voronoi cell. Call a disk � � in a finite collec-tion of disks redundant if its Voronoi cell is empty.

(i) Prove that if there are disks � � , � � and � � in thecollection such that

(a) � �* � � � �* � � � �* � � � ��* � for theorthocenter * of � � � � � � � � , and

(b) � � lies in the triangle � � � � � �then � � is redundant.

(ii) Prove that the necessary conditions given in (i)are also sufficient. In other words, prove that if� � is redundant then there exist disks � � , � � and� � that satisfy Conditions (a) and (b).

4. Binomial coefficients. Let � � � be two positiveintegers and recall that the binomial coefficient

� � � � isthe number of ways we can choose � elements froma collection of � elements. Recall also that# �

� % � � ���� � � � � � � � ����� � � � � �� � � � � � � � � �

(i) Show that� � � � � � ��

� � � .(ii) Show that � �� � � � �� � � � � � �� � � � .

[We note that the relation in (ii) neatly generalizesthe formula � � � � � � � � � � �� � �

� � � � . Thegeneralization is not quite as neat if we sum powersrather than binomial coefficients.]

5. Sphere arrangements. Let � � � � be the maximumnumber of cells we get by drawing � spheres in

� �.

(i) Show that � � � � � � � unless � � � .

(ii) Give a formula for � � � � that works for all posi-tive � .

[You might consider answering question (ii) beforequestion (i).]

6. Independent half-spaces. A half-plane is the set ofpoints on or on one side of a line in

� � . Similarly, ahalf-space is the set of points on or on one side of aplane in

� �, and a cap is the intersection of a sphere

with a half-space. What is the maximum number ofindependent

(i) half-planes in� � ,

(ii) half-spaces in� �

,

(iii) caps on a sphere in� �

?

7. The filtration of water. A water molecule consistsof one oxygen and two hydrogens: H � O.

(i) Look up the standard geometric model (deter-mined by radii, bond length and bond angle).

(ii) Describe the Voronoi diagram and the sequenceof alpha complexes of the model.

8. Barycentric subdivision. The barycentric subdi-vision of a simplex � is obtained by adding thebarycenter of � (also known as the centroid or cen-ter of mass) as a new vertex and connecting it to thesimplices in the barycentric subdivisions of the faces.

(i) How many vertices, edges, triangles and tetra-hedra are in the barycentric subdivision of atetrahedron?

(ii) Use the Alpha Shape software to create thebarycentric subdivision of a regular tetrahe-dron.

[You will need to use weights to make the barycentricsubdivision of the tetrahedron the Delaunay triangu-lation of the points.]

Chapter III

Surface Meshing

Recall the different types of space-filling diagrams wediscussed in Chapter II. The van der Waals and the solventaccessible models are both unions of finitely many ballsin three-dimensional space and differ only in the radii. Wehave also discussed the molecular surface model that is ob-tained by rolling a sphere about the van der Waals model.Corners and crevices are filled up and the surface consistsof spheres connected by blending torus patches and in-verted sphere patches.

In this chapter, we introduce model that is similar tothe molecular surface. Its surface consists of spheresconnected by blending hyperboloid patches and invertedsphere patches. We call this the molecular skin model.The surface is piecewise quadratic and has a number ofattractive properties not shared by the other space-fillingmodels. One is the continuity of the normal direction, an-other the continuity of the maximum principal curvature.Both properties are crucial for the construction of goodquality meshes, which may be used to support numericalcomputations over the surface. Another interesting prop-erty is an inside-outside symmetry that implies the exis-tence of locally perfectly complementary molecular skinmodels. In other words, for each cavity we may constructa molecular skin representation whose boundary matchesthat of the molecule. The molecular skin also lends itselfto represent deformations, and some of the possibilitiesalong these lines will be discussed in Chapter VIII.

This chapter is organized in four sections. In SectionIII.1, we give the geometric definition of the molecularskin and show how it can be decomposed into quadraticpatches. In Section III.2, we discuss various notions ofcurvature of a surface, and we show that the maximalprincipal curvature is a continuous map over the molec-ular skin. In Section III.3, we describe the algorithm thatconstructs a molecular skin in terms of a triangle mesh. Fi-nally in Section III.4, we present software for constructingmolecular skin in two- and three-dimensional space, and

we use that software to illustrate some of the properties ofthese curves and surfaces.

III.1 Molecular SkinIII.2 CurvatureIII.3 Adaptive MeshingIII.4 Skin Software

Exercises

35

36 III SURFACE MESHING

III.1 Molecular Skin

Almost everything we will say in this section appliesequally well to spheres of any fixed dimension. Eventhough the case of spheres in

� �is most relevant for the

study of molecules, there is sufficient pedagogical advan-tage to first talk about circles in

� � .

Circles and paraboloids. Recall that the weightedsquare distance function of a circle � � � � � � � � � � is themap � � � � �

�defined by � �* � � F�* � � � F � � � �� .

As illustrated in Figure III.1, its graph is a paraboloidof revolution in

� ��� � that intersects� � in the circle.

In other words, the circle is the zero-set of the weightedsquare distance function, � � � � �� � � � . All paraboloidsthat arise as weighted square distance functions have theform

� �* � ��* � � � * � � � * �� � 4 * � � �)* � � � . The three pa-rameters correspond to the three degrees of freedom rep-resented by the center and the radius.

Figure III.1: A circle in ��� is the zero-set of its weighted squaredistance function.

Functions form a vector space under the usual notionsof scaling and addition. We will use only a subspace ofthat vector space, namely the one consisting of functions�

of the above form. Given a collection of such functions � , we can generate another such function by affine combi-nation,

� � � � � , where the � � are real numbers with� � � � � . The new function is a convex combinationof the � if all � � are non-negative. Given a collection ofcircles, � , the affine hull is the set of zero-sets of affinecombinations of the corresponding weighted square dis-tance functions, and similarly the convex hull is the subsetof zero-sets of convex combinations,

��� � � � � � � � � � � � � � �

� � � � ���2�� � � � � � � � � � ��� � �

� � � � ��� � �

Pencils. It is possibly easier to develop an intuition forcombining circles than for combining paraboloids. Giventwo intersecting circles � � and � � , the affine hull con-sists of all circles that pass through the same two inter-section points. Indeed, if � �* � � � ��* � � � then

� � � �* � �� � � �* � � � for all coefficients � � and � � .

We call the resulting family a pencil of circles. If � � and� � are disjoint then the affine hull is again a pencil but thistime of pairwise disjoint circles, like the vertical familysketched in Figure III.2. We compute the center and ra-

Figure III.2: Circles sampled from a coaxal system consisting oftwo orthogonal pencils.

dius of the zero-set of � � � �� � � . We have

��

� � ��F�*� � � F � � � �� � �� � ��FH*� � � F � � � �� �

� FH*� � � � � � � � � � F � � F � � � � �� � � � F ��

� � F � � F � �� � F � � F � � � � � �� � � � � �� �

The center is therefore �� �

� � � � �� � � � and the square

radius is� �� � F � � F � � � � ��F � � F � � � �� � � � � ��F � � F � � � �� � .

The centers of the circles in the affine hull are therefore thepoints on the line that passes through � � and � � . If insteadof the affine hull we take the convex hull, then we get thesubset of circles whose centers are the points on the linesegment with endpoints � � and � � .

Recall that a circle � � � � � � � � � � is orthogonal to � � if ��� � � F � � � � � F � � � �� � � �� � � . If � � is orthogonal to � �and to � � then it is also orthogonal to every circle � � in theaffine hull of � � and � � . To see this elementary fact, notethat

� � � � F � � � � � F � � � �� � � ��

�� � ��F � � � � � F � � � �� � � �� ��

� � ��F � � � � � F � � � �� �� �� � �

III.1 Molecular Skin 37

which is � � �� � �� � ��� � and thus vanishes as required.

Suppose we are now given two circles � � and � � and twomore circles � � and � � both orthogonal to � � and � � . Thenevery circle in the affine hull of � � and � � is orthogonal toboth � � and � � and thus to every circle in the affine hull of� � and � � . In other words, we have two pencils in whicheach circle in the first pencil is orthogonal to each circlein the second pencil. Such a configuration is illustrated inFigure III.2 and is referred to as a coaxal system.

Envelopes. The convex hull of two circles is an infinitefamily of circles, but the union of their disks is just theunion of the two original disks. We introduce a shrinkingoperation that reduces small circles less than big ones andthis way generates a smooth envelope. Specifically, we de-fine � � � � � � � � � � � � � � � . Similarly, for a family of circles� we define � � � � � � � � � � . An example can beseen in Figure III.3, which sketches a shrunken pencil ofcircles.

Figure III.3: The dotted circles belong to the affine hull and thesolid circles are reduced.

We are interested in the envelope of a shrunken pencil.Suppose � is a pencil and all its circles pass through thepoints � � � � � and � � � � � � . We parametrize � by the * � -coordinate of the circle centers. The corresponding ra-dius is � � � � . The same parametrization of the familyof reduced circles, � � , gives

� � �:* � ��* � � � �* � � � � � * �� � � � � � � � � �The reduced circle with center � � � � is the zero-set of

Figure III.4: Sections of the zero-set of � viewed from the posi-tive � direction.

for fixed value of . The collection of all reduced circlesis the projection of the entire zero-set,

�� � � � � . It can be

visualized as a leaning hour-glass of circles, as in FigureIII.4. The envelope of � � is the projection of the silhou-ette of

�� � � � � as viewed along the direction. It is the

set of points for which �������� � �* � � � � � � � * �

vanishes. From �������� we get � �@* � . The envelope is

therefore the zero-set of� � �@* � �:* � �:* � � � �J* � � � * �� � �� ,

which is a hyperbola.

Skin and body. More general curves than just hyperbo-las can be constructed by taking the convex hull of a fi-nite collection of circles, then shrinking every circle in thefamily, and finally taking the envelope. Formally, the skinof the collection of circles � is the envelope of the reducedcircles, � � � � � � ���� � . The body is the union ofdisks bounded by circles in � �2�� � . It is the region in� � bounded by the skin, and symmetrically, the skin isthe boundary of the body. The smallest non-trivial exam-ple is the skin of two circles. If these circles intersect intwo points then the skin is a dumbbell, as shown in FigureIII.5. It consists of two circles connected by a blendinghyperbola arc.

Figure III.5: The skin of two intersecting circles is the envelopeof a reduced line segment of circles.

The skin of three circles is already more difficult to un-derstand, at least directly. We thus take an indirect ap-proach and first study what happens when orthogonal cir-cles shrink.

Orthogonality and complementarity. Let � � � � � � � � � �and � � � � � � � � � � be two orthogonal circles. We thus haveF � � � � � F � � � �� � � ��

� � �� � � �� � � � � � � � � � � � � � � � � �� � � �

� � � � � � � � � � � � � �Taking roots left and right implies that the radii of � � � and� � � add up to at most the distance between the two cen-ters. Furthermore, we have equality iff

� � � � � . In otherwords, the reduced versions of any two orthogonal circles

38 III SURFACE MESHING

touch if they are of the same size and they are disjoint inall other cases.

We apply this result to the coaxal system consisting oforthogonal pencils � and � . Suppose � contains only cir-cles with real radii, or equivalently, � is the affine hull oftwo intersecting circles. As shown earlier, the envelope of� � is a hyperbola. We claim that the envelope of � � isthe exact same hyperbola. To see this, we first note thata circle in � � can at most touch the hyperbola, for if itcrossed, we would have two crossing reduced circles con-tradicting the orthogonality of the two corresponding orig-inal circles. Furthermore, every circle in � � for whichthere is an equally large circle in � � touches the hyper-bola because it touches that circle. The two envelopes aretherefore the same hyperbola. As shown in Figure III.6,the two asymptotic lines of the hyperbola intersect at aright angle. The smallest separating circle that touchesboth branches belongs to � � and has the same size as thetwo osculating circles that both belong to � � . These cir-cles touch the hyperbola and have the same curvature asthe hyperbola at that point.

Figure III.6: Hyperbola with orthogonal asymptotic lines, small-est separating circle, and two osculating circles.

The complementarity of the bodies extends from thecase of two orthogonal pencils to the case in which � con-sists of a single circle � and � contains all circles orthog-onal to � . The set � is a two-parameter family spannedby three circles. The skin of � is trivially a circle, whichimplies that the skin of � is the same circle.

Decomposition. The skin of any finite set of circles �can be decomposed into simple pieces, each defined by atmost three of the circles. A single circle defines a (smaller)circle, a pair of circles defines a hyperbola, and a triplet ofcircles defines an inverted circle. We thus claim that the

skin of � consists of circles, connected to each other byblending hyperbola and inverted circle arcs. We will notprove this claim and instead give an explicit constructionof the decomposition, which is facilitated by a complexassembled from Voronoi and Delaunay polyhedra.

As usual, we let � be an index set and use it to de-note the Voronoi polyhedron

� � � �� � � � . The corre-sponding Delaunay simplex is � � � �2�� � � � � � � � .The corresponding mixed cell is the Minkowski sum ofshrunken copies of both, � � � ��

� � � �� � � . If � � ��� � � �the mixed cell is the shrunken and translated copy of atwo-dimensional Voronoi cell. If � � ��� � � � then � � isthe Minkowski sum of two orthogonal edges and there-fore a rectangle. If �� ��� � � � then � � is a shrunken andtranslated copy of a Delaunay triangle. The mixed complexconsists of all mixed cells and their faces. Figure III.7 il-lustrates the construction by showing the mixed complexdecomposing the skin into circle and hyperbola arcs. A

Figure III.7: The mixed complex and the skin of four circles.

rather intuitive explanation of the construction can be ob-tained by drawing the Voronoi diagram and the Delaunaytriangulation on two parallel planes in

� �. We decompose

the slab between the two planes into pyramids and tetrahe-dra, which are the convex hulls of corresponding Voronoipolyhedra and Delaunay simplices. The mixed complex isthen obtained by intersecting the pyramids and tetrahedrawith the plane parallel to and halfway between the othertwo planes, as sketched in Figure III.8.

Symmetry. Note that the construction of the mixedcomplex is symmetric in the Voronoi diagram and the De-launay triangulation. In other words, the mixed complexof � is the same as the mixed complex of the collec-tion of circles

�introduced in Section V.1. [The order

of the chapters on skin and pockets has changed now,which requires a local rewrite here and in Section III.4.]As explained there,

�contains a circle � � centered at each

III.1 Molecular Skin 39

Figure III.8: The top, middle, and bottom planes carry the Delau-nay triangulation, the mixed complex, and the Voronoi diagram.

Voronoi vertex � � (including those at infinity) with the ra-dius chosen so that � � is orthogonal to the circles that de-fine � � . The Voronoi diagram of

�is then the Delaunay

triangulation of � , the Delaunay triangulation of�

is theVoronoi diagram of � , and the mixed complexes of � and�

are the same. We have seen that the skins of two orthog-onal pencils are the same hyperbola. Similarly, the skinsof one circle and the affine hull of three orthogonal circlesare the same circle. Since the mixed complex decomposesthe entire skin of � into such cases, it follows that the skinof

�is the same as that of � . Note however that the two

bodies are not the same but rather complementary,� � ��� ��� � � ��� � � � � �� � ��� ��� � � ��� � � � �� � � � �� �

Bibliographic notes. There is another interpretation ofthe vector space of circles exploited in this section. Itidentifies each circle � � � � � � � in

� � with the point� � �9F � F � � � � � in

� �. Under this interpretation, the convex

hull of a set of circles corresponds to the usual convex hullof points in

� �, and the symmetry between � and

�can

be explained as a polarity between two convex polyhedra.This interpretation is prominently used in the geometrytext by Pedoe [5]. It has been discovered in the nineteenthcentury and published at more or less then same time inthree different languages by Clifford [1], Darboux [2], andFrobenius [4].

The material of this section is taken from [3], whereskin surfaces are introduced as orientable � � � � � -manifolds in

���. That paper also proves that the body of

a finite collection of spheres has the same homotopy typeas the dual complex.

[1] W. K. CLIFFORD. Problem 1748. Mathematical Questionsand Solutions from the Educational Times 44 (1865), 144.

[2] M. G. DARBOUX. De points, de cercles et de spheres. An-nales de L’Ecole Normale, Series 2 (1872), 323–392.

[3] H. EDELSBRUNNER. Deformable smooth surface design.Discrete Comput. Geom. 21 (1999), 87–115.

[4] G. FROBENIUS. Anwendungen der Determinantentheorieauf die Geometrie des Masses. J. Reine Angew. Math. 79(1875), 185–247.

[5] D. PEDOE. Geometry: a Comprehensive Course. Dover,New York, 1988.

40 III SURFACE MESHING

III.2 Curvature

The skin curves introduced in Section III.1 generalizestraightforwardly to surfaces in

���. In this section, we

study the curvature of these surfaces. The Curvature Vari-ation Lemma proved at the end of this section will playa major role in the meshing algorithm to be discussed inSection III.3. There are several notions of curvature of asurface, and all are obtained by considering the curvatureof curves drawn on the surface.

Curves. A closed space curve is a map of a circle tothree-dimensional space,

� ��� � �� �

. It is smooth ifthe derivatives of all orders exist. Usually we need onlya small number of derivatives, and the assumption of theexistence of infinitely many is convenient but not neces-sary. Note that a curve has a parametrization and thecounter-clockwise orientation of the circle gives a senseof direction. The velocity vector at the point � � � ��, �is -� �, � � ���� 1 ��, � and the speed is the length of that vector,F -� �, � F . The tangent vector is the normalized velocity vec-tor,

� ��, � � -� ��, � ��F -� ��, � F , which is defined as long as thespeed is non-zero. We can think of

�as the Gauss map

from � � to � � , as illustrated in Figure III.9.

Figure III.9: A closed space curve to the left and its Gauss mapto the right.

It is often convenient to assume unit speed. In this case� ��, � � -� ��, � and the second derivative,5� ��, � , is normal to

the first. The curvature is the length of that second deriva-tive, � ��, � � F 5� ��, � F . The normal vector is the normalizedsecond derivative, � �, � � 5� �, � �GF 5� �, � F , which is definedas long as � �, � �� � . Geometrically, the curvature is oneover the radius of the osculating circle at � � � ��, � , whichis the circle in the plane spanned by the tangent vector andthe normal vector.

Surfaces. Let � be a smooth surface or 2-manifold in� �

. For a point � ��� , we let� ��� be a neighborhood,

an open set in

� � , and� � �

�a parametrization.

Derivatives are taken along curves on the surface. For ex-ample, to compute the tangent plane at �

� � ��* � , we takethe tangent vectors of two curves that cross at � . They spanthe tangent plane, as illustrated in Figure III.10. Similarly,

yxf

Figure III.10: Construction of tangent plane from two tangentvectors.

we define the curvature at � in sections. For each curve�in the plane we consider the space curve

�� �. It is a

geodesic at � �� �* � if its normal agrees with the surface

normal at � . The curvature of�� �

consists of a portionforced by how the surfaces curves in space and anotherportion accounting for how

�� �curves within the sur-

face. The second contribution vanishes for geodesics, andif it does we call � � � � � � � the normal curvature of � at� in the direction of the tangent vector � � � < � � � ?

� 1 . Thereis a circle of tangent vectors, and for each one we get anormal curvature. The principal curvatures at � are theminimum and maximum normal curvatures,� � �� � � � � � � � � � �

� � � � � �� � � � � � � � � � �

Let � � and � � be the corresponding tangent directions. Bya result of Euler, the principal curvatures determine allother normal curvatures at � .

EULER’S THEOREM. The directions � � and � � are or-thogonal, and if � � � � � �

� � � �2�� � then

� � � � � ���� � �� � � � �2�� � � �

This implies that if � ��� � � then all other normal cur-

vatures are strictly between the two principal curvatures,which are therefore unique. If � �

� � � then all normalcurvatures are the same and the point � is an umbilic pointof the surface. Two other common notions of curvatureare the mean curvature, � ��� � � � �

� � � , and the Gaus-sian curvature,

� � � � ��� � . In contrast to the other no-tions, the Gaussian curvature is intrinsic. In other words, itis preserved by isometries, which are transformations thatpreserve the distance between points measured as lengthsof connecting paths. This is a famous result of Gauss.

THEOREMA EGREGIUM.�

is an isometric invariant.

III.2 Curvature 41

Skin surfaces. Recall that the skin defined by a finiteset of circles in

� � is the envelope of the infinite fam-ily of circles in the convex hull, each reduced by a fac-tor � ��� � . Furthermore, the mixed complex defined bythe circles decomposes the skin into circle and hyperbolaarcs. Similarly, the skin of a finite set of spheres � in� �

is � � � � � � ���� � . The mixed complex thatdecomposes the surface consists of the four types of cellsillustrated in Figure III.11. Within each mixed cell, we

Figure III.11: Typical mixed cells �������� ���

�� � . From left

to right we have ��� ������ ��� � ��� and 4.

have a sphere or a hyperboloid patch. The hyperboloidcan either be one-sheeted (an hour-glass) or two-sheeted.The cases are summarized in Table III.1. The two sphere

� � � � mixed cell skin patch1 3 0 convex polyhedron sphere2 2 1 polygonal prism hyperboloid3 1 2 triangular prism hyperboloid4 0 3 tetrahedron sphere

Table III.1: The cardinality of � listed in the first column deter-mines the dimensions of the corresponding Voronoi polyhedronand Delaunay simplex as well as the type of the mixed cell andof the skin patch.

cases are symmetric and differ from each other by the sur-face orientation: in the case � ��� � � � � , the body lieslocally inside, and in the case � ��� � � � � , it lies locallyoutside the sphere. Similarly, the two hyperboloid casesare symmetric and differ from each other by the surfaceorientation. In the case � ��� � � � � , the symmetry axisof the hyperboloid is the affine hull of the Delaunay edgeand the (orthogonal) symmetry plane is the affine hull ofthe Voronoi polygon. We have a one-sheeted hyperboloidif the two spheres intersect in a circle and a two-sheetedone if they are disjoint. The common limiting case is adouble-cone defined by two touching spheres. Either way,the body is on the side of the infinite ends of the symmetryaxis. In the case �� ��� � � � , the symmetry plane is theaffine hull of the Delaunay triangle and the symmetry axisis the affine hull of the Voronoi edge. Whether the hyper-boloid is one-sheeted, a double-cone, or two-sheeted de-pends on whether the two spheres orthogonal to the three

spheres with indices in � intersect in a circle, touch in apoint, or are disjoint. Either way, the body lies on the sideof the infinite circle in the symmetry plane.

Maximum normal curvature. We can translate and ro-tate every sphere and hyperboloid to standard form, whichwe define as * � � � * �� � * �� � � � �* � � � * �� � * �� � � � � �The second equation defines a hyperboloid with the apexat the origin, the symmetry axis along * � , and the sym-metry plane * � � � . We have a one-sheeted hyperboloidfor

� � � and a two-sheeted one for � � � , as illustrated inFigure III.12. For the sphere, the normal curvature at ev-

Figure III.12: The sphere, the one-sheeted hyperboloid, and thetwo-sheeted hyperboloid.

ery point is �� in every tangent direction. The situation ismore complicated for the hyperboloid. Consider the hy-perbola in standard form in

� � , as shown in Figure III.13,and note that both the one-sheeted and the two-sheeted hy-perboloid can be obtained by rotating the hyperbola abouta symmetry axis. In either case, the maximum normal cur-

rr xr

Figure III.13: Every point of the hyperbola is sandwiched be-tween two equally large circles.

vature at a point * � � , � � �* � , is one over the radius of

42 III SURFACE MESHING

the largest sphere that passes through * and touches butdoes not cross the hyperboloid. As shown in Figure III.13,this radius

�is the same as the distance of * from the ori-

gin. In short, � � ��* � � �� / � for every point * of a sphere orhyperboloid in standard form.

Curvature variation. The maximum normal curvaturevaries continuously over the skin because the commonradius of the sandwiching spheres varies continuously.We strengthen the result by showing that � � varies ratherslowly. In fact, we extend � � to a function defined on allof� �

and show that ��� � � has Lipschitz constant one. Wehave seen that within a mixed cell, ��� � � is simply the dis-tance to the center, � . By the definition of the mixed com-plex, this is a continuous function on

� �. Within the mixed

cell, the triangle inequality gives the Lipschitz bound,

� �� � �* � � �

� � � �� � � � F�* � � F � F � � � F �

� FH* � � F �By applying this to the pieces of the line segment from* to � contained in different mixed cells, we obtain theresult.

CURVATURE VARIATION LEMMA. For all points * ��� �� �

we have

� �� � ��* � � �

� � � �� � � FH* � � F �

We note that the extension of � � to a function� �

��

describes the maximal normal function of all skin surfacesin the family defined by the power growth model of thespheres, as introduced in Section II.2.

Bibliographic notes. The books by Bruce and Giblin[1] and by O’Neill [4] are good introductory texts tocurves and surfaces and other topics in differential geome-try. The skin surfaces in

���are obtained by extending the

results of Section III.1 by one dimension, from� � to

� �.

A more direct treatment of the general-dimensional casecan be found in [3]. The specific results on the curvatureand the curvature variation of skin surfaces are taken from[2].

[1] J. W. BRUCE AND P. J. GIBLIN. Curves and Singularities.Second edition, Cambridge Univ. Press, England, 1992.

[2] H.-L. CHENG, T. K. DEY, H. EDELSBRUNNER AND J.SULLIVAN. Dynamic skin triangulation. Discrete Comput.Geom. 25 (2001), 525–568.

[3] H. EDELSBRUNNER. Deformable smooth surface design.Discrete Comput. Geom. 21 (1999), 87–115.

[4] B. O’NEILL. Elementary Differential Geometry. Secondedition, Academic Press, San Diego, 1997.

III.3 Adaptive Meshing 43

III.3 Adaptive Meshing

In this section, we focus on constructing an explicit rep-resentation of a molecular skin surface. We choose a tri-angle mesh realized in

���that is a good approximation of

the surface and has good numerical properties.

Triangulations. Recall that a triangulation of a surface� � � �� � is a simplicial complex whose underlyingspace is homeomorphic to � . Since � is a 2-manifold,it follows that the simplicial complex is the closure of itstriangle set, every edge belongs to exactly two triangles,and the star of every vertex forms a disk. Note that the lastproperty implies the first two. We construct a triangula-tion by first selecting points on � and second connectingthese points with edges and triangles. Given the Delau-nay triangulation of � , we have sufficient information tosample points and to compute their maximum normal cur-vature values. Specifically, for each Delaunay simplex � �we construct the mixed cell � � � ��

� � � �� � � . The cen-ter of this cell is the point at which the affine hull of

� �intersects the affine hull of � � . It is also the center ofthe corresponding sphere or the apex of the correspondinghyperboloid. Next, we rotate the mixed cell so its centermoves to the origin. Furthermore, if

� � or � � is an edgethen we rotate it into vertical position. The sphere or hy-perboloid defined by � is then in standard form, which canbe sampled. For each sampled point we compute the max-imum normal curvature from its distance to the origin andwe obtain the corresponding point on � by the inverserotation.

Figure III.14: Local decomposition into restricted Voronoi cellsand dotted dual restricted Delaunay triangulation.

Let � be the set of points sampled on � . We use it asthe vertex set of the triangulation, which we construct asthe dual of a decomposition of � . Specifically, for each

point � � ��� , the restricted Voronoi cell is��� � � � � * � � � FH*� � � F � FH* � � � F ��� � ��where distance is measured in

� �, as usual. It is the in-

tersection of � with the Voronoi polyhedron of � � in� �

,��� � � � � � � � . The restricted cells decompose

� into closed regions that overlap along common piecesof their boundaries. Locally the picture is rather simi-lar to that of a Voronoi diagram in

� � . The restrictedDelaunay triangulation,

� �, is the collection of sim-

plices �� � ���� � � � � ����� with non-empty commonintersection of the corresponding restricted Voronoi cells,� � � � � � � � � � � �� �

. The construction is illustratedin Figure III.14. We note that

� �is a subcomplex of the

(unrestricted) Delaunay triangulation of � in���

.

Closed ball property. One trouble with the restrictedDelaunay triangulation is that it may not be homeomor-phic to � and thus not triangulate the surface. Indeed,it is easy to come up with cases where

� �is not even

a 2-manifold. A sufficient condition for� �

to triangu-late � is what we call the closed ball property. It requiresthat each common intersection of restricted Voronoi cellsis topologically a closed ball of the appropriate dimen-sion. We formulate this condition in terms of the three-dimensional Voronoi polyhedra defined by � . Assuminggeneral position, the Voronoi polyhedron

� � � � � � �has dimension �� �� ����� , and we require that

�� � � �� � � � is either empty or homeomorphic to a closed ballof dimension � � �� ���� . Depending on the cardinalityof � we have a closed disk, a closed interval, or a singlepoint.

Figure III.15: To the left a barycentric subdivision of a portionof a Voronoi diagram drawn with solid lines. To the right theisomorphic barycentric subdivision of the corresponding portionof the dual Delaunay triangulation drawn with dashed lines.

Proving that the closed ball property implies���

tri-angulates � is not difficult. Decompose the restrictedVoronoi diagram by adding a point in the middle of each

44 III SURFACE MESHING

arc and inside each cell and connect each point to thepoints on the boundary. The star of every point inside a re-stricted cell is a triangular decomposition of that cell. Thestar of every restricted Voronoi vertex consists of six tri-angular regions that can be homeomorphically mapped tothe six triangles in the barycentric subdivision of the dualrestricted Delaunay triangle. By construction of

���, the

triangles in the two barycentric subdivisions are connectedthe same way so we have a homeomorphism between �and the underlying space of

� �, which is illustrated in

Figure III.15.

� -sampling. The question remains how we sample thepoints such that the restricted Voronoi diagram has theclosed ball property. Since � is smooth, small neigh-borhoods are fairly flat and the restricted Voronoi diagrambehaves locally similar to the (unrestricted) Voronoi dia-gram of a set of points in the plane. In other words, adense enough sample of points should have the closed ballproperty. This intuition can be made precise by formaliz-ing the concept of density. Recall that � � �* � is the max-imum normal curvature at a point * � � . Around * wespread points at distance roughly proportional to � � � � ��* � .We therefore define � �* � � � � � � �* � and call it the lengthscale at * . The Curvature Variation Lemma of SectionIII.2 states that for any two points * ��� � � , the differ-ence in length scale is at most the distance between themin� �

,� � �* � ��� � � � � � FH*� � F .

An � -sampling is a subset � � � such that for eachpoint * � � there exists a point � � � at distanceFH* � � F � � � ��* � . Showing that a sufficiently small �implies the closed ball property for the restricted Voronoidiagram is rather tedious and we omit the proof.

HOMEOMORPHISM THEOREM. If � is an � -sampling of� with � � � � � � ��� � � � � , then the restricted Delau-nay triangulation of � is homeomorphic to � .

The precise upper bound for � is a root of the function

� � � � ����2�� � � � � � � �

� � � � � � � � � � � � �� � � �

which arises in the proof of the Homeomorphism Theo-rem.

Even sampling. The points of an � -sampling can locallynot be too far apart, but they can be arbitrarily close to-gether. In other words, on a microscopic scale, the pointscan be placed every way one likes and the mesh can be

arbitrarily ugly. To improve the mesh, we impose condi-tions on the size of edges and triangles that imply bothupper and lower bounds on the spacing between sampledpoints.

Let the size of an edge be half its length, ��� � � � ��� �

� ,and the size of a triangle be the radius of its circumcir-cle, ��� ��� . For edges we worry about them getting tooshort, so we compare size with the larger length scaleat the endpoints, � � � � � � � � � � � � ��� � � � . For trian-gles we worry about them getting too large, so we com-pare size with the minimum length scale at the vertices,� � ��� � � �� � � � � � �� � � � ��� �� � . We use two constants,

�and � , to express the conditions on the size. The constant�

controls how closely the triangulation approximates � ,and � controls the quality of the triangles. We refer to thetwo conditions as the Lower and Upper Size Bounds,

[L]�� ��� �� ���� for every edge � � � � �

,

[U]�� ����� ���� � � � for every triangle � �� � � �

.

It is not necessary to bound the edge lengths from abovebecause an edge with � � � ��� � � � � � would belong totwo triangles that both violate [L]. Symmetrically, we donot need to bound the triangle sizes from below becausea triangle with � � ��� ��� � ��� � ��

would have three edgesthat violate [L].

Mesh quality. The constants�

and � have to be chosenjudiciously. For example � � � would immediately leadto irreconcilable requirements on edge and triangle sizes.Furthermore,

�cannot be too large, else we would con-

tradict the � -sampling condition stated in the Homeomor-phism Theorem. Without going into details, we state that� �

� � ��� and � � � � � � are feasible choices. In particu-lar, these constants imply that � is an � -sampling for suffi-ciently small value of � . More precisely, they imply that �is either an � -sampling or it grossly violates the conditionfor � -sampling. An example of such a gross violation arefour points close together on a sphere. The points form atetrahedron whose edges and triangles may very well sat-isfy the Size Bounds, but the boundary of the tetrahedronis a miserable approximation of the much larger sphere.Fortunately, such a gross violation of the condition cannotbe created from an � -sampling without the intermediategeneration of triangles that grossly violate [U]. The algo-rithm discussed below is unable to generate such triangles.

The two Size Bounds together imply a reasonably largelower bound on the angles inside triangles of the restrictedDelaunay triangulation.

III.3 Adaptive Meshing 45

MINIMUM ANGLE LEMMA. A triangle that satisfies [U]and whose edges satisfy [L] has minimum anglelarger than � � � �� �� 8 .

PROOF. Let � �� be the triangle and � � � � ��� its cir-cumradius. Assuming � �� � is the smallest angle, wehave � � of length F ��� F � � � � �� � � as the short-est edge. We have � � ��� � � � � � � by definition of lengthscale. Using [L] and [U] we thus get

�F � � � F � � � � � ���� �� � � �

� � �� �

Hence � � � � � � � � � ��� �

� �� � � � � �� 8 .

For � � � � � � , the minimum angle is thus larger than� � � ��� � � � � , and the maximum angle is smaller than �� ������ � � � � � � � � � � � � � � � � � � � � � .

Density modification. Given an � -sampling, we can en-force the Size Bounds by contracting short edges and in-serting points near the circumcenters of large triangles.Given a triangle � �� that violates [U], we add the dualrestricted Voronoi vertex * as a new point to � . The inser-tion may cause new violations of [U] and thus trigger newpoint insertions.

void VERTEXINSERTION:while � triangle � � violating [U] do� � � � � *

endwhile.

The details of the algorithm that modifies the restrictedDelaunay triangulation to reflect the addition of * areomitted. A vertex insertion may cause other vertex in-sertions, but this cannot go on forever because we willeventually violate the Lower Size Bound. Given an edge� � that violates [L], we contract it by removing one of itsendpoints. We are not able to exclude the possibility thatthe removal creates new violations of [L], and it certainlycan create new violations of [U].

void EDGECONTRACTION:while � edge � � violating [L] doif � � � � � � � � � then � � � endif;� � � �

� �� ; VERTEXINSERTION

endwhile.

The details of the algorithm are again omitted. An edgecontraction may perhaps cause other edge contractions,but this cannot go on forever because we will eventually

violate the Upper Size Bound. It is possible that an edgecontraction causes a vertex insertion, but a vertex inser-tion cannot create edges of size below the allowed thresh-old. This is what prevents infinite loops in spite of thealgorithm’s partially conflicting efforts to simultaneouslyavoid short edges and large triangles. To prove this claim,we consider a triangle � � that causes the addition of itsdual restricted Voronoi vertex *+� � .

NO-SHORT-EDGE LEMMA. Every edge * � created dur-ing the addition of * has ratio � /�� ��� /�� � �� .

PROOF. We have � � ��� � � � ��� � � � . The sphere withcenter * that passes through � , � , and has radius� � ��� ��� and contains no other vertices than * in-side. Every new edge * � has therefore length FH* � � F �

� � � � � � ��� . Assume without loss of generality that� � ��� � � � � � . We use the Curvature Variation Lemma toderive upper bounds for the length scales at * and � :

� �* � � � � � � � � � � �� � � � � F�* � � F �� � � � � � �* � � F�* � � F � � �� � � �

� FH* � � F �Hence

� /�� � FH* � � F�

� � � � � � �* � ��� � � � � � �� � �

For� �

� � ��� and � � � � � � we have� �� � � � �

� �� and

therefore � /�� ��� /�� � ��, as claimed.

Scheduling. [Summarize the results on scheduling edgecontractions and vertex insertions described in [5].]

Bibliographic notes. The restricted Delaunay triangula-tion is a generalization of the dual complex of a ball union.It can be used to triangulate surfaces and other spaces em-bedded in a Euclidean space. Besides the dual complexliterature, there are several other partially dependent rootsof the idea, namely the surface meshing method by Chew[3], the neural net work by Martinetz and Schulten [6],the formulation of the closed ball property by Edelsbrun-ner and Shah [4], and the surface reconstruction algorithmby Amenta and Bern [1]. The last of the four papers alsointroduces � -samplings of surfaces, although in a slightlydifferent formulation in which the distance to the medialaxis replaces the length scale.

All results that are specific to skin surfaces are takenfrom [2]. The algorithm in that paper is more general than

46 III SURFACE MESHING

what is explained in this section and maintains the surfacemesh while it moves in space.

[1] N. AMENTA AND M. BERN. Surface reconstruction byVoronoi filtering. Discrete Comput. Geom. 22 (1999), 481–504.

[2] H.-L. CHENG, T. K. DEY, H. EDELSBRUNNER AND J.SULLIVAN. Dynamic skin triangulation. Discrete Comput.Geom. 25 (2001), 525–568.

[3] L. P. CHEW. Guaranteed-quality mesh generation forcurved surfaces. In “Proc. 9th Ann. Sympos. Comput.Geom., 1993”, 274–280.

[4] H. EDELSBRUNNER AND N. R. SHAH. Triangulating topo-logical spaces. Internat. J. Comput. Geom. Appl. 7 (1997),365–378.

[5] H. EDELSBRUNNER AND A. UNGOR. Relaxed schedulingin dynamic skin triangulation. In “Japanese Conf. Comput.Geom., 2002”, to appear.

[6] T. MARTINETZ AND K. SCHULTEN. Topology representingnetworks. Neural Networks 7 (1994), 507–522.

III.4 Skin Software 47

III.4 Skin Software

In this section, we use two pieces of software to visualizethe various geometric concepts introduced earlier in thischapter.

Skin curves. The Morfi software is two-dimensionaland constructs skin curves from finite sets of circles. InFigure III.16 we see seven disks whose union is decom-posed into convex regions by the Voronoi diagram. Su-perimposed on this decomposition is the skin curve withshaded body and the dual complex. Note that the disk

Figure III.16: Voronoi decomposition of disk union with super-imposed skin, body, and dual complex.

union contains the body and the body contains the dualcomplex. Furthermore, the disk union, the body, and thedual complex all have the same homotopy type. This isalways true. The skin shrinks the arcs in the boundary ofthe disk union and smoothly blends between the shrunkenarcs using pieces of hyperbolas and inverted circles. Moststriking is the blending for the quadrangular hole roughlyin the middle of the figure, which is converted into an al-most entirely circular hole in the body.

Mixed complex. Using the Morfi software, we can visu-alize concepts that are difficult if not impossible to showin� �

. An example is the mixed complex illustrated inFigure III.17. It decomposes the skin into circular and hy-perbolic arcs. As explained in Section III.1, it consists ofshrunken Voronoi polygons, rectangles, and shrunken De-launay polygons. The collection of circles generating thediagram in Figure III.17 is degenerate, which can be seenfrom the fact that there are three shrunken Delaunay trian-gles but also two shrunken Delaunay quadrangles. One ofthe quadrangles contains most of the hole in the body. The

Figure III.17: Decomposition of the skin and body by the mixedcomplex.

portion of the hole boundary inside that quadrangle is cir-cular while the portions outside the quadrangle are hyper-bolic. Observe also that the five Delaunay polygons vis-ible within the mixed complex apparently have eight ver-tices (not double-counting the shared ones). We see onlyseven of them in Figure III.16 because one of the eightradii is imaginary. Where is its center in Figure III.16?

Simulated smoothing. We return to an issue left open inSection V.1, where we considered the minimum weightedsquare distance function � � � � �

�of a collection of

circles � . The zero-set of � is the envelope of the cir-cles � � � � � � � ��� , and the preimage of any real value , isthe envelope of the circles � � � � � � �� � , � . Following thenotation in Section II.3, we think of , as time and de-note the collection of circles at time , � � � by � � . InSection V.1 we claimed that there is an infinite family ofsmooth approximations ��� � � � �

�of � that all have

the same critical points, namely the points where duallycorresponding Voronoi and Delaunay polyhedra intersect.We choose � � �

� � � � and construct the family such that� � � � and � � approaches � as � goes to 1. One functionin this family is the trajectory of the skin curve, � ��� � , thatmaps each point * � � � to the moment in time ,;� �

at which * belongs to the skin of � � . We generalize thisconstruction to any �;� �

� � � � by letting ��� be the trajec-tory of the modified skin curves. Specifically, the � -skinis the envelope of the circles in the convex hull that arereduced by a factor � � ,

� �� � � � � � �2�� � � �� � � � � � � � � � � � � � � � � �2�� � �

48 III SURFACE MESHING

Note that � � ��� �� is the skin as defined in Section III.1,

and � � � � is the envelope of the original disks. FigureIII.18 illustrates the construction by showing the modi-fied skins for several values of � . Observe that the bod-

Figure III.18: From inside out the sequence of skins for � �� � � � � � ��� � � � ��� � �

.

ies bounded by the � -skins are nested. As it turns out, theinnermost � -skin, defined for �

�� , is also the envelope

of the orthogonal circles as defined in Section III.1. Thefunction � � � � � � �

maps every point * � � � to the mo-ment in time � � ��* � � , at which * belongs to � �� � � � ,with �

� � , as usual. For �C� � � � � � , the height function� � is differentiable and assuming non-degeneracy of theinput circles, it is twice differentiable at the critical points.This is sufficient to justify the Morse theoretic reasoningabout the non-smooth function � used in Section V.1 todefine pockets.

Meshed skin surfaces. In���

, we compute triangulatedskin surfaces using the Skin Meshing software. It takes asinput a set of spheres � and constructs a mesh by main-taining a triangulation of the set of spheres � � , with thetime , � � � continuously increasing from minus infin-ity to zero. At the beginning, all spheres are imaginary,the skin is the empty surface, and the mesh is the emptycomplex. As time increases, the surface moves and thesoftware updates the mesh accordingly. At time , � � ,we have the mesh of the skin of � . Figure III.19 showsa portion of this mesh for a small molecule. The imageis created by slicing the surface with a plane and remov-ing the front portion of the surface. The complete surfacehas genus one, and the slicing plane is chosen to cut rightthrough the narrow part of the tunnel. The image of themesh in Figure III.19 should be compared with the ren-

Figure III.19: Cut-away view of the mesh of a small moleculeof about forty atoms. Only the edges of the mesh and the cutboundary are shown.

dering of the same surface in Figure III.20. The appar-ent smoothness is an illusion created by Gouraud shading,which is a graphics technique that interpolates betweennormal directions to generate the smooth impression. Notethat highly curved areas detectable in Figure III.20 corre-spond to high density regions in Figure III.19.

Growing the mesh. As mentioned earlier, the mesh isconstructed by maintaining it while growing the spheres.The algorithm thus reduces to executing a sequence of ele-mentary operations. We classify the operations accordingto the adaptation purpose they serve.

Shape adaptation. The growth of the spheres im-plies a deformation of the surface, which is facilitatedby a motion of the mesh vertices in

���. The algo-

rithm moves vertices normal to the surface, along theintegral lines of the skin trajectory, which is � ��� � �� �

��

. We use edge flips to maintain the mesh asthe restricted Delaunay triangulation of the movingvertices.

Curvature adaptation. Recall that the conditions[L] and [U] given in Section III.3 guarantee that themesh adapts its local density to the maximum nor-mal curvature. We use edge contractions to eliminateedges that violate [L] and vertex insertions to elimi-nate triangles that violate [U].

III.4 Skin Software 49

Figure III.20: Smoothly shaded rendering of the mesh in FigureIII.19.

Topology adaptation. There are four types oftopological changes that occur, and they correspondto the four types of generic critical points of three-dimensional Morse functions. A component is bornat a minimum, a handle is created at an index-1 sad-dle, a tunnel is closed at an index-2 saddle, and a voidis filled at a maximum. We use metamorphoses tochange the mesh connectivity accordingly.

Two of the four types of metamorphoses can be seen atwork in Figure III.21. From the first snapshot to the sec-ond, we see two new handles appear. Each handle createsa tunnel in the complement. From the second snapshot tothe third, we see both tunnels disappear again. By closinga tunnel we also remove the handle that forms it. Observethat the surface around a handle is the same as that arounda tunnel, namely a two-sheeted hyperboloid that flips overto a one-sheeted hyperboloid, or vice versa. The only dif-ference is the reversal of inside and outside.

Quantification. The Skin Meshing software comes witha quantification panel that displays parameters used inthe meshing algorithm, provides various measurements ofmesh quality, and indicates the number of operations ex-ecuted during the construction. The two most importantparameters are

�, which controls the numerical approxi-

mation of the surface, and � , which controls the size ofthe angles. The three other parameters shown in the panel

are � , , and � , which control how the metamorphosesare performed. The correctness of the algorithm is guar-anteed only if the inequalities referred to as Conditions (I)to (V) are all satisfied. The software permits other param-eter settings since a violation of the inequalities does notnecessarily imply a failure of the algorithm. In our ex-perience, the software works fine for small violations butbreaks down for moderate ones.

Figure III.22: The quantification panel of the Skin Meshing soft-ware. The quality measures do not include the special edges andtriangles that facilitate topological changes and purposely violatesome of the properties required for the rest of the mesh. [Thispanel needs to be updated to fit the text.]

Figure III.22 shows the panel after the construction of amesh. It displays measurements of mesh quality, includ-ing size versus length scale ratios of edges and trianglesand the angles inside and between triangles. Note that inFigure III.22, the ratios all lie inside the allowed interval,which is � �� � � � �

. As proved in Section III.3, the algo-rithm guarantees that the smallest angle inside any (non-special) triangle in the mesh is larger than � � � � �� 8 . Forthe standard setting of � � � � � � , this is roughly � � � � ��� ,and the smallest angle observed in the mesh is indeed� � � ����� .

Bibliographic notes. The two-dimensional Morfi soft-ware has been developed by Ka-Po (Patrick) Lam, and isdescribed in his master thesis [4]. The software has beenused in [2] to explain two-dimensional skin geometry andits application to deforming two-dimensional shapes intoeach other. The three-dimensional Skin Meshing softwarehas been developed by Ho-Lun Cheng [1, 5]. Computergraphics techniques used in displaying shapes, includingGouraud shading, can be found in [3].

50 III SURFACE MESHING

Figure III.21: Three snap-shots of the deforming triangulation of a molecular skin defined by continuously growing spheres. From leftto center, we note two metamorphoses that each add a handle in the front. From center to right, we note a metamorphosis that closes atunnel on the left.

[1] H.-L. CHENG. Dynamic and Adaptive Surface Meshing un-der Motion. Ph. D. thesis, Dept. Comput. Sci., Univ. Illinois,Urbana, 2001.

[2] S.-W. CHENG, H. EDELSBRUNNER, P. FU AND K. P.LAM. Design and analysis of planar shape deformation. In-ternat. J. Comput. Geom. Appl. 19 (2001), 205–218.

[3] J. FOLEY, A. VAN DAM, S. FEINER AND J. HUGHES.Computer Graphics. Principles and Practice. Second edi-tion, Addison-Wesley, Reading, Massachusetts, 1990.

[4] K. P. LAM. Two-dimensional geometric morphing. Masterthesis, Dept. Comput. Sci., Hong Kong University of Sci-ence and Technology, 1996.

[5] Molecular Skin web-site in the software collection atbiogeometry.duke.edu.

Exercises 51

Exercises

1. Pencils of spheres. Let us extend the concept of acoaxal system of circles to three dimensions. For thispurpose assume � � and � � are two sphere that are bothorthogonal to the spheres � � , � � and � � .

(i) Prove that every affine combination of � � and � �is orthogonal to � � , � � and � � .

(ii) Prove that every affine combination of � � , � �and � � is orthogonal to � � and � � .

(iii) In the light of (i) and (ii), what is the analog ofa coaxal system in

���?

2. Curvature in the plane. Note that the curvature � �� �

�of a molecular skin curve � in

� � is notcontinuous.

(i) Give an example illustrating that � is not con-tinuous.

(ii) Introduce a new function (perhaps similar to � )that is continuous over � .

3. Total curvature. Define the total curvature of a sur-face � as the integral of the maximum principal cur-vature:

� � � / � � � ��* � � * �(i) Calculate � for a sphere � .

(ii) Calculate � for the portion of a double-conewithin a unit-sphere around its apex.

4. Total square curvature. Define the total square cur-vature of a surface � as the integral of the maximumprincipal curvature squared:

� � / � � � � ��* � � * �(i) Calculate for a sphere � .

(ii) Let � be the portion of a hyperboloid of rev-olution within a unit sphere around the apex.Show that goes to infinity as the hyperboloidapproaches its asymptotic double-cone.

(iii) Prove that the number of points in a minimal� -sampling of � (as defined in Section III.3 isproportional to � � � .

5. Something about triangles. Let � �� be a trianglein the plane. We write � for the height of � definedas the distance of � from the closest point on the line

passing through � and . Similarly, we write � and � for the heights of � and . Prove that the radiusof the circumcircle satisfies

� � F � �� F � F � � CF� �

� F � �� F � F � � EF� �

� F � � CF � F � � EF� � �

52 III SURFACE MESHING

Chapter IV

Connectivity

Given a shape or a space, we can ask whether or howit is connected. It might not be immediately obvious whatthis question means, we can draw from precise definitionsdeveloped in topology to answer the question. However,we need to be aware that there are perfectly well-definedand reasonable but different precise notions that corre-spond to the intuitive idea of connectivity. For example,for two spaces � and � to be “connected the same way”,could mean they are topologically equivalent ( ����� ),they are homotopy equivalent ( ����� ), or they have iso-morphic homology groups ( ������� �� ��� ��� ��� . The threenotions are progressively weaker:

��� � � � � ��� � � ������� ��� ��� ��� � �In words, the classification of spaces by homology groupsis coarser than that by homotopy equivalence, which inturn is coarser than that defined by topological equiva-lence. [We should stress that homology in this topologicalcontext has a precise algebraic meaning, which is in sharpcontrast to how the term is used in biology (eg. homologymodeling of proteins), where it indicates a vague notion ofsimilarity.]

Given two triangulated spaces, there is a polynomial-time algorithm that computes and compares their homol-ogy groups. If the groups are not isomorphic then weknow that the two space are different, meaning they areneither homotopy equivalent nor topologically equivalent.However, if their homology groups are isomorphic thenwe still do not know whether the two spaces are the samealso under the two stricter definitions of sameness. In spiteof the apparent weakness, homology is the most importanttool to study connectivity. In this chapter, we focus onalgorithms computing the homology groups of moleculesrepresented by space-filling diagrams. In Section IV.1, weprove that space-filling diagrams are homotopy equivalentto their dual alpha shapes, which implies the two have iso-morphic homology groups. In Section IV.2, we formally

define homology groups and their ranks, the Betti num-bers. In Section IV.3, we describe an incremental algo-rithm for Betti numbers, which is fast but limited to com-plexes in three dimensions. In Section IV.4, we presentthe classic matrix algorithm for Betti numbers, which issignificantly slower but not limited to three-dimensionalspace.

IV.1 Equivalence of SpacesIV.2 Homology GroupsIV.3 Incremental AlgorithmIV.4 Matrix Algorithm

Exercises

53

54 IV CONNECTIVITY

IV.1 Equivalence of Spaces

The space-filling diagram of a molecule is a subset of� �

,and with induced subspace topology it is a topologicalspace. We study the connectivity of this space by con-sidering equivalence classes defined by continuous mapsbetween spaces.

Topological spaces. Recall that a map� � � � � is

continuous if for every � � � there is a� � � such

that if * ��� � � have distance less than�

then the points� �* � � � � � � ��� have distance less than � . To checkwhether or not

�is continuous, we thus have be able to

measure the distance between points in both sets. Accord-ing to a more general definition,

�is continuous if the

preimage of every open set in � is open in � . Here weonly need to distinguish between open and non-open sets.This distinction is the motivation for the following defini-tion. A topological space is a set � together with a system�

of subsets of � such that

(i)� � � and � � � ,

(ii) ��� � � for every subsystem � � � , and

(iii) � � � for every finite subsystem � � � .

The system�

is called the topology of � and the sets in�are the open sets of � . If � � � , we can induce the

subspace topology, which is the system � � � � � � �� � � . The space � together with the system � is atopological subspace of the pair � � � .

To get comfortable with these abstract ideas requires anumber of concrete examples. Here is one. Let � � � �

be the three-dimensional Euclidean space. An open ball isthe set of points at distance less than some � � � from afixed point, and an open set is a union of open balls. Notethat the common intersection of finitely many open setsis again open, but this is not necessarily true for infinitelymany open sets. For example, the common intersectionof the open balls of points at distance less than � � � � �from the origin, for � � ��� � � � � � , is just the origin itself,which is not an open set. We thus see that the restrictionto finite subsystems in condition (iii) is necessary. Thetwo-dimensional sphere, � � � � * � � � � FH*KF � � ,is a subset of

���, and if we choose its intersections with

open sets in� �

as the open sets in its topology, then it is atopological subspace of

���. Another topological subspace

of� �

is the two-dimensional Euclidean plane,� � .

Topological equivalence. Now that we know what atopological space is, we can define when two are the same.A homeomorphism is a bijective map � � � that is con-tinuous and whose inverse is continuous. We write � � �if a homeomorphism exists and say that � and � are home-omorphic, topologically equivalent, and that they have thesame topological type. Note that the identity is a homeo-morphism, the inverse of a homeomorphism is a homeo-morphism, and the composition of two homeomorphismsis a homeomorphism. In other words, being homeomor-phic is reflexive, symmetric and transitive, so � is indeedan equivalence relation for topological spaces.

As suggested by Figure IV.1, there are spaces that havethe same topological type and look vastly different, andthere are spaces that look quite similar and do not have thesame topological type. An interesting example of a pair of

Figure IV.1: The circle on the left is topologically equivalentto the trefoil knot in the middle, but both are not topologicallyequivalent to the annulus on the right.

non-homeomorphic spaces are the sphere and the plane.After embedding both in

� �, we can map points from the

sphere to the plane by stereographic projection from thenorth-pole, � , as illustrated in Figure IV.2. This map be-tween � � � � � and

� � is indeed a homeomorphism, butthere is no homeomorphism between � � and

� � .

N

Figure IV.2: The stereographic projection maps the sphere (mi-nus the north-pole) to the plane. The lower hemisphere maps tothe shaded disk and the upper hemisphere to the complement ofthat disk.

IV.1 Equivalence of Spaces 55

Homotopy equivalence. Next we introduce an equiva-lence relation that is less sensitive to the local dimensionof spaces than topological equivalence. We begin by com-paring maps between the same spaces. Two continuousmaps � ��� � � � � are homotopic if there is a continu-ous map � � �

�� � � � � � with ��* � � � � � �* � and

��* � � � � � �* � , for all *+� � . We write � � � and call a homotopy between � and � . This definition is illustratedin Figure IV.3. We may think of the parameter ,'� �

� � � � as

im h

im k

im H

Figure IV.3: In this example, � and � both map the circle intothree-dimensional space, and � maps the circle times � � � ��� tothe cylinder connecting the two images of the circle.

time and sweep out the image of by the images of the 1 �* � � ��* ��, � . The only requirements has to satisfyis that it starts with � � � , ends with �

� � , and thatit is a map. For example, is not required to be injective,which is the same as saying that the image of may beself-intersecting.

Two spaces � and � are homotopy equivalent if thereare continuous maps

� � � � � and � � � � � such that� � is homotopic to the identity on � and

� � is homo-topic to the identity on � . We write ��� � and say thatthe two spaces have the same homotopy type. Note that� is reflexive, symmetric, and transitive and is therefore

indeed an equivalence relation for topological spaces. It iseasy to show that two topologically equivalent spaces arealso homotopy equivalent. To see that the reverse is nottrue we note that the annulus in Figure IV.1 is homotopyequivalent to the circle, but the two are not topologicallyequivalent.

Deformation retraction. If � is a topological subspaceof � then we may prove that the two spaces are homotopyequivalent by constructing a map that retracts � to � . Adeformation retraction from � to � � � is a continuousmap � � � �

�� � � ��� � with

(i) � ��* � � � � * , for all *+� � ,

(ii) � ��* � � � � � , for all * � � , and

(iii) � � � ��, � � � , for all � � � and all ,&� �� � � � .

Note that � is a homotopy between � � , which is the iden-tity on � , and � � , which maps � to � . As illustrated inFigure IV.4, there is a deformation retraction from the dou-ble annulus to the figure-8 curve, but there is no deforma-tion retraction to the circle. (Why not?)

Figure IV.4: The arrows indicate a deformation retraction fromthe double annulus to the figure-8 curve.

DEFORMATION RETRACTION LEMMA. If � is a defor-mation retraction from � to � then � and � are ho-motopy equivalent.

PROOF. We construct maps� � � � � and ��� � � �

with the required properties. Define� ��* � � � � �* � and

��� � � � � . Then � � � � � is homotopic to the identity on� because � is a homotopy between the two maps. Fur-thermore,

� � is equal to the identity on � and thereforecertainly homotopic to it.

The simplest homotopy type is that of a point. A spaceis contractible if it is homotopy equivalent to a point. Forexample, a disk is contractible but a circle is not. Simi-larly, a ball is contractible but a sphere is not.

Decomposition into joins. We construct a deformationretraction between a union of balls and its dual complexusing a decomposition into joins. In general, a join be-tween two sets � and � in some Euclidean space is theunion of closed line segments that connect points in �with points in � ,

��� � � �/ &� � �� * � �and it is defined iff any two such line segments are eitherdisjoint or meet at a common endpoint. Figure IV.5 usestwo kinds of joins to decompose the difference betweenthe union and the dual complex of a set of disks, namelytriangles and disk sectors. A triangle is the join between a

56 IV CONNECTIVITY

Figure IV.5: The union of disks is decomposed into the underly-ing space of the dual complex and two types of joins connectingthat complex to the boundary of the union.

point and an edge and a sector is the join between a circu-lar arc and a vertex.

Let � be a finite collection of closed balls in� �

. We as-sume general position and construct a deformation retrac-tion from the union, � � � � , to the underlying spaceof the dual complex, � �

�� � ��. Recall that the bound-

ary of � consists of sphere patches separated by circulararcs connecting corners. To be specific, we define a patchas the contribution of the sphere bounding � � � � to theboundary of � . It does not have to be connected or sim-ply connected. Similarly, we define an arc and a corneras the contribution of the intersection of two and of threespheres to the boundary of � . An arc may be a full cir-cle, or any number of intervals along the circle. A cornermay be empty, a point, or a pair of points. The decom-position is constructed by forming the join between everypatch, arc, and corner and its dual vertex, edge, and trian-gle. Figure IV.5 illustrates the construction in the plane.There are four corners that are point pairs, and they corre-spond to the four principal edges of the dual complex. (Asdefined in Section II.4, an edge is principal if it is not faceof any other simplex in the complex. In the Alpha Shapesoftware, such an edge is referred to as singular.) Thereare also four arcs that consist of more than one componenteach, and they correspond to the vertices on the boundaryof the dual complex that are exposed to the outside in morethan one interval of directions.

Shrinking joins. We get a deformation retraction � �� �

�� � � � � � from � � � � to � �

�� � ��by shrink-

ing joins from outside in. Each join is the union of linesegments * � with * on the boundary of � and � on the

boundary of � . We shrink * � by defining� � � ��, � � � � ��, � � � , �for every point � on the line segment * � . A triangle inthe decomposition shrinks from its outer vertex towardsthe opposite edge, which belongs to the dual complex. Itturns into a trapezium whose height decreases and reacheszero at time , � � . A disk sector shrinks from its outer arctowards its center, which is a vertex of the dual complex.It maintains its shape while getting smaller until it reachesthe size of a point. The deformation retraction is obtainedby shrinking all joins simultaneously. It is illustrated inFigure IV.6, which shows the image of the retraction attime , � � � � . Figure IV.7 shows an entire sequence ofshapes during the deformation retraction visualized for themodel of gramicidin also shown in Figure II.3.

Figure IV.6: The decomposition after shrinking the joins halfway to zero.

There is a technical problem at the very beginning ofthe shrinking process that arises already in two dimen-sions. Specifically, the outer vertex of each triangle joinbelongs to more than one line segment and thus retractstowards more than one point of the dual complex. To fi-nesse this difficulty, we choose � � � and move the pointsdifferently in the time interval

�� � � � . In the assumed case

in which � is in general position, this initial motion needsto bridge the non-zero gap between the boundary of � andthe boundary of the image of � at time , � � . By choosing� small, we can make the gap arbitrarily small and easy tobridge.

Bibliographic notes. Homeomorphisms, homotopies,and deformation retractions are covered in most texts ofalgebraic topology, including Seifert and Threlfall [6] andMunkres [5]. Subtleties of the definitions of a topology

IV.1 Equivalence of Spaces 57

Figure IV.7: Six snap-shots of the deformation retraction from the union of balls representation of gramicidin to the dual complex.

and of a topological space are discussed in texts on gen-eral topology, including Kelley [2] and Munkres [4].

The particular deformation retraction used to prove thehomotopy equivalence between a union of balls and itsdual complex is taken from Edelsbrunner [1]. That equiv-alence can also be derived from general theorems aboutcoverings. The Nerve Lemma says that a space is homo-topy equivalent to the nerve of a finite open cover whosesets have either empty or contractible common intersec-tions. We can turn the Voronoi cells of a union of ballsinto such a cover and get the homotopy equivalence re-sult from that lemma. The history of the Nerve Lemma iscomplicated because different versions have been discov-ered independently by different people. Maybe the paperby Leray [3] is the first publication on that topic.

[1] H. EDELSBRUNNER. The union of balls and its dual shape.Discrete Comput. Geom. 13 (1995), 415–440.

[2] J. E. KELLEY. General Topology. Springer-Verlag, NewYork, 1955.

[3] J. LERAY. Sur la forme des espaces topologiques et sur

les points fixes des representations. J. Math. Pure Appl. 24(1945), 95–167.

[4] J. R. MUNKRES. Topology. A First Course. Prentice Hall,Englewood Cliffs, New Jersey, 1975.

[5] J. R. MUNKRES. Elements of Algebraic Topology. Addi-son-Wesley, Redwood City, 1984.

[6] H. SEIFERT AND W. THRELFALL. A Textbook of Topology.Academic Press, San Diego, California, 1980.

58 IV CONNECTIVITY

IV.2 Homology Groups

This section introduces homology groups as an algebraicmeans to characterize the connectivity of a topologicalspace. To keep the discussion reasonably elementary, werestrict it to triangulated spaces and to addition modulo 2.

Triangulations. In the preceding chapters, we havetalked about triangulations in an intuitive geometric sense.In topology, the term has a precise meaning, which wenow develop. A simplex is the convex hull of an affinelyindependent point set, � � �2�� � . If � has cardinality� � � then � has dimension � ��� � � � and is also referredto as a � -simplex. A face of � is the convex hull of asubset

� � � , and we write � � . Since � has � � � � sub-sets, � has the same number of faces, including the emptyset and � as its two improper faces. A simplicial complexis a finite collection

�of simplices with pairwise proper

intersections that is closed under the face relation, that is,

(i) if � � � and � � then � � , and

(ii) if � ��� � � � then � � � � is either empty or a face ofboth.

Recall that the underlying space of�

is the union of allsimplices,

�� � �� � � � . A simplicial complex can beused to represent a topological space, and we have seenan example in Section II.3, where the dual complex of aspace-filling diagram was used to represent a molecule.We proved in Section IV.1 that the underlying space ofthe dual complex is homotopy equivalent to the space-filling diagram. A topologically more accurate represen-tation would have a homeomorphic underlying space. Wethus define a triangulation of a topological space � as asimplicial complex

�whose underlying space is topolog-

ically equivalent,�� � ��

� � . The remainder of this sectionintroduces the algebraic concepts we will use to define ho-mology groups of triangulated spaces.

Abelian groups. A group is a set � together with an as-sociative operation

� ��� ��� ��� for which there is azero and an inverse for every group element. The group isabelian if the operation is commutative. Examples are theinfinite group of integers with addition, � � � � �

, and the fi-nite cyclic group of � elements, � � � � �

mod � � . A subset����� forms a subgroup if � � � � �

is a group.

Suppose ��� � � �is abelian and � � � � �

is a subgroup. Wehave �+� � , and because �

�� � implies * � ��� * � � ,

there is a bijection between � and each coset * � � �

� * � � � � � � . The quotient � divided by � , denoted as��� , is the collection of cosets. Addition in the quotient

group is defined by ��* � � � � � � � � � � �* � �� �

� . We note that it does not matter which representativeswe choose in computing the sum of the two cosets. Theresulting coset is always the same, so addition is indeedwell defined. Observe that ��� * � � implies � � � �

y+

H

H

H

H

G

x+y+

x+

0

Figure IV.8: Partition of � into cosets defined by � for the casein which � contains a quarter of the elements.* � �� � � � * � � . So if � � * � � and � � � � � then* � � � � � � . In words, two cosets are either disjoint orthe same. If � is finite this implies that all cosets have thesame cardinality and �� ���� � � � �� ������� � ��� � � .

A homomorphism between groups � and � is a function� ��� � � that commutes with addition, � �* � � � �� �* � � � � � � . The kernel of � is the subset of � whoseelements map to � � � , and the image is the subset of �whose elements have preimages in � :

� � � � � � * � � � � �* � � � � � ����� � � � � � � � �$*+� � with � ��* � � � �

An isomorphism is a bijective homomorphism. Its kernelis the zero element of � and its image is the entire � .

Chain complex. Let�

be a simplicial complex. Weconstruct groups by defining what it means to add sets ofsimplices. Call a set of � -simplices a � -chain. By defini-tion, the sum of two � -chains is the symmetric differenceof the two sets,

� � � � � � � � � � � � � � � �This is like adding modulo 2 where � � � � � , since achain belongs to � � �

iff it belongs to neither or to bothchains. � � is the set of � -chains and ��� � � � �

is the groupof � -chains. The zero of this chain group is the emptyset. We connect chain groups of different dimensions by

IV.2 Homology Groups 59

homomorphisms that map chains to their boundary. Forthis purpose we define � � � � � �

�� � � � � � � � �

� . The boundary of a chain is the sum of boundaries of itssimplices, � � � � � �� � � . Observe that the boundary ofthe sum of two chains is the sum of their boundaries, � � � �� � � � � � � � . This assumes of course that � and

�have the

same dimension, else � � �would not be defined. We thus

have a boundary homomorphism � � � � ��� � ��� � � � ,for every � . The sequence of chain groups connected byboundary homomorphisms is the chain complex of

�,

� � � ����� 8� � � � � �������� � � � �� � � � � ������ � � �

Figure IV.9 illustrates the sequence but contains informa-tion about subgroups that will be introduced shortly.

Cycles and boundaries. There are two types of chainsthat are particularly important to us: the ones withoutboundary and the ones that bound. A � -cycle is a � -chain� with � � � � . The set of � -cycles is the kernel of the � -th boundary homomorphism, � � � � � ��� � . Two � -cyclesadd up to another � -cycle, which implies that � � � � � �

isa subgroup of ��� � � � �

. A � -boundary is a � -chain � forwhich there exists a � � � � � -chain

�with � � � � . The set

of � -boundaries is the image of the � � � � � -st boundaryhomomorphism, � � � � ��� � � � . Two � -boundaries addup to another � -boundary, which implies that ��� � � � �

is asubgroup of ��� � � � �

. We prove that ��� � � � �is a subgroup

of � � � � � �. Equivalently, the boundary of every boundary

is empty.

FUNDAMENTAL LEMMA OF HOMOLOGY. ��� � � � .

PROOF. Note that ��� � � � for every � � � � � -simplex � .This is because every � � � � � -simplex belongs to exactlytwo � -simplices. The rest follows because taking bound-ary commutes with adding:

��� � � � � � �

� � ��

� ���� � �

which is the empty set, as required.

We can therefore draw the relationship between the setsof chains, cycles, and boundaries as sketched in FigureIV.9.

Homology groups. The � -th homology group is the quo-tient of the � -th cycle group divided by the � -th boundary

k+1 k −1kk+2

+1kB

C

Z

k

k

BBk

Z

−1

Z+1k

0

+1kC

k

kC −1

k−1

0 0

Figure IV.9: The chain complex and the groups of cycles andboundaries contained in the chain groups.

group, � � � � � � � � . If � � � � � then � � is the trivialgroup consisting only of one element. The size of � � is ameasure of how many � -cycles are not � -boundaries. Thecosets are the elements of � � and are referred to as homol-ogy classes.

As an example consider a triangulated torus, assketched in Figure IV.10. All 0-chains are 0-cycles andhalf of them are 0-boundaries, namely the ones with evencardinality. Hence � � � � � � � � � � � . The two non-bounding 1-cycles labeled 4 and � generate a first homol-ogy group of four elements, as shown in Figure IV.10. Itis isomorphic to � �

� � � , which is the group of elements� � � � � �� � � � � � � ��� � � �� ��� � � with component-wise additionmodulo 2. There is only one non-empty 2-cycle, � �

� � � ,and no non-empty 2-boundary, � �

� �� . Hence � �

� ��� �� � � .

b

a

0 a b a+b

a+ba

b0

0

a+b

a+b

a+b

a+b

0

ba

a

0

0

ab

b

b

a

Figure IV.10: The curves � and � represent the homology classes� ��� � and � ��� � , which generate the homology group � � .

An important property of homology groups is that theyare the same for triangulations of homeomorphic and ofhomotopy equivalent spaces. In particular, we get thesame homology groups for different triangulations of atopological space. Similarly, the homology groups of (anytriangulation of) a union of balls are the same as the ho-mology groups of the dual complex. In other words, thehomology groups are properties of the space and not arti-facts of the complexes used to represent that space. Prov-ing that this is really the case is beyond the scope of thisbook.

60 IV CONNECTIVITY

Betti numbers. The most useful aspects of homologygroups are their ranks, which have intuitive interpretationsin terms of the connectivity of the space. The concept ofa rank applies equally well to chain, cycle, boundary andhomology groups. All these groups are idempotent, thatis, * � * � � for every * . Given a subset � of such agroup � , we can form all sums of elements in � and thusgenerate a subgroup. This operation can also be expressedin the terminology of linear algebra, where the subgroupis knows as the linear hull,

� �� � , consisting of all ��� � � � ,with � � � � and � � � �

� � � . This subset � is a basis ifit is minimal and generates the entire group,

� � � � � .Even though there is no unique basis, all bases have thesame size, and because � is idempotent, that size is thebinary logarithm of the number of group elements. Bydefinition, the rank of � is the size of a basis: � � ��� �� ��� � � � � ��� � �� ����� . If the group is the � -th homologygroup of a space, � � � � , the rank is known as the � -thBetti number of that space: � � � � � � � � . Since � � �� � � � � we have

� � � � � � � � � � � � � � � � � �Revisiting the example above, we see that the Betti num-bers of the torus are � � � � , � �

�� and � �

� � . Thehomology groups of dimensions �

��� � ����� are all trivial

and the corresponding Betti numbers are all zero. For theclosed disk we have � � � � � , � �

� � � and � �� � �

and therefore � � � � , � ��� and � �

�� . Similarly for

the two-dimensional sphere we have � � � � , � ��� and

� �� � . As for the torus, all other Betti numbers vanish.

In general, the 0-th Betti number is the number of con-nected components. To see this remember that a 0-cycle� � � � bounds iff it contains an even number of vertices ineach component. Note also that exactly half of the subsetsof a finite set have even cardinality. If there are � compo-nents and � � � � � � � � � � � � � � vertices then � ��� � � � ��

�and � ��� � � � � �

�� � � � �

� 8 � � � � � ��� � ���� � � �

���

.It follows that � � � � � � � � � ���� � � � � � . Similar to� � , the 1-st and 2-nd Betti numbers have intuitive interpre-tations as the number of independent non-bounding loopsand the number of independent non-bounding shells.

Euler characteristic. Consider a simplicial complexand let � � be the number of its � -simplices. By defi-nition, the Euler characteristic is the alternating sum ofthese numbers: � � � ��� � � � � � � � � . We show that � isalso the alternating sum of Betti numbers. Note that if� ��� � � is a homomorphism, then the rank of � isequal to the sum of ranks of the kernel and the image.

Since � � � � � � � � � � is a homomorphism, � � � � �� � � ,and � � � � � ����� � , we have

� � � � � � ���� � � � � � � � � � � � �Using corresponding lowercase letters for ranks, werewrite this relation as � � � � � � � � � � . Earlier we derived� � � � � � � � . The number of � -simplices in the complexis also the rank of the chain group, � � � � � , hence

� � � � �� � � �

� � � �� � � � � � � � � � �

� � � �� � � � � � � � �

� � � � � � � � �We state this result because it is important and so we canuse it for later reference.

EULER-POINCARE THEOREM. � � � ��� � � � � � � � � .

This relation can often be used to quickly find the Eulercharacteristic of a space without constructing a triangula-tion and counting simplices. For example, the closed diskhas one component, no non-bounding loop, no shell, andtherefore � � � � � � �

� � . Similarly, the Euler charac-teristic of the two-dimensional sphere is � � � � � � � � �and that of the torus is � � � � � � � � � . Note that thisimplies that the disk, the sphere and the torus are pairwisenon-homeomorphic. This is hardly surprising but not easyto prove with elementary means. Indeed, two spaces withdifferent Euler characteristics have homology groups thatare different in at least one dimension. In this case, thespaces are neither homotopy equivalent nor topologicallyequivalent.

Bibliographic notes. Homology groups have been de-veloped at the end of the nineteenth and the beginning ofthe twentieth centuries. The French mathematician HenriPoincar e is usually credited with the conception of the idea[4]. He named the ranks of the homology groups after theEnglish mathematician Betti, who introduced a slightlydifferent version of the numbers years earlier. The begin-ning of the twentieth century witnessed parallel develop-ments of homology groups that differed in the elementsthey added (simplices, cubes, general cells, ...) and the co-efficient groups they used ( � � , � , � ,

�, ...). Eventually, all

this work was unified by axiomizing the assumptions un-der which homology groups exist [1]. Today, homologyis a general method within algebraic topology. We refer

IV.2 Homology Groups 61

to Giblin [2] for an intuitive introduction to that area andto Munkres [3] and Rotman [5] for more comprehensivesources.

[1] S. EILENBERG AND N. STEENROD. Foundations of Alge-braic Topology. Princeton Univ. Press, New Jersey, 1952.

[2] P. J. GIBLIN. Graphs, Surfaces and Homology. Chapmanand Hall, London, 1981.

[3] J. R. MUNKRES. Elements of Algebraic Topology. Addi-son-Wesley, Redwood City, 1984.

[4] H. POINCARE. Complement a l’analysis situs. Rendicontidel Circolo Matematico di Palermo 13 (1899), 285–343.

[5] J. J. ROTMAN. An Introduction to Algebraic Topology.Springer-Verlag, New York, 1988.

62 IV CONNECTIVITY

IV.3 Incremental Algorithm

The Betti numbers of a simplicial complex can be com-puted incrementally, by adding one simplex at a time.In this section, we describe the details of this algorithm,which is particularly well-suited for filtrations.

Adding a simplex. We analyze what happens to theBetti numbers when we add a simplex � to a complex

�.

Let �� �

�� � and assume that all proper faces of �

belong to�

, so � is also a complex. By observing how �fits into

�, we can determine the Betti numbers of � from

those of�

. In the case analysis, we mention only the Bettinumbers that change.

Case � is a vertex. Being a vertex, � cannot connect to�and thus forms a component by itself. Therefore,

� � ��� � � � � � � � � � .Case � is an edge. There are two sub-cases depending on

whether the endpoints of � belong to the same com-ponent or to two different components. Both casesare illustrated in Figure IV.11. In the first case, wehave � � ���

� � � � �� � � � , and in the second case

� � ��� � � � � � � �� � .

u v u v

Figure IV.11: The edge � ��� closes a loop on the left andconnects two components on the right.

Case � is a triangle. Again we have two sub-cases, bothillustrated in Figure IV.12. If � completes a 2-cyclethen � � ���

� � � � �� � � � . Otherwise, � closes a

tunnel and we have � � ���� � � � �

� �� � .

σσj j

Figure IV.12: To the left, the triangle completes a surface, whileto the right, it just closes a tunnel formed by the surface holes.

Case � is a tetrahedron. Assuming�

is a complex in� �

, it cannot have any 3-cycle. Adding � can there-fore only turn a non-bounding 2-cycle (its boundary)into a 2-boundary. Hence, � � ���

� � � � �� �

� � .

Observe that the four cases follow one and the same rule:if � belongs to a non-bounding cycle in � then we in-crement the Betti number of the dimension of � and,otherwise, we decrement the Betti number of dimensionone less than that of � . This is justified by the equa-tion � � � � � � � � � � developed in Section IV.2: addinga � -simplex always increments the rank of the � -th chaingroup, and it does this by either incrementing the rank ofthe � -th cycle group or that of the � � � �

�-st boundary

group.

Algorithm. To compute the Betti numbers of a complex,we form a filtration that ends with that complex:

� � � � � � ��

� � �� � � � �

All� � are complexes, and it is convenient to assume that

any two contiguous complexes differ by only one simplex:� � ��� � � � � � � � . For example, we may sort the sim-plices in non-decreasing order of dimension and take allprefixes of that sequence. Alternatively, we may use thefiltration of a Delaunay triangulation introduced in Sec-tion II.3. In the latter case, the filtration contains all alphacomplexes and we get the Betti number of all of them inone sweep. The algorithm is but a simple scan along thefiltration.

integer�

BETTI:� � � � �

� � ��� ;

for � � � to � do � � � ��� � � ;if � � belongs to a � -cycle in

� � then � � ++else � � � � --

endifendfor;return � � � � � � � � �

�.

The only difficult part of the algorithm is deciding whetheror not � � belongs to a � -cycle. We study this problem afterillustrating the algorithm for a small example.

Betti numbers of the dunce cap. The dunce cap is bestcreated from a triangular piece of soft cloth. As illustratedin Figure IV.13, all three sides are equally long and areglued to each other with matching orientations. To runour algorithm, we need a triangulation of the dunce cap.It is not difficult to construct one, but we have to avoidpitfalls such as creating edges that share more than oneendpoint and triangles that share more than one edge. Avalid triangulation is shown in Figure IV.14. When werun our algorithm, we first add all vertices, then all edges,

IV.3 Incremental Algorithm 63

Figure IV.13: In the first step, we glue two sides of the triangle,thus forming a cone with a seam. In the second step, we glue theseam along the rim of the cone (not shown).

49

A

D

CB

8 5

67

1

3 3

22

11 32

Figure IV.14: A triangulation of the dunce cap.

and finally all triangles. After adding the thirteen vertices,we have � � � � � , � �

�� and � �

�� . The evolution

of Betti numbers while adding the edges in lexicographicorder is shown in Table IV.1. There are 27 triangles in the

12 13 16 17 19 1A 1C 1D 23 25���12 11 10 9 8 7 6 5 5 4�

� 0 0 0 0 0 0 0 0 1 1

28 29 2A 2B 2D 35 36 37 38 3B� �3 3 3 2 2 2 2 2 2 2�

� 1 2 3 3 4 5 6 7 8 9

3C 45 46 47 48 49 4A 4B 4C 4D���2 1 1 1 1 1 1 1 1 1�

� 10 10 11 12 13 14 15 16 17 18

56 5D 67 78 89 9A AB BC CD� �1 1 1 1 1 1 1 1 1�

� 19 20 21 22 23 24 25 26 27

Table IV.1: Evolution of ��� and � � while adding the edges of thetriangulation in Figure IV.14.

triangulation, each closing a tunnel and thus decrementing� � . Indeed, no collection of triangles has zero boundary,which can be proved by observing that three edges belongto three triangles each and all other edges belong to twotriangles each. The final result is therefore � � � � and� �� � �

�� . Indeed, the dunce cap is connected, all

its closed curves bound, and the surface formed by thetriangles does not enclose any volume in

� �.

Classifying vertices and edges. We now return to theproblem of deciding whether the addition of a simplex in-creases the rank of a cycle group or that of a boundarygroup. In the former case, we say the simplex creates, andin the latter case it destroys. All vertices create, but edgescan create or destroy. For example, the edge � � in Fig-ure IV.11 creates on the left and destroys on the right. Todistinguish between the two cases, we maintain the com-ponents of the complex throughout the filtration using aunion-find data structure, which represents a system ofpairwise disjoint sets: the elements are the vertices andthe sets are components of the complex at any momentin time. The data structure supports three types of opera-tions:

FIND � � � � return the set that contains vertex � .

UNION � � � � � substitute��

for the sets

and�

inthe system.

ADD � � � � add�� as a new singleton set to the system.

The algorithm scans the filtration from left to right andclassifies each vertex and each edge as either creating ordestroying:

for � � � to � docase � � is a vertex � :� � creates; ADD � � � ;

case � � is an edge � � : �FIND � � � ; � � FIND � � � ;

if � �

then � � createselse � � destroys; UNION � � � �

endifendfor.

Standard implementations of the union-find data structuretake barely more than constant time per operation. Tobe more precise, let

� � � �be the extremely fast growing

Ackermann function. Its inverse is extremely slow grow-ing. To get a faint idea of how slow the inverse grows,we note that

�� � � � �

cannot be bounded from above byany constant, but

�� � � � � � � unless � is larger than

the estimated number of electrons in the universe. Anysequence of � operations takes time at most proportionalto �

�� � � � �

. For all practical purposes, this means thateach operation takes only constant time.

Classifying triangles and tetrahedra. In three-dimen-sional Euclidean space, every tetrahedron destroys but tri-angles can destroy or create. Deciding whether or not atriangle belongs to a cycle is not quite as straightforward

64 IV CONNECTIVITY

as it is for an edge. However, with an extra assumptionon the filtration, we can use the dual graph of the com-plement to classify triangles and tetrahedra the same wayas we classified edges and vertices. The most convenientversion of this assumption is that the last complex in thefiltration,

� �, is a triangulation of � � . Think of � � as the

one-point compactification of� �

. Given a Delaunay tri-angulation in

���, we can construct such a triangulation by

adding a dummy vertex � and connecting it to all bound-ary simplices of the Delaunay triangulation.

In� �

and also in � � , every closed surface bounds a vol-ume. In other words, a triangle � � completes a 2-cycleiff it decomposes a component of the complement intotwo. We keep track of the connectivity of the complementthrough its dual graph, whose nodes are the tetrahedra andwhose arcs are the triangles. Figure IV.15 illustrates thisconstruction in two dimensions. Adding a triangle to the

Figure IV.15: A subcomplex of the Delaunay triangulation andthe dual graph of the complement. The region outside the Delau-nay triangulation is represented by a single node.

complex effectively removes an arc from the dual graphof the complement. Deciding whether removing an arcsplits a component is more difficult than deciding whetheradding an arc connects two components. We thereforescan the filtration backward, from right to left:

for � � � downto � docase � � is a tetrahedron:� � destroys, unless � � � , in which case it creates;ADD � � � � ;

case � � is a triangle:let � and be the tetrahedra that share � � ;� � FIND � � � ; ��� FIND � � ;if � � � then � � destroys

else � � creates; UNION � ��� � �endif

endfor.

The algorithm requires that each triangle is shared by two

tetrahedra, but this is exactly what compactification doesfor us when it adds tetrahedra outside the boundary tri-angles of the Delaunay triangulation. The running timefor classifying all triangles and tetrahedra is again propor-tional to �

�� � � � �

.

Summary. The entire algorithm consists of three passesover the filtration:

1. a forward pass to classify all vertices and edges,

2. a backward pass to classify all triangles and tetrahe-dra,

3. a forward pass to compute the Betti numbers.

Figure IV.16 illustrates the result of the algorithm. In thefirst two passes, we maintain a union-find data structure,which takes time proportional to �

�� � � � �

. The thirdpass does only a constant amount of work per step, namelyincrementing or decrementing a counter. The total runningtime is therefore at most proportional to �

�� � � � �

.

Figure IV.16: The evolution of the Betti number � � (the num-ber of tunnels) in the filtration of gramicidin, which is shown inFigures II.3 and II.15.

Bibliographic notes. The incremental algorithm forcomputing Betti numbers described in this section is takenfrom [2]. It exploits the fact that the connectivity ofthe complex determines the connectivity of the comple-ment. This relation is a manifestation of Alexander dual-ity, which is studied in algebraic topology [3, Chapter 3].This algorithm has been implemented as part of the Al-pha Shape software, which computes the Betti numbers of

IV.3 Incremental Algorithm 65

typically thousands of complexes in the filtration of a pro-tein structure in less than a second. The key to achievingthis performance is a fast implementation of the union-finddata structure, namely one with running time proportionalto �

�� � � � �

for � operations. The details of such animplementation can be found in most algorithm texts, in-cluding [1, Chapter 22]. A proof that the running timecannot be improved from �

�� � � � �

to � has been givenby Tarjan [4].

[1] T. H. CORMEN, C. E. LEISERSON AND R. L. RIVEST.Introduction to Algorithms. MIT Press, Cambridge, Mas-sachusetts, 1990.

[2] C. J. A. DELFINADO AND H. EDELSBRUNNER. An incre-mental algorithm for Betti numbers of simplicial complexeson the 3-sphere. Comput. Aided Geom. Design 12 (1995),771–784.

[3] A. HATCHER. Algebraic Topology. Cambridge Univ. Press,England, 2002.

[4] R. E. TARJAN. A class of algorithms which require nonlin-ear time to maintain disjoint sets. J. Comput. System Sci. 18(1979), 110–127.

66 IV CONNECTIVITY

IV.4 Matrix Algorithm

In this section, we develop the linear algebra view of ho-mology and formulate a matrix algorithm for computingBetti numbers. After explaining the algorithm both foraddition modulo two, we extend it to integer addition.

Incidence matrices. Let�

be a simplicial complexwith � -simplices � � and � � � � �

�-simplices � � . The

� -th incidence matrix is

� � �

������ � � � � � � � � � � �� � � � � � � � � � � �...

.... . .

...� � � � � � � � � � � �

������ �

where � �!� � � iff � � is a face of � � . Using this notation,we can write the � -th boundary homomorphism in matrixform:

� � � � � � ��� � � � �!� � � �

Recall that the � � form a basis of the � -th chain group,� � , and similarly the � � form a basis of � � � � . The aboveformula thus expresses the boundary of every basis ele-ment of � � as a sum of basis elements of � � � � . To makethis interpretation of the incidence matrix useful for com-puting Betti numbers, we need to consider more generalbases. These can be generated by performing elementaryrow and column operations:

� exchange row�

with row�;

� add row�

to row�;

� exchange column � with column � ;� add column � to column � .

Exchanging two rows or columns is equivalent to re-indexing the � � or � � . As illustrated in Figure IV.17,adding row

�to row � has the effect of replacing � � by

� � � � � . Adding column � to column � has the effect ofreplacing � � by � � � � � . (Since we deal with idempo-tent groups, subtraction is the same as addition.) Note thatthe effect is not symmetric: the basis of � � changes atthe modified row, while the basis of � � � � changes at themodifying column.

Normal form algorithm. After a few elementary rowand column operations, � � is no longer the � -th incidence

g g +gr r i

gi

hss

+

jh h

+

−hj

Figure IV.17: The effect of elementary row and column opera-tions on the bases of �� and ��� � .matrix, but it is still describes a correspondence betweenbases of � � and � � � � . The matrix is in normal form ifits non-zero entries are lined up along an initial segmentof the main diagonal, as illustrated in Figure IV.18. Wecan use Gaussian elimination to transform the incidencematrix into normal form.

for� � � to � � � �� � do

if NONZERO � � �: �� � �then

forall rows� � � � do

if � � � � � then row� �

row� �

row�endif

endfor;forall columns

� � � � � doif � � � � � then col �

�col � �

col�endif

endforendif

endfor.

The algorithm uses a boolean function NONZERO thatmakes sure that during the

�-th iteration the

�-th diagonal

entry, � � � , is non-zero. It does this by exchanging rowsand columns. The function fails to make � � � non-zero iffall entries in the remaining sub-matrix are zero.

boolean NONZERO � � �: �� � �:

while � � � � � and� � � � � � �� � do

assume w.l.o.g. that � � ;if col

� �� then col

� � col � ; --

else find� � �

with � � � � � ;row

� � row

�endif

endwhile;return � � � � � .

We use the phrase “assume without loss of generality”as a short-form for expressing that there is another case,namely � � , that can be handled symmetrically. The al-

IV.4 Matrix Algorithm 67

gorithm consists of three nested loops. Letting � � �� ,

the running time is therefore at most proportional to � � .Deriving the Betti numbers. Suppose we have trans-formed all incidence matrices of

�into normal form.

As illustrated in Figure IV.18, the � -th matrix has � �rows and � � � � columns. The zero-rows correspond to� -cycles, of which we have � � many. It follows that thenumber of non-zero entries along the main diagonal is� � � � � � � � � � . The � -th Betti number is the rank of

bk−1 ck−11

c

−1k

k

1

zk

b

1

Figure IV.18: The normal form of the � -th incidence matrix.

the � -th cycle group minus the rank of the � -th boundarygroup: � � � � � � � � � � � � � � � � � � � . We can thus derivethe Betti numbers from the sizes and numbers of non-zeroentries in the normal form matrices.

We note that the ranks of the incidence matrices sufficefor computing the Betti numbers and it is not necessary togo all the way to normal form. Either way, the runningtime of the algorithm is cubic in the number of simplicesin the complex.

Integer coefficients. The matrix algorithm can be ex-tended to coefficients in � instead of � � . Before dis-cussing the necessary modifications, we talk about whatthis means in terms of adding simplices and chains. Westart at the beginning.

An ordered � -simplex is an ordering of the � � � verticesof a � -simplex, and we write � �

��� � � � � � � � � � � � . Two

ordered simplices have the same orientation if their order-ings differ by an even number of transpositions. Each sim-plex has two orientations, except if it is a vertex, in whichcase it has only one. To set the stage, we give each simplexin�

an arbitrary but fixed orientation, and for a given ori-ented simplex � , we write � � for the other orientation ofthe otherwise same simplex. A � -chain is a function fromthe � -simplices to the integers. It is convenient to write

this function as a formal polynomial:

� � 4 � � � � 4 � � � � � � � � 4 � � � �where 4 � � � is the function value of � � . We add two � -chains componentwise, by adding the coefficients of likesimplices:

� � � � 4 � � � � � � � �� ��4 � � � � � � � �

By definition, the boundary of � ���� � � � � � � � � � � � is the

alternating sum of ordered � � � ��-simplices obtained by

dropping one vertex at a time:

� � � ��� � � � � � � � � � � � � � ����� � � � � � � � � ���

where the hat marks the deleted vertex. We can check thatthe boundary is independent of the ordering, as long as itbelongs to the same orientation, and that it is the nega-tive boundary for an ordering of the opposite orientation:� � � � � � � � � . Similarly, we can check that the Funda-mental Lemma of Homology still holds: � � � � � . Asbefore, we define the group of � -chains, � � , the groupof � -cycles, � � , and the group of � -boundaries, � � . The� -th homology group is again � � � � � � � � , and the� -th Betti number is the rank of that homology group:� � � ���� � � � .

Torsion. A curious new phenomenon that arises with theuse of integer addition is algebraic torsion. It does not oc-cur for spaces that can be embedded in

� �, so it is not part

of people’s immediate experience. Maybe the simplesttopological space whose homology groups have torsion isthe Klein bottle. It can be constructed from a rectangular

1 4 5 1

2

3

1541

2

3

Figure IV.19: A triangulated rectangular piece of paper glued toform a Klein bottle.

piece of paper by gluing opposite sides as shown in Figure

68 IV CONNECTIVITY

IV.19. Since it has torsion, we know that the Klein bot-tle cannot be embedded in

���, and when we draw it, we

have to allow for a self-intersection. The 1-cycle markedaround the neck of the bottle does not bound, but twicethat 1-cycle bounds. This is what causes torsion. To de-scribe the phenomenon more generally, we need the factthat every finitely generated abelian group is isomorphicto a direct sum (Cartesian product) of copies of � and ofcyclic groups:

� � � � � � � � �� ��� ��� � � � � � � 8 � � � � � � ��� �

Furthermore, we may require that all� � are larger than one

and that� � divides

� ��� � for each � . This extra conditionfixes � and the indices

� � . The abelian group is thus thedirect sum of a free subgroup, namely �

�, and the rest,

namely � � � � � � � � � ��� , which is referred to as its torsionsubgroup. The

� � are the torsion coefficients. The rank ofthe group is the number of copies of � , which is � . Forthe Klein bottle, we have � � � � � , � �

� � �� � � and

� �� � � for addition modulo 2 and � � � � , � �

� � � � �and � �

� � for integer addition. We thus get differentBetti numbers for addition modulo 2 and for integer addi-tion, but their alternating sums are both equal to the Eulercharacteristic: � � � � � � � � � � �

�� . Indeed, the

Euler-Poincar e Theorem is true independent of the typeof coefficients we choose to define homology groups andBetti numbers.

Algorithm revisited. The normal form of a bases tran-sition matrix is the same as before, except that we nowallow entries in the main diagonal that are neither zeronor one. Specifically, the initial sequence of ones is fol-lowed by integers

�� ��� � � � � �

���, all larger than one, such

that� � divides

� ��� � , for each � . We modify the abovealgorithm to transform the incidence matrix into normalform. First we extend the elementary row and column op-erations by allowing the multiplication of entire rows orcolumns by non-zero integers. A more substantial mod-ification is needed within the function NONZERO, whichnow attempts to turn the next diagonal entry, � � � , into thesmallest positive entry achievable by row and column op-erations. Unless the entire remaining sub-matrix is zero,this attempt will be successful and � � � will divide everyentry in the sub-matrix. To see this property, assume thereis an entry � � � , with

� � � � � , that is not an integer multipleof � � � :

� � � � � � � � �...

. . ....

� � � � � � � � ���

If� � �

we get a positive integer smaller than � � � in a sin-gle column operation. Symmetrically, if �

� �we get such

a positive integer in a single row operation. Otherwise,we may assume that � � � divides both � � � and � � � , and wecan make � � � zero with a row operation. By adding row�

to row�

we keep � � � unchanged and we change � � � to� � � � � � � , which is not an integer multiple of � � � . Now weget a positive integer smaller than � � � in a single columnoperation, as before. Since � � � divides every entry in theremaining sub-matrix, it will also divide the future non-zero diagonal entries. Hence, the algorithm generates thetorsion coefficients with the required properties.

The running time of the algorithm is no longer guaran-teed to be at most cubic in the number of simplices. In-deed, the sequence of operations is sensitive to the sizeof the integers that arise, and it is not even clear whetheror not it is polynomial in the input size. As for � � coef-ficients, we can determine the homology groups directlyfrom the normal forms of all incidence matrices. We getthe rank of the � -th homology group from the � -th and the� � � � � -st normal form matrices: � � � � � ��� � � � � � � .We get the torsion coefficients from the � � � � � -st normalform matrix: they are the diagonal entries that exceed one.

Bibliographic notes. The matrix algorithm presented inthis section is taken from [2, Chapter 1]. The normal formit uses is sometimes referred to as the Smith normal form[3], and similarly, the algorithm is sometimes called theSmith normal form algorithm. For integer coefficients, itis unclear whether or not its running time is polynomialin the input size. However, it is possible to modify the al-gorithm to guarantee polynomial running time [1, 4]. TheBetti numbers obtained for � and � � (or other coefficientgroups) are not necessarily the same, but their differencesare predictable and described by the Universal CoefficientTheorem of Homology [2, Chapter 7].

[1] R. KANNAN AND A. BACHEM. Polynomial algorithms forcomputing the Smith and Hermite normal forms of an inte-ger matrix. SIAM J. Comput. 8 (1979), 499–507.

[2] J. R. MUNKRES. Elements of Algebraic Topology. Addi-son-Wesley, Redwood City, California, 1984.

[3] H. J. SMITH. On systems of indeterminate equations andcongruences. Philos. Trans. 151 (1861), 293–326.

[4] A. STORJOHANN. Near optimal algorithm for computingSmith normal forms of integer matrices. In “Proc. Internat.Sympos. Symbol. Algebraic Comput., 1997”, 267–274.

Exercises 69

Exercises

1. Equivalence classes. Consider the following topo-logical spaces: a circle, a trefoil knot, a M obius strip,a sphere with north-pole and south-pole removed,and a plane with origin removed.

(i) Partition the collection into classes of sametopological type.

(ii) Partition the collection into classes of same ho-motopy type.

2. Amino acids. Take the graphs drawn in Figures I.8and I.9 as definitions of the amino acids as (one-dimensional) topological spaces. Here an atom is avertex and a bond is an edge, no matter whether ornot it has (partial) double bond character.

(i) Are there any two amino acids with isomorphicgraphs? If yes, which ones?

(ii) Calculate the Betti numbers and Euler charac-teristics of the graphs.

(iii) Partition the collection of graphs into classes ofthe same homotopy type.

3. Joins and simplices. A tetrahedron can be definedas the join of two skew line segments in space. Thehalfway plane is parallel to both line segments andlies exactly halfway between them. Since the linesegments are skew, the halfway plane separates thetwo line segments.

(i) Show that the halfway plane intersects the tetra-hedron in a parallelogram.

(ii) Decomposing the line segments into�

and �pieces implies a decomposition of the tetrahe-dron into

� � joins, which are smaller tetrahedra.Draw the decomposition and highlight the in-tersection with the halfway plane.

4. Stars and links. Let�

be the dual complex of afinite collection � of balls in

���. Define the star of

a vertex � � � as the collection of simplices thatcontain � , and the link as the collection of faces ofsimplices in the star that do not belong to the star:

����� � ��� � �

�� � ��

� � � � � � � ���� � ��� ���

� �

(i) Show that� � � is a complex, that is, every face

of a simplex in the link also belongs to the link.

(ii) Assume � is the center of � � � . The spherebounding � intersects all other balls in caps.Show that

� � � is isomorphic to the dual com-plex of that collection of caps.

5. Torus and projective plane. Take a rectangularpiece of paper and orient the left and right sides fromtop to bottom and the top and bottom sides from leftto right. You get a torus if you glue the left side tothe right side and the top side to the bottom side, eachtime with matching orientations. You get a projectiveplane if you glue again the left to the right and the topto bottom sides but now with opposing orientations.

(i) Triangulate the rectangle such that you get avalid triangulation for both ways of gluing itssides.

(ii) Compute the Betti numbers of the torus andthe projective plane by running either the in-cremental or the matrix algorithm (by hand) onyour triangulations.

6. Simple graphs. A simple graph is a simplicial com-plex that consists of vertices and edges but has not tri-angles or higher-dimensional simplices. Let

�be the

number of vertices and � the number of edges. Usethe language of homology groups to re-confirm thefollowing formulas, which are well-known for sim-ple graphs:

(i) � � �� � if the graph is a tree.

(ii) � � �� � � � � if the graph is connected.

(iii) � � �� � � � � � in general.

7. Protein structure. Download a protein structurefrom the pdb database and use the Alpha Shape soft-ware to compute the Betti numbers of its van derWaals and its solvent accessible diagrams.

70 IV CONNECTIVITY

Chapter V

Shape Features

The topological analysis of spaces, as discussed inChapter IV, is an important first step, but by itself is in-sufficient to appropriately characterize the shape of pro-tein structures. To decide what is appropriate, we need tohave a purpose. The goal we have in mind is understand-ing how proteins interact with each other and with othermolecules. There is overwhelming evidence that interest-ing events in such interactions happen preferably in cavi-ties, which are partially protected regions in the protein ormolecular assembly, and that local shape complementar-ity plays a significant role in making such events happen.It appears that organic life is based on computations per-formed by dynamically matching the (changing) pieces ofa three-dimensional puzzle. A statement like this needsto be accompanied by a series disclaimers: not every in-teraction is based on shape complementarity; interactionsthat are based on shape complementarity are not entirelyso; and the relevant shape complementarity is local andimperfect. In other words, the situation is hopelessly com-plicated.

Our goal in this chapter is to introduce mathematicaland computational methods that allow us to start talkingabout the real problem in more precise terms. We do thisbe introducing three essentially new concepts. In SectionV.1, we make an attempt to give a precise meaning to cav-ities in proteins. The main idea here is to combine thetopological concept of a hole with a minimum amount ofgeometric information, and this information is the evolu-tion of the shape under growth. In Section V.2, we returnto homology groups and introduce the concept of topo-logical persistence. It is a measure of how important atopological feature is during the evolution. We see this asa tool to cope with imperfections as it permits us to distin-guish topological features from topological noise. In Sec-tion V.3, we make an attempt to give a precise meaning tointerfaces between interacting molecules. We define it asa two-dimensional sheet separating the molecule. While

this idea seems simple enough, the details are tricky andrequire that we use what we learned about pockets andtopological persistence. Finally, in Section V.4, we illus-trate the concepts using the Alpha Shape software and ex-tensions.

V.1 PocketsV.2 Topological PersistenceV.3 Molecular InterfacesV.4 Software for Shape Features

Exercises

71

72 V SHAPE FEATURES

V.1 Pockets

In this section, we formalize the idea of a cavity in a pro-tein by introducing the concept of a pocket in a space-filling diagram.

Voids. The simplest type of pocket is a void, which wedefine as a bounded connected component of the comple-ment. Suppose, for example, that � is a finite collection ofclosed balls in

� �and � � � � is the space-filling repre-

sentation of a molecule. Since � is finite, the balls cannotcover the entire space, which implies that the complement,� �

� � , consists of one or more connected components.Exactly on component is unbounded (infinitely large), andall other components are voids. See Figure V.1 for an il-lustration of the definition in two dimensions. Recall that

Figure V.1: The union of disks has a single (shaded) void. Thecorresponding void in the dual complex consists of five triangles.

in Chapter II, we described a deformation retraction fromthe space-filling diagram, � , to the dual complex,

�. The

plain existence of that retraction implies that for each voidin � we have a void in

�that contains the void in � . In-

deed, we can reverse the deformation retraction to showthat the two voids have the same homotopy type. Sincethe dual complex is a subcomplex of the Delaunay trian-gulation, we may think of each void in

�as a collection

of tetrahedra,� � �

��

. The boundary � � � � is a col-lection of triangles in

�. This collection bounds in

�but

not in�

. It follows that � represents a homology class inthe second homology group of

�. Indeed, the boundaries

of the voids form a basis of that homology group. Hence,� � is the number of voids in

�, which is the same as the

number of voids in � .

Definition of pockets. A pocket generalizes the conceptof a void by relaxing the requirement it be disconnected

from infinity. All we require is that a pocket be wider onthe inside than at possible entrances from the outside. Tomake this idea concrete, we grow the space-filling diagramand observe how it changes: the relatively narrow en-trances close before the inside disappears. In other words,a pocket is a maximal portion of space outside the space-filling diagram that turns into a void before it is subsumedby the growing diagram. To formalize this intuition, weneed to settle on a growth model. It is convenient to usethe one that gave rise to the sequence of alpha complexes,but we should keep in mind that this choice does affectwhat we do and do not call a pocket. According to thismodel, the center of the ball � � � � � � � � � � in � remainsfixed and the radius at time ,C� �

is equal to the squareroot of

� �� � , . We may think of the growth as pushing thepoints on the boundary of the space-filling diagram out-wards, in the direction normal to the surface. Figure V.2illustrates this view in two dimensions. In the interior of

Figure V.2: The growing disks push the points on the boundaryoutwards, in normal direction. Following the vectors, the pointsin the shaded region have paths that end at Voronoi vertices.

the Voronoi cells, the vector field is defined by the sweep-ing spheres. We extend it to the rest of space by usingthe circles that sweep out the Voronoi polygons and theintervals that sweep out the Voronoi edges. Starting at apoint outside the space-filling diagram, we follow vectorsand thus form a path that may or may not go to infinity.We define a pocket as a connected component of the set ofpoints * � � � � � whose paths do not go to infinity. Thepoints that flow to infinity form a single component, whichwe refer to as the outside. Each pocket is open where itborders the space-filling diagram and closed where it bor-ders the outside. The latter set of points may formally bedefined as the intersection of the pocket with the closureof the outside. Its connected components are open two-dimensional sets, which we refer to as the mouths of thepocket. Note that voids are pockets without mouths.

V.1 Pockets 73

Evolution of dual complex. Similar to voids, we mayassociate a pocket of the space-filling diagram with apocket of the dual complex. The latter is defined com-binatorially, again by observing how the space-filling di-agram changes as it grows. The dual complex changesonly at discrete moment, namely when the space-fillingdiagram encounters a new vertex, edge, polygon or cell ofthe Voronoi diagram. There are ten cases distinguished bythe dimension of the dual Delaunay simplex, � , and therelative position of its orthocenter, � . We recall that � isthe point at which the affine hull of � intersects the affinehull of its dual in the Voronoi diagram.

Case M�: � is a vertex and the orthocenter �

� � liesin the interior of the corresponding Voronoi cell,

� � .This cell is encountered at time , � �

� �� , which is themoment when the

�-th ball changes from imaginary

to real radius.

Case � is an edge and � lies in the interior of the cor-responding Voronoi polygon. There are two genericsub-cases, both illustrated in Figure V.3.

M 1C1

Figure V.3: The vertical lines are side views of polygons inspace. The solid dot marks the orthocenter of the Delaunay edge.On the left, this edge intersects its dual Voronoi polygon, whileon the right, it lies on ones side of the polygon.

Case M � : � � �� � � . The two balls approach theVoronoi polygon from both sides, eventuallytouching it at � .

Case C � : ��� � . The two balls approach the poly-

gon from the same side. At the moment theytouch, the smaller ball breaks through the outersphere and starts sweeping out the Voronoi cellon the other side of the polygon.

Case � is a triangle and � lies in the interior of the corre-sponding Voronoi edge. There are three generic sub-cases, all illustrated in Figure V.4.

Case M � : � � �� � � . The three balls completely sur-round the Voronoi edge before they touch at � .

C2

2CM 2

Figure V.4: The thin solid lines represent polygons that meetalong a common edge in space. That edge appears as a solid dot,which marks the orthocenter of the triangle. From left to right,the orthocenter lies inside the triangle, lies outside and sees oneedge, lies outside and sees two edges and their shared vertex.

Case C � : ��� � . Here we have two sub-cases de-

pending on whether � sees one or two edgesfrom the outside. In the first case, the threeballs touch the Voronoi edge at the same mo-ment they encounter the Voronoi polygon dualto the visible edge. In the second case, the ballstouch the edge at the same moment they en-counter the two polygons and one cell dual tothe two visible edges and the vertex they share.

Case � is a tetrahedron. Its orthocenter is necessarily thecorresponding Voronoi vertex.

Case M � : � � � � � . The four balls completely sur-round the Voronoi vertex before they reach it.

Case C � : ��� � . Here we have three sub-cases de-

pending on whether � sees one, two or three tri-angles from the outside. The four balls touchthe Voronoi vertex at the same moment theytouch the Voronoi edges, polygons and cellsthat correspond to the triangles, edges and ver-tices visible from � .

In Case C � and in the last sub-case each of Cases C �and C � , � sees a vertex of � from the outside. Assuming� lies outside the space-filling diagram, this is only pos-sible if the ball centered at that vertex is contained insidethe union of the balls centered at the other vertices of � .This is unlikely to happen for molecular data and usuallyindicates a measurement or modeling mistake.

Metamorphoses and collapses. In four of the ten cases,only one simplex is added to the dual complex, namely in

74 V SHAPE FEATURES

Cases M�, M � , M � and M � . Consistent with the discussion

in Chapter III, we call these operations metamorphoses,since they change the homotopy type. We will see shortlythat the remaining six cases do not affect the homotopytype. They can be understood as inverses of the six typesof collapses illustrated in Figure V.5. Recall that a princi-

01−collapse

02−collapse12−collapse

03−collapse13−collapse23−collapse

Figure V.5: From left to right, top to bottom: collapsing a tetra-hedron from a triangle, an edge and a vertex, collapsing a trianglefrom an edge and a vertex, and collapsing an edge from a vertex.In each case, the collapse removes the tetrahedron, the transpar-ent triangles, the dashed edges, and the dotted vertices, if any.

pal simplex is not face of any other simplex in the com-plex. A proper face � of a principal simplex � is free if allsimplices that contain � are faces of � . Such a pair � � �defines a collapse, which is the operation that removes allsimplices between and including � and � . Formally, thecomplex obtained from

�by collapsing the pair � � � is

� � � �� � � � � � . It is convenient to specify

the type using the dimensions � � � ��� � and � � �����and to talk about � -collapses, for �

� � � � � . Withthis notation, the changes in the dual complex describedin Case C � are caused by inverses of � -collapses, for�� � � .

Each collapse can be realized as a deformation retrac-tion that pushes a portion of � ’s boundary through � to-ward the remaining portion of the boundary. In the pro-cess, the retraction removes � and all faces of � that con-tain � . Being a deformation retraction, the operation doesnot affect the homotopy type of the complex, and neitherdoes its inverse.

Partial order. Using the classification into ten differentoperations, we may introduce a partial order on the De-launay simplices, which we think of as a discretization of

the flow along normal vectors. We are only interested intetrahedra. As noted in Case C � , if the orthocenter � ofa Delaunay tetrahedron � lies outside � then it sees ei-ther one, two or three of the triangles. For each trianglevisible from � , we define � , where is the tetrahe-dron on the other side of the shared triangle. To cover thecase in which the triangle lies on the boundary of the De-launay triangulation, we introduce a dummy tetrahedron,� , that represents the space outside the triangulation. Bydefinition, its orthocenter is at infinity, so � can only be asuccessor but not a predecessor of other tetrahedra. Thisis what we call a sink of the relation. The other sinks arethe tetrahedra that contain their orthocenters; they definemetamorphoses in the evolution of the dual complex.

Note that � implies that the square radius of the or-thosphere of � is less than that of the orthosphere of . If � � , this is true because the orthoradius of � is infinity,by definition. If � and are both (finite) Delaunay tetra-hedra, this is true because their orthocenters are Voronoivertices that lie on the same side of the plane separating �and . As illustrated in Figure V.6, the two orthospheresintersect in a circle that lies in the separating plane and theorthocenter of is further from that plane than the ortho-center of � . This implies that the square radius increasesalong every chain of the relation. Hence, is acyclic andits transitive closure is transitive.

Figure V.6: Think of the triangles as projections of tetrahedraand the circles of projections of spheres. The centers of both(dotted) orthospheres lie on the right of the separating plane.

Pockets of dual complex. We are now ready to defineand compute the pockets of the dual complex using thepartial order over the tetrahedra. The ancestor set of atetrahedron � �

�� � contains , its predecessors, the

predecessors of the predecessors, and so on:� � � � � �

��� �

� � � �

V.1 Pockets 75

We have seen that a tetrahedron can have more than onesuccessor. It is also possible that it belongs to more thanone ancestor set, although this is not the common case.The pockets in the dual complex are defined by the tetra-hedra that neither belong to the dual complex nor to theancestor set of � . Note that this is more conservative thancollecting all tetrahedra outside

�that belong to ancestor

sets of finite sinks. We compute the pockets in two steps:

Step 1. Collect the tetrahedra in���

�� � � .

Step 2. Partition this collection into components.

To collect the tetrahedra, we assume the Delaunay sim-plices are given in a list ordered by birth-time. As il-lustrated in Figure V.7, the relation over the tetrahedrais acyclic and goes monotonically from left to right. We

ωK

Figure V.7: Ordered list of simplices with relation over the tetra-hedra indicated by arrows.

mark the tetrahedra in the dual complex, which form a pre-fix of the sub-list of tetrahedra. Next, we mark the tetra-hedra in the ancestor set of � by searching backward from� along the pairs of the relation. To complete Step 1,we now collect all unmarked tetrahedra in a single scanthrough the list. See Figure V.8 for a two-dimensional il-lustration. The resulting collection contains the tetrahe-

Figure V.8: The eight disks form one pocket, which connects tothe outside along one mouth. The corresponding pocket in thedual complex consists of four triangles and a single mouth edge.

dra of all pockets. Call two tetrahedra in this collectionare adjacent if they share a triangle that is not in the dual

complex. Based on this adjacency information, we cancompute the connected components using standard graphalgorithms, such as depth-first search or union-find. Com-puting mouths is similar to computing pockets, only onedimension lower.

Step 1. Collect the boundary triangles not in�

.

Step 2. Partition this collection into components.

We may do the computation for individual pockets or forall pockets at once. In Step 1, we collect the trianglesin

���

that belong to exactly one pocket tetrahedron.In Step 2, we call two triangles adjacent if they sharean edge does not belong to

�. Finally, we use the same

standard graph algorithms to compute components.

Bibliographic notes. The importance of cavities in drugdesign and discovery has been known for a while [4].The formalization as pockets introduced in this section hasbeen described in [3] and implemented as part of the AlphaShapes software. The definition of a pocket is not purelytopological and requires a crucial geometric component,namely the growth model of the input balls. This growthmodel forms the basis of the partial order over the Delau-nay tetrahedra. An extension to include simplices of alldimensions has been used for reconstructing the surfaceof scanned point sets [2] and might have further applica-tions in the analysis of protein shape.

In everyday language we barely make any differencebetween pockets and other holes, such as the ones countedby the Betti numbers. This has also been noticed by thephilosophers Casati and Varzi [1], who introduce a con-cept they call a hollow which is similar at least in spirit toour formal notion of a normal pocket.

[1] R. CASATI AND A. C. VARZI. Holes and Other Superfi-cialities. MIT Press, Cambridge, Massachusetts, 1994.

[2] H. EDELSBRUNNER. Surface reconstruction by wrappingfinite sets in space. Discrete and Computational Geome-try — The Goodman-Pollack Festschrift, eds. B. Aronov, S.Basu, J. Pach and M. Sharir, Springer-Verlag, Berlin, to ap-pear.

[3] H. EDELSBRUNNER, M. A. FACELLO AND J. LIANG. Onthe definition and the construction of pockets in macro-molecules. Discrete Appl. Math. 88 (1998), 83–102.

[4] I. D. KUNTZ. Structure-based strategies for drug design anddiscovery. Science 257 (1992), 1078–1082.

76 V SHAPE FEATURES

V.2 Topological Persistence

In this section, we measure the life-time or persistence of atopological feature in an evolving topological space. Themeasure can be used to distinguish between pockets withrelatively wide and narrow entrances and they are essentialin the definition of molecular interfaces discussed in thenext section.

The intuition. A prime example of an evolving topolog-ical space is a space-filling diagram that grows in the waydiscussed in the preceding section. As before, we write� � � � � � �

�� � �

� � � � �for the corresponding filtration. The

� � are the complexesthat arise during the evolution and, in the generic case, anytwo contiguous complexes differ either by a metamorpho-sis or an anti-collapse. Each anti-collapse may be viewedas a sequence of metamorphoses in which the later sim-plices destroy the topological features created by the ear-lier simplices. For example, a 23-collapse consists of atriangle creating a void and a tetrahedron filling the same.The life-time of this void is zero because the triangle andthe tetrahedron are added at the same moment. We will seethat even if a triangle and a tetrahedron are added at dif-ferent moments, it is possible to decide in an unambiguousmanner whether or not the tetrahedron destroys what thetriangle created. If it does, then we are talking about a voidwith positive life-time, and we may interpret that life-timeas a measure of significance of the void. We may also in-terpret it as a shape measure of the corresponding pocket.

MM

M

0

1

2

M1

M0

Figure V.9: The region grows from two vertices, the two com-ponents merge twice, and the second merge creates a void thateventually disappears.

The idea of creation and destruction is the same as inSection IV.3 and depends on the effect on the Betti num-bers: a � -simplex creates if its addition increases � � and

it destroys if its addition decreases � � � � . Consider theevolving two-dimensional space illustrated in Figure V.9as an example. There are three events at which homol-ogy classes are created, namely when the two componentsget born at the points labeled M

�and when the compo-

nents merge the second time at the upper point labeledM � . The labels indicate the types of metamorphoses thatcorrespond to the topological changes. When the compo-nents merge the first time, a component gets destroyed,and when the hole gets filled, a 1-cycle gets destroyed. Itshould be clear that M � destroys what the upper M � created,and that the lower M � destroys what the right M

�created.

Nobody destroys the component created by the left M�.

Incremental algorithm revisited. We will formalizethe idea of pairing creations with destructions by revisitingthe incremental algorithm for Betti numbers presented inSection IV.3. We study the algorithm in terms of matricesof boundary homomorphisms. Recall that a single step inthat algorithm computes the Betti numbers of a complex� � � � � � � � � � � from the Betti numbers of

� � � � .Let the dimension of � � be � � � ��� � � . The only matri-ces affected by adding � � to the complex are the ones of� � � � ��� � � � � � � and of � � ��� � � � � � � , which aredisplayed in Figure V.10. The new column of the matrix

C k+1

C k

C k

C k−1

0

Figure V.10: The addition of �� to the complex appends a col-umn to the matrix of � ��� � and a row to the matrix of � � .

of � � � � is zero because � � is not a face of any � � � � � -simplex in

� � . Hence � � , the rank of the � -th boundarygroup, is the same for

� � as it is for� � � � . On the other

hand, � � � � may remain the same or it may increase.

Case � � creates. Then � � belongs to a � -cycle, whichimplies that its row in the matrix of � � can be ze-roed out. We can thus write the Betti numbers of

� �in terms of the ranks of various groups defined for� � � � as follows:

� � � � � � � � � � � � � � � � � � � � � � � �� � � � � � � � � � � � � � � � � � � � � �

V.2 Topological Persistence 77

In words, the � � � ��-st Betti number remains un-

changed and the � -th Betti number increases by one.

Case � � destroys. Then � � does not belong to a � -cycle.Its row in the matrix of � � can therefore not be zeroedout and we get a new non-zero entry in the normalform of that matrix. Hence,

� � � � � � � � � � � � � � � � � � � � � � � � � �� �

� � � � � � � � � � � ��� � � � � � � �

�� � � �

In words, the � � � ��-st Betti number decreases by

one and the � -th Betti number remains unchanged.

The case analysis confirms that the incremental algorithmas described in Section IV.3 computes the Betti numberscorrectly.

Recognizing creations. Besides re-proving the correct-ness of the incremental algorithm, the above analysispoints the way to an alternative procedure for distinguish-ing creating from destroying simplices. Instead of a union-find data structure, we use elementary row operations,which are slower but more general. Since we only userow operations, columns in the matrix of � � correspond toindividual � �� � � -simplices and rows represent � � � � � -cycles. When we add � � , we attempt to zero out its rowfrom right to left. To describe how this is done, we callthe column of the rightmost non-zero entry in a row itslast column, and we assume a function LASTCOL that re-turns the index of the last column; it returns zero if thatlast column does not exist. Clearly, each row has at mostone last column. Conversely, we maintain inductively thateach column is last for at most one row. For example, thisproperty is satisfied by the matrix in Figure V.11 beforethe shaded last row is added. After that addition, we userow operations to reinstate the property before adding thenext row. To explain the algorithm, we let

�be the index of

11 1 11 1 1

1 11 1

0

Figure V.11: The shaded rightmost non-zero entries identify lastcolumns of rows.

the row that corresponds to the new simplex � � . Given acolumn � , we also assume a function ROW that returns the

index of the row, among the first�� � rows, for which � is

the last column. It returns zero if the row is not defined.

boolean DOESCREATE � int � �while � � LASTCOL � � � � � doif

� �ROW � � � � � then row

� �row

� �row

�else return FALSE

endifendwhile;return TRUE.

After running Function DOESCREATE for the�-th row, that

row is either zero, in which case the corresponding sim-plex � � creates, or it has a unique last column, in whichcase � � destroys.

Persistent homology. We argue below that FunctionDOESCREATE computes more than just Betti numbers:it also determines how long a homological feature lastsalong the filtration. To make this precise, we return to thesituation in which the filtration represents meaningful in-formation, such as scale in the case of alpha shapes. Ingeneral, we define persistence so it depends on the timewhen simplices are added to the complex in the filtration,but to simplify matters here, we re-define time equal tothe index. In other words, we say � � is added at time � .Keeping this convention in mind, we now define the � -persistent � -th homology group of

� � as the cycle groupdivided by the boundary group at � � � positions later inthe filtration:

� ��� �� � � � � � ��� ������ � � � � � �Taking the intersection of the boundary group with thecycle group is necessary for technical reasons to definethe quotient group. Figure V.12 illustrates the difference

B

Z

j+p

j

B j

Figure V.12: The cycle group and its decompositions into solid� -persistent homology classes and dotted 0-persistent homologyclasses.

78 V SHAPE FEATURES

between the � -persistent homology group and the usualor 0-persistent homology group. The � -persistent � -thBetti number is the rank of the � -persistent � -th homol-ogy group: � ��� �� � � � � � ��� �� .

Interval property of persistence. We develop an intu-itive picture of persistence using the distinction betweencreating and destroying simplices. Note that the numberof creating � -simplices until position � in the filtration isthe rank of the cycle group: � �� � � � � � � � . Similarly,the number of destroying � � � �

�-simplices is the rank

of the boundary group: � � � � � � � � � � . The Betti num-ber is the surplus of creating versus destroying simplices:� �� � � �� � � � � . Because Betti numbers are non-negative,the creating � -simplices and destroying � � � � � -simplicesare arranged like opening and closing parentheses in anexpression, except that some closing parentheses may bemissing at the end. In particular, every prefix contains atleast as many creating � -simplices as destroying � � � � � -simplices. We can therefore pair them up and form vertexdisjoint intervals, each starting at the position of a creat-ing � -simplex and ending at the position of a destroying� � � � � -simplex (or extending to infinity if there are nodestroying simplices left). We use intervals that are closedto the left and open to the right. The Betti number at posi-tion � is then the number of intervals that contain � . Anyarbitrary pairing creating vertex disjoint intervals has thisproperty for Betti numbers. (Can you prove that?) In con-trast, there is exactly one pairing that has the followingstronger property for persistent Betti numbers:

INTERVAL PROPERTY. The � -persistent � -th Betti num-ber at position � is the number of intervals that si-multaneously contain � and � � � .

[

[[

[

persistence

index

)

)

))

Figure V.13: Each right-angled isosceles triangle in the index-persistence plane represents a non-bounding cycle that persistsover the complexes covered by its interval.

We illustrate this property by drawing a right-angledisosceles triangle below every interval, as shown in Fig-ure V.13. Each triangle is closed along the top and leftedges but open along the hypotenuse. The � -persistence� -th Betti number of

� � is represented by the point � ��� � �in the index-persistence plane. According to the IntervalProperty, it is the number of right-angled isosceles trian-gles that contain this point.

Pairing. The pairing of simplices to obtain intervals sat-isfying the Interval Property is done using Function DOE-SCREATE explained above. Specifically, each destroying� -simplex corresponds to a non-zero row in the matrix of� � and is paired with the � � � �

�-simplex that corresponds

to the last column in that row. Note that this � � � � � -simplex indeed creates, as it witnessed by the cycle repre-sented by the row. The persistence of a pair � � � ��� � � is thetime-lag between the additions of the two simplices to thecomplex in the filtration. In the assumed simplified casein which � � is added at time � , the persistence is the dif-ference between indices: � � �

. This is the convention weused to generate Figure IV.16, which shows the persistentfirst Betti numbers of the space-filling diagram modelingthe gramicidin protein.

0

1000

2000

3000

4000

5000

60000 1000 2000 3000 4000 5000 6000 7000 8000 9000

0123456

Figure V.14: Graph of ����� � � � � � � � , the number of tunnels in log-scale for gramicidin. The index in the filtration varies from leftto right and the persistence from back to front. Observe the largetriangular plateau, which corresponds to the dominant tunnel thatpasses through gramicidin.

The running time of the pairing algorithm is roughlythe same as that of the normal form algorithm describedin Section IV.4, namely cubic in the number of simplices,which is at most some constant times � . Indeed, Func-tion DOESCREATE spends fewer than � row operationsper simplex, each taking time at most proportional to � .

V.2 Topological Persistence 79

Bibliographic notes. The material for this section istaken from [1], where we find the definition of persis-tent Betti numbers, the algorithm and its correctness proof.The algorithm has been implemented and experimental re-sults suggest it is considerably faster than the obvious cu-bic time bound. We should note, however, that the imple-mentation in [1] differs in two possibly significant aspectsfrom the algorithm described in this section. First, the im-plementation uses a union-find data structure to classifysimplices as creating or destroying, and second, it uses asparse matrix representation that permits row operationsin time proportional to the number of non-zero entries.Persistent Betti numbers have been defined independentlyby Robins [3], who uses them to study the fractal natureof two-dimensional point patterns. Persistent homologygroups are embedded in spectral sequences, which are spe-cial tables of related homology groups [2]. It might beinteresting to explore the other groups in that table andto find meaningful interpretations in the context of alphacomplexes.

[1] H. EDELSBRUNNER, D. LETSCHER AND A. ZOMORO-DIAN. Topological persistence and simplification. DiscreteComput. Geom. 28 (2002), 511–533.

[2] J. MCCLEARY. A User’s Guide to Spectral Sequences. Sec-ond edition, Cambridge Univ. Press, England, 2001.

[3] V. ROBINS. Toward computing homology from finite ap-proximations. Topology Proceedings 24 (1999), 503–532.

80 V SHAPE FEATURES

V.3 Molecular Interfaces

The interface between two or more interacting moleculesis the location of that interaction. In this section, wepresent a proposal for a surface or complex of surfaces thatgeometrically represents that interface. One of its applica-tions is to display functions defined over the interface.

Interfaces without boundary. Our definition of a mo-lecular interface is a formalization of two intuitions,namely that the best separation of two or more moleculesis part of the Voronoi diagram and that the interesting por-tion of that separation is protected by a relatively tight seal.We will come back to the second intuition later and for-malize the first intuition now.

Figure V.15: The solid bi-chromatic edges form the interface ofthe two collections of disks. The dotted mono-chromatic edgesshow the rest of the Voronoi diagram.

Consider an assembly of � � molecules, each repre-sented by a collection of balls � � in

� �, and let � � � � �

be the collection of all balls. Recall that the Voronoi di-agram of � consists of a polyhedral cell

� � for each ball� � � � and of the polygons, edges and vertices sharedby the cells. We use colors to keep track of the corre-spondence between balls and molecules. Specifically, if� � belongs to � � then we say � � and

� � have the color � .The polygons, edges and vertices get their colors from thecells they belong to. While all cells are mono-chromatic, apolygon can be mono-chromatic or bi-chromatic depend-ing on whether the two cells that share the polygon havethe same or different colors. The interface between the � �is the subcomplex of the Voronoi diagram consisting of all

bi-chromatic polygons and their edges and vertices. Fig-ure V.15 illustrates the definition by showing the interfaceof two collections of disks in the plane.

Local structure. In the generic case, every edge belongsto three and every vertex to four Voronoi cells. This im-plies that for � � colors, the interface has a particularlysimple local geometric structure. An interface edge be-longs to two cells of one and to one cell of the other color,and exactly two of the three polygons sharing the edge arebi-chromatic and thus belong to the interface. There aretwo types of interface vertices: those that belong to threecells of one and one cell of the other color and those thatbelong to two cells of each color. As illustrated in FigureV.16, the local neighborhood of both types of vertices isa topological disk. We conclude that in the generic case

Figure V.16: The shaded polygons and their edges belong to theinterface. On the left, we have three cells of one and one cell ofthe other color. On the right, we have two cells of each color.

the interface for � � colors is a � -manifold, which is atopological space in which every point has an open neigh-borhood homeomorphic to

� � . By construction, that 2-manifold is orientable, with the cells of one color on oneside and the cells of the other color on the other side.

For � � colors, the local structure of the interface canbe more complicated because we may have tri-chromaticedges and tri- and four-chromatic vertices. For any twocolors, we get a 2-manifold, but now these 2-manifoldsmeet along curves formed by tri-chromatic edges. Inother words, the interface is a two-dimensional complex ofsheets, curves and vertices. Every sheet is a maximal com-ponent consisting of bi-chromatic polygons, edges andvertices of a given color pair. Similarly, every curve is amaximal component consisting of tri-chromatic edges andvertices of a given color triplet. Finally, every interfacevertex is a four-chromatic vertex in the Voronoi diagram.Together, the sheets, curves and vertices form a complexin the sense that the boundary of every sheet consists offinitely many pairwise disjoint curves and vertices, and theboundary of every curve consists of finitely many interfacevertices.

V.3 Molecular Interfaces 81

Retraction. As defined above, the interface may go toinfinity, which is sometimes a disadvantage. Our goal hereis to shrink the interface back to where the molecules aresufficiently close to interact. It seems natural to do thiswith a distance threshold, but this would most certainlylead to the deletion of interior portions and produce frac-tured surfaces. We therefore shrink from outside in anduse relative rather than absolute distance measurements todecide where to stop the process. In the first step, we re-tract the interface back to the multi-chromatic dual of thedual complex and its pockets. In the second step, we usetopological persistence to shrink the interface even further.We will return to the second step later.

To describe the shrinking process, we consider the De-launay triangulation

�of the collection of balls � . We

have mono-chromatic vertices and mono- as well as multi-chromatic edges, triangles and tetrahedra. The interfaceas defined above is dual to the subset of multi-chromaticsimplices in

�. Note that the first step of the shrinking

process is equivalent to removing all tetrahedra outside thedual complex that belong to the ancestor set of the dummytetrahedron, which represents the space outside the Delau-nay triangulation. We use 23-collapses to remove thesetetrahedra. We simplify the algorithm by ignoring prin-cipal triangles, edges and vertices; in other words, wedelete principal triangles, edges and vertices as soon asthey arise. Let

�denote the dual complex.

void COLLAPSE ���������������� � � � � :if � � � �� � and � � � � � is collapsible thenforall faces � � � � do delete endfor

endif.

In this context, we consider � � � � � collapsible if the pair ispart of an anti-collapse in the construction of the filtrationand the collapse of � and � renders the other simplices inthis anti-collapse principal. This is equivalent to sayingthat the effect of the 23-collapse is the inverse of that anti-collapse. We define a retraction as a maximal sequenceof collapses. In other words, we collapse as long as wecan. In the implementation of this operation, we maintaina stack of candidate pairs. Initially, this stack contains allboundary triangles of the Delaunay triangulation togetherwith their incident tetrahedra. During the process, we takepairs from the stack and add new pairs whenever we createnew boundary triangles by collapsing.

Complex RETRACT:while the stack is non-empty do� � � � � � POP; COLLAPSE � � � � �

endwhile.

We may think of a retraction as successively removingsinks from an acyclic directed graph. It follows that theresult of the operation is independent of the sequence inwhich the collapses are performed.

Clipping. The result of the retraction is the collection oftetrahedra in the dual complex together with the tetrahe-dra in the pockets. We further remove all mono-chromatictetrahedra and let � denote the remaining collection ofmulti-chromatic tetrahedra. The interface is now obtainedas the dual of � . More specifically, for each bi-chromaticedge of the tetrahedra in � , we add the dual polygon tothe interface. There are, however, complications becausesuch a bi-chromatic edge may either be completely or onlypartially surrounded by tetrahedra in � . In the latter case,we clip the polygon before adding it to the interface. Fig-ure V.17 illustrates this idea in two dimensions, but weshould keep in mind that the situation in three dimensionsis more complicated. A partially surrounded bi-chromatic

Figure V.17: The triangles drawn with solid edges are the bi-chromatic triangles constructed by the contraction algorithm.The boldface interface is dual to and clipped at the boundaryof this collection.

edge corresponds to a polygon with two types of vertices:those dual to tetrahedra in � and the others. We clip thepolygon by cutting each edge connecting vertices of dif-ferent types with the plane of the corresponding boundarytriangle. If that plane does not intersect the dual Voronoiedge, which happens in rare cases, we clip at the endpointthat is closer to the plane. Finally, we connect the cutpoints in contiguous pairs and retain the portions of thepolygon with vertices of the first type.

82 V SHAPE FEATURES

Further retraction. We now take the shrinking processbeyond the retraction from the dummy tetrahedron. Re-call that the topological persistence algorithm of SectionV.2 generates simplex pairs � � � � � with the property that� destroys what � created. The dimension of � is onelarger than that of � , but we are only interested in the casein which � is a triangle and � is a tetrahedron. We thinkof the operation that removes � and � as a generalizationof a 23-collapse, but it is more complicated because � isgenerally not a face of � , although it can be. We do theoperation only if � is a boundary triangle of � and doesnot belong to the dual complex. We first delete � and thenretract from � . As before, we remove principal triangles,edges and vertices as soon as they get created.

void REMOVE � � � � � :if � � � �� � then delete � ;forall triangles � � do PUSH � ��� � endfor;RETRACT

endif.

Here, � is the tetrahedron that shares with � . If the re-traction from � reaches far enough, � gets deleted just be-cause it becomes principal. However, it can happen thatthe retraction does not reach all the way, in which casewe recurse for other pairs of simplices before deleting � .This is done implicitly during the retraction. To decidewhether or not to remove � and � in the first place, wecompare their persistence with a constant threshold andremove only if

� � ��� � � � ���� � �

. Here, �� , � and

�� ,�� are the moments when � and � are born. Note that

for � � � � � � � � � we have� � ��� � � � � � � � � � � � � (V.1)

This monotonicity property is important for the correct-ness of the algorithm because if the retraction from � doesnot reach � then this can only be because there is a triangle� � between � and � that split the void created by � beforeit was destroyed by � . But then the other part of the voidmust have been destroyed by a tetrahedron � � preceding �in the filtration. In other words, � � � � � � � � � , where� � and � � are the moments when � � and � � are born. Themonotonicity guarantees that the simplices between � and� are removed by recursive deletions so that � can even-tually be deleted. We now restate the algorithm and sim-plify its description by declaring a 23-collapse as a specialcase of a removal. Because of our policy to delete prin-cipal triangles, edges and vertices, all other collapses canbe ignored. The algorithm maintains a stack of triangle-tetrahedron pairs formed by the topological persistence al-gorithm. Initially, the stack contains all pairs � � � � � with

� on the boundary of the current set � . We may start with� the set of all Delaunay tetrahedra.

Complex RETRACTMORE ��� ����� � �:

while the stack is non-empty do� � � � � � POP;if

� � ��� � � � �then REMOVE � � � endif

endwhile.

As before, we get the interface by duality from the com-puted collection of tetrahedra. The running time is dom-inated by the topological persistence algorithm, whichtakes cubic time to form the triangle-tetrahedron pairs.With some care, we can implement the rest of the algo-rithm so it takes only constant time per simplex in the De-launay triangulation.

We note that it is possible to use other functions�

thatsatisfy the monotonicity property (V.1). For example, wemay bias the shrinking process against large triangles andtetrahedra by using

� � ��� � � � ���� . A second potential

advantage of this function over the inverse of the persis-tence is that it is dimensionless and thus amenable to theuse of universally meaningful constant thresholds.

Global structure. Note that we may get different in-terfaces for different values of the threshold

�. Since a

smaller threshold permits as many or more removals thana larger threshold, the interface shrinks with decreasing�

. Indeed, if we use� � ��� � � � ��

�� , we get a filtration

that is parametrized in a way similar to the sequence ofalpha shapes. For

� �� , the interface is the original sur-

face or complex defined by the set of bi-chromatic Voronoipolygons. For

� �� , the interface is empty, unless the

dual complex of � contains bi-chromatic triangles, whichwould remain. In this case, we can further decrease the in-terface by making

�negative, but we have to modify the

retraction to allow for collapses of simplices in the dualcomplex. Eventually, for

� ���� , the interface is guar-

anteed to be empty.

For a fixed�

, the interface is a two-dimensional com-plex. Its two-dimensional elements are sheets definedby bi-chromatic Voronoi polygons. There are two kindsof one-dimensional elements: the original tri-chromaticcurves and the new bi-chromatic curves outlining the sheetboundary created by shrinking. Finally, there are twokinds of zero-dimensional elements, namely the originalfour-chromatic vertices and the new tri-chromatic verticesforming the curve boundary created by shrinking. We takeall sheets and curves as open sets so the complex is a col-lection of pairwise disjoint open elements. Note, however,

V.3 Molecular Interfaces 83

that the elements are not necessarily simply connected. Toexplore this further, we excise thin strips along the curvesto turn each sheet into a connected 2-manifold with bound-ary. Each component of the boundary is a closed curveoutlining a hole in the 2-manifold. A classic result intopology says that two orientable 2-manifolds with bound-ary are homeomorphic if and only if they have the samegenus and the same number of holes. Furthermore, theEuler characteristic of a 2-manifold with genus � � � and� � � holes is

� � �� � � � �

� � � � � � �where

�, � and � are the number of vertices, edges and

triangles of any arbitrary triangulation of the 2-manifold.Given a sheet, it is easy to compute its Euler characteristicand to determine its number of holes. We then get thegenus as � � � ��� � � � � � � . We may think of this manifoldas obtained by punching � holes into a � -fold torus.

Bibliographic notes. The material in this section istaken from the recent manuscript by Ban et. al [1]. Thereis evidence that the geometric interfaces shed new light onthe hot-spot theory of protein-protein interaction [4]. Acompeting proposal for a geometric definition of molecu-lar interfaces can be found in [3], where two independentreal parameters are used to define the interface as a portionof the molecular surfaces of the two or more molecules.In topology, 2-manifolds with and without boundary havebeen studies for more than a century. The fact that thetopological type of a connected orientable 2-manifold isdetermined by the genus and the number of holes can befound in a number of texts, including [2].

[1] Y.-E. BAN, H. EDELSBRUNNER AND J. RUDOLPH. A defi-nition of interfaces for protein oligomers. Manuscript, DukeUniv., Durham, North Carolina, 2002.

[2] W. S. MASSEY. Algebraic Topology: an Introduction.Springer-Verlag, New York, 1967.

[3] A. VARSHNEY, F. P. BROOKS, JR., D. C. RICHARDSON,W. V. WRIGHT AND D. MINOCHA. Defining, computingand visualizing molecular interfaces. In “Proc. IEEE Visu-alization, 1995”, 36–43.

[4] J. A. WELLS. Binding in the growth hormone receptor com-plex. Proc. Natl. Acad. Sci. 93 (1996), 1–6.

84 V SHAPE FEATURES

V.4 Software for Shape Features

In this section, we explore extensions of the Alpha Shapesoftware that are concerned with connectivity informationand shape features. We begin with signatures, then pro-ceed to pockets, and finally look at molecular interfaces.

Betti number signatures. As explained in Section IV.2,the components, tunnels and voids of a complex in

� �are

counted by the Betti numbers � � , � � and � � . They arecomputed by the algorithm explained in Section IV.3 anddisplayed to the right of the correspondingly labeled but-tons in the signature panel shown in Figure V.19. To theleft of each button we can toggle the display of the evo-lution of the number as a function of the index in the fil-tration. We refer to these functions as signatures of thedata set. As an example consider the zeolite data shown in

Figure V.18: Three axis-parallel views of the 2,354-th dual com-plex in the filtration of a periodic zeolite molecule consisting of1,296 atoms.

Figure V.18. Two of the three views are taken along tunnelsystems that intersect orthogonally and give rise to a rathercomplicated cave system. Note that the tunnels shown inthe second view are smaller in diameter than those shownin the third view. It follows that there are complexes in thefiltration that have the tunnels in the first system closedwhile the tunnels in the second system are still open. Thetwo systems can be detected in the tunnel signature shownin Figure V.19. Figure V.20 shows the two-dimensional

Figure V.19: The signature panel with the tunnel signature dis-played in log-scale. The index 2,354 belongs to the higher of thetwo plateaus, which implies that both tunnel systems are open inthe displayed complex.

tunnel signature with filtration index increasing from leftto right and persistence increasing from back to front. Thepersistence of the tunnels is formally defined in SectionV.2.

0

5000

10000

15000

20000

25000

30000

350000 5000 10000 15000 20000 25000 30000 35000 40000 45000

02468

1012

Figure V.20: The graph of ����� � � � � � � � , the number of tunnels inlog-scale, of the zeolite data. The noise in the signature decreasesfrom back to front. The two persistent tunnel systems are visibleas plateaus that escape the noise removal the longest.

Displaying pockets. Prior to developing and imple-menting pockets, we have experimented with other andmore simple-minded ideas aimed at getting a handle oncavities in molecular data. One such idea was to displaythe difference between the Delaunay triangulation and thedual complex,

��� � , or more generally the difference

V.4 Software for Shape Features 85

between two dual complexes,� � �

� � . This differencecan be computed in the Alpha Shape software by first se-lecting � and � and second pushing the ‘Difference’ but-ton in the scene panel. The results are not encouragingbecause a typically large number of inessential simplicesclutters the view of important cavities. In contrast, thedual set of a pocket usually gives a clear indication of thecavity, as in Figure V.21. The interface also supports the

Figure V.21: All pockets in the dual complex of the zeolite datafor index 2,926.

display of individual pockets, and Figure V.22 shows thelargest of the pockets in Figure V.21 from a different angle.We should keep in mind that the pocket in the dual com-

Figure V.22: Side view of the largest pocket of the collectionshown in Figure V.21.

plex is geometrically considerably larger than the pocketin the corresponding space-filling diagram. This effect isthe reverse of that for the molecule, whose dual complexis considerably smaller than a corresponding space-fillingdiagram.

Remember that pockets in the dual complex are not

closed under the face relation. The software indicates thepresence or absence of boundary triangles by the choiceof color. The mouth regions are therefore visually eas-ily identifiable. However, the internal connectivity of thepockets is not immediately visible, which may lead to con-fusion. For example, two pockets may appear connectedbut are not because of missing shared triangles. It is pos-sible to visually inspect the connectivity by turning on thedisplay of simplices of all dimensions in the scene panel,as shown in Figure II.17, and using the explosion func-tion to separate all simplices. We observe the same phe-nomenon for the mouths of a pocket. Two boundary trian-gles that share a common edge may or may not belong tothe same mouth depending on which shared edges belongto the pocket.

Pocket panel. Pockets can be computed without open-ing the pocket panel, but a more detailed exploration re-quires interaction with the software, which is facilitatedby that panel. A useful feature is the ‘Shapewire’ button,which can be used to display the edge skeleton of the dualcomplex together with the pockets. The skeleton does notblock the view and helps positioning the pockets relativeto the complex. The panel also provides a means to stepthrough the sequence of individual pockets and to selectpockets by their number of mouths. The main design of

Figure V.23: Pocket panel of the Alpha Shape software.

the pocket panel, shown in Figure V.23, is similar to thatof the signature panel. It contains a window for its ownsignatures, which start after the index � of the first chosencomplex. The second index, � , can be chosen anywherebetween � and the maximum. It is used to eliminate an-cestor sets of tetrahedra whose indices are larger than orequal to � . In other words, all tetrahedra � � , with � � ,are treated like � in the computation of pockets. This elim-ination of large pockets helps in the exploration of detailedstructures, such as side pockets of larger pockets. An ex-

86 V SHAPE FEATURES

ample is shown in Figure V.24, which shows the pocketsfilling the system of narrow tunnels visible in the secondview in Figure V.18, but with � set such that the systemof wider tunnels visible in the third view of Figure V.18are still open. The pockets thus only fill the remains of thenarrow tunnels, and as can be seen in the first view, theseremains are not connected.

Figure V.24: Three axis-parallel views of the pockets represent-ing the narrow tunnel system decomposed into pieces by openingup the wide tunnel system. Both systems are shown as holes inFigure V.18.

Displaying interfaces. [The input is a complexed collec-tion of proteins.] [Mention the issue of water molecules,which we remove for simplicity.] [Talk about the weightedsquare distance function over the interface.] [Show onefigure with iso-lines of that function.]

A human growth hormone example. [Say a few worksabout the particular two proteins.] [Show the sequence offigures illustrating the interface filtration.]

Bibliographic notes. The persistence software has beendeveloped by Afra Zomorodian and is described in his dis-sertation [4]. It is currently not part of the Alpha Shapesoftware. The pocket software has been developed byMichael Facello and is described in his dissertation [1].Using this software, Liang and collaborators [3] studied

fifty-one proteins and their cavity structure. The most in-teresting outcome of that study is perhaps that in about80% of the cases, the pocket with the largest volume isalso the biologically active site of the molecule. In manyinstances, the largest pocket is assisted in its function bysmaller auxiliary pockets in the vicinity. In another appli-cation, Liang and Dill [2] provide numerical evidence thatproteins are packed tighter in the core than near the out-side. The interface software has been developed by Yih-En (Andrew) Ban but is not yet complete. It is built ontop of the Alpha Shapes software but requires a varietyof additional features to be useful to biologists. Some ofthese features can be seen in visualizations of interfacespresented in this section.

[1] M. A. FACELLO. Geometric Techniques for MolecularShape Analysis. Ph. D. thesis, Dept. Comput. Sci., Univ. Illi-nois, Urbana, 1996.

[2] J. LIANG AND K. A. DILL. Are proteins well-packed? Bio-physics J. 81 (2001), 751–766.

[3] J. LIANG, H. EDELSBRUNNER AND C. WOODWARD.Anatomy of protein pockets and cavities: measurement ofbinding site geometry and implications for ligand binding.Protein Science 7 (1998), 1884–1897.

[4] A. ZOMORODIAN. Analyzing and Comprehending theTopology of Spaces and Morse Functions. Ph. D. thesis,Dept. Comput. Sci., Univ. Illinois, Urbana, 2001.

Exercises 87

Exercises

1. Gabriel graph. Let � be a finite set of points in� � .

The Gabriel graph of � consists of all edges � � forwhich F � � � F � � F � � *IF � � F � ��*KF � �for all points *+��� �

�� � � .

(i) Prove that all edges in the Gabriel graph belongto the Delaunay triangulation of � .

(ii) Prove that the Gabriel graph is connected.

2. Ancestor sets in the plane. Consider the Delaunaytriangulation of a finite points set in

� � . Write � if the two Delaunay triangles share an edge and bothorthocenters lie on ’s side of that edge.

(i) Prove that is a partial order.(ii) Prove that the ancestor sets of any two different

sinks in the order are disjoint.(iii) Explain how the Gabriel graph relates to the an-

cestor sets of the sinks.

3. Collapsible complexes. Recall that a contractibletopological space has the homotopy type of a point.We call a simplicial complex collapsible if there is asequence of collapses that reduces it to a single ver-tex. Clearly, if

�is collapsible then its underlying

space is contractible.

(i) Prove that if�

is embedded in� � then

�is collapsible iff its underlying space is con-tractible.

(ii) Give an example of a simplicial complex em-bedded in

���that is not collapsible but whose

underlying space is contractible.

4. Barycentric subdivision. Let�

be a simplicialcomplex and let

� � � denote its barycentric subdi-vision.

(i) Show that each � -simplex in�

gives rise to� � � ��

-simplices in� � � , for �

� � � � .(ii) Prove that the Euler characteristic of

�and

� � � are the same.

5. Connectivity of voids. A void of a space-filling dia-gram is by definition connected but can have handlesand islands.

(i) How would you define the Betti numbers of avoid?

(ii) Following your definition, can the Euler char-acteristic of a void be any integer or are thererestrictions?

6. Paired parentheses. Consider a sequence of �@�parenthesis of a well-formed expression, such as forexample ��� � ��� � � ����� . A pairing is a perfect matchingbetween the opening and closing parentheses suchthat the opening parenthesis precedes the closingparenthesis in every pair. Each parenthesis has aninteger position in the sequence, and the length of apair is position of the closing minus the position ofthe opening parenthesis.

(i) Given a pairing, let � be the sum of lengths ofthe � pairs. Prove that � � � � � � .

(ii) Prove that � depends on the given sequence butnot on the pairing.

7. Sperner’s Lemma. Let 4 � � be a triangle and�

atriangulation of 4 � � . The label of a vertex in

�that

lies on the edge * � is either * or � , for every * � �� 4 � ��4 � � � � , and the label of a vertex in the interiorof 4 � � is either 4 , � or � .

(i) Prove that there exists at least one triangle in�

whose vertices have three different labels.

(ii) Strengthen the result in (i) by proving that thenumber of triangles with three different labelsis odd.

(iii) What would be a natural generalization of theseresults from a triangle to a tetrahedron?

8. 2-manifolds. Recall that a 2-manifold is a topologi-cal space in which every point has an open neighbor-hood homeomorphic to

� � .

(i) Show that a two-dimensional simplicial com-plex in which every edge belongs to exactly twotriangles is not necessarily a 2-manifold.

(ii) Show that a simplicial complex in which theclosed star of every vertex is the triangulationof a disk is necessarily a 2-manifold.

88 V SHAPE FEATURES

Chapter VI

Density Maps

Morse theory grew out of the study of the variationalmethods in analysis. The initial interest focused on high-and possibly infinite-dimensional settings. In this chapter,we introduce Morse theory with an emphasis on the two-and three-dimensional cases. Possibly the best known re-sult in Morse theory is the relation between the criticalpoints of a smooth real-valued function over a manifoldand the Euler characteristic of that manifold. Because ofthis relation, Morse theory is sometimes also referred to ascritical point theory.

We use two sections to introduce the basic setting ofMorse theory and one to explain the concept of molecu-lar pockets in Morse theoretic terms. In the second sec-tion, we make an effort to relate the Morse theoretic con-cepts with the discussion on connectivity. While Morsetheory requires differentiable spaces and thus seems tobe built on rather specialized assumptions, we will seethat many themes are familiar from Chapter IV. In someways, Morse theory is but a different language or frame-work to talk about connectivity. The differentiability as-sumption allows the introduction of otherwise undefinedconcepts. Together with suitable non-degeneracy assump-tions, it brings order into the complicated world of ge-ometric form. [The material will have to be partially re-arranged according to the following plan of sections:]

VI.1 Morse FuncitonsVI.2 Critical PointsVI.3 Morse-Smale ComplexesVI.4 Jacobian Submanifolds

Exercises

89

90 VI DENSITY MAPS

VI.1 Smooth vs. Piecewise Linear

A Morse function is a smooth real-valued map over a man-ifold that satisfies certain non-degeneracy assumptions.This section introduces Morse functions as a crucial piecein the basic mathematical framework of Morse theory.

Sweeping a torus. Morse theory talks about manifoldsand smooth functions over these manifolds. The primarygoal is to find out about the topological type of the mani-folds through a differential analysis of the functions. Thestandard introductory example is the torus � embeddedin upright position in

���and the height function this em-

bedding defines. Formally, � � � ��

is defined bymapping each point * � � to its distance from the * � * � -plane. For each 4;� �

, we consider the set of points withheight less than or equal to 4 ,

��� � � * � � � � �* � � 4 �As illustrated in Figure VI.1, � � changes its topologyonly at certain critical values of 4 .

1-cellattach attach attach

2-cellattach1-cell

p

q

r

0-cell

s

( )

r

q

p

( )s

( )

0

h

h

h

h

( )

Figure VI.1: Evolution of the torus in the sweep from bottom totop and the corresponding construction by attaching a 0-cell, two1-cells, and a 2-cell.

It is instructive to look at the evolution of the homotopytype of � � . A � -cell, � � , is a space homeomorphic tothe � -dimensional ball,

� � ��� * � � � � FH*KF � � . Eachtime the homotopy type of � � changes, we can interpretthis event as attaching a cell of some dimension. The evo-lution of the torus during the sweep and the interpretationof attaching cells is illustrated in Figure VI.1. To definewhat attaching a cell exactly means, note that the bound-ary of � � is a � � � � � -sphere, � � � � . The attachment of � �to a space � requires a continuous map � � � � � � � � ,which we refer to as the gluing map. Then � with � � at-tached by � is the space � ��� � � obtained by identifyingevery points * � � � � � with ���* � � � . All interior points

of � � do not belong to � . For � � � we have emptyboundary, � � � � � , so attaching a point or 0-cell is thesame as taking the disjoint union.

Smooth manifolds. In order to relate the topologicaltype to differential properties, we need to restrict ourselvesto sets for which such properties are defined. We needsome basic definitions from differential geometry to ex-press these restrictions.

A map�

from an open set � � � to another open set� � � � is smooth if the partial derivatives of all orders

exist and are continuous. For general and not necessarilyopen sets � � � � and � � � � , the map

� � � � �is smooth if for every * � � there exists an open set � � � containing * and a smooth map

� � thatcoincides with

�throughout

� � . Note that the com-position of two smooth maps is smooth. A diffeomor-phism is a smooth homeomorphism

� � � � � whoseinverse is also smooth, and two spaces are diffeomorphicif there is a diffeomorphism between them. A subset� � � � is a smooth manifold of dimension � � � ifeach * � � has a neighborhood � ��� that is diffeo-morphic to an open subset

� � � . A particular diffeo-morphism � � ��� � � is called a parametrizationof � � � , and its inverse � � � ��� ��� �

is called

a coordinate system on � � � . As an example we mayconsider the 2-sphere � � � � * � � � � F�*IF � � . We cancover � � with six open hemispheres defined by

� * � � �for

� � ������� � . As shown in Figure VI.2, each hemispherecan be parametrized by orthogonal projection to one of thecoordinate planes. For a point * ��� , we can construct

Figure VI.2: The upper open hemisphere is parametrized by pro-jection to the � � � � -plane.

a � -dimensional hyperplane in� � that best approximates

� near * . The tangent space at * is the � -dimensionalhyperplane � / through the origin of

� � that is parallelto this best approximating hyperplane. The elements ofthe vector space � / are called tangent vectors to � at

VI.1 Smooth vs. Piecewise Linear 91

* . Note that for every smooth curve� � � � � passing

through * , the tangent vector � �� 1 ��* � is a tangent vector and

thus an element of � / .

Critical points. The homotopy type of the partial torus� � changes when 4 passes the height value of the points� , � ,

�, and � marked in Figure VI.1. These are the points

with horizontal tangent planes. Assuming a local coordi-nate system in a neighborhood, a point � � � is a criticalpoint of � if all derivatives vanish,

���� * � � � � �

� �

If � is a critical point then � � � � is a critical value. Non-critical points and non-critical values are also referred toas regular points and regular values.

Just like the first derivative can be used to computethe best linear approximation to � , the second derivativecan be used to compute the best quadratic approximation.Specifically, the Hessian of � at * � � is the matrix ofsecond derivatives,

�* � �#

� � �� * � � * � ��* � % �

A critical point � is non-degenerate if � � � is non-singular, that is, � � � � � � ��

� . Non-degenerate criticalpoints are isolated, which means there is an open neigh-borhood without other critical points. We call � a Morsefunction if all critical points are non-degenerate.

A quadratic function in two variables has only threetypes of critical points, maxima, saddles, and minima. Theorigin is a critical point for every possible assignment ofsigns to � �* � �:* � ��� � * � � � * �� , and it is a maximum for� � � , a saddle for

� � � or � � � , and a minimum for� � � .

The saddle is the most interesting case of the three becausea circle drawn around it has two peaks alternating with twopits. In contrast, a circle drawn around a regular point hasonly one peak and one pit. Critical points with small cir-cles that oscillate more often than twice are necessarilydegenerate.

Index. The Hessian is symmetric and we can computeits eigenvalues, � �

� � �� � � � � � � , where

�is the

dimension of the manifold � . Assuming the Hessian isnon-singular, all eigenvalues are non-zero. The index of �at a non-degenerate critical point � is the number of neg-ative eigenvalues and is denoted as � � � � . Recall that theeigenvectors define an orthogonal coordinate system in the

tangent space of � . The index is then the number of eigen-vector directions along which � decreases. For example,the indices of the critical points � , � ,

�, and � in Figure

VI.1 are 0, 1, 1, and 2. This fact is also expressed in thelemma of Morse.

MORSE LEMMA. Let � be a non-degenerate critical pointwith index � � � � � � of � � � �

�. There is a

neighborhood

of � and a local coordinate system� � � ��� � � � � � ��� �

�in

with � � � � � � � for all�

and

� � � � � � � � ��� � � � � � ��

���� � ��

��� � � � � � � � � ��

throughout

.

Note that the dimensions of the cells attached to the evolv-ing torus in Figure VI.1 are equal to the indices of thecorresponding critical points. This is generally the casebecause a critical point � with index � � � � � � connectsto the past along � directions. These directions span a � -dimensional cell needed to realize the connections.

Degenerate critical points. A 1-dimensional manifoldis a closed curve. A connected open subset is an open in-terval, which is homeomorphic to

�� . Consider the height

function � � � � ��

defined by � �* � � � * � � . Thederivative vanishes at 0. The second derivative vanishestoo, � � � � � , which identifies 0 as a degenerate crit-ical point. Geometrically, the degeneracy is manifestedby the fact that an arbitrarily small perturbation can re-move the critical point or turn it into two non-degenerateones, a maximum and a minimum. Figure VI.3 illustratesthe instability of the degenerate critical point. A simi-

Figure VI.3: From left to right, graphs of the function �� � ��� � �

for ��� �, � � �

, and ��� �. Critical points are marked.

The middle function has a degenerate critical point at 0, which isunfolded in different ways by the other two functions.

lar degenerate critical point exists for the monkey saddleshown in Figure VI.4. It may be specified as the graph

92 VI DENSITY MAPS

of � ��* � �:* � � � * � � � �@* � * �� , which is the real part of�* � � � * � � � . As we go around a circle centered at the ori-gin, the function � has three peaks at ��� , � � ��� , and � � ��� ,and three pits at

���� , ��� ��� , and � � ��� . The only critical

point is �� � � � � � . The matrix of second derivatives at

that point is

� � � �� � * � �

� * ��� * � �

� * ��� �

which is zero at 0.

Figure VI.4: Monkey saddle with degenerate critical point.

All critical points in the above examples are isolated,but there are others that are not. For example, for� �* � �:* � � � * � � the entire * � -axis is critical, but none ofits points are isolated. Similarly, if we lay down the toruson its side, the height function has a circle of minima andanother circle of maxima.

Euler characteristic. Let � be a compact and smoothmanifold without boundary and � � � �

�a Morse func-

tions. We will see in Section VI.2 that we can construct a� -cell for each index- � critical point so that � can be con-structed by successive attachment of these cells. Let � � bethe number of critical points of index � . As always, theEuler characteristic is the alternating sum of cells, whichis also the alternating sum of critical points,

� � � � � � � � � �� � � � ��� .�� � �

For example for the torus we get � � � � � � ���

��� � � ��

� . In words, for every minimum and maximum we getexactly one (non-degenerate) saddle point, no matter whatMorse function we use. For the sphere we get � � � � ���

� ���� . This implies that every Morse function of the

sphere has at least two (non-degenerate) critical points. Aminimum example is the ordinary height function, whichhas a minimum at the south-pole and a maximum at thenorth-pole.

Bibliographic notes. The original development ofMorse theory from its variational background is describedby Morse [3] and by Seifert and Threlfall [4]. Milnor’slater book [2] emphasizes the topological analysis of man-ifolds and has since become a standard reference in Morsetheory. Good introductory texts to the related subject ofdifferential topology are the books by Guillemin and Pol-lack [1] and by Wallace [6]. A good introduction to lin-ear algebra including an intuitive discussion of eigenval-ues and eigenvectors is the book by Strang [5].

[1] V. GUILLEMIN AND A. POLLACK. Differential Topology.Prentice-Hall, Englewood Cliffs, New Jersey, 1974.

[2] J. MILNOR. Morse Theory. Princeton Univ. Press, New Jer-sey, 1963.

[3] M. MORSE. The Calculus of Variations in the Large. Amer.Math. Soc., New York, 1934.

[4] H. SEIFERT AND W. THRELFALL. Variationsrechnen imGroßen. Published in the United States by Chelsea, NewYork, 1951.

[5] G. STRANG. Introduction to Linear Algebra. Wellesley-Cambridge Press, Wellesley, Massachusetts, 1993.

[6] A. WALLACE. Differential Topology. First Steps. Benjamin,New York, 1968.

VI.2 Morse-Smale Complexes 93

VI.2 Morse-Smale Complexes

In this section, we introduce the gradient of a Morse func-tion and use it to construct the � -cells whose inductive at-tachment reproduces the evolution of the homotopy typeof � � , for continuously increasing real threshold 4 .

Gradient flow. The gradient of a linear map � �* � �� 4 � * � is the vector ��� � � � � � 4 � ��4 � � � � ���4 � � . It is theprojection of a normal vector of the graph of � and pointsin the direction of the steepest ascent. The same conceptcan also be defined for a Morse function � � � �

�.

Assuming an orthonormal local coordinate system at * ,the gradient of � is ��� � � � � � ���� / � � ���� / 8 � � � � � ���� /�� � , sameas for linear maps. We can define it also without refer-ence to a coordinate system. A vector field,

�, maps

every point * � � to a tangent vector� ��* � � � / .

The gradient is the particular vector field that satisfies�� � ����� � � � � � � � , for every vector field�

, where� � � �

is the directional derivative of � along�

. For example, ifwe have a smooth curve � � � � � with velocity vector���� 1 then the derivative of � � � � �

�can be computing

using the gradient as

� � � � �� , � ���

� , � ��� � � � �The gradient vanishes precisely at all critical points of � .If we start at a regular point and follow the gradient wetrace out a path, which is a solution to the ordinary dif-ferential equation -* � ��� � � � �* � . This path is called anintegral line. It depends smoothly on the initial condition,which is its regular starting points. Two integral lines cantherefore not cross. Neither can an integral line fork, andbecause we can reverse the gradient vector field by con-sidering � � , two integral lines can also not merge. Thepatterns of integral lines in the neighborhoods of a regu-lar and several critical points on a smooth 2-manifold areshown in Figure VI.5

Figure VI.5: From left to right, the flow in the neighborhoods ofa regular point, a minimum, a saddle, and a maximum.

Stable manifolds. Every regular point belongs to an in-tegral line, and two maximal integral lines are either dis-

joint or the same. Every maximal integral line is open atboth ends and thus a map of an open interval or, equiva-lently, of the real line, � � � � � . It approaches twocritical points, which we refer to as its origin and destina-tion, ��� ��� � � � � 1��

�� � �, � and � � � � � � ��� 1�� � � �, � .

It is convenient to consider each critical point as an inte-gral line by itself so that the collection of integral linespartitions � . The stable manifold of a critical point � isthe union of integral lines with destination � and, symmet-rically, the unstable manifold is the union of integral lineswith origin � ,

� � � � � �.����� � �

� � � � � � � � �

������ � �

� � � �

The stable manifold of a minimum is the minimum itself.The stable manifold of a saddle is an open curve, which isthe union of two integral lines and the saddle itself. In a 2-manifold � , the stable manifold of a maximum is an opendisk, which is the union of a circle of integral lines andmaximum itself. All three cases are illustrated in FigureVI.6. Note that the dimension of each stable manifold isthe index of the critical point that defines it, � ��� � � � � �� � � � .

Figure VI.6: From left to right, that stable manifold of a min-imum, a saddle, and a maximum of a two-dimensional Morsefunction.

Each stable manifold is the injective image of an openballs. However, as indicated by the examples in FigureVI.6, the closure of a stable manifold is not necessarilyhomeomorphic to a closed ball. Nevertheless, the clo-sure of each stable manifold is the union of (open) sta-ble manifolds. The collection of stable manifolds thussatisfies the two conditions of an open complex: its cellspartition � and the boundary of every cell is a union ofother cells. By symmetry, everything we said about sta-ble manifolds is also true for unstable manifolds. Thedimension of the unstable manifold of a critical point �is the co-dimension of the stable manifold, � ��� � � � ���� � ��� � � � � � � ��� � � � � � � .

94 VI DENSITY MAPS

Morse-Smale functions. We may refine the complexesof stable and unstable manifolds by forming unions ofintegral lines that agree on both limiting critical points.This amounts to overlaying the two complexes. In do-ing so, it is convenient to assume that the stable and un-stable manifolds intersect in a generic manner. To ex-plain what this means, we consider a point * common to� � � � � � and

� � � � . The intersection is transversalat * if the tangent spaces � / and / span the tangentspace � / . Equivalently, the dimension of the intersec-tion of the two tangent spaces is �

� � ��� � � / � / � �� ��� � � � ��� � � ��� � .

A Morse-Smale function is a Morse function ��� � ��

whose stable and unstable manifolds intersect onlytransversally. For example, the height function of the up-right torus in Figure VI.1 is Morse but not Morse-Smalebecause the stable 1-manifold of the upper saddle,

�, meets

the unstable 1-manifold of the lower saddle, � , along en-tire one-dimensional integral lines, � ��� � � � � � � � � ��� �� � �

� � � � � � � � � � ��� � � � � � ��� � . Morse-Smalefunctions are again dense in the set of maps from � to�

. In the case of the upright torus, it suffices to tilt it everso slightly sideways in order to get transversality. Assum-ing a Morse-Smale function, we define the Morse-Smalecomplex as the collection of connected components of in-tersections of stable and unstable manifolds. We can see inFigure VI.7 that it is indeed necessary to take components.

maximumsaddleminimum

Figure VI.7: Solid stable and dashed unstable 1-manifolds withoverlaid dotted iso-lines of a rectangular portion of a Morse-Smale function. The two bold 2-cells share the same origin anddestination.

Shape of Morse-Smale cells. Note that all 2-cells inFigure VI.7 have four sides, provided we count an arctwice if it bounds the cell on both sides. In other words,all two-dimensional Morse-Smale cells are quadrangles.

QUADRANGLE LEMMA. Every 2-cell of a two-dimen-sional Morse-Smale complex is a quadrangle.

PROOF. The vertices of a 2-cell alternate between saddlesand other critical points, and the non-saddles alternate be-tween minima and maxima. Any such cyclic sequence haslength � � , for � � � . We take two copies of a � � -gon andglue them together along the shared boundary. Saddles be-come regular points, minima remain minima, and maximaremain maxima. The result is a topological 2-sphere with� minima and � maxima. The Euler characteristic of the2-sphere is �

� � � � , which implies � � � .The 3-cells of a Morse-Smale complex may have the

structure of a cube, but they can also assume more gen-eral shapes with arbitrarily many saddles alternating be-tween index-1 and index-2 separating the minimum fromthe maximum. The common features of all 3-cells are thatthey have one minimum and one maximum, and all 2-cellsin the boundary are quadrangles. A few examples of 3-cells are shown in Figure VI.8.

Figure VI.8: Three 3-cells of a three-dimensional Morse-Smalecomplex. From left to right they have one, two, and three index-1saddles and the same number of index-2 saddles.

Piecewise linear height functions. Height functionsover manifolds occur in many practical problems, but theyare never smooth in the mathematical sense of the word.An example is a surface � of a molecule model and theelectrostatic potential on this surface. The surface wouldtypically be given as a triangulating simplicial complex

�,

as shown in Figure VI.9, and the function would be speci-fied by its values at the vertices. Using linear interpolation,we can extend these values to a continuous function overthe entire surface.

We need some definitions to explain the linear interpo-lation. Each point * of a triangle 4 � � is a convex com-bination of the three vertices, * � � 4 � � � � � � with

VI.2 Morse-Smale Complexes 95

Figure VI.9: Portion of a triangulated surface of a molecule.

�� � � � � � and � � � � � � � . The three parame-

ters � � � � � are unique and referred to as the barycentriccoordinates of * . The value at * is now defined as theanalogous combination of values at the vertices,

� ��* � �� � � 4 � � � � � � � � � � � � � �

Note that the barycentric coordinates of the vertex 4 of4 � � are �� � and � � � � � , which implies that the

linearly interpolated � agrees with the value specified at 4 .Furthermore, for points * along the edge 4 � we have

� �� . The values computed for * within the two triangles thatshare 4 � thus agree, which implies that � is continuous.

Lower stars. The height function ��� �� � ����

is con-tinuous but not smooth. It still shares many characteristicswith Morse functions. Define the star of a vertex � � �as the collection of simplices that contain � , and the lowerstar as the subset for which � is the highest vertex,

����� � ��� � �

�� � ��

����� � ��� ���

�� � � � � � � � � � ��� � � � �

It is convenient to assume pairwise different height valuesat all vertices so that each simplex belongs to exactly onelower star. With this assumption, the lower stars partitionthe complex

�. Figure VI.10 illustrates the definitions by

showing the lower stars of vertices that behave like regularpoints, minima, saddles, and maxima. More complicatedlower stars are possible, and we cannot remove them justby perturbing the height values. Instead, we may considera vertex whose circle of neighbors alternates � � � � � �

times between lower and higher values of � as a � -foldsaddle. This interpretation is consistent with the result that

minimumregular maximumsaddle

Figure VI.10: The star of every vertex in the triangulation of a2-manifold is an open disk. The shaded portions are lower stars.

the alternating sum of critical points is equal to the Eulercharacteristic of � . The alternating sum of simplices inthe lower stars of a regular point, minimum, saddle, maxi-mum, and � -fold saddle are � , � , � � , � , and ��� . It followsimmediately that � is the number of minima and maximaminus the number of saddles counted with multiplicity.

Another similarity between smooth and piecewise lin-ear height functions arises when we sweep in the direc-tion of increasing height. Assuming � � � � �� � � � � forall �

�� � , we sort the vertices in the order of increas-ing height. Indexing the vertices accordingly, we define� � as the the union of the first � lower stars and note that� � is a simplicial complex. The sequence of complexes

� ��� �� � � � � � ��� � � � �

is a filtration and a discrete version of the evolution of �during the sweep. Adding the lower star of a regular pointdoes not change the homotopy type of

� � , and adding thelower star of a critical point is similar to attaching a cell inthe smooth case.

Bibliographic notes. The gradient and related conceptsfrom vector calculus are intuitively described in the book-let by Schey [3]. The transversality condition for stableand unstable manifolds has its origin in dynamical systemand is named after Steve Smale [4]. The Morse-Smalecomplex has been introduced recently in [2] along withalgorithms for piecewise linear height functions over 2-manifolds. The idea of writing a triangulated manifold asthe disjoint union of lower stars goes back to Banchoff [1].

[1] T. F. BANCHOFF. Critical points and curvature for embed-ded polyhedra. J. Differential Geometry 1 (1967), 245–256.

[2] H. EDELSBRUNNER, J. HARER AND A. ZOMORODIAN.Hierarchy of Morse-Smale complexes for piecewise linear2-manifolds. Discrete Comput. Geom., to appear.

96 VI DENSITY MAPS

[3] H. M. SCHEY. Div, Grad, Curl and All That. An InformalText on Vector Calculus. Second edition, Norton, New York,1992.

[4] S. SMALE. The Mathematics of Time. Essays on Dynam-ical Systems, Economic Processes, and Related Topics.Springer-Verlag, New York, 1980.

VI.3 Construction and Simplification 97

VI.3 Construction and Simplifica-tion

[Explain the sweep construction for two-dimensionalMorse-Smale complexes using the simulation of differetia-bility.] [The most important part of the algorithm is maybethe handle slide, which is the only restructuring operationnecessary to go between different complexes.] [That oper-ation has been used in early work on Morse theory, maybethe first time by Smale(?).]

[Build a hierarchy through prioritized cancellation.] [Wecan describe the cancellation as a combinatorial restruc-turing operation and we only need this one to go up thehierarchy.] [Again, there should be reference to the earlymathematics literature on the topic of cancellation.]

Bibliographic notes.

[1] C. L. BAJAJ, V. PASCUCCI AND D. R. SCHIKORE. Visu-alization of scalar topology for structural enhancement. In“Proc. 9th Ann. IEEE Conf. Visualization, 1998”, 18–23.

[2] H. EDELSBRUNNER, J. HARER AND A. ZOMORODIAN.Hierarchy of Morse-Smale complexes for piecewise linear2-manifolds. Discrete Comput. Geom., to appear.

[3] H. EDELSBRUNNER, J. HARER, V. NATARAJAN AND

V. PASCUCCI. Hierarchy of Morse-Smale complexes forpiecewise linear 3-manifolds. Manuscript, Dept. Comput.Sci., Duke Univ., Durham, North Carolina, 2001.

[4] M. VAN KREFELD, R. VAN OOSTRUM, C. L. BAJAJ, V.PASCUCCI AND D. R. SCHIKORE. Contour trees and smallseed sets for iso-surface traversal. In “Proc. 13th Ann. Sym-pos. Comput. Geom., 1997”, 212–220.

98 VI DENSITY MAPS

VI.4 Simultaneous Critical Points

[Explain the work with John on the topic and mention pa-pers by Hassler Whitney and books in Catastrophy The-ory.]

Bibliographic notes.

[1] V. I. ARNOL’D. Catastrophy Theory. Third edition,Springer-Verlag, Berlin, Germany, 1992.

[2] H. EDELSBRUNNER AND J. HARER. Jacobian submani-folds of multiple Morse functions. Manuscript, Duke Univ.,Durham, North Carolina, 2002.

[3] T. POSTON AND I. STEWART. Catastrophy Theory and ItsApplications. Dover, Mineola, New York, 1978.

Exercises 99

Exercises

The credit assignment reflects a subjective assessment ofdifficulty. Every question can be answered using the ma-terial presented in this chapter.

1. Section of triangulation. (2 credits). Let�

be atriangulation of a set of � points in the plane. Let be a line that avoids all point. Prove that intersectsat most �@� � � edges of

�and that this upper bound

is tight for every � � � .

100 VI DENSITY MAPS

Chapter VII

Match and Fit

As a general theme in biology, questions are almostalways about populations and rarely about individuals.This is particularly true on the molecular level. Themolecules that participate in the mechanism of life tendto be large and composed of small molecules. Minorvariations in the type or arrangement of the componentsare frequently inessential and do not alter the role of amolecule within the larger organization. But then again,there are seemingly small variations that do have signif-icant consequences. The underlying question is one ofdefinition: when do we call two molecules the same orof the same type, and how do we quantify and assess thatnotion of sameness. There are various approaches to thequestion applied to proteins, including the comparison ofamino acid sequences, space curves modeling backbones,and shapes formed by space-filling diagrams. Instead ofasking how similar two shapes are, we may also ask therelated question of how well two shapes fit side by side.The complementarity question is a similarity question be-tween one shape and (a portion of) the complement of an-other shape. It really makes sense only for space-fillingdiagrams and does not seem to apply to information ex-pressed in terms of sequences and space curves. Thesimilarity question is at the core of human understand-ing, which crucially relies on classification to simplify andcreate order. The complementarity question, on the otherhand, is at the root of natural and other re-production pro-cesses and it takes part in protein interaction, which formsthe basis of functioning life.

As always in this book, we focus on mathematical andalgorithmic methods that shed light on the broader biolog-ical issues. In Section VII.1, we explore rigid motions inthree-dimensional Euclidean space and introduce quater-nions as a tool to specify and compute with rotations. InSection VII.2, we study the problem of finding the bestrigid motion for matching one points set with another. Themeasure of choice is the root mean square distance be-

tween the two sets. In Section VII.3, we look at the re-lated problems of sampling a rigid motion and of coveringthe space of such motions with small neighborhoods. InSection VII.4, we apply the methods to questions of sim-ilarity and complementarity. In particular, we look at theproblem of identifying matching subsequences with min-imum root mean square distance and at score functionsthat assess the shape complementarity of two space-fillingdiagrams.

VII.1 Rigid MotionsVII.2 Optimum MotionVII.3 Sampling and CoveringVII.4 Alignment

Exercises

101

102 VII MATCH AND FIT

VII.1 Rigid Motions

A motion in three-dimensional Euclidean space can be de-composed into a rotation and a translation. In this sectionwe consider different ways to mathematically represent ro-tations, and we focus on quaternions, which provide a par-ticularly elegant mathematical framework.

Rotation and translation. A rigid motion in� �

is anorientation-preserving isometry of three-dimensional Eu-clidean space. More formally, it is a map � � � � �

� �

such that FH*� � F � F � �* � � � � � � F and � �* � �� �

� �* � � � � � � for every pair * ����� ���. As illustrated in

Figure VII.1, a rotation is a rigid motion that preserves theorigin, and a translation is a rigid motion that preservesdifference vectors. Every rigid motion can be written as

1x 2x

3x

Figure VII.1: The translation of the boldface original coordinatesystem preserves the directions of the axes while the rotation pre-serves their anchor point.

the composition of a rotation and a translation: � � �� .Using matrix notion, we can write � ��* � � � * � �

, where� is an orthonormal 3-by-3 matrix with unit determinantand

�is a 3-vector:�

� � �� �� ��� �

�� �

� ��� �

����

����� �

�� ��

��

�� �

�� �

��

�� * �* �* �

�� � �

� , �, �, ��� �

The rotation matrix moves the unit coordinate vectors tothe vectors

�� ,

�� and

�� that make up the columns of

� . A rotation about a coordinate axis has a comparativelysimple rotation matrix. For example, rotating about the* � -axis gives

� �

�� � � �� ��� � � �� �� � � �2�� �

�� �

The angle of rotation about a coordinate axis is referred toas an Euler angle. Leonhard Euler proved that any rotation

can be obtained by a sequence of three rotations about co-ordinate axes. In general, the composition of any two ro-tations is another rotation. Indeed, the rotations form theso-called special orthogonal group of 3-by-3 matrices, ab-breviated as SO � � � . Note, however, that this group is notabelian because the multiplication of matrices and there-fore the composition of rotations is not commutative. It isimportant to specify the Euler angles in a fixed sequenceas other sequences of the same angles usually specify dif-ferent rotations. It is mostly true that two different tripletsof angles specify different rotations, but there are excep-tions. Consider for example a rotation by � about the * � -axis, followed by a rotation by � � ��� about the * � -axis,followed by a rotation by about the * � -axis and notethat we get the same composite rotation if we switch �and . In other words, the map

� � � � � � � � � � � SO � � �is not injective. This suggests that the Cartesian productof three circles is not an appropriate model and we willindeed see shortly that � � � � � � � � is not homeomorphicto the space of rotations.

Quaternions. As an alternative to orthonormal 3-by-3matrices, we may use quaternions to represent rotations.Quaternions can be viewed as a generalization of complexnumbers:

� � � � �I��

�J��

�K

� � �where � � , �

� ,�� and � � are real numbers and I, J and K

are three different imaginary units. In preparation of anoperation that multiplies two quaternions, we specify howto multiply the imaginary units:

I J K

I � � K � J

J � K � � I

K J � I � �

Note that reversing two different imaginary units changesthe sign of the result. If �

� � � �I��

�J��

�K

�� is another

quaternion then the product of � and � is

� �� � � � � � � �

��� �

���� �

�� � � ��

I � � � ��

� ��� � � �

�� � � �

� � � ��J � � � �

� ���� � � �

�� � � �

� ����

K � � � � � � ���� �

����

� �� � � � �

The product � � has a similar form but six of the terms havetheir signs changed. Sometimes it is more convenient to

VII.1 Rigid Motions 103

think of a quaternion as a vector in� �

. We can expressthe product of two quaternions in terms of an orthogonal4-by-4 matrix and a vector. This can be done by expandingeither the first or the second quaternion to a matrix:

� ��

����

� ��

�� �

�� �

���

�� �

���

���

���

� ��

���

� ���

��

� ������

����

� ������ �

����� � � � �

� ��

����

� ��

�� �

�� �

���

�� � �

� ����

� ���

� � ���

��� �

��

� ������

����

� ������ �

����� � � � �

Take a moment to verify that the matrices�

and�

areindeed orthogonal.

�differs from

�by having the lower

right 3-by-3 submatrix transposed. While the product oftwo quaternions is another quaternion, the scalar productis a real number: � � � � � � � � � �

���

� ����

� � � � � �As usual, we can use the scalar product to define the lengthof a vector: F � F � � � � � � � . Similar to complex num-bers, the conjugate of a quaternion is obtained by negat-ing the imaginary parts: � � � � �

� I�� � J

�� � K

�� . Ob-

serve that the matrices associated with � � are the trans-poses of those associated with � . Since the matrices areorthogonal, the products with their transposes are diago-nal:

��� � � ��� � �� , where � is the 4-by-4 identity ma-

trix. Similarly, the imaginary parts vanish when we mul-tiply a quaternion with its conjugate: � � � �

��� � . Thisimplies that every non-zero quaternion � has an inverse,namely � � �

�� � � ��� � . In the special case when � has

unit length, we have��� � � � , � � � � � and � � �

�� � .

Representing rotations. We use purely imaginaryquaternions to represent vectors in

� �and compound mul-

tiplication with unit quaternions to represent rotations. Westart with a few properties, always assuming F � F � � .First, the scalar product

�� � � is preserved if we multiplywith � . This is true from either side and we show it formultiplication from the left: � � � � � � ��� � � � �� � � � � � � �� � � because

� � � � � . This implies in particular that multi-plying with � also preserves length:

� ��� � � � ��� � .

Same as rotation, multiplication with a unit quaternionneither changes the angle nor the length. However, we

cannot use simple multiplications to represent rotationsbecause the product of a unit quaternion and a purelyimaginary quaternion is not in general purely imaginary.Instead, we use the composite product � �

� � � � � . Ob-serve that

� � � � � � � � � � � � � � � � � � � � � � � ����

where�

and�

are the 4-by-4 matrices that correspondto � . We expand the product of the two matrices in Ta-ble VII.1 and see that � � is purely imaginary. Furthermore,since F � F � � , both

�and

�are orthonormal. It follows

that the lower right 3-by-3 submatrix of� � �

is also or-thonormal. This 3-by-3 matrix is the familiar rotation ma-trix � that takes

� � � �� �

�� �

�� � � to

��� � �

. The justifi-cation for � � � � to represent a rotation is not yet complete.Another possibility is that it represents a reflection, whichalso preserves scalar products. However, a reflection re-verses the orientation of a sequence of three vectors, andwe can check that composite multiplication does not. Todo this, we think of a quaternion as composed of a scalarand a vector, �

� � � � � with � � � � � � � � � � � � . The rulesfor computing

� �� � can be rewritten as� � � � �

���� � � �� � � �

� � � � � � � � � �When � and � are purely imaginary then these results sim-plify to � � � �

�� � � and � � � � � . If we now applythe composite product with a unit quaternion � , we get� �� � � � � and � � � � � � � . Notice that

� � � � � � � � � � � � � � � � � � � � ��� � � � �Hence,

� ��� � � is the result of applying the composite prod-uct with the unit quaternion to

� � � , which shows that thecomposite product preserves cross-products, as required.

Axis and angle. The expansion of� � �

given in TableVII.1 provides an explicit method for computing the or-thonormal rotation matrix from the unit quaternion. In thereverse direction, we show that the rotation by an angle

�about the axis defined by the unit vector �

� � � � � � � � � ��

can be represented by the unit quaternion

� � �2�� � � � ��� �� � I � �

�J � �

�K � �

��

As illustrated in Figure VII.2, an observer who looksagainst the direction of the axis sees the vector rotate ina counterclockwise order. The imaginary part of � gives

104 VII MATCH AND FIT

� � � �

����

F � F � � � �� � �� � � �� � � �� � � �� � � � � � � � � � � � � � � � � � � � � � �

��

� � � � � � � � � � � � � � �� � � �� � � �� � � �� � � � � � � � � � ���

� � � � � � � � � � ���

� � � � � � � � � ��� � �� � � �� � � �� � � ��

����� �

Table VII.1: Product of matrices in the representation of a rotation by composite multiplication with unit quaternions.

θ

ur,u r’r

xu r

Figure VII.2: The rotation of the vector � by an angle of�

aboutthe line spanned by � . The three dotted vectors correspond to theterms in the formula of Rodrigues.

the direction of the rotation axis, and the real part deter-mines the angle of the rotation. Note that � � representsthe same rotation as � and that non-antipodal pairs of unitquaternions represent different rotations. In other words,the unit sphere � � in

� �is a double cover of the space

of rotations in� �

. Figure VII.3 illustrates the correspon-dence with a picture in one lower dimension. The space

21

0

x x

x

Figure VII.3: The north- and south-poles correspond to the iden-tity, and points on the equator correspond to rotations by ��� ���

.The dashed great-circle through the two poles represents the setof rotations about a fixed axis.

obtained by identifying antipodal points of � � is usuallyreferred to as the real projective three-dimensional space,or��� �

for short. It is a good model of the set of rotationsin� �

, although we usually prefer � � because it is easier toimagine.

To prove the claimed correspondence, we write the vec-tor

�rotated by

�about the axis defined by � using the

formula of Rodrigues,� � � � �2�� � � � � � � � � � �2�� � � � � � � � � ��� � �which can be seen from Figure VII.2. We show that thiscan also be written in the form � �

� � � � � , where ��

� � �, � � � � � � � and � as given above. Tedious but

straightforward calculations show� � � � � �� � � � � � � � � � � � � � � � � � � � � � �

If we substitute � � � ��� �� and � � � ��� �

� and use theidentities ��� � �

�� �� �

� �2�� �� and ��� � � �2�� � �� � ��� � ��then we obtain the formula of Rodrigues.

Composing rotations. The above relationships providea convenient conversion between unit quaternions andaxis-angle pairs. We have �

� � ��F � F , �� � � � � � F � Fand ��� � � � �� ��F � F � . The composition of two rotationsrepresented by the unit quaternions � and

�is

� � � �� � � � � � � � � � � � � � � � � � � � �Thus, composition of rotations corresponds to multipli-cation of quaternions, and from the product it is easy toagain get the axis and the angle. A more direct geomet-ric description of the composition of two rotations usesthe fact that every rotation can be written as the composi-tion of two reflections, as illustrated in Figure VII.4. Thetwo planes defining the reflections are not unique; theyjust need to pass through the axis of rotation and enclosehalf the angle of rotation. To compose two rotations, wewrite each as the composition of two reflections, makingsure that the second plane of the first rotation is also thefirst plane of the second rotation, as in Figure VII.4. Themiddle two reflections cancel and we are left with two re-flections. The axis of the corresponding rotation is theline common to the two planes, and the angle of rotationis twice the angle enclosed by the planes.

VII.1 Rigid Motions 105

ϕ

ρ

v

w

Figure VII.4: We see three rotations defined by the axis-anglepairs � � � ����� , � ��� � � � and ��� � ����� . Each rotation is the compo-sition of two reflections illustrated by the great-circles at whichtheir planes meet the sphere.

Bibliographic notes. The exposition of quaternions andtheir connection to rotations chosen for this section fol-lows [2]. It is commonly acknowledged that quaternionshave been discovered by Hamilton in 1844 [1]. It is lesswell known that a few years earlier, Rodrigues studied thecomposition of rotations in space and gave a purely geo-metric explanation that is equivalent to Hamilton’s algebra[5]. Even earlier, Gauss recorded his discovery of quater-nions in his unpublished notebook in 1819. We recom-mend the primer by Kuipers [3] for background on rota-tions and the text by Needham [4] for background on themore general context provided by complex analysis.

[1] W. R. HAMILTON. On a new species of imaginary quan-tities connected with the theory of quaternions. Irish Acad.Proc. 2 (1844), 424–434.

[2] B. K. P. HORN. Closed-form solution of absolute orienta-tion using unit quaternions. J. Opt. Soc. Amer. A 4 (1987),629–642.

[3] J. B. KUIPERS. Quaternions and Rotation Sequences.Princeton Univ. Press, New Jersey, 1999.

[4] T. NEEDHAM. Visual Complex Analysis. Clarendon Press,Oxford, England, 1997.

[5] O. RODRIGUES. Des lois geometriques qui regissent lesdeplacements d’un systeme solide dans l’espace, et de lavariation des coordonnees provenant de ces deplacementsconsideres independamment des causes qui peuvent les pro-duire. J. Math. Pures Appl. 5 (1840), 380–440.

106 VII MATCH AND FIT

VII.2 Optimum Motion

In this section, we study an optimization problem thatarises when one attempts to match two molecular struc-tures or to fit two structures snug next to each other. Afterformulating the optimization problem, we solve it usingquaternions representing rotations in three-dimensionalspace.

Problem specification. Suppose we are given two finitecollections of points in

���and a bijection between them.

While entertaining the possibility that the two collectionsare structurally the same or at least similar, we are in-terested in moving one collection so it best matches theother. We need some notation to make this precise. Let ���

� � � � � � � � and� ��� � � � � � � � � be the

two collections and assume that � � corresponds to � � , foreach

�. We use the root mean square or RMS distance to

assess how similar the two collections are. This measureis the square root of the average square distance:

� � � � � �

���� �� �� � � � � F � � � � � F � �

Given a rigid motion � � ��� �� �

, we may apply it tothe first collection and recompute the root mean squaredistance. We are interested in finding the rigid motion� � ��� � � that minimizes the root mean square distancebetween � � �

and�

.

Note that minimizing the root mean square distance isequivalent to minimizing the sum of square distances. Re-call also that every rigid motion can be decomposed intoa rotation followed by a translation. The space of rigidmotions is therefore six-dimensional, namely

� � � � � � ,and it might seem that computing the particular rigid mo-tion that minimizes

� � � � � � � �would be hopeless or at

least difficult. Quite the opposite is true, and the main rea-son for this is the convenience provided by quadratic func-tions. We consider rotations and translations separately.

Optimum translation. Recall that the centroid of a col-lection of points is the average of the points. More for-mally, the centroids of

and � are �

� �� � � � and� � �� � � � . We begin by showing that the best translationmoves � to � . In other words, the translation � �� � � thatminimizes the root mean square distance between � �and

�is defined by �* � � * � � � � � � . A crucial insight

used in proving this fact is that the centroid is the only

point for which the sum of the vectors to the points in thecollection vanishes:�

� � � � � � � � � � � ��� � � � � � � � � � � � � �

This implies that � minimizes the sum of square distancesfrom the � � . Indeed,

� ��* � � � F�*� � � F � is a quadraticfunction with a unique minimum. That minimum is char-acterized by a vanishing gradient:

A � �* � ��

�� � � � � ��* � � � � � � �

As mentioned earlier, the latter sum vanishes iff * � � .We are now ready to prove that the best translation is theone that moves � to � . Let us move every point � � to theorigin of

� �and move the translated copy of � � with it

to � � � � � � � . This operation is illustrated in Figure VII.5.Then the sum of square distances between the correspond-

Figure VII.5: After moving the shaded points ��� to the origin,the (solid) difference vectors all radiate out from the origin.

ing points, � F � � � � � � � F � , is also the sum of squaredistances of the points � � � � � � � from the origin. Thetranslation minimizes the sum iff the origin is the centroidof the points � � � � �� � :

�� �� �

� � � � � � � � � � � � � � � � � � � ���

This implies that the best translation moves � to � , asclaimed.

Optimum rotation. Note that rotating and taking thecentroid commute. In other words, the centroid of

� � �is� � � � . Since every rigid motion can be written as a rota-

tion followed by a translation, � � � , the motion canbe optimal only if translates the centroid of

� � �to the

centroid of�

. We may therefore simplify our problem bytranslating

and independently translating

�such that

VII.2 Optimum Motion 107

both centroids lie at the origin. Equivalently, we may as-sume �

� � � � . Using quaternions, we can express therotation of a point � � as ��� � � � , where � is a unit quater-nion and � � is the pure imaginary quaternion that corre-sponds to � � � � �

, as explained in Section VII.1. Thesum of the square distances after the rotation is

� � � � ��� � � � � F ��� � � � ��� � F �

��� � � � � � F � � F � � �

��� � � � ��� � � F�� � F ��� �The sums of the F � � F � and the F�� � F � are not affected bythe rotation, so minimizing � � � � is equivalent to maxi-mizing the sum of the

��� � � � �� � . Since multiplicationwith a unit quaternion preserves scalar products, we have ��� � � � ��� � � ��� � �� � � . Recall from the previous sec-tion that

��� � �

����

� � � � � � � � � � � � �� � � � � � � � � � �� � � � � � � � � � �� � � � � � � � � � �

����� � � � � �

� � � �

����

� � � � � � � � � � � � �� � � � � � � � � � �� � � � � � � � � � �� � � � � � � � � � �

� ��� � � � � � �

The two matrices are skew symmetric as well as orthogo-nal. The sum that we have to maximize can now be rewrit-ten as �

� � � � � � � � � � � ��� � � � � � � �� � � �

� � � � �� � � � � �� � ��� �

� � ��� � �where � � � �� � � . Take a moment to verify that eachmatrix in this sum is symmetric. Since the sum of sym-metric matrices is again symmetric, we have � � � � .

Eigenvalues and -vectors. We can interpret � � � � ge-ometrically as a quadratic function over four-dimensionalEuclidean space. Short of being able to draw the graph ofthis function in

��, we illustrate the idea in Figure VII.6,

which drops two of the dimensions. Our goal is to find a

Figure VII.6: The plane represents ��� , the partially dotted circlerepresents � � , the surface represents the graph of the quadraticfunction over � � , the dashed lines represent the zero-set and theboldface curve represents the graph of the restriction of that func-tion to � � .point � ��� � for which the quadratic function gives a max-imum. We can compute such a � with a modest amount oflinear algebra.

Recall that the eigenvalues of a square matrix � are thecomplex numbers � � for which the determinant of � � � � �vanishes. The corresponding eigenvectors are the unit vec-tors � � such that ��� � � � � � � . Letting � � � , wehave four eigenvalues, and because � is symmetric, theeigenvalues are all real. It is convenient to order them as� � � � �

� � �� � � . The corresponding eigenvectors are

pairwise orthogonal and therefore span� �

. We can thuswrite any quaternion as a linear combination of the eigen-vectors, �

� � * � � � , and because we are only interestedin unit quaternions, we have � * �� � � . Hence

� � � � � � � �� � � * � � � � � �

�� � � * �� � � �By the assumed ordering of the eigenvalues, we have� � � � � � � , and this maximum is attained for * � � � .The corresponding quaternion is �

� � � . In other words,the optimum rotation is defined by the unit eigenvectorthat corresponds to the largest eigenvalue.

Without bijection. If there is no bijection specified be-tween the two sets then the problem of finding the bestrigid motion seems significantly more difficult. Assum-ing

and

�contain � points each, we could of course

try all ��� bijections, but that would take a long time. Amore effective algorithm alternates between improving the

108 VII MATCH AND FIT

root mean square distance by changing the bijection andby changing the motion. Note that independent of the bi-jection, the best translation always moves the centroid of

to the centroid of�

. So we may again assume that bothcentroids are at the origin and restrict ourselves to rota-tions. We use three subroutines to describe the iterativealgorithm. For a given rotation, MATCH � � � returns thepermutation that minimizes the root mean square distancebetween

� � �and

�. Given a permutation, ROTATE � �

returns the rotation that minimizes the mean square dis-tance under this permutation. Finally, given a permutationand a rotation, RMSD � �� � � returns the root mean squaredistance.

� �� ;

� �identity;

loop � MATCH � � � ; � � ROTATE � � ;if

���

RMSD � �� � � � � then � � � �else exit

endifforever.

After each iteration, the root mean square distance de-creases. This implies that no permutation is tried twice.Since there are only finitely many permutations, it followsthat the algorithm halts. Note however that we neitherhave a polynomial bound on the number of iterations nora guarantee that the algorithm finds the globally optimalsolution.

A popular version of the above algorithm uses injec-tions from

�to

instead of bijections. Sometimes thischange is motivated by the purpose of the computation, atother times by the fact that finding the best bijection is notentirely straightforward. Given a rotation, we may use asubroutine ASSOCIATE � � � , which determines for each � �the point � � closest to � � . In the algorithm, we replaceMATCH by ASSOCIATE and do the remaining operationsas before, except that

is replaced by the multi-set of

points in

that are closest to some point in�

.

Bibliographic notes. The problem of finding the rota-tion that minimizes the root mean square distance betweentwo point sets with given bijection in

� �has been studied

in various fields, including x-ray crystallography [4] andcomputer vision [2]. In this section, we follow the expo-sition of the solution given by Horn [3]. For backgroundon linear algebra and how to compute the eigenvalues andeigenvectors of a symmetric matrix, we refer to Strang [5].The algorithm that attempts to minimize the root meansquare distance between two point sets without specifiedbijection has also been described in several fields. In com-

puter vision, the version that works with injections ratherthan bijections is known as the iterated closest point orICP algorithm [1].

[1] P. J. BESL AND N. D. MCKAY. A method for registrationof 3-D shapes. IEEE Trans. Patt. Anal. Mach. Intell. PAMI-14 (1992), 239–256.

[2] O. D. FAUGERAS AND M. HEBERT. The representation,recognition, and locating of 3-D objects. Int. J. RoboticsRes. 5 (1986), 27–52.

[3] B. K. P. HORN. Closed-form solution of absolute orienta-tion using unit quaternions. J. Opt. Soc. Amer. A 4 (1987),629–642.

[4] W. KABSCH. A discussion of the solution for the best rota-tion to relate two sets of vectors. Acta Crystallogr. Sect. A34 (1978), 827–828.

[5] G. STRANG. Introduction to Linear Algebra. Wellesley-Cambridge Press, Wellesley, Massachusetts, 1993.

VII.3 Sampling and Covering 109

VII.3 Sampling and Covering

In this section, we study two questions on rigid motions,namely how to sample uniformly at random and how tocover the space of motions most economically. We treattranslations and rotations separately and spend most of ourtime on the more complicated case of rotations.

The size of a sphere. We prepare the discussion of sam-pling rotations by measuring the unit 2-sphere and the unit3-sphere. For � � embedded in

���, we sweep a plane nor-

mal to the * � -axis and compute the area by integrating in-finitesimal slices. The perimeter of the circle in which theplane cuts the sphere is � � �* � � , with the square radiusequal to � � ��* � � � � � * � � . Hence,

Area�

� � � �

� �� �* � ��� � � #

���� * � % �

� * ��

� � � �

� ���* � �

The total area of the 2-sphere is therefore �� . But notethat the derivation shows more, namely that the area of theslice between two parallel planes at a constant distance isthe same for all such planes, as long as both intersect thesphere. This fact has been known already to Archimedesand is often expressed by saying that the axial projectionfrom the sphere to an enclosing cylinder preserves area.This projection is illustrated in Figure VII.7.

Figure VII.7: Illustration of Archimedes’ theorem implying thatthe sphere and the enclosing truncated cylinder have the samearea.

We use the same method to compute the volume of � �embedded in

� �. Sweeping a three-dimensional hyper-

plane normal to the * � -axis, we get the volume by integrat-

ing the infinitesimal slices. The area of a slice is �� �����* � � ,with � ���* � � � � ��* �� , as before. Hence,

Vol�

�� � � �

� �� � ��* � � � � � #

� �� * � % �

� * ��

����� � �� � � � �2�� ��� � �

���

� � � �� � � � �2�� � � � �

� � ��

��� � � �

�� �

� � ���

� � � � �which we get by substituting * � � � � . The total vol-ume of the 3-sphere is therefore � � . Note also thatArchimedes’ theorem does not extend to the 3-sphere, atleast not in the straightforward manner from sections be-tween parallel plane to sections between parallel hyper-planes.

Uniform sampling. Archimedes’ theorem can be usedto pick a point uniformly at random on � � . The methodmay be viewed as picking a point on the enclosing cylinderand projecting it back to the 2-sphere:

Step 1. Pick � uniformly at random in�� � � � .

Step 2. Pick 4 uniformly at random in�� ��� � � .

Define � �������� J4 .Return * � � ��� ����� � ��� � � �2��� �2�� � � � .

We now extend this method to � � and thus to an algorithmfor picking a rotation uniformly at random. Think of * asthe axis of rotation, so we just need to pick the angle ofrotation about this axis. It would not be correct to pick anangle

�uniformly at random since this would favor small

dislocations of * . Indeed, in � � the quaternions near theidentity would be more likely than those far away from theidentity. To pick the angle correctly, we return to what welearned from the above volume computation. The angle ofrotation about the axis is twice the angular distance fromthe identity on � � . In other words, �

� � � � � � . Weneed to pick the angle � from

�� � � � � � � , not uniformly but

from a density that favors angles near the middle of theinterval. Specifically, the density is �� ���� � � , normalizedto have unit total integral. The corresponding distributionfunction is

� �* � � �

� /� � � � �2�� ��� � � �

110 VII MATCH AND FIT

which monotonically increases and reaches� �* � � � at* � � � . To pick an angle, we pick a number � uniformly

at random in�� � � � , and we compute its preimage under

the distribution function: � � �� � � � � . To get a point

uniformly at random on � � , we append Steps 1 and 2above with

Step 3. Pick � uniformly at random in�� � � � .

Let � � �� � � � � .

Return � � � �� � ����� � �� � �2�� � ��� � � � ��2�� � ��� � ��� � � � .

We get a random rotation by using � as a unit quaternion.Alternatively, we get a random rotation by using � , and� � � � � as Euler angles.

Covering the spaces of translations and rotations. Weturn our attention to selecting a collection of rigid mo-tions such that every possible motion has a selected mo-tion nearby. It is convenient to measure the distance be-tween translations and between rotations using the Eu-clidean metric. We will later analyze how these notionsof distance relate to the effect of the motion on the rootmean square distance between two sets in

���.

The idea of guaranteeing that every possible motion hasa nearby selected motion can be expressed by coveringthe space of motions with neighborhoods. Consider firsttranslations, which we represent by 3-vectors or points in� �

. Let � � � and let � be a collection of closed balls,all of radius � . We call � a covering if ��� � � � and wecall � the covering radius. We need infinitely many ballsjust because

���has infinite volume, but we are usually

only interested in bounded portions of space. If we usethe centers of the covering balls as selected translations,we are guaranteed that every translation * � � �

has a se-lected translation at a distance at most � from * . We studythree lattices of points in some detail. The cube latticeconsists of all integer points, the FCC or face-centeredcube lattice adds all centers of cube faces, and the BCCor body-centered cube lattice adds all cube centers to thecube lattice. Figure VII.8 shows the portion of each lat-tice inside a cube of unit side-length and Table VII.2 listssome of their pertinent properties. By counting fractions,we note that the FCC lattice has four times and the BCClattice has twice as many points as the cube lattice. Thepacking radius is the largest radius we can assign to thepoints to get non-overlapping balls, and the volume is thefraction of the space covered by the packed balls. The cov-ering radius is the smallest radius we can assign and stillhave the balls cover

� �, and the volume is the total vol-

Figure VII.8: From left to right: the cube, the FCC and the BCClattices. The points with maximum distance to the lattice pointsare the cube centers, the edge centers and the midpoints betweenthe face and the edge centers.

ume of the balls divided by the volume of the space theyinhabit. We see that the FCC lattice leads to an effective

CUBE FCC BCC

points per cube 1 4 2packing radius 0.500 0.353 0.433volume (fraction) 0.523 0.740 0.680covering radius 0.866 0.500 0.559volume (fraction) 2.720 2.094 1.463

Table VII.2: Numerical assessment of how well the cube, theFCC and the BCC lattices pack and cover.

packing while the BCC lattice leads to an effective cov-ering. Indeed, both are known to be the respective bestpacking and covering lattices.

As an exercise we may estimate the number of balls weneed to cover the unit 3-sphere. Recall that its volumeis � � . Assuming � � � is very small, the volume ofa ball with radius � in � � is about

� �� � � . If we believethat we cannot cover more economically than the BCClattice in

� �, we can use a straightforward volume argu-

ment to show that we need at least � � � �� � � � � � � � �� � �� ��

� ��� � � � � balls to cover the 3-sphere.

Sensitivity to small translations. Next, we address howtranslations affect the root mean square distance betweentwo point sets. As in Section VII.2, let

and

�be two

collections of � points in� �

, with a bijection that maps � �to � � , for each

�. To simplify the analysis, we assume that

the centroids of the two collections are both at the origin:�� � � � . This implies that the vectors � � � � � add up to

0 implying that the sum of scalar products with any vector* � � �vanishes: �

� � � � � ��* � � . Recall that theroot mean square distance between

and

�is the square

root of the average square distance between correspondingpoints. After translating

along * , the root mean square

VII.3 Sampling and Covering 111

distance is

� �* � � � �� F � � � *� � � F �� � �� � F � � �� � F � � FH*KF ��� �

which implies� �* � � FH*KF . We have

� ��* � � FH*KF if andonly if � � � � � for all

�. To measure how fast the root mean

square distance changes with varying translation vector,we compute the the gradient:

A � �* � ��� � � � � � � � � � � � * � � � �* � � *� �* � �

The gradient is defined everywhere except at * � � andits length is F0A � ��* � F � � . The length is 1 if and onlyif � � � � � for all

�. Figure VII.9 illustrates this result

by comparing the graphs obtained for equal and for non-equal corresponding points. Since the length of the gra-

Figure VII.9: The hyperboloid approaches the graph of the normfunction at plus and minus infinity.

dient never exceeds 1, the difference between the rootmean square distances for two translations is boundedfrom above by the norm of the difference vector:

� � �* � � � � � � � � FH*� � F �In words, the root mean square as a function over thethree-dimensional space of translations satisfies a Lips-chitz condition with constant 1.

Sensitivity to small rotations. We repeat the analysisfor rotations. Call the root mean square distance from thecentroid the radius of gyration. Since we assume �

� � �

� , the radii of gyration of

and�

are��� � � �� F � � F � and��� � � �� F � � F � �

Let � � � * � �:* � ��* � �:* � � � be a unit quaternion. The ef-fect of the rotation represented by � is best viewed in the

direction opposite to the rotation axis. It is geometricallyobvious that the total distance increases the fastest wheneach point � � moves in a direction straight away from � � .This is possible in the limit and characterized by the veloc-ity vector of � � being parallel to � � � � � , which includesthe possibility that � � � � � . As for translations, the lengthof the gradient is maximized if � � � � � for all

�. In this

case, we have� � ��� � ���

and the root mean squaredistance between

�and the rotated copy of

is

� ��� � � � �� F�� � � � � � � � F �� � �

� � � �� � � * �� �where � � � � �

� � �� � � are the eigenvalues of the

matrix � defined in the previous section. For the purposeof computing the gradient and its length, we consider

�a

function over� �

:

A � ��� � � � �� � � * � � � � * � � � � * � � � � * � � �� � �� � �

F2A � �� � F � �� � ��� � � � �� * �� �Going back to the definition of � , we observe that theeigenvalues are � � � � � � and � � � � � � � � �

� �� � , for � �������� � , where

� � is the radius of gyration of

projectedinto the plane * � � � in

� �. Note that

� �� � � �� � � �� � �� � .

Using � * �� � � we simplify the expressions for�

, itsgradient and the length of the gradient:

� �� � ��� � �� * � � � � �� * �� � � �� * �� �A � �� � ���� � � �� * � � � �� * � � � �� * � � � � � ��� � �F0A � ��� � F �

� � � ��

Since the length of the gradient never exceeds � � � �, the

difference between the root mean square distance for tworotations is no more than that multiple of the norm of thedifference vector:

� � ��� � � � ��� � � �� � � � FH� ���'F �

We see that the rotations satisfy a Lipschitz condition thatis similar to that for translations, except that the constantnow depends on the collection of points, in particular totheir radii of gyration.

Bibliographic notes. The problem of sampling motionshas been studied in various fields, including statistics,

112 VII MATCH AND FIT

crystallography and molecular modeling. Various meth-ods for picking a rotation uniformly at random have beenpublished but not all are correct. In particular, it is impor-tant to notice that first picking a rotation axis and second arotation angle favors quaternions close to the identity if wepick the angle uniformly at random in

�� ��� � . A popular

method that is correct and different from the one describedin this section is due to Marsaglia [4] and is reproduced inthe exercise section of this chapter.

Packing and covering problems have been studiedwithin mathematics and have generated a large body ofliterature [2, 3]. Surprisingly, many of the main ques-tions in this area are still open. For example, it is notknown whether or not the BCC lattice is the most eco-nomical covering of

���with congruent balls. Very little

is known about optimal packings and coverings in non-Euclidean spaces. The problem is challenging even in therelatively simple case of the 2-sphere, and for most num-bers of points (or caps) only approximate solutions areknown [1].

[1] J. BERMAN AND K. HANES. Optimizing the arrangementof points on the unit sphere. Math. Comput. 31 (1977),1006–1008.

[2] J. CONWAY AND N. SLOANE. Sphere Packings, Latticesand Groups. Springer-Verlag, New York, 1988.

[3] L. FEJES TOTH. Lagerungen in der Ebene, auf der Kugelund im Raum. Second edition, Springer-Verlag, New York,1972.

[4] G. MARSAGLIA. Choosing a point from the surface of asphere. Ann. Math. Stat. 43 (1972), 645–646.

VII.4 Alignment 113

VII.4 Alignment

In this section, we briefly discuss the two problems ofmatch and fit for protein structures. We begin by studyinghow to match proteins and develop an algorithm that mea-sures the similarity between two chains of atoms. There-after, we consider the related problem of docking a proteinwith its substrate.

Longest common subsequence. Consider first the com-binatorial (as opposed to geometric) version of the se-quence alignment problem. We model a protein as astring over the alphabet of twenty amino acids:

� � � � � � � � � and� � � � � � � � � � � . An alignment maps

the � � to the � � in sequence, but it permits spaces on bothsides. As illustrated in Table VII.3, we represent an align-ment by a matrix consisting of two rows and � � � � � � � � �columns, where � is the total number of spaces. A match

Q R A A C CA Q A C R C R

Table VII.3: The alignment uses � � � spaces to achieve � � �matches.

is a column of two equal non-space characters, and a mis-match is a column with two different non-space charac-ters. Columns with two spaces are disallowed. An inser-tion is a column with a space at the top and a deletion isa column with a space at the bottom. The common sub-sequence between two strings consists of all matches, andits length is the number of matches. For the moment, werestrict ourselves to alignments without mismatches. Let-ting � �� � � �

be the length of the longest commonsubsequence, �

��

� � � � is the minimum numberof insertions and deletions needed to transform

to�

.We compute by dynamic programming. Let ��� � be thelength of the longest common subsequence of � � � � � � � � �and � � � � � � � � � , and define �� � � � � � for all

�and � . Then

��� � � � � � � � � � � � � �: �� � � � if � � �� � � � � � � � � � � � � if � � � � � �To verify the recurrence relation note that every alignmentends with an insertion, a deletion or a match. In each case,removing the last column leaves an optimal alignment ofshorter strings. In the third case, we need to show that thelength of the common subsequence cannot increase if wedo not use the match between � � and � � . Indeed, withoutusing that match we end with an insertion or a deletion,and we may move the last match to the end without de-

creasing the length. We turn the recurrence relation intoan algorithm:

integer LCS � � � �: � � � � � ;

for� �

� to � do ��� � � � ;for � � � to � do � � � � � ;if � � � � � then ��� � � � � � � � � � � �

else ��� � � � � � � � � � � � �: �� � � � endif

endforendfor; return � � � .

This algorithm is a typical example of the dynamic pro-gramming paradigm, which constructs an optimal solutionfrom pre-computed optimal solutions to sub-problems. Tostore the solutions, the algorithm uses an array of � � en-tries. Each entry takes constant time, which implies thatthe total running time is proportional to � � . Using a sec-ond array of the same size, we may keep track of the deci-sions made by the algorithm, and with this extra informa-tion, we can reconstruct the longest common subsequenceitself, and not just compute its length.

Sequence alignment. The general alignment problempermits mismatches and assesses the score by rewardingeach match and penalizing each mismatch, insertion anddeletion. Assuming

� ��* ��� � gives the score for having *and � in a single column, we get

��� � � � � � � � � � � � � � � � � �� � � � � � � � � � � � � � � � � � � � � � � � � � � �

We can think of every alignment as a directed path in theso-called edit graph of the two strings, which we illustratein Figure VII.10. The path starts at the source in the upper

deletion:

insertion:

match:

mismatch:

A Q A C R C R

Q

R

A

A

C

C

Figure VII.10: The edit graph for the strings in the above exam-ple and the path that corresponds to the given alignment.

left corner, takes vertical, horizontal and diagonal edges

114 VII MATCH AND FIT

and ends at the sink in the lower right corner. A gap inthe alignment is a sequence of contiguous insertions orof contiguous deletions. It is common to penalize a gapseparately for its existence and an additional amount thatdepends on its length. This may be done by penalizing aninsertion or deletion an amount 4 when it starts a gap andan amount �

� � � 4 when it continues a gap. This givesrise to the following recurrence relations:

� �� � � � � � � � ��� � � � � � �: �� � � � � 4���� �� � � � � � � � � � � � � � � �: � � � � � � 4 �� �� � � � � � � � ��� � � � �� � � � � � � � � � � � � � � ��� � � ��where

� ��� � is the score of the best alignment that ends withan insertion and

� ��� � is the score of the best alignment thatends with a deletion. Using three arrays, we can againcompute the best alignment with dynamic programmingin time proportional to � � .

Chains of atoms. We can use the same algorithmicideas to compute alignments between two sequences ofatoms. Let the � � and the � � be the centers of the � -carbonatoms along the backbones of two proteins. For now, weassume a fixed embedding in

���and consider the align-

ment problem without applying any rigid motion. Usingthe root mean square distance between two sub-chains isproblematic for two reasons. First, it does not lend it-self to the dynamic programming algorithm and, second,it prefers shorter over longer sub-chains. Instead, we needa score function that balances the contributions of lengthand distance. One such function is obtained by combiningsquare distances with gap penalties as follows. Letting

��

and�� be positive constants, we reward a match between

� � and � � by adding

� � � � ��� � � ����

�� F � � �� � F � (VII.1)

to the score, and we penalize for gaps as before. The dy-namic programming algorithm can still be used to identifythe best in a collection of exponentially many alignments.It does this in time proportional to � � .

Next, we permit a rigid motion be applied to one of thechains, say

. Instead of computing the best motion for

each alignment, we compute the best alignment for eachof a dense sample of motions. We need some notation toformalize this idea. For each alignment

� � between

and�, we get a function � � that maps a rigid motion � to the

score � � � � � between � � �and

�. Consider the function

� � � � � � � � � �defined as the motion-wise maximum

of all � � : � � � � � � � � � � � � � � � . This construction isillustrated in Figure VII.11. Let � � be the motion thatmaximizes � . The score of the best alignment between

and�

is then � � � � � � , and the best alignment is� �

for which � � � � � � � .

Γ

µ

Figure VII.11: The horizontal axis represents the six-dimension-al space of rigid motions. The upper envelope of the graphs isthe motion-wise maximum of the score functions.

The idea of the algorithm is to sample the space of mo-tions dense enough to guarantee an alignment with a scoreat least � � , for some � � � . We thus aim at computingan approximately best alignment, but we may decrease �and thus get arbitrarily close to the optimum. This strategymakes sense in practice since in any case the locations ofatoms are only known up to some precision.

Running time. Improving the approximation by de-creasing � comes with a cost, namely higher running timebecause we evaluate � for more rigid motions. We quan-tify the dependence by analyzing the running time depend-ing on � . The other parameters entering the analysis arethe lengths of the chains, � and � , the radii of the small-est spheres enclosing

and

�and the radii of gyration of

the two sets. Proteins tend to have globular shapes pack-ing their atoms around their centroids. We may thereforeassume that the radii of

are both roughly equal to � �

� �and the radii of

�are both roughly equal to � � � � . We

further simplify the discussion by assuming �� � . To

decide how dense we have to cover the space of rigid mo-tions, we determine the sensitivity of the score functionto small motions. We first consider translations * � � �

.Ignoring penalties for gaps, we get

� �* � �� � � � � �

���

�� F � � � * �� � F � �

where � is the length of the alignment and the points arere-indexed so that � � maps to � � , for �

� � � � . The normof the gradient of a single term in this sum is boundedby a constant

�� , and hence F2A � �* � F � �

� � � �� � .

VII.4 Alignment 115

We cover the space of translations with balls of radius� � �@� �� . It follows that having a translation that is not

quite the optimum contributes at most � � � to the error.The sensitivity of

�to small rotations depends on the radii

of gyration, and we get F � �� � F � � � � � � � . By coveringthe space of rotations with balls of radius � � � � � � � � � , weget again a contribution of at most � � � to the error.

By assumption on the shape of the protein, the volumeof translations we need to cover is proportional to � , andthe volume of the rotations is � . In each case, we needa constant times � � � � � balls. We cover the space of rigidmotions by cross-products of these balls and thus get aconstant times ��� � � � rigid motions. Multiplying this withthe running time of the dynamic programming algorithmgives a total running time of � � � � � � . This is of course notpractical and we need faster alternatives, some of whichwill be mentioned at the end of this section.

Protein re-docking. In protein docking, the basic ques-tion is how well a proteins and its substrate fit to eachother. The substrate could be another protein or a smallligand. We interpret this question as asking how similarthe substrate is to a portion of the complement of the pro-tein. This question makes sense if we use space-fillingrepresentations of the protein and the ligand, but not ifwe represent them combinatorially or as chains of pointsin space. This idea is illustrated in Figure VII.12. For

Figure VII.12: The shaded local complement of the left shape issimilar to the shaded portion of the right shape.

protein-protein interactions, the region of local comple-mentarity is frequently fairly large. The geometric fit be-tween the two proteins thus becomes a significant factorin making the interaction possible or, more accurately, innot making that interaction impossible. Instead of pro-tein docking, we consider the simpler re-docking problem.Here we are given the complexed form of a protein andits substrate and we attempt to reconstruct that form whilesuppressing any knowledge of the solution. We need some

notation to lay out the rules for this problem. Let

and�

represent the protein and the substrate in complexed form,and let

�� � ��� � . � �

be the protein after applying arandom rigid motion. The input to the reconstruction al-gorithm consists of

� and

�and not knowing the solu-

tion means we can not use any information on

and on� ��� � . . The goal is to find a rigid motion � such that

and��� � � � �

fit well. After � is computed, we can testhow well we did by comparing � with � ��� � . , which can bedone directly or by computing the root mean square dis-tances between

� and � � �

and between � ��� � . and�� .

We cannot use the root mean square distance to guideour reconstruction of the complexed form and thus needa score function � that assesses how well a motion doesin generating a good fit. There are many possibilities, andone is the approximation of the van der Waals potential bycounting the pairs of spheres at small distance from eachother. We think of the � � and � � as the centers and write

� �and � � for the van der Waals radii of the spheres in

and�

. The collections of colliding and of close pairs are

���� � � � � � � � F � � � � � F � � � � � � ��

� � � � � � � � � � F � � � � � F � � � � � � � � ��where

�is a small positive constant. As mentioned in Sec-

tion I.4, the van der Waals force is weakly attractive withinsmall distances of maybe up to four Angstrom, and it isstrongly repulsive for colliding van der Waals spheres. Wethus define

��� � � � � � if ������� �

�� ��� ��� if ������

Given a rigid motion � , we compute � � � � by comparingall pairs of spheres in time proportional to � � . Improve-ments of the running time are possible. Experiments showthat this score function is a good indicator of good fit, butone weakness is its sensitivity to collisions. Actual pro-teins are flexible and can avoid minor collisions by smalldeformations. We may account for this fact by allowinga few collisions in the definition of � , but to get a goodapproximation of the reality, we will need to build knowl-edge about flexibility into the score function.

Analysis. The general algorithm for re-docking is sim-ilar to the one for geometric alignment: we explore thespace of rigid motions and evaluate the score function atthe centers of the balls used to cover the space. By choos-ing the balls in the cover small enough, we can guaranteethat the root mean square distances between

� and � � �

and between � ��� � . � � �and

� � � � � � �are less than some

116 VII MATCH AND FIT

threshold � � � . Note that this does not necessarily im-ply that � � � � is large. Indeed, it could be zero becausemotions with high score value tend to be right next to mo-tions that generate collisions. In other words, whether ornot the algorithm recognizes � as close to � ��� � . dependson the shape of � in this neighborhood. We can designcases in which � has arbitrarily narrow high spikes andour algorithm has little chance to ever recover the com-plexed form. There is, however, experimental evidencethat such configurations do either not exist or are rare foractual proteins.

Let us return to the question how to cover the space ofmotions to guarantee a root mean square distance of atmost � . As before, we simplify the analysis by setting�� � and assuming that the radii of the smallest enclos-

ing spheres and the radii of gyration are all roughly equalto � � � � . According to the sensitivity analysis in the previ-ous section, we may cover the space of translations withballs of radius � � � and the space of rotations with balls ofradius � � � � � �

, where�

is the radius of gyration of eitheror�

. For the translations, we need to cover a volumeof about � requiring about � � � � balls. For the rotations,we need to cover a constant volume also requiring about� � � � balls. The total number of rigid motions to be ex-plored is thus proportional to � ��� � � , and multiplying thiswith quadratic running time for evaluating the score func-tion � , we get a total running time proportional to � � � � � .An improvement by a factor � is possible if we compute �for all translations composed with a single rotation in onesweep. For constant � , this improves the running time toroughly � � . Since � is typically in the thousands, even thisis not practical and we need faster alternatives.

Bibliographic notes. The structural alignment problemrefers to comparing the backbones modeled as curves orchains of spheres in three-dimensional space. Its impor-tance within structural molecular biology derives fromthe observation that evolution preserves structure betterthan amino acid sequences. Among other things, re-search on this problem has lead to the creation of struc-tural databases [6, 8]. There are two main computationalapproaches to structural alignment: one represents a chainby its matrix of internal distances [5] and the other usesrigid motions to align the chains embedded in space [9].In this section, we have followed the second approach andpresented the work of Kolodny and Linial [7], who explorerigid motions in the outer loop and optimal alignments us-ing dynamic programming [3] in the inner loop of their al-gorithm. The particular score function given in Equation(VII.1), with constants

��� � � � and

��� � , was sug-

gested in [9]. It should be mentioned that the presentedalgorithm is significantly slower than the currently mostcommonly used DALI software [5], but it is the only algo-rithm that guarantees a good approximation of the optimalalignment in polynomial time.

The goal of protein docking is the prediction of whether,where and how proteins interact with each other and withother molecules. In many cases, the surface area of theinterface during the interaction is substantial, and in thesecases the geometric fit is an important factor. However,there are cases with smaller interaction area in whichforces unrelated to geometric shape outweigh the impor-tance of shape [2]. We refer to [4] for a recent surveyof the extensive literature on computational approaches toprotein docking. The material in is this section is based onthe work described in [1].

[1] S. BESPAMYATNIKH, V. CHOI, H. EDELSBRUNNER AND

J. RUDOLPH. Protein docking by exhaustive search. Manu-script, Duke Univ., Durham, North Carolina, 2003.

[2] A. H. ELCOCK, D. SEPT AND J. A. MCCAMMON. Com-puter simulation of protein-protein interactions. J. Phys.Chem. B 105 (2001), 1504–1518.

[3] D. GUSFIELD. Algorithms on Strings, Trees, and Se-quences. Cambridge Univ. Press, England, 1997.

[4] I. HALPERIN, B. MAO, H. WOLFSON AND R. NUSSINOV.Principles of docking: an overview of search algorithms anda guide to scoring functions. Proteins 47 (2002), 409–443.

[5] L. HOLM AND C. SANDER. Protein structure comparisonby alignment of distance matrices. J. Mol. Biol. 233 (1993),123–138.

[6] L. HOLM AND C. SANDER. The FSSP database of struc-turally aligned protein fold families. Nucleic Acid Res. 22(1994), 3600–3609.

[7] R. KOLODNY AND N. LINIAL. Approximate protein struc-tural alignment in polynomial time. Manuscript, StanfordUniv., Stanford, California, 2002.

[8] A. G. MURZIN, S. E. BRENNER, T. HUBBARD AND

C. CHOTHIA. SCOP: a structural classification of proteinsdatabase for the investigation of sequences and structures. J.Mol. Biol. 247 (1995), 536–540.

[9] S. SUBBIAH, D. V. LAURENTS AND M. LEVITT. Struc-tural similarity of DNA-binding domains of bacteriophagerepressors and the globin core. Current Biol. 3 (1993), 141–148.

Exercises 117

Exercises

1. Reflections. The reflection through a plane � mapsevery point * � � �

to the point � � � �such that �

crosses the line segment * � orthogonally at its mid-point. The central reflection maps every point * to itsantipodal point �J* .

(i) Show that every rigid motion is the compositionof two plane reflections.

(ii) How many plane reflections do you need to rep-resent the central reflection?

2. Sizes of spheres. The � � � ��-dimensional unit

sphere consists of all points at unit distance from theorigin of the

�-dimensional Euclidean space:

� � � � � � * � � � � FH*KF � � �We know that the perimeter of � � is � , the area of� � is �� and the volume of � � is � � . What is the� � � � � -dimensional volume of � � � � ?

3. Square distance from planes. The square distancefrom a point � , FH* � � F � � �* � � � � � � � �* � � � � � � ���* � � � � � � , is also the sum of square distances fromthe three planes parallel to the coordinate planes thatpass through � .

(i) Show that the above claim holds for any threeplanes that pass through � and pairwise enclosea right angle.

(ii) Area there triplets of planes enclosing non-rightangles for which FH* � � F � is equal to the sumof square distances from * to the three planes?

4. Sum of square distances. Consider a collection of �points � � in

� �and let �

� �� � � � be its centroid.

(i) Prove that for every point * in space, the rootmean square distance to the � � is the root of thesquare distance to the centroid plus a constant:

� ��* � � � F�* � �$F � ��

What exactly is the constant?

(ii) Extend the construction to a collection of �planes in

� �. In other words, prove that there

are three planes for which a similar formulagives the sum of square distances to the �planes.

(iii) Further extend the construction to a collectionof � lines in

� �.

5. Biased probability. Suppose Function UNIFORM

picks a real number uniformly at random in�� � � � .

(i) Show that the minimum of two numbers pickedby Function UNIFORM is distributed accordingto the triangle density function

� �* � � � � * .

(ii) How are the minimum, the median and themaximum of three numbers picked by FunctionUNIFORM distributed?

6. Sampling the 3-sphere. Prove that the followingmethod picks a point uniformly at random on � � :

(i) Pick numbers * ��� ��� and uniformly at ran-dom in

�� ��� � � .

(ii) If * � � ��� � � or ��� � � � � then repeat Step1, else let �

� � � � � * � � � � � � � � � � � � andreturn

� * ��� ��� � �� � � � .

7. Random rotation. Let us mark a point * on the unit2-sphere. For a rotation

�, let ��� � � be the image of* under that rotation. Any density function over the

space of rotations implies a density function over the2-sphere. Prove that the uniform density of quater-nions over � � implies the uniform density of points �over the 2-sphere.

8. Number of alignments. Recall that an alignment be-tween two chains of � and � � -carbon atoms thatuses � spaces can be represented by a matrix withtwo rows and � � � � � �

� � � columns. Assuming�

� � , we define �� � � � � and note that we

need ��

insertions just to make up for the differencein length. The remaining spaces are distributed overequally many insertions and deletions, so we define� � ��� � �

�.

(i) Show that ��� ��� is a necessary and suffi-

cient condition for the number of spaces in anyalignment of the two chains.

(ii) What is the number of different alignments witha fixed number of spaces?

(iii) What is the total number of different align-ments?

118 VII MATCH AND FIT

Chapter VIII

Deformation

VIII.1 Molecular DynamicsVIII.2 Spheres in MotionVIII.3 RigidityVIII.4 Shape Space

Exercises

119

120 VIII DEFORMATION

VIII.1 Molecular Dynamics

Newton’s second law. [� ��� � .]

Numerical integration. [Taylor expansion, different nu-merical methods (Euler, Verlet, leap-frog, Beeman,predictor-corrector).]

Hydrophobic surface area. [Weighted area and deriva-tive (forward pointer to Chapter IX).]

Kinetic data structures. [Close neighbor lists, Delaunaytriangulation or dual complex (forward pointer to SectionVIII.2 and IX).]

VIII.2 Spheres in Motion 121

VIII.2 Spheres in Motion

[Explain the slack in the Pie Volume Formula (with a for-ward pointer to Chapter IX.)] [This topic relates to the pos-sibility of drawing non-straight Voronoi like decompositions[2].] [Define cross-sections of the complex of independentsimplices and proof that each cross-section gives a differ-ent pie formula but the same measurement.]

[Dynamic Delaunay triangulations [3]. Linear motion in� � instead of � � .]

[Predict collisions of spheres.]

Bibliographic notes.

[1] J. BASCH, L. J. GUIBAS AND L. ZHANG. Proximity prob-lems on moving points. In “Proc. 13th Ann. Sympos. Com-put. Geom., 1997”, 344–351.

[2] H. EDELSBRUNNER AND E. A. RAMOS. Inclusion-exclusion complexes for pseudodisk collections. DiscreteComput. Geom. 17 (1997), 287–306.

[3] M. A. FACELLO. Geometric techniques for molecularshape analysis. Ph. D. thesis, Report UIUCDCS-R-96-1967, Dept. Comput. Sci., Univ. Illinios, Urbana, Illinois,1996.

122 VIII DEFORMATION

VIII.3 Rigidity

[Discuss the pebble algorithm that analyzes the rigidity ofa graph in three dimensions.]

Bibliographic notes.

VIII.4 Shape Space 123

VIII.4 Shape Space

[Explain the mixing of two or more shapes as a generaliza-tion of 1-parametrized deformation. The problems of

(1) finding a good basis,

(2) finding the best approximation within the spannedspace,

are both difficult. They are similar to fundamental ques-tions on function representation, which are probably dis-cussed in the approximation theory literature.]

The main functionality of the Morfi software is that itcan smoothly morph between one skin curve to another.In other words, it deforms the skin of one set of circles tothe skin of another. The details of this deformation willbe explained in Section VIII.4, where we discuss notionsof similarity between two molecular skins. In this section,we merely illustrate the deformation and mention some ofits features in passing. Figure VIII.1 shows the deforma-tion of a skin curve defined by four into one defined bythree circles. For each snapshot, we show the skin curvetogether with the dual complex. We note that any two con-tiguous bodies, except the last three in the sequence, differby at least one change in homotopy type. Recall that thehomotopy types of the body and the dual complex are al-ways the same, which implies that they change their typethe same way and at the same time. For the complex weobserve two types of changes caused by adding an edgeor a triangle. The corresponding changes in the body arecaused by creating a handle or filling a hole. There is athird type of change not seen in Figure VIII.1, which inthe he complex is caused by adding a vertex and in thebody by creating a component.

Bibliographic notes. The Morfi software has been usedin [2] to explain two-dimensional skin geometry and to il-lustrate its use in deforming two-dimensional shapes intoeach other. We note that these deformations are similar butalso different from the image morphs studied in computergraphics [3]. The goal there is photo realism and possiblythe most difficult problem towards achieving it is the con-struction of a one-to-one correspondence between featuresof the initial and the final images. The Morfi software cre-ates a few-to-few correspondence through geometric con-siderations rather than working towards a one-to-one cor-respondence, which often does not exist. Similar to twodimensions, we can deform skin surfaces into each otherby continuously changing the defining spheres. A canon-ical such method is explained in [1]. That method can be

used to mix � � � skin surfaces and thus create a shapespace that encompasses � ��� �

�-variate deformations.

[1] H.-L. CHENG, P. FU AND H. EDELSBRUNNER. Shapespace from deformation. Comput. Geom. Theory Appl. 19(2001), 191–204.

[2] S.-W. CHENG, H. EDELSBRUNNER, P. FU AND K. P.LAM. Design and analysis of planar shape deformation.Comput. Geom. Theory Appl. 19 (2001), 205–218.

[3] G. WOLBERG. Recent advances in image morphing. In“Proc. Comput. Graphics Internat., 1996”, 64–71.

124 VIII DEFORMATION

Figure VIII.1: Ten snapshots of a deformation with skin and dual complex displayed. The skin in the fifth snapshot is the same as in thefigures above.

VIII.4 Shape Space 125

Figure VIII.2: From left to right and top to bottom: the shapes at times � � � � � � � � ��� � � � ��� � �. The sequence is defined by a set of seven

spheres forming a question mark at time � � � � �and a set of eight spheres forming a human-like figure at time � � � � �

.

126 VIII DEFORMATION

Exercises

The credit assignment reflects a subjective assessment ofdifficulty. Every question can be answered using the ma-terial presented in this chapter.

1. Section of triangulation. (2 credits). Let�

be atriangulation of a set of � points in the plane. Let be a line that avoids all point. Prove that intersectsat most �@� � � edges of

�and that this upper bound

is tight for every � � � .

Chapter IX

Measures

There are various reasons why biologists want to mea-sure the size of molecules. Volume is important in thecalculation of free energy and in estimates of populationsgiven a bound on the available space. Surface area is aresource consumed by molecular interactions and is prob-ably even more relevant to research in structural biologythan volume. This chapter will study three aspects of size:volume, surface area, and arc length for such diagrams.

Our general approach to measuring the size begins withindicator functions for convex polyhedra in

� �. From

these we will derive short inclusion-exclusion formulas forsize measurements.

IX.1 Indicator functionsIX.2 Volume and surface areaIX.3 Void formulasIX.4 Measuring Software

Exercises

127

128 IX MEASURES

IX.1 Indicator Functions

The Euler relation for convex polyhedra is a special caseof the Euler-Poincar e theorem for complexes. There areelementary proofs for this special case, and this sectionpresents one that is inductive.

Convex polyhedra. A convex polyhedron is the inter-section of finitely many closed half-spaces. It is eitherbounded or unbounded, and both cases are illustrated inFigure IX.1. In the first case, the polyhedron is the convexhull of finitely many points, and in the second, it extendsto infinity. We study polyhedra in

�-dimensional space,

keeping in mind that� �

� is the most important dimen-sion since polyhedra in

� �relate to molecules in

� �, as

we will see later.

Figure IX.1: A bounded convex polyhedron in � � to the left andan unbounded one to the right.

Let�

be a convex polyhedron in� �

and assume it hasnon-empty interior. A hyperplane � supports

�if it in-

tersects the boundary but not the interior, � � � �� �and� � � � � � �

. A face of�

is the intersection with asupporting hyperplane. The boundary is decomposed intofaces of various dimensions, which are usually prefixedfor clarity. For example,

�is a

�-face of itself and the

facets are the � � � � � -faces. Let� � be the number of � -

faces. The Euler characteristic of�

is the alternating sumof faces,

� � � � ��� �� � � � � � � � � � �

In the bounded case, the boundary is a � � � � � -dimensionaltopological sphere whose only non-zero Betti numbers are� � � � �

� �� � . In the unbounded case, the boundary is

an open � � � � � -dimensional topological ball whose onlynon-zero Betti number is � � � � . Assuming general po-sition, the dual of the boundary complex is a simplicialcomplex and the Euler-Poincar e Theorem stated in Sec-tion IV.3 implies the Euler relation for convex polyhedra:

� � � � � � � � � � � � � � � if�

is bounded �� � � � � � � if

�is unbounded �

Below we will construct indicator functions of�

from Eu-ler characteristics of subcomplexes of the boundary com-plex. The Euler relation will follow from elementaryproofs of properties of these indicator functions.

Inclusion-exclusion. Let be the finite collection ofhalf-spaces such that

� � . For a subset � � and a point � � ��� we define� � � � � � � if * �� � � � � � � �

� otherwise.

Note that � is outside�

iff� � � � � � for at least one non-

zero subset � . Namely if ��� �

then it sees a facet fromthe outside and we have

� � � � � � for � the singletonset containing the half-space whose bounding hyperplanecontains that facet.

We form an alternating sum of the�

that leads toan indicator function for the convex polyhedron. Thestraightforward way of doing this is called the principleof inclusion-exclusion. Particularly, we define

� � � � � � � ���

� � � ��� ��� . � � � � � (IX.1)

The sum ranges over all subsets of , including the emptyset for which

��� � � for all points � . We show that thenon-zero terms cancel unless there is only one non-zerocontribution to the sum, which comes from the empty set.To see this define � � � � �� �

��� � and �

� �� ��� � .Note that � �

� � � � � � � � � ��, which is the alternating sum

of subsets of � . This sum is� � � � � � � � � #

� � % � � � � � � � �� �

provided �� � . For �

�� we get � ��� and � � � � �

� �� . In words, � � � is an indicator function for

� � ,

� � � � � � � � � if � � � �� if �

�� ��

Truncation. Most of the terms in the exponentially longformula (IX.1) are redundant and can be removed. Specif-ically, we only keep the terms that correspond to faces of�

. Each face is the intersection of the polyhedron with asubset of the hyperplanes bounding half-spaces in ,� � � � �

� � � � �

IX.1 Indicator Functions 129

For � � �we get � � � �

, which we consider an im-proper face but still a face of

�. It is convenient to assume

general position, which in this context means that thereare no two subsets � �� � of that define the same face.Let

� ��� � � � � � � � � �� � be the systemof subsets that define non-empty faces. For sets � � �there is an intuitive interpretation of

� � � � . Consider � visible from � if � sees all facets around � from outside�

. Notice that according to this definition, the faces onthe silhouette are not visible. Then

� � � � � � iff � isvisible from � . The restriction of the inclusion-exclusionformula (IX.1) to the system

�is

��� � � � � �

� � ���� ��� . � � � � � (IX.2)

We claim that even though � � is much shorter than � � � , itis still an indicator function of

�. This claim is sufficiently

important to warrant a complete proof.

PIE THEOREM A.

� � � � � � � � if � � � �� if �

�� ��

PROOF. We use induction over the cardinality of the set� , which is again defined as the collection of half-spaces� � that do not contain � . The basis of the induc-tion is covered by � � �

, in which case � � �and

� � � � � � � � � � � � � , as required. Assume � ����, let

� � � , and define � as the closed complement of � , whichis a half-space that contains � . Define sets of half-spaces �� �

� � and � �� � �

� �� . The correspond-ing systems are

��� � � �

�and

�� �� � � � �

�. The

convex polyhedron� � �

� is obtained by remov-ing the constraint � , and therefore

��� �

��� � , where�

� �� � � , as shown in Figure IX.2. We distinguish

g_

gP’’

P

Figure IX.2: The half-spaces � and � share the hyperplane andare complementary to each other. The union of � and � � � is � � .

three types of faces of� � , the ones contained in � , the

ones crossing the hyperplane shared by � and � , and theones contained in � . The corresponding systems form thepartition

���

� � -� � � -� � , where

� �� � � � � �

� � � � ��� � � � � � � �

� � � � ���� and � � � ���� �� � � � � � � �� � � � �

Note that� � � � . The faces of

�are defined by sets in

� � , � � , � , and the faces of�� � are defined by sets in

� ,

� � , � � � , where

� � � � �� � � � ��� � ��

� � � � � � �� � � � ��� � �

The introduced systems partition�� ,

�, and

�� � . We can

therefore write their � values as sums of � values of thesubsystems,

� ��� � ��� � � � � � � � � � �� � � ��� � � � � � � � � �� ��� � � � � � � � � � � � � � � �

and hence ��� � � ����� � ����� � � � � � � � � � � � � � � � �. We

argue that all three terms on the right side of the equationfor ��� vanish. Both � and � � have one less half-spacenot containing � than does. The induction hypothesisthus applies. By assumption, � � � , which implies that� � �

� iff ��� �� � and therefore � ��� � � � � � ��� � � � � � � .

The second term vanishes because all sets in � � � con-tain � . The third term vanishes because � � � � iff� �

� � � � . We have� � � � � � �� �� � � � for all

� . Therefore � � � � � � � � � � � � � � because the�

valuescancel pairwise.

Unbounded convex polyhedra. The Pie Theorem Aimplies the Euler relation for unbounded polyhedra. Tosee this, we fix a point � outside all half-spaces in , as inFigure IX.3, and rewrite the formula in the Pie Theorem

y

Figure IX.3: The point � lies in the intersection of the comple-ments of the half-spaces.

A in terms of face numbers� � . By assumption of general

130 IX MEASURES

position,� � is the number of sets �D� �

with cardinality�� � . By the choice of � , we have

� � � � � � for all� � �

and therefore � � � � � � � � �� � � � � � � � � � �

� � � �� . This implies the Euler relation for unbounded convexpolyhedra, � � � � � � � �

� �� � .

Restricting body. We need a slightly stronger version ofthe Pie Theorem A to prove the Euler relation for boundedconvex polyhedra. We first weaken the theorem by re-stricting the points � to lie within a convex body

�, and

then strengthen it by further reducing the set system. De-fine

� � � � � � � � � � � � � � � �� � � �� � andlet ��� be the corresponding sum of

�values. We show

that for points � � �, ��� is an indicator function for

�.

PIE THEOREM B.

��� � � � � � � if � � � � � �� if � � �

���

PROOF. We construct a convex polyhedron��� � �

that contains�

and approximates�

in the sense that� � � � � � � � � � � �, as in Figure IX.4. Define

� � �

A

P

AP

Figure IX.4: Three edges and one vertex of � intersects the in-terior of

�, and the same edges and vertex intersect the interior

of ��� .� � �� � � and use the Pie Theorem A to get

� ��� � � � � � � if � � ��� � � �� if �

�� ��� � ��

By choice of � , every point � � �is contained in all

half-spaces of � . Hence� � � � � � if � � � �� �

.The system

�contains exactly all sets � � � �

for which� �� � � � . Hence ��� � � �� for all points � � � �and therefore also for all points � � �

.

Bounded convex polyhedra. We return to the compu-tation of the Euler characteristic, this time for a boundedconvex polyhedron

�. We choose a line not parallel to any

face of�

and points � and � sufficiently far in opposite di-rections on the line. As illustrated in Figure IX.5, this par-

z

Z Y

y

Figure IX.5: The boundary of �� is dotted, that of � is solid,and the silhouette is indicated by the two hollow vertices.

titions into the set � of half-spaces that do not contain� and the set � of half-spaces that do not contain � . Eachproper face of

�either belongs to

� or to � or to

the silhouette as seen in a view parallel to the chosen line.Let � � be the number of � -faces of

� that have non-empty intersection with the interior of

� , and define � �symmetrically. Let � � be the number of � -faces in the sil-houette. The projection of the silhouette onto a hyperplanenormal to the line � � is a bounded convex polyhedron

�of dimension

�� � . We can now argue inductively that the

Euler characteristic of�

is � � � � � � � � � .For

� � � ,�

is a closed interval with � � � , whichestablishes the induction basis. For

� � � we have

� � � � � � � � � � ��� � � � � � � � � �

��� � � � � � � � � � � � � � � � � � �

Observe that this sum counts the�-face

�the same num-

ber of times on both sides. On the right side it is counted� � � � � � � � � � � � � �

� �� � � � � � � times, same as on the

left side. We get

�� � � � � � � � � � ��� � � � � � � � � � �

by the Pie Theorem B, using the respective other convexpolyhedron as the restricting convex body

�. Further-

more,

�� �� � � � � � � � � � � � � � � � � � � �

� �� � � � � � � � � � � �

IX.1 Indicator Functions 131

by induction hypothesis. Adding the alternating sums ofthe � � , � � , and � � implies � � � � �

� � � � �� �� � , as re-

quired.

Bibliographic notes. Most of the material in this sec-tion is taken from [2], where the inclusion-exclusion ap-proach to measuring the union of balls is laid out. Asdemonstrated, this principle also yields the Euler relationfor convex polyhedra. The discovery of that relation forconvex polyhedra in three dimensions is usually attributedto Ludwig Euler [3, 4], although there is evidence thatRen e Descartes knew about it a century earlier. There aremany proofs of that relation, and the historically first onefor the general

�-dimensional case goes back to the work

of Ludwig Schl afli [7] in the middle of the nineteenth cen-tury. He implicitly assumes that the boundary complex ofevery convex polyhedron is shellable, which has not beenestablished until 1972 by Bruggesser and Mani [1], whothus filled the gap left in Schl afli’s proof.

We note that all authors of papers referenced in this sec-tion are Swiss, except for one who has a Swiss grand-mother. Indeed, finding elementary proofs of the Eulerrelation for convex polyhedra seems to be a favorite topicfor Swiss mathematicians [5, 6].

[1] H. BRUGGESSER AND P. MANI. Shellable decompositionsof cells and spheres. Math. Scand. 29 (1972), 197–205.

[2] H. EDELSBRUNNER. The union of balls and its dual shape.Discrete Comput. Geom. 13 (1995), 415–440.

[3] L. EULER. Elementa doctrinae solidorum. Novi Comm.Acad. Sci. Imp. Petropol 4 (1752/53), 109–140.

[4] L. EULER. Demonstratio nonnullarum insignium proprieta-tum, quibus solida hedris planis inclusa sunt praedita. NoviComm. Acad. Sci. Imp. Petropol 4 (1752/53), 140–160.

[5] H. HADWIGER. Eulers Charakteristik und kombinatorischeGeometrie. J. Reine Angew. Math. 194 (1955), 101–110.

[6] W. NEF. Zur Einfuhrung der Eulerschen Charakteristik.Monatsh. Math. 92 (1981), 41–46.

[7] L. SCHLAFLI. Theorie der vielfachen Kontinuitat. Written1850–52 and published in Denkschrift der Schweizerischennaturforschenden Gesellschaft 38 (1901), 1–237.

132 IX MEASURES

IX.2 Volume and Surface Area

In this section, we use the indicator functions developedin Section IX.1 to derive inclusion-exclusion formulas forthe volume, area, and total arc length of a space-fillingdiagram.

Volume by integration. By definition, the indicatorfunction of a geometric set is 1 inside and 0 outside theset. We can therefore compute its volume by integration.Consider for example a bounded convex body

� � � �

and a convex polyhedron� � . Let

� ��� � � � �be the system of subsets of that appears in the statementof the Pie Theorem B in the last section. The volume ofthe intersection of the two convex bodies is

=� � � �� � � � � � � � �

� �� �

� � � ��� ��� . � � � � � ��

�� � � � � � � . �

� �� � � � � �

� �

� � � � � � � . � � � � � ��

� � �

where � is the closed complement of the half-space � . As-suming general position, the sets � contain

�or fewer

half-spaces each. For measuring molecules, we are mostlyinterested in the case

� � � , in which the volume is a sumof terms each involving four or fewer half-spaces.

In� � � dimensions, the above formula gives a proof

of the area formula for spherical triangles. Recall that � �is the unit sphere centered at the origin � � � �

. Let be a set of three half-spaces whose bounding planes passthrough 0. The half-spaces intersect in an unbounded tri-angular cone, and the intersection with the ball

�bounded

by � � is a pyramid whose base is a spherical triangle, asshown in Figure IX.6. Let � , � , and

�be the dihedral an-

gles between the planes, or equivalently, the angles of thespherical triangle. The volume of the pyramid can now becomputed by taking the ball, subtracting three half-balls,adding three sectors, and subtracting the reflected pyra-mid,

� �� � � � �� � �� � �� � ��� � � � � � � � � �

. It followsthat the volume is

=� � � � � � � � �� � �

� � ��� � � �The area of the spherical triangle is three times the volumedivided by the radius of the sphere. That radius is one,

Figure IX.6: A pyramid cut out of a ball by three half-spaces.

which implies that the area of the spherical triangle is ��

� � � � .

Stereographic projection. We now turn to the problemof measuring the union of a finite set of balls � in

� �.

We transform the question into one about half-spaces in� �

. Let � � be the unit 3-sphere with center at the origin��� � �

and identify� �

with the hyperplane * � � � . Call� � � � � � � � � � � the north-pole of � � . The stereographicprojection � ��� � � � � �

� �maps a point * to the

point � �* � collinear with * and � . The map is bijectiveand therefore has an inverse. If applied to all points of aball � in

� �, we get a cap of � � , which is the intersection

of the 3-sphere with a half-space ��� . This is illustratedin Figure IX.7. The half-space ��� lies on the side of its

N

Figure IX.7: Stereographic projection from � � to � � .hyperplane that does not contain the north-pole, so ��� �� � does contain � . Let � �� � � � � � � � � be thecollection of half-spaces that contain the north-pole. Then� � is the stereographic projection of the portion of � �that is not contained in the interior of

� � .

Union of balls. Instead of computing the volume of � �directly, we compute the volume of

� � � � � �� � � �

IX.2 Volume and Surface Area 133

� � � � � � � . Let�

be the 4-ball bounded by � � and� �

� � � � �the system of subsets of that appears in the

Pie Theorem B. The volume of the portion of � � outsidethe polyhedron is

� � � � �� ����

�� � � � � � � � � �

� �� �� �

�� �

�� � �

��� ��� . � � � � � � �� �

� �� �� � � � �

� � �� . � � � � � � � � �

� � �� �

� � �� . � � �

� �� �� � � � � �

� � �� �

� � � � . � � =� � � � � � ��

� � �

We could now get a formula for ��� by scaling the vol-ume by the distortion factor of � . A more straightforwardderivation of a formula for the ball union translates theinclusion-exclusion formula from � � to

� �. Instead of the

system of half-spaces we now use a system of balls ob-tained by substituting � for � � . For convenience, we usethe same notation, namely

�for the system of balls and

� for a generic set in�

.

PIE VOLUME FORMULA. The volume of the union of afinite set of balls � is

� � � � � � �� �

� � � � . � � =� � � � �

Dual complex, revisited. We observe that the index sys-tem

�in the Pie Volume Formula is an abstraction of the

dual complex� � � � of � . Instead of proving this alge-

braically, we explain the connection in geometric pictures.

Start with � � and� �

embedded in� �

as suggested inFigure IX.7. For each ball �E� � we get a half-space � � ,and the intersection of the half-spaces is a convex poly-hedron

� � , which contains the north-pole in itsinterior. Use � to project the boundary complex of

�to

� �. This is the weighted Voronoi diagram of � . A subset

� � belongs to� � � � � � �

iff its correspond-ing face � of

�has non-empty intersection with the ball�

bounded by � � . But this is also the condition for theprojection of � to have non-empty intersection with theinterior of � � . Hence, a non-empty set of half-spaces isin�

iff the corresponding set of balls defines a simplexin the dual complex. We have arrived at a simple inter-pretation of the Pie Volume Formula: construct the dual

complex of � and do inclusion-exclusion with a term forevery simplex in the dual complex. This is illustrated inFigure IX.8.

Figure IX.8: The area of the union is the sum of eight disk areasminus the sum of nine pairwise intersection areas, plus the sumof two triple-wise intersection areas.

Area and length. Similar to volume, we get a Pie AreaFormula for the surface area of � � ,

� � �� � � � �

� � � � . � � � � �� � � �

For � � �we get

� � � �and therefore a zero con-

tribution to the area. To prove this formula, we add thecontributions of individual spheres. For a single sphere,we use the Pie Volume Formula on the set of caps definedby intersecting balls. Since the caps are two-dimensional,the volume formula becomes an area formula. Letting � �be the sphere and

�the set of caps, the area of � � � � �

is the area of � � minus the alternating sum of the areas ofcap intersections, � � �� � ��� � � � � . � � � ��� � � � , where� � is the abstraction of the dual complex of

�. For each

set of caps in the system� � , we have the corresponding

set of balls together with the ball of � � in the system of�

.By summing over all balls, we get the Pie Area Formulagiven above.

Similarly, we can get a Pie Length Formula that mea-sures the total length of the circular arcs in the boundaryof the union of balls,� � ��� � � �

�� � � � � � . � � � � ��� � � �

The sets � with one or no half-space are redundant be-cause

� � ��� � � � in these cases. The proof of the for-mula is similar to the one for area, except that the sum-mation is done over all circles that are intersections of two

134 IX MEASURES

spheres forming a pair in�

. For each such circle, we ap-ply the (one-dimensional) Pie Volume Formula and thusget an expression whose terms correspond to the simplicesin the star of the pair.

We might even go one step further and consider thenumber of vertices of ��� . The inclusion-exclusion for-mula suggests that this number is the alternating sum ofvertex numbers of common intersections of balls. Foreach triple in

�we have a three-sided spindle with two

vertices, and for each quadruple we have a rounded tetra-hedron with four vertices. For two or fewer balls we haveno vertices. It follows that in the generic case, the numberof vertices of � � is twice the number of triangles minusfour times the number of tetrahedra in the dual complex.

Bibliographic notes. In 1992, Naiman and Wynnproved that the volume of a finite union of congruent ballscan be expressed by an inclusion-exclusion formula whoseterms correspond to the simplices in the Delaunay triangu-lation of the centers [4]. Edelsbrunner generalized the for-mula to allow for different size balls and strengthened it byusing the dual complex as the index system [1]. The ma-terial in this section is taken from that paper. The proof ofthe volume formula uses the inverse of the stereographicprojection to transform balls in

���to half-spaces in

� �.

That projection is conformal (preserves angles) and has anumber of other nice properties, many of which can befound in the book by Thurston [5].

Just as a union of balls in���

corresponds to a convexpolyhedron in

� �, a union of intersections of balls corre-

sponds to a union of intersections of half-spaces. The lat-ter is Hadwiger’s notion of a not necessarily convex poly-hedron [3]. Inclusion-exclusion formulas for such polyhe-dra can be found in [2].

[1] H. EDELSBRUNNER. The union of balls and its dual shape.Discrete Comput. Geom. 13 (1995), 415–440.

[2] H. EDELSBRUNNER. Algebraic decomposition of non-convex polyhedra. In “Proc. 36th Ann. IEEE Sympos.Found. Comput. Sci., 1995”, 248–257.

[3] H. HADWIGER. Vorlesungen uber Inhalt, Oberflache undIsoperimetrie. Springer, Berlin, 1957.

[4] D. Q. NAIMAN AND H. P. WYNN. Inclusion-exclusionBonferroni identities and inequalities for discrete tube-likeproblems via Euler characteristics. Ann. Statist. 20 (1992),43–76.

[5] W. P. THURSTON. Three-Dimensional Geometry andTopology, Volume 1. Edited by S. Levy, Princeton Univ.Press, New Jersey, 1997.

IX.3 Void Formulas 135

IX.3 Void Formulas

This section derives another collection of inclusion-exclusion formulas that express the volume, surface area,and arc length of a union of balls in

���. The new collec-

tion leads to formulas for voids, which are bounded com-ponents of the space outside the union.

Angles of revolution. A (one-dimensional) angle is bydefinition the length of a unit circle arc and can assumeany value between 0 and � . A two-dimensional angle isthe area of a piece of the unit 2-sphere and can assumeany value between 0 and �� . It is convenient to normal-ize so that in both cases the full angle is 1 and every an-gle is a fraction of the full angle. This definition can beused in any dimension

�. For example, the 0-sphere is a

pair of point with possible subsets the empty set, a singlepoint, or both points. The only zero-dimensional anglesare therefore 0, �� , and 1, and we will see shortly that thisconvention makes perfect sense when we compute volumeusing angles.

Consider for example a tetrahedron � . For each face � � , we define the angle � �

� as the fraction of directionsaround along which we enter � . Equivalently, � �

� is thevolume fraction of a sufficiently small ball centered at aninterior point of that lies inside the tetrahedron. FigureIX.9 illustrates the definition. In

� �we refer to the two-

Figure IX.9: The solid angle at a vertex, the dihedral angle at anedge, and the zero-dimensional angle of a triangle.

dimensional angle at a vertex as a solid angle, and theone-dimensional angle at an edge as a dihedral angle.The zero-dimensional angle of a triangle is always �� . Forconvenience, we also define the angles of the improperfaces of � as � �

�� � and � �� � � .

Independent triangles and tetrahedra. Recall that acollection of three disks in

� � is independent if for ev-

ery subset � � � , there is a point inside every diskin the subset and outside every disk not in the subset, � � � � � � � � ����

. This condition is equivalent to thethree circles decomposing

� � into eight regions in the wayshown in Figure IX.10. Let � , � , and

�be the angles at the

c

ba b

c

a

Figure IX.10: Both triangles are spanned by the centers of threeindependent disks.

vertices 4 , � , and � . The left drawing suggests that the areaof the triangle 4 � � is �I4 � � � � � � � �� � 4 � � 4 � � � � � � 4 � � ,where we write 4 for the area of the disk with center 4 , 4 �for the area of the intersection of the disks with centers 4and � , and so on. If we change the meaning from area toperimeter we get �

��I4 � � � � � � � �� ��4 � � 4 � � � � � � 4 � � .

Both formulas hold whenever the three disks are indepen-dent, but the right drawing in Figure IX.10 indicates thatthere are cases where the formulas are not as obvious as tothe left.

We generalize the formulas for independent triangles toindependent tetrahedra. To simplify the notation, we dropthe distinction between abstract and geometric simplices.Specifically, we let � denote an independent set of fourballs and, at the same time, the tetrahedron spanned by thefour ball centers. We use similar conventions for triangles,edges, and vertices.

INDEPENDENT VOLUME FORMULA. The volume of anindependent tetrahedron � is

� � � � �

� �� � � � . � � � � �

� =� � � �

The proof of the formula is somewhat technical andomitted. Similar to the two-dimensional case, we getsums that evaluate to zero if we replace volume by areaor length,

��

�� �

� � � � . � � � � �

� � � �� � ��

��

�� �

� � � � � � . � � � � �

�� � � � � �

136 IX MEASURES

Angle weights. We derive a new volume formula for aunion of balls by combining the Pie Volume and the In-dependent Volume Formulas. We first make the Pie Vol-ume Formula more complicated and then simplify by can-celling terms. It is convenient to cover the portion of � �outside the Delaunay triangulation with tetrahedra. Thiscan be done by adding four points viewed as degenerateballs to the set � . We start with the Pie Volume Formula,

=� � � � � � �� � �

� � �� . � � � =� � � ��

and decompose into the parts defined by the tetrahedra

� that contain as a face,

=� � � � � � �

� �

� � � � �

We need some notation to continue. Let � � denote the setof tetrahedra in a simplicial complex � . Furthermore, fora subcomplex � � � , let

�� � � � � denote the collection of

pairs � � with ��� and � � ��. With this notation

we can rewrite the Pie Volume Formula as

=� � � � � �

� � �� � � � ��� � � � � . � � � � �

� =� � � �

where�

is the Delaunay triangulation of � . For examplefor a tetrahedron � � , the only coface in

�is � � ,

the angle is � �

�� � , and the contributed term is � =� � ,

as before. For triangles, edges, and vertices , the contri-bution is split up into as many pieces as there are anglesaround . Whenever � is a tetrahedron in

�, we use the

Independent Volume Formula to make a substitution. Thisresults in the new volume formula. We write

�for

���

.

ANGLE-WEIGHTED PIE VOLUME FORMULA. The vol-ume of the union of a finite set of balls in

� �is

� � � � � � � �

� � �� �

� � �� � � � � � � � � � . � � � � �

� =� � � �

The new formula suggests we compute volume in twosteps. First we compute the volume of the underlyingspace of

�itself, and second we add the volume of the

fringe, � � ��� � ��

. Observe that not all pieces con-

sidered in the second sum are subsets of the fringe; somemight reach into the interior of

�� � ��. Nevertheless, the

second sum is exactly the volume of the fringe. We get

the same formulas for area and length, except that the firstsum vanishes:

� � �� � � � �

� � �� � � � � � � � �� . � � � � �

� � � �� � �

� � � � � � � �

� � �� � � � � � � � �� � � . � � � � �

�� � � � � �

Voids. As defined earlier, a void of a union of balls is abounded component of the complement space,

� �� ��� .

Figure IX.11 illustrates the fact that every void of � � iscontained in a void of

�. From a point inside the void,

Figure IX.11: Both voids in the union of disks is contained in acorresponding void of the dual complex.

the union of balls looks a lot like from a point outside allballs and voids. It is therefore not surprising that we canrewrite the Angle-weighted Pie Volume Formula to get anexpression for the volume of a void

�of ��� . The cor-

responding void in�

is triangulated by a subset � of theDelaunay triangulation. Strictly speaking, � is not a tri-angulation because it is not even a complex, missing thesimplices that bound the void in

�. The most straightfor-

ward translation of the angle-weighted formula suggestswe compute the volume of

�by first computing the vol-

ume of the corresponding void in�

and then subtractingthe volume of the fringe that reaches into that void.

VOID VOLUME FORMULA. The volume of a void�

of��� with dual set � � �

is

� � � � � � �

=� � ��

� � �� � � � ��� � � � � . � � � � �

� =� � � �

IX.3 Void Formulas 137

Similarly, we get formulas for the area and the total arc

length of�

by substituting ��

for� �

in the correspondingformulas of ��� :

� � �� � � �

� � �� � � � � � � � �� . � � � � �

� � � �� � �

� � � � � � �

� � �� � � � � � � � �� � � . � � � � �

�� � � � � �

Proof of void volume formula. The main idea in theproof is to cover the void with small balls and measure thedifference between the new and the old union. Let � � bethe set of balls we add, and consider � � � ��� � � , � � � ,and��� � � � � � . We require that

(i) � � be finite,

(ii)�

be a subcomplex of�� ,

(iii)� � ��� � ����� .

Assuming these three conditions, we have � � � �

=� � � � � � =� � � � . The Angle-weighted Pie Volume For-mulas for the two unions are

� � � � � � � � � �

=� � �� �

� � �� � � � � � � � � � � � . � � � � �

� =� � � �

=� � � � � � � �

=� � �� �

� � �� � � � � � � � � � . � � � � �

� =� � � �

The difference gives the Void Volume Formula.

Finally, we construct � � so that (i), (ii), and (iii) aresatisfied. Assuming general position, there exists a posi-tive � with

� � � � � � � ��� � , where ��� is obtained from� by reducing every ball with radius

�to radius � � � � � .

� and ��� have the same Voronoi diagrams and Delaunaytriangulations by the way we changed the radii, and theyhave the same dual complexes by the choice of � . Let � �be a finite set of balls of radii � � with centers in the void�

that covers�

. Let � � be the set of centers and note thatthe dual complex of � � ��� � is just

� � � � � together withfinitely many isolated vertices. Hence,

� � ��� � � � � ��� ��� � � � � � ��� � � � �where the second containment follows because ��� � � isobtained from ��� ��� � by growing every ball of radius

�to radius � � � � � . The first complex is the sequence is�and the last is

�� , hence

� � � � as required by (ii).Define � �

���� ��

and note that the underlying space of� � is the void in

�that corresponds to the void

�in � � .

By choice of � , the balls in � � are contained in��� ���and

thus cannot contribute to the union of balls in any otherway than covering

�, as required by (iii).

Bibliographic notes. The material of this section istaken from [1], which also contains a proof of the

�-

dimensional version of the Independent Volume Formula.The implementation of the formulas are part of the AlphaShapes software and their use in structural biology hasbeen described in [2]. The Angle-weighted Pie VolumeFormula is related to Gram’s angle sum formula, whichstates that the alternating sum of angles in a bounded con-vex polyhedron

�always vanishes,

��

faces �� � � � . � � � � �� �

In� � , this implies that the sum of angles at the vertices of

a convex � -gon is�� , for the � edges, minus 1, for the � -

gon. Expressed in radians, this is � � �� � � � � ��� � �

� .In� �

, the sum of angles at the vertices is not longer deter-mined by the combinatorial structure of the polyhedron,but the sum of solid angles minus the sum of dihedral an-gles is. A treatment of Gram’s angle sum formulas can befound in Gr unbaum [3, chapter 14].

[1] H. EDELSBRUNNER. The union of balls and its dual shape.Discrete Comput. Geom. 13 (1995), 415–440.

[2] H. EDELSBRUNNER, M. A. FACELLO, P. FU AND J.LIANG. Measuring proteins and voids in proteins. In “Proc.28th Ann. Hawaii Internat. Conf. System Sciences, 1995”,vol. V: Biotechnology Computing, 256–264.

[3] B. GRUNBAUM. Convex Polytopes. Wiley, Interscience,London, England, 1967.

138 IX MEASURES

IX.4 Measuring Software

[Should we add a short discussion of Patrice’s new soft-ware that also computes derivatives?] Volbl stands forthe =� � ume of a union of

�a�ls. It is part of the Alpha

Shapes software and can be used to compute the volume,surface area, and total arc length of a ball union and itsvoids.

Running volbl. The software uses the files generatedby delcx and by mkalf that represent the Delaunay tri-angulation and its filtration, as explained in Sections II.3and II.4. It is not necessary but a good idea to executevolbl in parallel with visualizing the alpha shapes of thesame data, which we do by typing

> alvis name &> volbl name

on the command line. The software will start with a di-alogue narrowing down the options of what to compute.As an example consider the measurements of voids incdk2, which is an enzyme involved in the control of thegrowth process of a body cell. The voids shown in Fig-ure IX.12 occur for the solvent accessible diagram definedfor �

�� � � ��� � � � A. In other words, we look at the wire-

frame of the dual complex defined by the balls with radii� � �� �� � , where

� � is the van der Waals radius of the�-th

ball. After entering the index of the � -complex, which

Figure IX.12: There are eight voids in the � -complex of cdk2,for � � � � � � � � � � A. Some of the voids have (open) dual setsthat seem connected in the image but are not because of missingtriangles.

we get as � � � � � � from alvis, we pick the middle of

the corresponding interval of � -values. Measuring voidstakes about � � ��� seconds on the author’s SGI Indigo II,and volbl outputs the measurements of all voids. Theoutput for the largest void in this example is

measurements of void, index 845:number of tetrahedra: 26tetra volume: 2.504511e+02void volume: 1.009809e+01surface area: 3.880316e+01arc length: 5.776804e+01number of corners: 34

The index of the void is a unique but fairly arbitrary inte-ger assigned during the process of collecting the tetrahedra

in the dual set. The measurements are in A�

, A � , and A, asappropriate. While the largest void is more than ten timesas large as any of the others (in volume), it is still onlyof the order of one van der Waals ball. The correspond-ing void in the dual complex is more than twenty times aslarge, which confirms out intuition about the size differ-ence between the two representations. While measuringthe voids, the software calculates for each ball its contri-bution to the void area and outputs the result in a new file,name.contrib.

Before exploring any of the other options in volbl,we take a brief look at the algorithms used and the datastructures these algorithms require.

Algorithms and data structures. To measure a unionof balls using the Pie Volume, Area, and Length Formu-las, we need a list of the simplices in the dual complex

�of � � . This list is a prefix of the masterlist mentionedin Section II.4. We simplify the actual situation insignif-icantly by assuming that the simplices in

� � � � arestored in an array

� �� � � ��� . The following pseudo-code is

then a direct implementation of the Pie Volume Formulaof Section IX.2.

��� � � ��� � � � � ;for

� � � to � do� ��� � ��� ; ��� � � ��� � ��� � � ��� � � � � � . � � � � � �

endfor.

The implementation of the Area and Length Formulas issimilarly straightforward. The Angle-weighted Pie andVoid Volume Formulas use the masterlist and in additionrequire a representation of the voids. We use a partition ofthe Delaunay tetrahedra into the dual complex and the var-ious voids,

� � ��� � -� �� -� � � -� � � � -� � � , where �

�is

IX.4 Measuring Software 139

the set of tetrahedra in the unbounded component of thecomplement of

�. We have voids, each represented by a

linear list � � of tetrahedra. We compute the lists by main-taining a union-find data structure while scanning the mas-terlist from back to front.

for� �

� downto � � � do � � � � � � ;case � � � � � � . ADD � � � ;case � � � � � � . let be the first and � the second

Delaunay tetrahedron that has � as a face;UNION � FIND � � � FIND � � ���

endfor.

The only trouble with this algorithm is that tetrahedra inthe unbounded component may be scattered in more thanone list. We fix this problem by adding a dummy tetra-hedron to the system and setting �

� � whenever � isa triangle on the boundary of the Delaunay triangulation.The following pseudo-code is a direct implementation ofthe Void Volume Formula of Section IX.3.

��� � � ��� � � � � � ;forall tetrahedra � � � � do��� � � ��� � � ��� � � ��� � � � � � ;forall faces � � doif ;� � then��� � � ��� � � ��� � � ��� � � � � � � . � � � � �

� � � endif

endforendfor.

The implementation of the Void Area and Length Formu-las is similarly straightforward.

Options. The software computes the volume, area,length, and also the number of vertices in the boundary,which we refer to as corners. It does this for the space-filling diagram � � , its voids, the outside fringe (definedas the portion of the unbounded component of the com-plement of

�� � ��that is covered by the balls), and the enve-

lope (defined as the space-filling diagram union all voids).Table IX.1 lists the main measurements made. As an ex-ample consider the van der Waals diagram of cdk2, whosedual complex is shown in Figure IX.13. In the checkingoption, the software computes all terms in Table IX.1 andprints a summary of the results. In the considered exam-ple, it reports that there are no voids and it prints the sizesof the space-filling diagram and the outside fringe as

Vsf = 3.034036e+04 Vof = 2.962563e+04

vol area lgth crnsspace-filling diagram Vsf Asf Lsf Csfvoids Vtv Atv Ltv Ctvoutside fringe Vof Aof Lof Cofenvelope Ve Ae Le Cedual complex Vshdual sets of voids Vtiv

Table IX.1: Cumulative measurements made by the Volbl soft-ware.

Figure IX.13: The dual complex of the van der Waals diagram ofcdk2. The complex has ������� �

vertices and no voids.

Asf = 3.100959e+04 Aof = 3.100959e+04Lsf = 1.915391e+04 Lof = 1.915391e+04Csf = 6388 Cof = 6388

Note that the volume of the space-filling diagram is in-significantly higher than that of the outside fringe. Thedifference is the volume of the dual complex, which is ap-parently rather small. The surface area, total arc length,and number of corners are of course the same for both.The software also checks a few linear relations that shouldvanish provided the computations are correct. For exam-ple, the sum of volumes of the space-filling diagram andits voids should be equal to the volume of the envelope,which in turn should be equal to the sum of volumes ofthe dual complex, the voids in the dual complex, and theoutside fringe. The specific relations checked by the soft-ware are

Vsf + Vtv - Vtiv - Vsh - Vof = 0.0Asf - Atv - Aof = 0.0Lsf - Ltv - Lof = 0.0Csf - Ctv - Cof = 0

140 IX MEASURES

Another form of output is the description of the total mea-surement as a sum of contributions over individual atoms.This makes sense for volume and area but is done only forthe latter. Depending on the type of area measurement,the software outputs a file name.contrib that containsthe contribution of each individual atom. In the check-ing option, the software compares for each atom the areacontribution to the space-filling diagram with the sum ofcontributions to the voids and the outside fringe. It alsochecks whether the sum of contributions really add up tothe total area, and it does this for the space-filling diagram,the voids, and the outside fringe.

Area formula. All analytic formulas needed to measurethe common intersection of up to four balls are straightfor-ward, except possibly the area of the intersection of up tothree caps. A formula for the area follows from the Gauss-Bonnet theorem in differential geometry, but we prefer toderive it with elementary means. The cap � � on a sphere � �consists of the portion inside the sphere � � . Equivalently,the cap contains all points whose power distance from � �is no less than that to � � ,

� � � � * � � � � � ��* � � � �* � �Let

� � be the radius of � � and � � the radius of the cir-cle bounding � � . We define the width of � � equal tothe distance between the two planes that cut � � from � � , � � � � � � � �� � � �� � � � � , as illustrated in Figure IX.14.The area of the cap is then � � � � � times the area of thesphere � � , which is �� � �� � �� ��� � � � � � .

ϕ ϕ

k

pj

p

jj

i

w

Figure IX.14: To the left, the shaded cap � � has radius � � andwidth � � . To the right, the shaded bigon has angles � and � andarc lengths � � and � � .

Consider now the intersection of two caps. Since allsimplices in

�are independent, we may assume that the

intersection � � � � � is a bigon, as shown in Figure IX.14.We let � be the angle at the two vertices and � � and � � thelengths of the two arcs, all measured as fractions of a fullcircle. We approximate the bigon by a spherical � -gon,

whose edges are by definition great-circle arcs. The areaof that � -gon is �

� �� � � � � ��� ��

�, where the sum adds

all angles in the � -gon. This is because a triangulationproduces � � � spherical triangles each contributing onehalf times the sum of the three angles minus one quarterto the area. To construct the � -gon, we approximate eachof the two circles by a regular spherical � -gon. The pointsare placed slightly outside the circles so that the areas ofthe � -gons are exactly the areas of the caps. Let � � and � �be the angles in the two � -gons. Assuming that � � and � �are rational, we can find infinitely many integers � so thatthe two � -gons share two vertices near the vertices of thebigon. We then have �

� � � � � � � � . The angles at thetwo shared vertices approach � as � goes to infinity. Fur-thermore, the � -gon has � � � � � vertices with angle � �and � � � � � vertices with angle � � . To compute � � we re-call that the area of the cap � � is � � � � . By construction,the area of the approximating � -gon is the same, namely� � �� �� � � � �

� ��� �

� � � � . Hence � � � � �� � � � �� � �� ,and symmetrically � � � � �� � � � �� � �� . We plug the valuesfor � � and � � into the formula for the area of � � � � � andget

� � �� � � � � � � � � � � � � � � � � �� � ���

after eliminating the terms that vanish when � goes to in-finity. Similarly, for the intersection of three caps with an-gles � � , � � , and � � and arc lengths � � , � � , and � � we get� � �� � � � � � � � � � ��� � ���� �

� �� � for the area of � � � � � � � � ,where � � ��� � � . Note that the formulas give the precisearea of the intersection of two or three caps since the ap-proximating spherical � -gon is only a tool in the proofand not used in the formula.

Bibliographic notes. The structural biology litera-ture distinguishes between numerical and analytical ap-proaches to measuring molecules. For the latter approach,we would decompose the molecule into simple pieces andgive a formula for the size of each piece. An example isConnolly’s work [1] on computing the area of a molecu-lar surface. The idea of using inclusion-exclusion for sizecomputations goes back to Kratky [4], who shows thatthere is a short inclusion-exclusion formula for the areaof the intersection of a finite set of disks in the plane. Hisproof is existential and superceded by explicit formulasthat can be derived by the same methods as described inSections IX.1 and IX.2. Scheraga and coauthors [5] imple-ment an inclusion-exclusion formula for a union of ballsbased on Kratky’s work, but the lack of an explicit expres-sion occasionally leads to miscalculations [2]. A detaileddocumentation of the Volbl software is given in [3].

IX.4 Measuring Software 141

[1] M. L. CONNOLLY. Analytical molecular surface calcula-tion. J. Appl. Cryst. 16 (1983), 548–558.

[2] L. R. DODD AND D. N. THEODOROU. Analytic treat-ment of the volume and surface area of molecules formedby an arbitrary collection of unequal spheres intersected byplanes. Molecular Physics 72 (1991), 1313–1345.

[3] H. EDELSBRUNNER AND P. FU. Measuring space fillingdiagrams and voids. Rept. UIUC-BI-MB-94-01, BeckmanInst., Univ. Illinois, Urbana, Illinois, 1994.

[4] K. W. KRATKY. The area of intersection of � equal circulardisks. J. Phys. A: Math. Gen. 11 (1978), 1017–1024.

[5] G. PERROT, B. CHENG, K. D. GIBSON, J. VILA, A.PALMER, A. NAYEEM, B. MAIGRET AND H. A. SCHER-AGA. MSEED: a program for rapid determination of acces-sible surface areas and their derivatives. J. Comput. Chem.13 (1992), 1–11.

142 IX MEASURES

Exercises

The credit assignment reflects a subjective assessment ofdifficulty. Every question can be answered using the ma-terial presented in this chapter.

1. Section of triangulation. (2 credits). Let�

be atriangulation of a set of � points in the plane. Let be a line that avoids all point. Prove that intersectsat most �@� � � edges of

�and that this upper bound

is tight for every � � � .

Chapter X

Derivatives

The derivative of surface area under deformation is animportant term in the simulation of molecular and atomicmotion. In the case of van der Waals or solvent accessiblediagram, it is related to the length of the circular arcs inthe boundary.

X.1 Implicit Solvent ModelX.2 Weighted Area DerivativeX.3 Weighted Volume DerivativeX.4 Derivative Software

Exercises

143

144 X DERIVATIVES

X.1 Implicit Solvent Model

[Give a general introduction and work out the relationshipwith area and volume derivatives.]

X.2 Weighted Area Derivative 145

X.2 Weighted Area Derivative

[Talk about the unweighted and the weighted area deriva-tives.] [Explain the results and disucuss the continuity is-sue of the functions.]

[1] R. BRYANT, H. EDELSBRUNNER, P. KOEHL AND M.LEVITT. The area derivative of a space-filling diagram.Manuscript, Duke Univ. Durham, North Carolina, 2002.

146 X DERIVATIVES

X.3 Weighted Volume Derivative

[Talk the unweighted and the weighted volume derivatives.][Explain the results and disucuss the continuity issue of thefunctions.]

[1] H. EDELSBRUNNER AND P. KOEHL. The weighted vol-ume derivative of a space-filling diagram. Manuscript, DukeUniv. Durham, North Carolina, 2003.

X.4 Derivative Software 147

X.4 Derivative Software

[Discuss Patrice’s ProShape software.]

148 X DERIVATIVES

Exercises

The credit assignment reflects a subjective assessment ofdifficulty. Every question can be answered using the ma-terial presented in this chapter.

1. Section of triangulation. (2 credits). Let�

be atriangulation of a set of � points in the plane. Let be a line that avoids all point. Prove that intersectsat most �@� � � edges of

�and that this upper bound

is tight for every � � � .

SUBJECT INDEX 149

Subject Index

active site, 7affine combination, 28affine hull, 28alpha complex, 21alpha shape, 21Alpha Shape software, 23amino acid, 5angle, dihedral, 103

, solid, 103area, 100atom, 9atomic number, 9atomic weight, 9attachment, 60

backbone, 5barycentric coordinates, 65basis (of a group), 51Betti number, 51, 114

, persistent, 57body (inside a skin), 29boundary group, 49boundary homomorphism, 49Brunn-Minkowski theorem, 116

canonical basis, 57cell (in a complex), 60central dogma, 1chain, 48chain complex, 49chromosome, 3closed ball property, 35coaxal system, 29codon, 5coherent triangulation, 19Connolly surface, 16continuous function, 44contractible, 45convex combination, 28convex hull, 28convex polyhedron, 96coordinate system, 60Corey-Pauling-Koltun model, 16coset, 48critical point, 61

, non-degenerate, 61critical point theory, 59curvature (of a curve), 32

, Gaussian, 32, mean, 32, normal, 32, principal, 32

cycle group, 49

deformation retraction, 45Delaunay triangulation, 23

, restricted, 35, weighted, 18

diffeomorphism, 60differential topology, 62dihedral angle, 103

Dirichlet tessellation, 19DNA (deoxyribonucleic acid), 2dual complex, 20, 101dual set, 69

edge contraction, 40edge flip, 40electron, 9element, 9� -sampling, 36Euler characteristic, 51, 96Euler relation, 96Euler-Poincar e theorem, 96exact arithmetic, 24

face (of a polyhedron), 96face (of a simplex), 48facet, 96filtration, 21, 24fundamental theorem of linear algebra, 51

Gauss map, 32Gaussian curvature, 32gene, 3genome, 2geodesic, 32gluing map, 60Gouraud shading, 40gradient, 63graphical user interface, 23group, 48

Helly’s theorem, 116Hessian, 61homeomorphism, 44homology class, 49homology group, 49

, persistent, 57homomorphism, 48homotopic map, 44homotopy equivalence, 44homotopy type, 45homotopy, 44

image (of a function), 48inclusion-exclusion, 96independent collection, 20independent simplex, 20, 103index (of a critical point), 61indicator function, 96integral line, 63interval tree, 24isomorphism, 48

Johnson-Mehl model, 16join, 45

kernel, 48

length scale, 36length, 100Lennard-Jones function, 11linear algebra, 62

150 SUBJECT INDEX

linear independence, 51lower star, 65

manifold, 60map, 44matrix (of a homomorphism), 55mean curvature, 32mesh, 35metamorphosis, 41Minkowski sum, 30, 116mixed cell, 30mixed complex, 30molecular mechanics, 10molecular skin, 27molecular surface, 15molecule, 9Morfi software, 39morphing, 84Morse complex, 64Morse function, 61Morse theory, 59Morse-Smale function, 64mouth (of a pocket), 69

neutron, 9NMR (nuclear magnetic resonance), 23normal curvature, 32normal form, 55normal form algorithm, 55, 114normal vector, 32nucleotide, 2

open ball, 44open set, 44open set (of simplices), 72orthogonal spheres, 18orthosphere, 18, 22

parametrization, 60partial order, 69pdb-file, 23pencil (of circles), 28persistent Betti number, 57persistent homology group, 57piecewise linear, 65pocket, 68polyhedron, 102

, convex, 96potential energy, 11power diagram, 17power distance, 17principal curvature, 32principal simplex, 24principle of inclusion-exclusion, 96protein, 5Protein Data Bank, 23proton, 9

quotient group, 48

Ramachandran plot, 6rank (of a group), 51regular point, 61

regular simplex, 24regular triangulation, 19replication (of DNA), 3residue, 5restricted Delaunay triangulation, 35restricted Voronoi diagram, 35ribosome, 6RNA (ribonucleic acid), 3

signature, 25, 71simplex, 48simplicial complex, 48simulated perturbation, 24singular simplex, 24skin, 29Skin Meshing software, 40smooth manifold, 60smooth map, 60solid angle, 103solvent accessible surface, 15space-filling diagram, 14specificity, 7speed (of a curve), 32spherical triangle, 100stable manifold, 63star, 65stereographic projection, 100subspace topology, 44supporting hyperplane, 96

tangent space, 60tangent vector, 32, 60topological equivalence, 44topological space, 44topological subspace, 44topological type, 44topology, 44transcription (of DNA to RNA), 4transversal, 64triangulation, 35, 48

, coherent, 19, regular, 19, weighted Delaunay, 18

union-find, 56, 107unstable manifold, 63

van der Waals potential, 10van der Waals radius, 23van der Waals surface, 15vector field, 63velocity vector, 32vertex insertion, 40void, 69, 104Volbl software, 106volume, 100Voronoi diagram, additively weighted, 15

, restricted, 35, weighted, 17

x-ray crystallography, 23

AUTHOR INDEX 151

Author Index

Akkiraju, N., 16Alberts, B., 8Alexandrov, P. S., 22Amenta, N., 38Ashcroft, N. W., 11Aurenhammer, F., 16

Bader, R. F. W., 79Bajaj, C. L., 77Banchoff, T. F., 65Basch, J., 83Berman, H. M., 26Bern, M., 38Besl, P. J., 93Bhat, T. N., 26Billera, L. J., 19Bondi, A., 11Bourne, P. E., 26Bray, D., 8Bronson, H. R., 8Bruce, J. W., 34Bruggesser, H., 99

Capoyleas, V., 117Casati, R., 70Cheng, B., 109Cheng, H.-L., 34, 38, 42, 84, 87Cheng, S.-W., 42, 84Chew, L. P., 38Chothia, C., 11Clifford, W. K., 31Connolly, M. L., 16, 109Corey, R. B., 8Cormen, T. H., 54, 114Creighton, T. E., 8Crick, F. H. C., 4

Darboux, M. G., 31Darby, N. J., 8Delaunay, B. (also Delone), 19Delfinado, C. J. A., 54Dey, T. K., 34, 38Dirichlet, P. G. L., 19Dodd, L. R., 109

Edelsbrunner, H., 16, 19, 22, 26, 31, 34, 38, 42, 46,54, 58, 65, 70, 74, 76, 77, 82, 84, 87, 99, 102,105, 109, 113, 114, 115

Eilenberg, S., 54Euler, L., 32, 99

Facello, M. A., 70, 74, 105, 115Feiner, S., 42Feng, Z., 26Foley, J., 42Forman, R., 70, 115Frobenius, G., 31Fu, P., 16, 25, 42, 84, 87, 105, 109

Gauss, C. F., 19, 32Gelbart, W. M., 4

Gelfand, I. M., 19Gerstein, M., 11, 26, 93Giblin, P. J., 22, 34, 50Gibson, K. D., 109Gilliland, G., 26Gr unbaum, B., 105Griffith, A. J. F., 4Gromov, M., 117Guibas, L. J., 83Guillemin, V., 62

Hadwiger, H., 99, 102Harer, J., 65, 77Helly, E., 117Hughes, J., 42

Johnson, A., 8Johnson, W. A., 16Jorgensen, W. L., 11

Kapranov, M. M., 19Kelley, J. E., 46Kirkpatrick, D. G., 22Klee, V., 117Kratky, K. W., 109Kuntz, I. D., 70

Lam, K. P., 42, 84Leach, A. R., 11, 16Lee, B., 16Leiserson, C. E., 54, 114Leray, J., 46Letscher, D., 58, 76, 114Levitt, M., 93Lewis, J., 8Lewontin, R. C., 4Liang, J., 70, 74, 105, 115London, F., 11

M ucke, E. P., 22, 26Maigret, B., 109Maillot, P.-G., 92Mani, P., 99Martinetz, T., 38McCleary, J., 58McKay, N. D., 93Mehl, R. F., 16Mendel, G., 4Mermin, N. D., 11Miller, J. H., 4Milnor, J., 62Morse, M., 62Munkres, J. R., 46, 50, 58

Naiman, D. Q., 102Nef, W., 99Neyeem, A., 109

O’Neill, B., 34

Palmer, A., 109Pascucci, V., 77Pauling, L., 8

152 AUTHOR INDEX

Pedoe, D., 31Perrot, G., 109Poincar e, H., 54Pollack, A., 62

Qian, J., 16

Raff, M., 8Ramachandran, G. N., 8Ramos, E. A., 82Richards, F. M., 16, 26Rivest, R. L., 54, 114Roberts, K., 8Rotman, J. J., 50

Sasisekharan, V., 8Sch utte, K., 113Scheraga, H. A., 109Schey, H. M., 66Schikore, D. R., 77Schl afli, L., 99Schneider, R., 117Schulten, K., 38Seidel, R., 22Seifert, H., 46, 62Shah, N. R., 38Sharir, M., 113Sherwood, E. R., 4Shindyalov, I. N., 26Smale, S., 66Steenrod, N., 54Stern, C., 4Storjohann, A., 58Strang, G., 62Stryer, L., 8Sturmfels, B., 19Sullivan, J., 34, 38

Taylor, R., 11Theodorou, D. N., 109Threlfall, W., 46, 62Thurston, W. P., 102Tirado-Rives, J., 11Tsai, J., 11

Van Dam, A., 42Van der Waals, 11Van der Waerden, B. L., 113Van Krefeld, M., 77Van Oostrum, R., 77Varzi, A. C., 70Veltkamp, R., 91Vila, J., 109Vleugels, J., 91Voronoi, G., 19

Wagon, S., 117Wallace, A., 62Walter, P., 8Wang, Y., 77Watson, J. D., 4Weissig, H., 26Westbrook, J., 26

Will, H.-M., 16Woodward, C., 74Wynn, H. P., 102

Zelevinsky, A. V., 19Zhang, L., 83Zomorodian, A., 58, 65, 74, 76, 77, 114