Archive for the ‘Uncategorized’ Category

Moving average

Wednesday, January 26th, 2011

In statistics and biophysics, a common value is moving average. There is one efficient way and the derivation is:

x_{i+1}=(x_{1}+x_{2}+..+x_{i+1})-(x_{1}+x_{2}+..+x_{i})

It then could be written as:

x_{i+1}= (i+1)*Average_{i+1}-i*Average_{i}

Therefore we have:

Average_{i+1}=\frac{i*Average_{i}+x_{i+1}}{i+1}
or =Average_{i}+\frac{x_{i+1}-Average_{i}}{i+1}.

not a good one: “Samuel Adams: A Life”

Thursday, November 11th, 2010

This suppose to be a biography, but the author gave too much writing to the context so that it seems it is rather a biography of that time instead of the person of interests. Maybe this is a new style or something, it just doesn’t work for me.

Anyway, Samuel Adams seems an interesting figure, I’ll try to read books about him if there is a good one and I have time.

Need for a HIV-1 vaccine

Sunday, November 7th, 2010

It would be disheartened for me to not think more about the problem after read the NY Time’s paper on HIV baby survivors. Life is surely imaginable for those kids who were born with HIV. Many notorious side-effect of medicines on them, in particular they have to take those medicines for life long, mental tortures of the disease on them, and harsh social environment surrounding them,  …, I can’t help asking the old question, is there anything to cure? And equally urgent, is there anything to prevent getting the disease at first place?

I sincerely hope the paper I read yesterday on Science holing the key to invent such a vaccine. I’m very much motivated to do something about it because it seems that we have the tools and data we need to start tackle the problem. A quintessential data mining coupling with statistical analysis, a fairly reasonable thermophysical model,  massive computer resource, to me it seems we could turn this tide. WOW, very excited with such a possibility of beating the beast.

Good obituary

Sunday, October 3rd, 2010

The obituary is about George C. Williams by Richard Dawkin and published in Science. The first two sentences are very good and I can’t help posting here:

It has become a cliché that Charles Darwin would not have succeeded as a scientist today. He would not have won big research grants and did not have the mathematics to be a “theorist” by today’s conventions.

Well said, well said. From now one, I shouldn’t feel bad myself at all, even that poor Charles Darwin can’t get a grant, why should I expect?

The book about Warren Buffet

Thursday, September 9th, 2010

I heard a while ago about the biography book of Warren Buffet by Alice Shroeder and finally got a chance to read(rather listen to) it. This is the first book I read about the admired Buffet. To me the whole book is just more gossips than what I knew from watching Charlie Rose Show. I mean, after read this book, Buffet is still just in a plane. The book title says his business life, but the author didn’t dig in enough to unveil his business activities from business perspective. The Solomon event is good but still lacking something, well, I guess I’ll never satisfied unless I read some documentation about that collapse–could put in on my wish list.

Anyway it is worth reading if you are interested in the greatest investor’s personal life.

The “Did you know?” video

Sunday, September 5th, 2010

It is quite interesting to watch this video from youtube.

Open source synthetic biology project: CINUX

Friday, June 11th, 2010

I guess the concept has been out there for a while. After the news from Craig Venter’s lab, which they created a new cell out of designed genome, I’m more optimistic of seeing such a new phenomena in future (decades or centuries), i.e., one lab or person makes a living thing out of own design, another lab or person makes a different one, as a whole, many different living things can be designed and trading of designed cells or even larger like tissues. Just like the great Linux project, we will have something like Cell-Linux(Cinux), an open source cell organization. There would be a concord effort to create a new platform of life that could do amazing things, such as, write this blog. :)

It would be a totally new world to live, and two of the most important issues would be related to ethics and privacy. IMHO, they are even more important than the techniques or the CINUX concept itself.

Variational transition state theory

Monday, May 17th, 2010

This is my note from Prof. Ron Elber’s lecture on “varational transition state theory”.

In the system, there are more than one minimum. If we can find a surface on which the probability of state going to one minimum is equal to going to another. Finding such a surface can be formulate asmin[I=\int_{S}e^{-\beta U(x)}d\sigma]

The surface S is usually in high dimension and complicated. A simplification is that the surface is a plane, that is, S: \vec{n} \cdot \vec{x} - b=0.

Therefore the problem for finding the S is equivalent to min[I(\vec{n},b)].

We reformulate the integral,

I_{approximate}=\int_{V}\delta(\vec{n} \cdot \vec{x} - b)dx\int_{S}e^{-\beta U(x)}|\nabla S|d\sigma,

because it is a plane, no Jacob transformation, so \nabla S = 1 .

