prody / NMWiz

Normal Mode Wizard
csb.pitt.edu/NMWiz
6 stars 3 forks source link

How to calculate Scale by RMSD? #5

Closed jingyile closed 2 years ago

jingyile commented 2 years ago

image

As shown in the picture, I want to know how to calculate the real-valued scaling factor by RMSD and mode frequency.

"The sum of squares of the arrow lengths will be the square of the specified RMSD", i can't understand it.

Looking forward to your reply, thanks!

SHZ66 commented 2 years ago

意思就是这些箭头长度的平方和等于你设定的RMSD的平方。这样的好处是箭头所指到的位置和初始结构的RMSD正好就是你设置的值。

jingyile commented 2 years ago

感谢回复! 那比如我第一组mode值为-0.004,-0.005,0.004 这样子。 RMSD设为2,如上图的scale by 第一个值是NMA算出来的(应该是模式频率的倒数?那就是周期?)

jingyile commented 2 years ago

意思就是这些箭头长度的平方和等于你设定的RMSD的平方。这样的好处是箭头所指到的位置和初始结构的RMSD正好就是你设置的值。 那么就是-0.004× Scale 的第一个值和第二个值? 那么第二个值是自动根据RMSD和第一个值算出来的。 我想知道这个计算方法是什么样的呢?

jingyile commented 2 years ago

意思就是这些箭头长度的平方和等于你设定的RMSD的平方。这样的好处是箭头所指到的位置和初始结构的RMSD正好就是你设置的值。

也就是说,我想知道每一个原子对应的箭头长度是怎么算出来的?

jingyile commented 2 years ago

以上图为例,RMSD的值为2 人工设定。 Scale by 第一个位置的值,NMA算出来的 那第二个值是怎么计算出来的呢?

SHZ66 commented 2 years ago

以上图为例,RMSD的值为2 人工设定。 Scale by 第一个位置的值,NMA算出来的 那第二个值是怎么计算出来的呢?

不好意思才看见。第一个值应该是mode的正则值的倒数(mode的正则值是频率平方,所以倒数正比于周期平方,有时候我们称之为mode的variance),所以是固定的,第二个值是用来进一步scale到你设定的RMSD的。不是很确定,但感觉这第二个值应该是这样计算的:

rmsd / (1/sqrt(n_atoms)) / (1/eigenvalue)

@jamesmkrieger do you know how the second scaling value was calculated exactly for scaling the mode vectors to the target RMSD?

jamesmkrieger commented 2 years ago

I think it's exactly as you said except it's 1/sqrt(eigenvalue)

We have a function evalRMSD that is called whenever the RMSD is changed and it calculates the scaling number as follows: https://github.com/prody/NMWiz/blob/d7837cbddb3e591ae7d400b3e0b3caf3f80499cb/nmwiz.tcl#L3037

The variable $length is the original lenght that was extracted from the nmd file and is the first scaling number, which is the 1/sqrt(eigenvalue).

The veclength evaluation is to divide away the length that's currently there to multiply by the new scaled length.

jingyile commented 2 years ago

@SHZ66 @jamesmkrieger Thank you very much!!!

jingyile commented 2 years ago

以上图为例,RMSD的值为2 人工设定。 Scale by 第一个位置的值,NMA算出来的 那第二个值是怎么计算出来的呢? 不好意思才看见。第一个值应该是mode的正则值的倒数(mode的正则值是频率平方,所以倒数正比于周期平方,有时候我们称之为mode的variance),所以是固定的,第二个值是用来进一步scale到你设定的RMSD的。不是很确定,但感觉这第二个值应该是这样计算的:

rmsd / (1/sqrt(n_atoms)) / (1/eigenvalue)

@jamesmkrieger do you know how the second scaling value was calculated exactly for scaling the mode vectors to the target RMSD?

I think it's exactly as you said except it's 1/sqrt(eigenvalue)

We have a function evalRMSD that is called whenever the RMSD is changed and it calculates the scaling number as follows:

https://github.com/prody/NMWiz/blob/d7837cbddb3e591ae7d400b3e0b3caf3f80499cb/nmwiz.tcl#L3037

The variable $length is the original lenght that was extracted from the nmd file and is the first scaling number, which is the 1/sqrt(eigenvalue).

The veclength evaluation is to divide away the length that's currently there to multiply by the new scaled length.

感谢感谢!!

jamesmkrieger commented 2 years ago

You’re welcome