Protool/structure.py
def make_boxes(self):
        """Divide all atoms into 6A boxes"""
        self.boxes={}
        self.small_boxes={}
        for atom in self.atoms:
            x_index=int(self.atoms[atom]['X']/6.0)
            y_index=int(self.atoms[atom]['Y']/6.0)
            z_index=int(self.atoms[atom]['Z']/6.0)
            index='%d_%d_%d' %(x_index,y_index,z_index)
            if not self.boxes.has_key(index):
                self.boxes[index]=[]
            self.boxes[index].append(atom)
            #
            self.atoms[atom]['box']=[x_index,y_index,z_index]
            #
            # --- Now the smaller box
            #
            x_index=int(self.atoms[atom]['X']/3.5)
            y_index=int(self.atoms[atom]['Y']/3.5)
            z_index=int(self.atoms[atom]['Z']/3.5)
            index='%d_%d_%d' %(x_index,y_index,z_index)
            if not self.small_boxes.has_key(index):
                self.small_boxes[index]=[]
            self.small_boxes[index].append(atom)
            #
            self.atoms[atom]['smallbox']=[x_index,y_index,z_index]
        return
Divide all atoms into 6A boxes
Divide all atoms into 6A boxes
Divide all atoms into 6A boxes
def make_boxes(self):
        self.boxes={}
        self.small_boxes={}
        for atom in self.atoms:
            x_index=int(self.atoms[atom]['X']/6.0)
            y_index=int(self.atoms[atom]['Y']/6.0)
            z_index=int(self.atoms[atom]['Z']/6.0)
            index='%d_%d_%d' %(x_index,y_index,z_index)
            if not self.boxes.has_key(index):
                self.boxes[index]=[]
            self.boxes[index].append(atom)
            self.atoms[atom]['box']=[x_index,y_index,z_index]
             --- Now the smaller box
            x_index=int(self.atoms[atom]['X']/3.5)
            y_index=int(self.atoms[atom]['Y']/3.5)
            z_index=int(self.atoms[atom]['Z']/3.5)
            index='%d_%d_%d' %(x_index,y_index,z_index)
            if not self.small_boxes.has_key(index):
                self.small_boxes[index]=[]
            self.small_boxes[index].append(atom)
            self.atoms[atom]['smallbox']=[x_index,y_index,z_index]
        return
def make_boxes ( self ) : self . boxes = { } self . small_boxes = { } for atom in self . atoms : x_index = int ( self . atoms [ atom ] [ 'X' ] / 6.0 ) y_index = int ( self . atoms [ atom ] [ 'Y' ] / 6.0 ) z_index = int ( self . atoms [ atom ] [ 'Z' ] / 6.0 ) index = '%d_%d_%d' % ( x_index , y_index , z_index ) if not self . boxes . has_key ( index ) : self . boxes [ index ] = [ ] self . boxes [ index ] . append ( atom ) self . atoms [ atom ] [ 'box' ] = [ x_index , y_index , z_index ] x_index = int ( self . atoms [ atom ] [ 'X' ] / 3.5 ) y_index = int ( self . atoms [ atom ] [ 'Y' ] / 3.5 ) z_index = int ( self . atoms [ atom ] [ 'Z' ] / 3.5 ) index = '%d_%d_%d' % ( x_index , y_index , z_index ) if not self . small_boxes . has_key ( index ) : self . small_boxes [ index ] = [ ] self . small_boxes [ index ] . append ( atom ) self . atoms [ atom ] [ 'smallbox' ] = [ x_index , y_index , z_index ] return
Divide all atoms into 6A boxes
Divide all atoms into 6A boxes
"""Divide all atoms into 6A boxes""" # # # --- Now the smaller box # #
self