So the minimization is to make sure,  \frac{\partial I}{\partial n_{i}}=0, \frac{\partial I}{\partial b}=0.

The index i here is due to the fact that in general one plane is not a good separator, so multiple planes (piece-wise) are needed, i is just the i-th plane. So reorganize the definition of I, we have

 I_{approximate}= \sum_{i=1}^{m}\int_{V}\delta(\vec{n_{i}} \cdot \vec{x} -  b_{i})dx\int_{S}e^{-\beta U(x)}d\sigma For simplicity, I consider I_approximate as I.

The \delta function can be rewritten as a limitation, so we have  I = \lim_{k \to \infty}\int \sqrt{\frac{k}{\pi}}e^{-k(\vec{n_{i}} \cdot \vec{x}-b_{i})^2}e^{-\beta U(x)}dx.

Some tricks here:

\frac{d log(I)}{db}=\frac{1}{I}\frac{\partial I}{\partial b} = \frac{1}{I}\lim_{k \to \infty} \int \sqrt{\frac{k}{\pi}} [2k(\vec{n_{i}} \cdot \vec{x}-b_{i})]e^{-k(\vec{n_{i}} \cdot \vec{x}-b_{i})^2}e^{-\beta U(x)}dx

define some new symbols

 x=(q,y), q=\vec{n} \cdot \vec{x}, \delta q = \vec{n} \cdot \vec{x}-b

rewrite the above with the new symbols:

\frac{d log(I)}{db}=\frac{1}{I}\lim_{k \to \infty} \int \sqrt{\frac{k}{\pi}}(-2k\delta q)e^{-k(\delta q)^{2}}e^{-\beta U(q,y)}d\delta q dy

Apply Talyor expansion to U, we have

e^{-\beta U(q,y)}=e^{-\beta U - \beta \frac{\partial U}{\partial \delta q}|_{\delta q =0}\delta q}=e^{-\beta U} (1-\beta (\frac{\partial U}{\partial \delta q})_{\delta q=0}\delta q)

Now we have

\frac{d log(I)}{db}=\frac{1}{I}\lim_{k \to  \infty} \int \sqrt{\frac{k}{\pi}}(-2k\delta q)e^{-k(\delta q)^{2}}e^{-\beta U} (1-\beta (\frac{\partial U}{\partial \delta q})_{\delta  q=0}\delta q)d\delta q dy

There exists such a simplification:

\frac{1}{I}\lim_{k \to  \infty}\int \sqrt{\frac{k}{\pi}}(-2k\delta  q)e^{-k(\delta q)^{2}}e^{-\beta U}d\delta q dy=0

So we have

\frac{d log(I)}{db}=-\frac{\beta}{I}\lim_{k \to   \infty}\int \sqrt{\frac{k}{\pi}}(-2k\delta q)e^{-k(\delta q)^{2}}e^{-\beta U} (\frac{\partial U}{\partial \delta q})_{\delta  q=0}\delta  q d\delta q dy

\frac{d log(I)}{db}=-\frac{\beta}{I}\lim_{k \to   \infty}\int  \sqrt{\frac{k}{\pi}}(-2k(\delta q)^{2})e^{-k(\delta q)^{2}} d\delta q \int e^{-\beta U}  (\frac{\partial U}{\partial \delta q})_{\delta  q=0} dy\\=-\frac{\beta}{I}\int e^{-\beta U}  (\frac{\partial U}{\partial \delta q})_{\delta  q=0}  dy=\ll \vec{F} \gg = \bar F

The above is simplified because

\lim_{k \to   \infty}\int  \sqrt{\frac{k}{\pi}}(-2k(\delta  q)^{2})e^{-k(\delta q)^{2}} d\delta q = \lim_{k \to   \infty}\sqrt{\frac{k}{\pi}} \frac{\partial }{\partial k}\int e^{-(k \delta q)^{2}} d\delta q=\lim_{k \to   \infty}\sqrt{\frac{k}{\pi}} \frac{\partial }{\partial k} \frac{\sqrt{\pi}}{k}=-\lim_{k \to   \infty}\sqrt{\frac{k}{\pi}}\frac{\sqrt{\pi}}{k^2}=must=-1The must here means, in previous introduction of limit function for the \deltafunction, the coefficient is not right. Anyway, the trick is that in the end,all k terms are reduced. I am too lazy to revisit each term and change them. :(

Because we expect \frac{\partial I}{\partial b}=0\Rightarrow \bar{F} =0. So just make sure the total force along the surface, here under the approximation the plane the total force is equal to zero.

I don’t know what it will turn out after we do \frac{\partial I}{\partial n_{i}}=0 \forall i \in [1,m] though.