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

def Bio::PDB::DSSP::DSSP::__init__ (   self,
  model,
  pdb_file,
  dssp = "dssp" 
)

@param model: the first model of the structure
@type model: L{Model}

@param pdb_file: a PDB file
@type pdb_file: string

@param dssp: the dssp executable (ie. the argument to os.system)
@type dssp: string

Definition at line 102 of file DSSP.py.

00102                                                     :
        """
        @param model: the first model of the structure
        @type model: L{Model}

        @param pdb_file: a PDB file
        @type pdb_file: string

        @param dssp: the dssp executable (ie. the argument to os.system)
        @type dssp: string
        """
        p=PDBParser()
        # create DSSP dictionary
        self.dssp_dict=dssp_dict_from_pdb_file(pdb_file, dssp)
        map={}
        res_list=[]
        # Now create a dictionary that maps Residue objects to 
        # secondary structure and accessibility, and a list of 
        # (residue, (secondary structure, accessibility)) tuples
        for chain in model.get_iterator():
            chain_id=chain.get_id()
            for res in chain.get_iterator():
                res_id=res.get_id()
                if self.dssp_dict.has_key((chain_id, res_id)):
                    aa, ss, acc=self.dssp_dict[(chain_id, res_id)]
                    # Verify if AA in DSSP == AA in Structure
                    resname=res.get_resname()
                    resname=to_one_letter_code[resname]
                    # Something went wrong if this is not true!
                    assert(resname==aa)
                    map[res]=(ss, acc)
                    res_list.append((res, (ss, acc)))
                else:
                    pass
        self.map=map
        self.res_list=res_list
        self.model=model

    def __getitem__(self, res):


Generated by  Doxygen 1.6.0   Back to index