Input: - idx: residue indices of given sequence (B,L) Output: - seqsep: sequence separation feature with sign (B, L, L, 1) Sergey found that having sign in seqsep features helps a little
(idx)
| 92 | return RBF |
| 93 | |
| 94 | def get_seqsep(idx): |
| 95 | ''' |
| 96 | Input: |
| 97 | - idx: residue indices of given sequence (B,L) |
| 98 | Output: |
| 99 | - seqsep: sequence separation feature with sign (B, L, L, 1) |
| 100 | Sergey found that having sign in seqsep features helps a little |
| 101 | ''' |
| 102 | seqsep = idx[:,None,:] - idx[:,:,None] |
| 103 | sign = torch.sign(seqsep) |
| 104 | neigh = torch.abs(seqsep) |
| 105 | neigh[neigh > 1] = 0.0 # if bonded -- 1.0 / else 0.0 |
| 106 | neigh = sign * neigh |
| 107 | return neigh.unsqueeze(-1) |
| 108 | |
| 109 | def make_full_graph(xyz, pair, idx, top_k=64, kmin=9): |
| 110 | ''' |