Closed camel2000 closed 10 months ago
Same question, did you solve this?
Hi @camel2000, @YAndrewL ,
Apologies for the long delay. To answer briefly: please note that the .step()
function is "old" KeOps syntax that means "> 0". As a consequence, writing:
xyz_dists = ((xyz1_i - xyz2_j) ** 2).sum(-1).sqrt()
xyz_dists = (1.0 - xyz_dists).step()
creates a (N_1, N_2)
LazyTensor of "booleans" whose value xyz_dists[i, j]
indicates if point i
from protein 1 and point j
from protein 2 are at distance < 1 Angstrom
from each other. Then, computing:
p1_iface_labels = (xyz_dists.sum(1) > 1.0).float().view(-1)
is just a way of looking for points i
in protein 1 with at least two such neighbours in protein 2.
All in all, this code "flags" points on the surface of protein 1 that are close to the interface of protein 2, and vice versa.
I hope that this answers your question, please feel free to re-open the issue if needed :-) Best regards, Jean
Hi @jeanfeydy, thank you very much for the reply. Is it fine to use the latest version of keops and pytorch geometrics?
thanks very much, this problem bave been solved , Not long ago, I also checked the official website of kops, the api ".step()" is really confusing, but now it is clear
李 @.***
------------------ 原始邮件 ------------------ 发件人: "Jean @.>; 发送时间: 2023年11月9日(星期四) 下午5:05 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [FreyrS/dMaSIF] why the interface is computed like this ? (Issue #42)
Hi @camel2000, @YAndrewL ,
Apologies for the long delay. To answer briefly: please note that the .step() function is "old" KeOps syntax that means "> 0". As a consequence, writing: xyz_dists = ((xyz1_i - xyz2_j) ** 2).sum(-1).sqrt() xyz_dists = (1.0 - xyz_dists).step()
creates a (N_1, N_2) LazyTensor of "booleans" whose value xyz_dists[i, j] indicates if point i from protein 1 and point j from protein 2 are at distance < 1 Angstrom from each other. Then, computing: p1_iface_labels = (xyz_dists.sum(1) > 1.0).float().view(-1)
is just a way of looking for points i in protein 1 with at least two such neighbours in protein 2. All in all, this code "flags" points on the surface of protein 1 that are close to the interface of protein 2, and vice versa.
I hope that this answers your question, please feel free to re-open the issue if needed :-) Best regards, Jean
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
this function in data_iteration.py as below,
my question is: what is the meaning of
xyz_dists.sum(1) > 1.0
and I think the value in the array ofxyz_dists.sum(1)
is less than 1.0 , and maybe in most case the value should be negative, so the p1_iface_labels may have no non-zero value. which means there is no interface.