smcantab / sens

Highly modular, parallel implementation of Superposition Enhanced Nested Sampling
5 stars 1 forks source link

use metric tensor or no? #1

Closed js850 closed 11 years ago

js850 commented 11 years ago

In the superposition approximation the vibrational free energy is the log product of the normal mode frequencies. If the metric tensor (M) is not the identity, which is the case for, e.g., systems with rigid bodies then this you compute the normal modes by diagonalizing the matrix

M^(-1) H

Where H is the hessian. When sampling coordinates from a minimum according to the superposition approximation should we use the eigenvactors of H or M^-1 H? It seems like it should be the latter, but I remember thinking earlier that it was only H. We should double check this.

js850 commented 11 years ago

as a further comment. If we're not supposed to use the metric tensor, should we also not use fvib, which is the log product of the normal mode frequencies. probably we should then use the log product of the hessian eigenvalues.

I think all the systems we've looked at have a metric tensor that is the identity

js850 commented 11 years ago

I just had a big powwow with Victor and Andy and we've come to a conclusion. Here is the summary of our thoughts

First we need to more clearly define the metric tensor, G. We are talking about the metric tensor that defines how distances are calculated in the coordinate system, a la general relativity. Sometimes we include further information into a generalized metric tensor like mass and moment of inertia --- this we definitely don't want because we are sampling from configuration degrees of freedom not the momentum degrees of freedom.

For computing phase space volume V (the relevant parameter being fvib) we definitely need the metric tensor. This allows us to have a consistent definition of volume. define the energy as

E(x) = x^2

the integral of all space up to E = 4 is

V = integral_(-2)^2 dx = 4

Now change coordinates

g = x^2 E(g) = g

naively we would write down the volume as

Vg = \integral_(-4)^4 dg = 8

but this is obviously not the same volume as V. To get the volume in V space (cartesian space) we need

V = \integral_(-4)^4 Jac dg

where the Jacobian Jac is

dg = 2xdx dx = dg / 2 / x = dg / (2 sqrt(g)) Jac = 1 / (2 sqrt(Abs(g)))

Mathematical tells me that the integral does indeed give V=4. The jacobian is directly related to the metric tensor, but I don't know how off the top of my head (probably J=G or J=G^(-1)).

Next we discuss sampling from that volume. Again we will consider the two integrals.

V = integral(-2)^2 dx V = \integral(-4)^4 Jac(g) dg

In both of them the bounds of the integral are defined directly with respect to the energy function. E less than 4 gives and E(g) = g gives g in (-4,4). And equivalently E(x) = x^2 gives x in (-2,2). Thus the bounds of the integral are irrespective of the coodinate system. They depend only on the energy function.

In cartesian coodinates all volume elements are the same, but in the transformed coordinates the volume element between g and g + dg is Jac(g)*dg. We must take care when sampling from this, we cannot simply sample uniformly in the coordinate g.

summary

to compute the phase space volume you need the metric tensor.

for the bounds on the volume integral you don't need the metric tensor, just the energy function

for sampling from the minimum you need the metric tensor to determine the correct weight of the volume element. This is the only part with a non trivial solution.

conclusion

we say that this method is implemented only for cartesian systems. (where the metric tensor is the identity). We can leave the implementation for non cartesian coordinates to others, or do it later. The only part that actually needs doing is sampling uniformly from curvilinear coordinates. This paper may help with that http://www.jstor.org/stable/2333716?seq=3