Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio.PDB.Superimposer.Superimposer.set_atoms (   self,
  fixed,
  moving 
)
Put (translate/rotate) the atoms in fixed on the atoms in 
moving, in such a way that the RMSD is minimized.

@param fixed: list of (fixed) atoms
@param moving: list of (moving) atoms 
@type fixed,moving: [L{Atom}, L{Atom},...]

Definition at line 23 of file Superimposer.py.

References Bio.PDB.Superimposer.Superimposer.rms, and Bio.PDB.Superimposer.Superimposer.rotran.

00023 
    def set_atoms(self, fixed, moving):
        """
        Put (translate/rotate) the atoms in fixed on the atoms in 
        moving, in such a way that the RMSD is minimized.

        @param fixed: list of (fixed) atoms
        @param moving: list of (moving) atoms 
        @type fixed,moving: [L{Atom}, L{Atom},...]
        """
        if not (len(fixed)==len(moving)):
            raise PDBException("Fixed and moving atom lists differ in size")
        l=len(fixed)
        fixed_coord=numpy.zeros((l, 3))
        moving_coord=numpy.zeros((l, 3))
        for i in range(0, len(fixed)):
            fixed_coord[i]=fixed[i].get_coord()
            moving_coord[i]=moving[i].get_coord()
        sup=SVDSuperimposer()
        sup.set(fixed_coord, moving_coord)
        sup.run()
        self.rms=sup.get_rms()
        self.rotran=sup.get_rotran()


Generated by  Doxygen 1.6.0   Back to index