Docsity

Protein Structure Geometry: Computing Properties with Monte Carlo, Assignments of Computer Science

Toggle sidebar
bg1
ECS 229
Assignment #2
Protein Structure Geometry
Due: Sunday, November 25, 2007
The main objective of this assignment is to get you accustomed to see protein structures as solid
object. You will also learn how to compute geometric properties numerically, using a well-known
technique in scientific computing, the Monte Carlo technique.
Protein geometry:
A common concrete model for proteins is to represent them as a union of balls, in which each ball
corresponds to an atom. Properties of a protein are then expressed in terms of properties of the
union. For example, the interaction of the protein with its environment is quantified through the
surface area and/or volume of the union of balls, and its potential active sites are detected as
cavities (for review, see the paper entitled “The geometry of biomolecular solvation”, by
Edelsbrunner and myself, available on the course web site, as a companion to this assignment).
How do we compute geometric properties of a protein, represented as a union of ball? This is by
far not an easy problem! Analytical solutions to that problem exist (see paper mentioned above),
but they are not easy to implement. Here we will use numerical methods to solve this problem
that are surprisingly accurate and easy to implement. These methods are based on the scientific
computing technique called “Monte Carlo integration”.
Monte Carlo techniques:
Let us assume we want to compute the integral I of a function f over a multidimensional volume
V. Suppose that we have picked N random points, uniformly distributed in a multidimensional
volume V. Call them x1,…,xN. The basic theorem of Monte Carlo integration estimates the integral
I as:
N
ff
VfVfdV
2
2!
±"
#
Here the brackets denote taking the arithmetic mean over the N sample points,
!! ==
==
N
i
i
N
i
ixf
N
fxf
N
f
1
22
1
)(
1
)(
1
The “plus-or-minus” term is a one standard deviation error estimate for the integral.
To understand how it can be applied to computing a volume, lest us look at a simple toy problem
in 2D, where we want to compute the surface area of two overlapping disks.
pf3
pf4

Partial preview of the text

Download Protein Structure Geometry: Computing Properties with Monte Carlo and more Assignments Computer Science in PDF only on Docsity!

ECS 2 29

Assignment # 2

Protein Structure Geometry

Due: Sunday, November 25, 2007 The main objective of this assignment is to get you accustomed to see protein structures as solid object. You will also learn how to compute geometric properties numerically, using a well-known technique in scientific computing, the Monte Carlo technique.

Protein geometry: A common concrete model for proteins is to represent them as a union of balls, in which each ball corresponds to an atom. Properties of a protein are union. For example, the interaction of the protein with its environment is quantified through the then expressed in terms of properties of the surface area and/or volume of the union of balls, and its potential active sites are detected as cavities (for review, see the paper entitled “The geometry of biomolecular solvation”, by Edelsbrunner and myself, available on the course web site, as a companion to this assignment). How do we compute geometric properties of a protein, represented as a union of ball? This is by far not an easy problem! Analytical solutions to that problem exist (see paper mentioned above), but they are not easy to implement. Here we will use numerical methods to solve this problem that are surprisingly accurate and easy to implement. Th computing technique called “Monte Carlo integration”. ese methods are based on the scientific

Monte Carlo techniques: Let us assume we want to compute the integral I of a function f over a multidimensional volume V volume V. Call them. Suppose that we have picked N random p x 1 ,…,xN. The basic theorem of Monte Carlo integration estimates the integraloints, uniformly distributed in a multidimensional I as:

fdV V f V f N^ f " ±^2!^2

Here the brackets denote taking the arithmetic mean over the N sample points,

f = N^1! i^ N = 1 f ( x i ) f^2 = N^1! i =^ N 1 f^2 ( x i )

The “plus To understand how it can be applied to computing a volume, lest us look at a simple toy problem-or-minus” term is a one standard deviation error estimate for the integral. in 2D, where we want to compute the surface area of two overlapping disks.

We define the function f as: For all x in R, f(x) = 1 if x! A U B , and f(x) = 0 otherwise.

To compute the surface area covered by the two disks A and B, whi use the following algorithm: ch we denote S ( A U B ), we

(1) (2) InitializeInitialize number of random points S = 0 and S 2 = 0 N (3) { For { i=0; i <= N, STEP=1 }

    • PositionCompute x if(x at random in the box i) : if the distance from R xi to the center of A is smaller than the radius of A, or if the distance from f(xi) = 1 ; in all other cases, f(x xii) = 0 to the center of B is smaller than the radius of B, }^ -^ Update the sums:^ S = S + f(xi); S^2 = S^2 + f(xi) * f(xi) (4) Compute means: < f > = S/N (5) Compute Surface area^ <^ f^2 > = S^2 /N

where S(R) is the surface of the rectangular box R. S^ (^ A U B )^ =^ S ( R )< f >

(6) Compute the one standard deviation error estimate: SD S R f N^ f = ( )^2!^2 This algorithm can be generalized to any number of disks, and any dimensions.

A

B

R

ii.i.^ PositionCompute^ x if(x^ at random on circle i) : if xi is inside a circle j, j^ k ≠k (green region in the figure above), iii. f(x Update the sums: i)^ =^^0 ; in all other cases (red region in the figure) S = S + f(xi); S 2 = S 2 + f(xi) * f(x^ f(xi) i) =^1 } c. Compute means: ii.^ i.^ <<^ ff^2 > = S/N^ > = S 2 /N d. Compute accessible length and update total length: i.

!

where^ Lk^ = R (^2 i "is the radius of circle Rk )^ f k , and ( 2 πRk ) its total length.

}^ ii.^ L = L + Lk Upon termination, Adapt the algorithm above to the problem of computing the total accessi L contains the total length of the union of circles. ble surface area of a union of balls. Write a small program implementing this algorithm (your choice of language). At this stage, do not worry about efficiency. ( the surface of a sphere?) Hint : there is a hidden difficulty in this part of the assignment: how do you sampling uniformly

c) Apply this program on the test case provided on the web page. Show how the estimate of the surface area changes as you vary N, the number of points you consider. (Using an analytical method, I found the surface of this union of balls to be 36764.21 Å^2 ) d) What is the time consuming part of this algorithm? Give suggestions on how to improve its efficiency.

e) Could the approach described above for computing the surface area of a union of balls be adapted to compute its volume?

Please provide for Problem 1 and Problem 2 both the source code of the program you wrote, and a report describing the results.

Good Luck!