Ghost/make_figs.py
def restraint_plot(self,big_satisfied):
        """
        Make a plot of restraints satisfied vs. eps for each method
        """
        import pylab
        plotdata=[]
        for method in big_satisfied.keys():
            xs=[]
            present=[]
            absent=[]
            tgs=big_satisfied[method].keys()
            for eps in sorted(big_satisfied[method][tgs[0]].keys()):
                sat=[]
                abs_sat=[]
                for tg in tgs:
                    for residue in big_satisfied[method][tg][eps].keys():
                        data=big_satisfied[method][tg][eps][residue]
                        if data[2]==1:
                            abs_sat.append(data[1])
                        else:
                            sat.append(data[0])
                sat=sum(sat)/float(len(sat))*100.0
                abse=sum(abs_sat)/float(len(abs_sat))*100.0
                present.append(sat)
                xs.append(eps/10.0)
                absent.append(abse)
            #
            pylab.plot(xs,present,'-',label=method,linewidth=3)
            pylab.plot(xs,absent,'--',label='abs %s' %method,linewidth=3)
            plotdata.append([xs,present,absent,method])
        pylab.legend()
        pylab.ylim((0.0,100.0))
        pylab.xlabel('Dielectric constant')
        pylab.ylabel('% of restraints satisfied')
        pylab.savefig('%s/restraints.png' %self.options.plotdir,dpi=300)
        #pylab.show()
        return plotdata

        Make a plot of restraints satisfied vs. eps for each method
        
Make a plot of restraints satisfied vs. eps for each method
Make a plot of restraints satisfied vs . eps for each method
def restraint_plot(self,big_satisfied):
        import pylab
        plotdata=[]
        for method in big_satisfied.keys():
            xs=[]
            present=[]
            absent=[]
            tgs=big_satisfied[method].keys()
            for eps in sorted(big_satisfied[method][tgs[0]].keys()):
                sat=[]
                abs_sat=[]
                for tg in tgs:
                    for residue in big_satisfied[method][tg][eps].keys():
                        data=big_satisfied[method][tg][eps][residue]
                        if data[2]==1:
                            abs_sat.append(data[1])
                        else:
                            sat.append(data[0])
                sat=sum(sat)/float(len(sat))*100.0
                abse=sum(abs_sat)/float(len(abs_sat))*100.0
                present.append(sat)
                xs.append(eps/10.0)
                absent.append(abse)
            pylab.plot(xs,present,'-',label=method,linewidth=3)
            pylab.plot(xs,absent,'--',label='abs %s' %method,linewidth=3)
            plotdata.append([xs,present,absent,method])
        pylab.legend()
        pylab.ylim((0.0,100.0))
        pylab.xlabel('Dielectric constant')
        pylab.ylabel('% of restraints satisfied')
        pylab.savefig('%s/restraints.png' %self.options.plotdir,dpi=300)
        pylab.show()
        return plotdata
def restraint_plot ( self , big_satisfied ) : import pylab plotdata = [ ] for method in big_satisfied . keys ( ) : xs = [ ] present = [ ] absent = [ ] tgs = big_satisfied [ method ] . keys ( ) for eps in sorted ( big_satisfied [ method ] [ tgs [ 0 ] ] . keys ( ) ) : sat = [ ] abs_sat = [ ] for tg in tgs : for residue in big_satisfied [ method ] [ tg ] [ eps ] . keys ( ) : data = big_satisfied [ method ] [ tg ] [ eps ] [ residue ] if data [ 2 ] == 1 : abs_sat . append ( data [ 1 ] ) else : sat . append ( data [ 0 ] ) sat = sum ( sat ) / float ( len ( sat ) ) * 100.0 abse = sum ( abs_sat ) / float ( len ( abs_sat ) ) * 100.0 present . append ( sat ) xs . append ( eps / 10.0 ) absent . append ( abse ) pylab . plot ( xs , present , '-' , label = method , linewidth = 3 ) pylab . plot ( xs , absent , '--' , label = 'abs %s' % method , linewidth = 3 ) plotdata . append ( [ xs , present , absent , method ] ) pylab . legend ( ) pylab . ylim ( ( 0.0 , 100.0 ) ) pylab . xlabel ( 'Dielectric constant' ) pylab . ylabel ( '% of restraints satisfied' ) pylab . savefig ( '%s/restraints.png' % self . options . plotdir , dpi = 300 ) return plotdata
Make a plot of restraints satisfied vs. eps for each method
Make a plot of restraints satisfied vs . eps for each method
"""
        Make a plot of restraints satisfied vs. eps for each method
        """ # #pylab.show()
self
big_satisfied