sidechainnet/structure/StructureBuilder.py
def _init_bb(self):
        """Initialize the first 3 points of the protein's backbone.

        Placed in an arbitrary plane (z = .001).
        """
        n = torch.tensor([0, 0, 0.001], device=self.device, requires_grad=True)
        ca = n + torch.tensor([BB_BUILD_INFO["BONDLENS"]["n-ca"], 0, 0],
                              device=self.device, requires_grad=True)
        cx = torch.cos(np.pi - self.ang[3]) * BB_BUILD_INFO["BONDLENS"]["ca-c"]
        cy = torch.sin(np.pi - self.ang[3]) * BB_BUILD_INFO["BONDLENS"]['ca-c']
        c = ca + torch.tensor([cx, cy, 0], device=self.device, dtype=torch.float32, requires_grad=True)
        o = nerf(
            n,
            ca,
            c,
            torch.tensor(BB_BUILD_INFO["BONDLENS"]["c-o"]),
            torch.tensor(BB_BUILD_INFO["BONDANGS"]["ca-c-o"]),
            self.ang[1] - np.pi,  # opposite to current residue's psi
            l_bc=torch.tensor(BB_BUILD_INFO["BONDLENS"]["ca-c"]),  # Previous bond length
            nerf_method=self.nerf_method)
        return [n, ca, c, o]
Initialize the first 3 points of the protein's backbone.

        Placed in an arbitrary plane (z = .001).
        
Initialize the first 3 points of the protein's backbone.
Placed in an arbitrary plane (z = .001).
Initialize the first 3 points of the protein ' s backbone . Placed in an arbitrary plane ( z = . 001 ) .
def _init_bb(self):
        n = torch.tensor([0, 0, 0.001], device=self.device, requires_grad=True)
        ca = n + torch.tensor([BB_BUILD_INFO["BONDLENS"]["n-ca"], 0, 0],
                              device=self.device, requires_grad=True)
        cx = torch.cos(np.pi - self.ang[3]) * BB_BUILD_INFO["BONDLENS"]["ca-c"]
        cy = torch.sin(np.pi - self.ang[3]) * BB_BUILD_INFO["BONDLENS"]['ca-c']
        c = ca + torch.tensor([cx, cy, 0], device=self.device, dtype=torch.float32, requires_grad=True)
        o = nerf(
            n,
            ca,
            c,
            torch.tensor(BB_BUILD_INFO["BONDLENS"]["c-o"]),
            torch.tensor(BB_BUILD_INFO["BONDANGS"]["ca-c-o"]),
            self.ang[1] - np.pi,  
            l_bc=torch.tensor(BB_BUILD_INFO["BONDLENS"]["ca-c"]),  
            nerf_method=self.nerf_method)
        return [n, ca, c, o]
def _init_bb ( self ) : n = torch . tensor ( [ 0 , 0 , 0.001 ] , device = self . device , requires_grad = True ) ca = n + torch . tensor ( [ BB_BUILD_INFO [ "BONDLENS" ] [ "n-ca" ] , 0 , 0 ] , device = self . device , requires_grad = True ) cx = torch . cos ( np . pi - self . ang [ 3 ] ) * BB_BUILD_INFO [ "BONDLENS" ] [ "ca-c" ] cy = torch . sin ( np . pi - self . ang [ 3 ] ) * BB_BUILD_INFO [ "BONDLENS" ] [ 'ca-c' ] c = ca + torch . tensor ( [ cx , cy , 0 ] , device = self . device , dtype = torch . float32 , requires_grad = True ) o = nerf ( n , ca , c , torch . tensor ( BB_BUILD_INFO [ "BONDLENS" ] [ "c-o" ] ) , torch . tensor ( BB_BUILD_INFO [ "BONDANGS" ] [ "ca-c-o" ] ) , self . ang [ 1 ] - np . pi , l_bc = torch . tensor ( BB_BUILD_INFO [ "BONDLENS" ] [ "ca-c" ] ) , nerf_method = self . nerf_method ) return [ n , ca , c , o ]
Initialize the first 3 points of the protein's backbone.
Initialize the first 3 points of the protein ' s backbone .
"""Initialize the first 3 points of the protein's backbone.

        Placed in an arbitrary plane (z = .001).
        """ # opposite to current residue's psi # Previous bond length
self