Protool/geometry.py
def apply_current_transformation(self,fit_atoms):
        """Apply the last transformation to fit_atoms"""
        #
        # Check that we have a rotation matrix
        #
        for varname in ['refcenter','fitcenter','rotation']:
            if not hasattr(self,varname):
                raise Exception('No transformation defined. Call "superpose" first')
        #
        fit_coords=[]
        for atom in fit_atoms:
            fit_coords.append(self.GetPosition(atom))
        newcoords=quatfit.qtransform(len(fit_atoms),fit_coords,self.refcenter,self.fitcenter,self.rotation)
        #
        # Change the coordinates
        #
        count=0
        for atom in fit_atoms:
            self.SetPosition(atom,newcoords[count])
            count=count+1
        return
Apply the last transformation to fit_atoms
Apply the last transformation to fit_atoms
Apply the last transformation to fit_atoms
def apply_current_transformation(self,fit_atoms):
         Check that we have a rotation matrix
        for varname in ['refcenter','fitcenter','rotation']:
            if not hasattr(self,varname):
                raise Exception('No transformation defined. Call "superpose" first')
        fit_coords=[]
        for atom in fit_atoms:
            fit_coords.append(self.GetPosition(atom))
        newcoords=quatfit.qtransform(len(fit_atoms),fit_coords,self.refcenter,self.fitcenter,self.rotation)
         Change the coordinates
        count=0
        for atom in fit_atoms:
            self.SetPosition(atom,newcoords[count])
            count=count+1
        return
def apply_current_transformation ( self , fit_atoms ) : for varname in [ 'refcenter' , 'fitcenter' , 'rotation' ] : if not hasattr ( self , varname ) : raise Exception ( 'No transformation defined. Call "superpose" first' ) fit_coords = [ ] for atom in fit_atoms : fit_coords . append ( self . GetPosition ( atom ) ) newcoords = quatfit . qtransform ( len ( fit_atoms ) , fit_coords , self . refcenter , self . fitcenter , self . rotation ) count = 0 for atom in fit_atoms : self . SetPosition ( atom , newcoords [ count ] ) count = count + 1 return
Apply the last transformation to fit_atoms
Apply the last transformation to fit_atoms
"""Apply the last transformation to fit_atoms""" # # Check that we have a rotation matrix # # # # Change the coordinates #
self
fit_atoms