Re: [ccp4bb] Jelly body refinement?
Hi Gunnar, I would have thought that changing the value and gradient of the target function had the potential to alter the minima? Indeed, the target function is changed during the search, but once a stable minimum is found, the DEN potential needs to be zero by definition and the coordinates have to sit in a minimum of the original target function. Yes, I believe both statements are correct - I was referring to the nature of the function during the procedure, and you refer to the nature after asymptotic convergence. The nature of the target function and location of the minima are changed during DEN refinement - at any given time step (before asymptotic convergence) the minima of the target function may lie in locations different to the original target function. However, upon convergence, dij ~= Dij regardless of particular parameter values. With DEN, the target function changes shape throughout the procedure, but results in the target function being asymptotically equal to the original, thus refinement converges to a minima of the original target function. This behaviour is interesting and notable because it is different to other terms used in refinement. Generally, prior information (e.g. geometry terms, external structural information) in the form of restraints is determined externally and remains static during refinement. These determine the nature of the target function, but do not change it during refinement - this contrasts with the DEN approach. Of course, the structure factors are also updated and thus also alter the nature of the target function during refinement. Just some interesting observations! Here are my thoughts: since the DEN update formula is recursive, the equilibrium distance can also be written in terms of the Dij alone (still assuming gamma=1): dij(t+1) = Dij(0)*(1-kappa)^(t+1) + kappa*sum_n=0^t{Dij(t+1-n)*(1-kappa)^n} This means that the equilibrium distance is indeed dependent on the initial distance Dij(0) for all times t. … I hope I do not get you wrong, but with this argument aren't you just saying that the path/trajectory (of both the atomic coordinates and the DEN potential) depends on the starting point? No, this wasn't quite the point I was trying to make. For sure, we all trivially know that any path during refinement depends on the starting point of the parameter values. However, it is interesting that the DEN restraint target (or DEN potential, or equilibrium distance) depends on the starting point. Moreover, the DEN restraint target can be expressed in a form that makes this dependency explicit. This observation is not trivial, as it differs from other approaches. As above, it is most interesting to acknowledge that this contrasts with other terms used in refinement. For example, simple geometry/external restraints representing prior information always remain static during refinement. At time t, other restraints do not depend on their value at time t-1, and thus do not depend on their value at time 0. Rather, they are pre-determined before refinement begins. The important point is that the decision on how to move the DEN minimum from one iteration (at time t) to the next (at time t+1) depends only on where the atoms are at t+1 and where the DEN minimum was at time t. Or equivalently, the decision on how to move the DEN minimum from one iteration (at time t) to the next (at time t+1) depends on where the atoms are at t+1, where they were at time t, where they were at time t-1, … , where they were at time 0. Of course, the degree of dependency on distant history is controlled by kappa. Very low values of kappa will result in DEN remembering more distant historical values of the interatomic distance, and thus refinement will take longer to converge. Very high values of kappa will result in DEN being dependent only on the immediate history, and thus will have little effect on refinement. If we assume that there is a second starting point which results in a minimization path that happens to cross exactly the path from the first starting point (same atomic coordinates and same position of DEN minimum) at some time t'. Then the new position of the DEN minimum at time t'+1 would be exactly at the same position that you get from the first path at time t+1. Of course, if a second minimisation path happens to cross exactly the first minimisation path, then they would both end up with the same final result. There would be something wrong if they didn't! The property that two paths within some neighbourhood of each other both converge to the same final positions is a simple requirement for refinement robustness. Just to clarify, I certainly did not make any incorrect/unsupported claims that DEN is not robust. I was merely investigating the exact nature of the technique. Interestingly, note that DEN requires both the atomic coordinates to be at the same position AND the DEN
Re: [ccp4bb] Jelly body refinement?
Hi Rob, This also means that the position of the minima of the target function are not changed by the DEN (gamma=1) restraints. I would have thought that changing the value and gradient of the target function had the potential to alter the minima? Indeed, the target function is changed during the search, but once a stable minimum is found, the DEN potential needs to be zero by definition and the coordinates have to sit in a minimum of the original target function. First we note that if the DEN potential minimum is at the same position as the atomic coordinates, the potential and the first derivative are zero. Assume the atoms are at a stable minimum of the combined energy function (original target function + DEN potential with gamma=1) AND the DEN potential minimum is different from the atomic positions. Then the DEN potential minimum would move towards the atomic positions, which would change the combined energy function and its derivative. The atoms would not be in a stable minimum anymore, which contradicts the assumption and proofs that the DEN potential is always zero if the atoms are in a stable minimium of the combined energy function. Here are my thoughts: since the DEN update formula is recursive, the equilibrium distance can also be written in terms of the Dij alone (still assuming gamma=1): dij(t+1) = Dij(0)*(1-kappa)^(t+1) + kappa*sum_n=0^t{Dij(t+1-n)*(1-kappa)^n} This means that the equilibrium distance is indeed dependent on the initial distance Dij(0) for all times t. … I hope I do not get you wrong, but with this argument aren't you just saying that the path/trajectory (of both the atomic coordinates and the DEN potential) depends on the starting point? Every simulation/minimization depends on the starting point. In a steepest descent minimization the step size determines how long it takes to move away from the starting point, just like the parameter kappa determines how long it takes for the DEN potential and the atomic coordinates to move away from the starting model. I do not see the difference? Am I missing something here? The important point is that the decision on how to move the DEN minimum from one iteration (at time t) to the next (at time t+1) depends only on where the atoms are at t+1 and where the DEN minimum was at time t. If we assume that there is a second starting point which results in a minimization path that happens to cross exactly the path from the first starting point (same atomic coordinates and same position of DEN minimum) at some time t'. Then the new position of the DEN minimum at time t'+1 would be exactly at the same position that you get from the first path at time t+1. This shows that the DEN update does not depend on the starting point. Cheers, Gunnar PS: Just for the record, here we only discuss DEN refinement for gamma=1. On Aug 31, 2012, at 11:30 AM, Robert Nicholls wrote: Hi Gunnar, I generally agree with your comments. However, I'd like to clarify a couple of points: For gamma=1 the DEN potential can follow anywhere, the entire conformational space is accessible and dij(t+1) depends only on Dij(t) and dij(t). ... But, again, the starting (or reference) model is completely forgotten and never used after the first iteration. Certainly, the entire conformational space is accessible. However, I'm not so sure about the starting model being completely forgotten and never used after the first iteration. Here are my thoughts: since the DEN update formula is recursive, the equilibrium distance can also be written in terms of the Dij alone (still assuming gamma=1): dij(t+1) = Dij(0)*(1-kappa)^(t+1) + kappa*sum_n=0^t{Dij(t+1-n)*(1-kappa)^n} This means that the equilibrium distance is indeed dependent on the initial distance Dij(0) for all times t. For values of kappa in (0,1), this dependency will diminish with time t, but will always exist. In fact, the equilibrium distance dij(t) is dependent on the whole history of the distance throughout the procedure, i.e. Dij(n) for n=0…t. Of course, the degree of influence of the historical information is controlled by kappa. Values of kappa~=0 would mean that the initial distance has very high weight (equilibrium distance dij(t) = Dij(0) in the limit kappa=0), and kappa~=1 would mean that the most recent distances have very high weight (equilibrium distance dij(t) = Dij(t) in the limit kappa=1, as you have already stated). Intermediate values of kappa will give various non-zero weights to the historical values of Dij. This also means that the position of the minima of the target function are not changed by the DEN (gamma=1) restraints. I would have thought that changing the value and gradient of the target function had the potential to alter the minima? It is therefore usually useful to run a final minimization without restraints to test whether the refinement reached a stable minimum
Re: [ccp4bb] Jelly body refinement?
Hi Gunnar, I generally agree with your comments. However, I'd like to clarify a couple of points: For gamma=1 the DEN potential can follow anywhere, the entire conformational space is accessible and dij(t+1) depends only on Dij(t) and dij(t). ... But, again, the starting (or reference) model is completely forgotten and never used after the first iteration. Certainly, the entire conformational space is accessible. However, I'm not so sure about the starting model being completely forgotten and never used after the first iteration. Here are my thoughts: since the DEN update formula is recursive, the equilibrium distance can also be written in terms of the Dij alone (still assuming gamma=1): dij(t+1) = Dij(0)*(1-kappa)^(t+1) + kappa*sum_n=0^t{Dij(t+1-n)*(1-kappa)^n} This means that the equilibrium distance is indeed dependent on the initial distance Dij(0) for all times t. For values of kappa in (0,1), this dependency will diminish with time t, but will always exist. In fact, the equilibrium distance dij(t) is dependent on the whole history of the distance throughout the procedure, i.e. Dij(n) for n=0…t. Of course, the degree of influence of the historical information is controlled by kappa. Values of kappa~=0 would mean that the initial distance has very high weight (equilibrium distance dij(t) = Dij(0) in the limit kappa=0), and kappa~=1 would mean that the most recent distances have very high weight (equilibrium distance dij(t) = Dij(t) in the limit kappa=1, as you have already stated). Intermediate values of kappa will give various non-zero weights to the historical values of Dij. This also means that the position of the minima of the target function are not changed by the DEN (gamma=1) restraints. I would have thought that changing the value and gradient of the target function had the potential to alter the minima? It is therefore usually useful to run a final minimization without restraints to test whether the refinement reached a stable minimum of the target function. I agree. In the context of REFMAC5, my current favourite strategy at low resolution is to first use external restraints in order to aid the structure to adopt a more sensible conformation, but then subsequently release the external restraints and replace them with jelly-body restraints towards the final refinement stages. From the user perspective, I think the main difference is that DEN is designed to be used in simulated annealing MD refinement, whereas jelly-body is designed to be used in minimization (and cannot be used for MD refinement as there are no second derivatives). I agree. Since the second derivative is utilised in ML refinement, it is possible to design a regulariser that has the desirable properties X=0 and X'=0 (e.g. jelly-body refinement) in the absence of any externally-derived prior information. Since this is not possible in simulated annealing MD refinement, the analogous solution will undoubtedly have to alter X and/or X'. Either way, all of these 'tricks' are just designed to aid robustness and combat overfitting! Certainly, both approaches can give positive results when refining at low resolution. Cheers Rob On 30 Aug 2012, at 19:43, Gunnar Schroeder wrote: Hi Rob, thank you, your comments helped a lot. From the Refmac5 paper I did not get the fact that d is set to d_current after each step. In that case you are right, jelly-body corresponds rather to DEN with gamma=1 than to gamma=0. And of course, a very important difference is, as you said, the fact that jelly-body is applied only to the second derivative. However, I would like to clarify this one point you made: For gamma=1 the DEN potential can follow anywhere, the entire conformational space is accessible and dij(t+1) depends only on Dij(t) and dij(t). The update formula is (again, for gamma=1): dij(t+1) = (1-kappa)*dij(t) + kappa * Dij(t+1) Dij(t) : distance between atom i and j and time t. dij_ref : distance between atom i and j in the reference structure. dij(t) : equilibrium distance of restraint between atom i and j at time t. The parameter kappa just defines how quickly dij(t) changes, i.e. kappa=1 sets dij(t+1)= Dij(t+1) at each time step. The parameter kappa is usually set to 0.1, which means the restraints slowly follow the atomic coordinates. But, again, the starting (or reference) model is completely forgotten and never used after the first iteration. This also means that the position of the minima of the target function are not changed by the DEN (gamma=1) restraints. It could just take longer to get there as the restraints need to be dragged along. For gamma1, the situation is different, there are additional forces toward the reference (could be the starting) model, in which case dij(t+1) additionally depends on dij_ref. This also changes the position of the minima of the target function. It is
Re: [ccp4bb] Jelly body refinement?
Hi Rob, thank you, your comments helped a lot. From the Refmac5 paper I did not get the fact that d is set to d_current after each step. In that case you are right, jelly-body corresponds rather to DEN with gamma=1 than to gamma=0. And of course, a very important difference is, as you said, the fact that jelly-body is applied only to the second derivative. However, I would like to clarify this one point you made: For gamma=1 the DEN potential can follow anywhere, the entire conformational space is accessible and dij(t+1) depends only on Dij(t) and dij(t). The update formula is (again, for gamma=1): dij(t+1) = (1-kappa)*dij(t) + kappa * Dij(t+1) Dij(t) : distance between atom i and j and time t. dij_ref : distance between atom i and j in the reference structure. dij(t) : equilibrium distance of restraint between atom i and j at time t. The parameter kappa just defines how quickly dij(t) changes, i.e. kappa=1 sets dij(t+1)= Dij(t+1) at each time step. The parameter kappa is usually set to 0.1, which means the restraints slowly follow the atomic coordinates. But, again, the starting (or reference) model is completely forgotten and never used after the first iteration. This also means that the position of the minima of the target function are not changed by the DEN (gamma=1) restraints. It could just take longer to get there as the restraints need to be dragged along. For gamma1, the situation is different, there are additional forces toward the reference (could be the starting) model, in which case dij(t+1) additionally depends on dij_ref. This also changes the position of the minima of the target function. It is therefore usually useful to run a final minimization without restraints to test whether the refinement reached a stable minimum of the target function. From the user perspective, I think the main difference is that DEN is designed to be used in simulated annealing MD refinement, whereas jelly-body is designed to be used in minimization (and cannot be used for MD refinement as there are no second derivatives). Cheers, Gunnar
Re: [ccp4bb] Jelly body refinement?
Hi Gunnar, A couple of comments, to clarify a few of the similarities and dissimilarities between DEN and analogous technologies: According to your very nice paper from 2010, DEN refinement with gamma=0 gives a higher weight to external information, whilst gamma=1 ignores external information in favour of self-restraints. Thus, unless I am mistaken, isn't it gamma=1 that would be more analogous to jelly-body refinement? Both jelly-body and DEN with gamma=1 are similar in that they are both independent of explicit externally-derived information. Indeed, DEN with gamma in [0,1] is analogous, but not equivalent, to a combination of jelly-body (or self-restraints) and external reference structure restraints as implemented in REFMAC5. In fact, jelly-body is actually quite different to DEN with gamma=1. Since jelly-body restraints are not applied to the target function (or 1st derivative), the restrained atoms are allowed to move easily if there is evidence to suggested that they should, e.g. from the electron density, or from other (external) restraints. The principal purpose of jelly-body restraints is simply to act as a regulariser thus stabilise refinement, not to inhibit deformation of interatomic distances where appropriate. Jelly-body is only applied to the 2nd derivative simply due to the form of the function: X=(d-d_current)^2. Note that d_current is updated at each step, thus we always have d=d_current. Thus, X=0, X'=0, but X''!=0. This formulation makes sense - in the absence of any external prior knowledge, we shouldn't change the likelihood function or the gradient, as we want the minima to remain in the same place. However, we can reasonably change the 2nd derivative, and we would like to benefit from the decreased effective parameter-to-observation ratio from this regulariser. Hopefully, that explains why jelly-body is actually quite different to DEN with gamma=1. Importantly, note that with jelly-body d_current is updated/reset at each step, which means that the structure is indeed very deformable. The structure is allowed to move away from the start values - in fact, d_current at cycle n is not dependent on d_current at cycle 0. I believe this contrasts with DEN, unless kappa=1. In contrast with jelly-body, external restraints and local NCS restraints are applied to the target function. In order to allow the inter-atomic distances to exhibit large deviations from the prior information, the Geman-McClure robust estimator function is used instead of assuming least squares residuals (i.e. parameters are estimated using generalised M-estimators instead of the traditional maximum likelihood method). Consequently, when using jelly-body and external restraints, regions of structure that need to move far should be able to do so, whilst the regions that are happy should remain where they are (ideally with more stable refinement and less overfitting) . Hopefully that helps to clarify a few of the similarities and dissimilarities between DEN and the analogous technologies implemented in REFMAC5 to anyone who may find it useful! Regards Rob On 28 Aug 2012, at 20:23, Gunnar Schroeder wrote: Just a quick comment on low resolution refinement: The concept of Deformable Elastic Network (DEN) refinement is quite similar to jelly-body refinement in the special case of gamma=0, for which the network is not deformable. In contrast to jelly-body refinement, the DEN restraints are however actually applied to the target function (and the first derivative). For gamma0 the minimum of the elastic network potential is allowed to move and, thus, to deform the restraints (which changes their equilibrium distances). Some individual distances can deform more than others depending on the force they feel from the target function. This automatically discriminates between those regions in the structure that need to move far (and are allowed to do so) and those regions that are happy where they are (and remain restrained). DEN refinement is implemented in CNS (1.3) and now also in Phenix (=1.7.3). Cheers, Gunnar
Re: [ccp4bb] Jelly body refinement?
Just a quick comment on low resolution refinement: The concept of Deformable Elastic Network (DEN) refinement is quite similar to jelly-body refinement in the special case of gamma=0, for which the network is not deformable. In contrast to jelly-body refinement, the DEN restraints are however actually applied to the target function (and the first derivative). For gamma0 the minimum of the elastic network potential is allowed to move and, thus, to deform the restraints (which changes their equilibrium distances). Some individual distances can deform more than others depending on the force they feel from the target function. This automatically discriminates between those regions in the structure that need to move far (and are allowed to do so) and those regions that are happy where they are (and remain restrained). DEN refinement is implemented in CNS (1.3) and now also in Phenix (=1.7.3). Cheers, Gunnar
[ccp4bb] Jelly body refinement?
Dear experts, Could someone explain what it is exactly that jelly body refinement does? I think that I understand it intuitively but want to make sure. In the same vein, what does jelly body refinement sigma parameter control? I.e., in comparison to the default sigma = 0.02, does sigma = 0.1 make body more or less like a jelly fish? Thanks! - Nate
Re: [ccp4bb] Jelly body refinement?
Garib gave a nice description of jelly-body refinement at the ACA meeting. IIRC from his talk, conceptually jelly-body refinment is the equivalent of adding springs between atoms within a certain radius of each other that restrain their movement during refinement. The restraints contribute to the target function curvature. The weight factor describes the contribution of the restraints to the overall target function. If w=1 and and the radius of atoms considered was infinity, you would have rigid body refinment. If w=0 you have normal uncontrained refinment. The REFMAC defaults are 4.2 A for the constraints radius, and 0.02 for the weighting factor. If I understand it correctly, it's basically like a slightly flexible rigid body refinement. Bigger w, more rigid jellyfish. (Someone will correct me if I have this wrong.) Mathematically, the contribution to the target function is sum(w (|d|-|dcurrent|)^2) where is d is a measure of the distances between atom pairs within a certain radius. The value d is the new distances and dcurrent is the old distances. The value w is the weighting factor. I have a recently obtained 2.9A dataset for which this approach might be interesting to try and see how it works compared to the usual unrestrained refinement and/or TLS, etc. Cheers, ___ Roger S. Rowlett Gordon Dorothy Kline Professor Department of Chemistry Colgate University 13 Oak Drive Hamilton, NY 13346 tel: (315)-228-7245 ofc: (315)-228-7395 fax: (315)-228-7935 email: rrowl...@colgate.edu On 8/23/2012 1:27 PM, Nathan Pollock wrote: Dear experts, Could someone explain what it is exactly that jelly body refinement does? I think that I understand it intuitively but want to make sure. In the same vein, what does jelly body refinement sigma parameter control? I.e., in comparison to the default sigma = 0.02, does sigma = 0.1 make body more or less like a jelly fish? Thanks! - Nate
Re: [ccp4bb] Jelly body refinement?
Glad to clarify! Also, note that whilst the springs between atoms analogy is nice for visualisation purposes, and certainly helps to initially explain the concept, it is not technically correct. Certainly, a similar analogy would be appropriate for external restraints and NCS local restraints, but not for jelly-body restraints. In the case of jelly-body, applying springs between atoms (i.e. altering the likelihood function) would effectively slow refinement, thus requiring more cycles in order to reach convergence. Consequently, only the second derivative is altered, and the springs between atoms are not actually applied. This helps to stabilise refinement (purely because it is a regulariser and thus helps robustness to noise) without overly impeding speed of convergence. Still, many cycles may be required… Cheers Rob On 23 Aug 2012, at 19:44, Robert Nicholls wrote: Hi Roger, You are correct, that *conceptually* the contribution to the target function is sum(w (|d|-|dcurrent|)^2)… however this is not actually applied to the target function. The target function remains unchanged. Only the 2nd derivative is affected by the jelly-body restraints. Also, note that the refmac5 ccp4i interface quotes: use jelly body refinement with sigma 0.02. You mention that bigger w, more rigid jellyfish. This is correct. However, note that w is inversely related to sigma, thus it should be acknowledged that smaller sigma, more rigid jellyfish… Also, note that the utility of such regularisers is greater when the effective observation-to-parameter ratio is worse, i.e. at lower resolutions. At this stage, it is not certain exactly what the resolution threshold is such that jelly-body restraints are useful. I can envisage that it not only depends on the resolution, but also on the quality (or noisiness) of the data. I am sure that there are 2.9A datasets out there that would benefit from such regularisers. Cheers Rob On 23 Aug 2012, at 19:31, Roger Rowlett wrote: Garib gave a nice description of jelly-body refinement at the ACA meeting. IIRC from his talk, conceptually jelly-body refinment is the equivalent of adding springs between atoms within a certain radius of each other that restrain their movement during refinement. The restraints contribute to the target function curvature. The weight factor describes the contribution of the restraints to the overall target function. If w=1 and and the radius of atoms considered was infinity, you would have rigid body refinment. If w=0 you have normal uncontrained refinment. The REFMAC defaults are 4.2 A for the constraints radius, and 0.02 for the weighting factor. If I understand it correctly, it's basically like a slightly flexible rigid body refinement. Bigger w, more rigid jellyfish. (Someone will correct me if I have this wrong.) Mathematically, the contribution to the target function is sum(w (|d|-|dcurrent|)^2) where is d is a measure of the distances between atom pairs within a certain radius. The value d is the new distances and dcurrent is the old distances. The value w is the weighting factor. I have a recently obtained 2.9A dataset for which this approach might be interesting to try and see how it works compared to the usual unrestrained refinement and/or TLS, etc. Cheers, ___ Roger S. Rowlett Gordon Dorothy Kline Professor Department of Chemistry Colgate University 13 Oak Drive Hamilton, NY 13346 tel: (315)-228-7245 ofc: (315)-228-7395 fax: (315)-228-7935 email: rrowl...@colgate.edu On 8/23/2012 1:27 PM, Nathan Pollock wrote: Dear experts, Could someone explain what it is exactly that jelly body refinement does? I think that I understand it intuitively but want to make sure. In the same vein, what does jelly body refinement sigma parameter control? I.e., in comparison to the default sigma = 0.02, does sigma = 0.1 make body more or less like a jelly fish? Thanks! - Nate
[ccp4bb] Jelly-body refinement
I know that refmac5 can run Jelly-body refinement for low resolution structure, but how can I update my ccp4i to get the jelly-body refinement? Thanks for all your suggestion.
Re: [ccp4bb] Jelly-body refinement
by adding new external keywords as described as in the PDF described by Garib N Murshudov www.ccp4.ac.uk/schools/China-2011/talks/refmac_Shanghai.pdf Padayatti PS On Mon, Apr 25, 2011 at 5:19 AM, Zhipu Luo zhipu...@yahoo.com wrote: I know that refmac5 can run Jelly-body refinement for low resolution structure, but how can I update my ccp4i to get the jelly-body refinement? Thanks for all your suggestion. -- Pius S Padayatti,PhD, Phone: 216-658-4528