Esempio n. 1
0
    def get_dihedral_subset_mask(self, flexible_residues, mtype):
        '''
        This method creates an array of ones and/or zeros
        of the length of the number of atoms in "self". It
        uses the user-supplied flexible_residue array to
        determine which atoms to include in the mask.
        This version is hard-wired for proteins or rna to choose
        the C(n-1), N(n), CA(n), C(n), and N(n+1) atoms		
        or the O3'(n-1), P(n), O5'(n), C5'(n), C4'(n), 
        C3'(n), O3'(n) and P(n+1) atoms that form the basis set		
        for the rotation phi & psi or alpha, beta, delta, epsilon, and eta
        angles respectively.  This method calles a c-method called
        mask to speed up the calculation (24.5 X faster).	
        '''
        natoms = self.natoms()
        name = self.name()
        resid = self.resid().astype(numpy.long)
        nflexible = len(flexible_residues)

        nresidues = int(self.resid()[-1] - self.resid()[0] + 1)

        farray = numpy.zeros((nflexible, natoms), numpy.long)

        mask.get_mask_array(farray, name, resid, flexible_residues, nresidues,
                            mtype)

        return farray
Esempio n. 2
0
def cee_way():

    m1 = sasmol.SasMol(0)
    m1.read_pdb("min3.pdb")
    natoms = m1.natoms()
    resid = m1.resid()
    name = m1.name()
    nresidues = m1.resid()[-1] - m1.resid()[0] + 1
    flexible_residues = numpy.arange(2, 8).tolist()
    # 	print 'getting rotation indices for molecule'
    residue_rotation_indices = {}
    residue_rotation_mask = {}
    # 	print 'number of flexible residues = ',len(flexible_residues)
    nflexible = len(flexible_residues)
    atomlist = numpy.arange(0, natoms).tolist()

    # import cee_mask
    import mask

    farray = numpy.zeros((nflexible, natoms), numpy.int32)

    nresidues = int(nresidues)

    mask.get_mask_array(farray, name, resid, flexible_residues, nresidues)

    for i in xrange(nflexible):
        for j in xrange(natoms):
            if farray[i][j] != 0:
                print farray[i][j],
Esempio n. 3
0
	def get_dihedral_subset_mask(self,flexible_residues,mtype):
		'''
		This method creates an array of ones and/or zeros
		of the length of the number of atoms in "self". It
		uses the user-supplied flexible_residue array to
		determine which atoms to include in the mask.
		This version is hard-wired for proteins or rna to choose
		the C(n-1), N(n), CA(n), C(n), and N(n+1) atoms		
		or the O3'(n-1), P(n), O5'(n), C5'(n), C4'(n), 
		C3'(n), O3'(n) and P(n+1) atoms that form the basis set		
		for the rotation phi & psi or alpha, beta, delta, epsilon, and eta
		angles respectively.  This method calles a c-method called
		mask to speed up the calculation (24.5 X faster).	
		'''
		natoms=self.natoms()
		name=self.name()
		resid=self.resid().astype(numpy.long)
		nflexible=len(flexible_residues)

		nresidues=int(self.resid()[-1] - self.resid()[0]+1)

		farray=numpy.zeros((nflexible,natoms),numpy.long)

		mask.get_mask_array(farray,name,resid,flexible_residues,nresidues,mtype)

		return farray
Esempio n. 4
0
def cee_way():

    m1 = sasmol.SasMol(0)
    m1.read_pdb('min3.pdb')
    natoms = m1.natoms()
    resid = m1.resid()
    name = m1.name()
    nresidues = m1.resid()[-1] - m1.resid()[0] + 1
    flexible_residues = numpy.arange(2, 8).tolist()
    #	print 'getting rotation indices for molecule'
    residue_rotation_indices = {}
    residue_rotation_mask = {}
    #	print 'number of flexible residues = ',len(flexible_residues)
    nflexible = len(flexible_residues)
    atomlist = numpy.arange(0, natoms).tolist()

    #import cee_mask
    import mask

    farray = numpy.zeros((nflexible, natoms), numpy.int32)

    nresidues = int(nresidues)

    mask.get_mask_array(farray, name, resid, flexible_residues, nresidues)

    for i in xrange(nflexible):
        for j in xrange(natoms):
            if (farray[i][j] != 0):
                print farray[i][j],