pKaTool/pKaTool_main.py
def save_titration(self):
        """Save all titrations in a pickled file"""
        import tkFileDialog, os, pickle
        savedir=os.getcwd()
        filename=tkFileDialog.asksaveasfilename(defaultextension=".ppc",
                                                initialfile='calculation1.ppc',
                                                initialdir=savedir,
                                                filetypes=[("pKaTool pKa calc file","*.ppc"),
                                                           ("WHAT IF pKa dir format","*.pdb"),
                                                           ("All files","*.*")],
                                                parent=self.master)
        if not filename:
            return
        if filename[-4:]=='.ppc':
            fd=open(filename,'w')
            pickle.dump(self.calcs,fd)
            fd.close()
        elif filename[-4:]=='.pdb':
            print 'Not implemented yet'
            return
        else:
            #
            # Save in ppc format anyway
            #
            fd=open(filename,'w')
            pickle.dump(self.calcs,fd)
            fd.close()
        return
Save all titrations in a pickled file
Save all titrations in a pickled file
Save all titrations in a pickled file
def save_titration(self):
        import tkFileDialog, os, pickle
        savedir=os.getcwd()
        filename=tkFileDialog.asksaveasfilename(defaultextension=".ppc",
                                                initialfile='calculation1.ppc',
                                                initialdir=savedir,
                                                filetypes=[("pKaTool pKa calc file","*.ppc"),
                                                           ("WHAT IF pKa dir format","*.pdb"),
                                                           ("All files","*.*")],
                                                parent=self.master)
        if not filename:
            return
        if filename[-4:]=='.ppc':
            fd=open(filename,'w')
            pickle.dump(self.calcs,fd)
            fd.close()
        elif filename[-4:]=='.pdb':
            print 'Not implemented yet'
            return
        else:
             Save in ppc format anyway
            fd=open(filename,'w')
            pickle.dump(self.calcs,fd)
            fd.close()
        return
def save_titration ( self ) : import tkFileDialog , os , pickle savedir = os . getcwd ( ) filename = tkFileDialog . asksaveasfilename ( defaultextension = ".ppc" , initialfile = 'calculation1.ppc' , initialdir = savedir , filetypes = [ ( "pKaTool pKa calc file" , "*.ppc" ) , ( "WHAT IF pKa dir format" , "*.pdb" ) , ( "All files" , "*.*" ) ] , parent = self . master ) if not filename : return if filename [ - 4 : ] == '.ppc' : fd = open ( filename , 'w' ) pickle . dump ( self . calcs , fd ) fd . close ( ) elif filename [ - 4 : ] == '.pdb' : print 'Not implemented yet' return else : fd = open ( filename , 'w' ) pickle . dump ( self . calcs , fd ) fd . close ( ) return
Save all titrations in a pickled file
Save all titrations in a pickled file
"""Save all titrations in a pickled file""" # # Save in ppc format anyway #
self