PEATDB/Ekin/Titration.py
def do_summary(self, DB, cols=None):
        """Print a summary of the current data loaded - no longer used"""
        summary=[]

        self.model_count={}
        self.residue_count={}
        self.residue_models={}
        self.atom_count={}
        for m in self.allmodels:
            self.model_count[m]=0
        #store per residue model data
        for res in self.residue_list:
            self.residue_count[res]=0
            self.residue_models[res]={}
            for m in self.allmodels:
                self.residue_models[res][m]=0
        for m in self.allmodels:
            self.atom_count[m]={}
            for a in self.atom_types:
                self.atom_count[m][a]=0
        for prot in ekindata:
            if ekindata[prot].has_key('__datatabs_fits__'):
                fits = ekindata[prot]['__datatabs_fits__']
            for dataset in ekindata[prot].keys():
                if dataset in self.excluded or ekindata[prot][dataset]==None:
                    continue
                if ekindata[prot][dataset].has_key('residue'):
                    resname = ekindata[prot][dataset]['residue']
                    self.residue_count[resname] += 1
                else:
                    resname = None
                if ekindata[prot][dataset].has_key('atom_type'):
                    atomtype = ekindata[prot][dataset]['atom_type']
                else:
                    atomtype = None
                if fits.has_key(dataset):
                    fdata = fits[dataset]

                    #print dataset, fdata
                    if fdata != None and len(fdata) != 0:
                        model = fdata['model']
                        self.model_count[model] += 1
                        if resname != None:
                            self.residue_models[resname][model] += 1
                        if atomtype != None:
                            self.atom_count[model][atomtype] += 1

        import pprint
        pp = pprint.PrettyPrinter(indent=4)
        x=pp.pformat(self.model_count)
        summary.append('Models:')
        summary.append(x+'\n')
        x=pp.pformat(self.residue_count)
        summary.append('Residues:')
        summary.append(x+'\n')
        x=pp.pformat(self.residue_models)
        summary.append('Residue model breakdown:')
        summary.append(x+'\n')
        x=pp.pformat(self.atom_count)
        summary.append('Atom types breakdown:')
        summary.append(x+'\n')
        return summary
Print a summary of the current data loaded - no longer used
Print a summary of the current data loaded - no longer used
Print a summary of the current data loaded - no longer used
def do_summary(self, DB, cols=None):
        summary=[]
        self.model_count={}
        self.residue_count={}
        self.residue_models={}
        self.atom_count={}
        for m in self.allmodels:
            self.model_count[m]=0
        for res in self.residue_list:
            self.residue_count[res]=0
            self.residue_models[res]={}
            for m in self.allmodels:
                self.residue_models[res][m]=0
        for m in self.allmodels:
            self.atom_count[m]={}
            for a in self.atom_types:
                self.atom_count[m][a]=0
        for prot in ekindata:
            if ekindata[prot].has_key('__datatabs_fits__'):
                fits = ekindata[prot]['__datatabs_fits__']
            for dataset in ekindata[prot].keys():
                if dataset in self.excluded or ekindata[prot][dataset]==None:
                    continue
                if ekindata[prot][dataset].has_key('residue'):
                    resname = ekindata[prot][dataset]['residue']
                    self.residue_count[resname] += 1
                else:
                    resname = None
                if ekindata[prot][dataset].has_key('atom_type'):
                    atomtype = ekindata[prot][dataset]['atom_type']
                else:
                    atomtype = None
                if fits.has_key(dataset):
                    fdata = fits[dataset]
                    if fdata != None and len(fdata) != 0:
                        model = fdata['model']
                        self.model_count[model] += 1
                        if resname != None:
                            self.residue_models[resname][model] += 1
                        if atomtype != None:
                            self.atom_count[model][atomtype] += 1
        import pprint
        pp = pprint.PrettyPrinter(indent=4)
        x=pp.pformat(self.model_count)
        summary.append('Models:')
        summary.append(x+'\n')
        x=pp.pformat(self.residue_count)
        summary.append('Residues:')
        summary.append(x+'\n')
        x=pp.pformat(self.residue_models)
        summary.append('Residue model breakdown:')
        summary.append(x+'\n')
        x=pp.pformat(self.atom_count)
        summary.append('Atom types breakdown:')
        summary.append(x+'\n')
        return summary
def do_summary ( self , DB , cols = None ) : summary = [ ] self . model_count = { } self . residue_count = { } self . residue_models = { } self . atom_count = { } for m in self . allmodels : self . model_count [ m ] = 0 for res in self . residue_list : self . residue_count [ res ] = 0 self . residue_models [ res ] = { } for m in self . allmodels : self . residue_models [ res ] [ m ] = 0 for m in self . allmodels : self . atom_count [ m ] = { } for a in self . atom_types : self . atom_count [ m ] [ a ] = 0 for prot in ekindata : if ekindata [ prot ] . has_key ( '__datatabs_fits__' ) : fits = ekindata [ prot ] [ '__datatabs_fits__' ] for dataset in ekindata [ prot ] . keys ( ) : if dataset in self . excluded or ekindata [ prot ] [ dataset ] == None : continue if ekindata [ prot ] [ dataset ] . has_key ( 'residue' ) : resname = ekindata [ prot ] [ dataset ] [ 'residue' ] self . residue_count [ resname ] += 1 else : resname = None if ekindata [ prot ] [ dataset ] . has_key ( 'atom_type' ) : atomtype = ekindata [ prot ] [ dataset ] [ 'atom_type' ] else : atomtype = None if fits . has_key ( dataset ) : fdata = fits [ dataset ] if fdata != None and len ( fdata ) != 0 : model = fdata [ 'model' ] self . model_count [ model ] += 1 if resname != None : self . residue_models [ resname ] [ model ] += 1 if atomtype != None : self . atom_count [ model ] [ atomtype ] += 1 import pprint pp = pprint . PrettyPrinter ( indent = 4 ) x = pp . pformat ( self . model_count ) summary . append ( 'Models:' ) summary . append ( x + '\n' ) x = pp . pformat ( self . residue_count ) summary . append ( 'Residues:' ) summary . append ( x + '\n' ) x = pp . pformat ( self . residue_models ) summary . append ( 'Residue model breakdown:' ) summary . append ( x + '\n' ) x = pp . pformat ( self . atom_count ) summary . append ( 'Atom types breakdown:' ) summary . append ( x + '\n' ) return summary
Print a summary of the current data loaded - no longer used
Print a summary of the current data loaded - no longer used
"""Print a summary of the current data loaded - no longer used""" #store per residue model data #print dataset, fdata
self
DB
cols