pKaTool/explore/explore_pKa_system.py
def construct_permutations(self):
        """Construct the specification for all possible permutations specified in __init__"""
        #
        # Make pickled files for each configuration
        #
        import large_dataset_manager, os
        self.options.dir=os.path.join(os.getcwd(),options.dir)
        if not os.path.isdir(self.options.dir):
            os.mkdir(options.dir)
        self.Data=large_dataset_manager.data_manager(self.options.dir)
        print 'Constructing system permutations'
        print '000.00 perc done',
        perm=0
        last_perc=0
        #
        # Init the counters
        #
        import time
        start=time.time()
        #
        # Start the loop
        #
        while perm<self.tot_perms:
            #
            # Get the specification
            #
            spec=self.get_specs(perm)
            #print spec
            self.Data.put(perm,{'configuration':spec,'numgroups':self.number_of_groups})
            #
            # Get the time to completion
            #
            now=time.time()
            time_passed=now-start
            perc=float(perm)/float(self.tot_perms)*100.0+0.00001 # To avoid zerodivision error
            total_time=time_passed/(perc/100.0)
            time_to_completion=total_time-time_passed
            text='%5.2f perc done. Complete in %.2f minutes (= %.2f hours or %.2f days)          ' %(perc,time_to_completion/60.0,time_to_completion/60.0/60.0,
                                                                                           time_to_completion/60.0/60.0/24.0)
            text=(len(text)+4)*'\b'+text
            print text,
            #
            # Calculate titration curves for this permutation
            #
            new_data=self.do_one_pKa_calc(perm)
            self.Data.put(perm,new_data)
            perm=perm+1
        return
Construct the specification for all possible permutations specified in __init__
Construct the specification for all possible permutations specified in __init
Construct the specification for all possible permutations specified in __init
def construct_permutations(self):
         Make pickled files for each configuration
        import large_dataset_manager, os
        self.options.dir=os.path.join(os.getcwd(),options.dir)
        if not os.path.isdir(self.options.dir):
            os.mkdir(options.dir)
        self.Data=large_dataset_manager.data_manager(self.options.dir)
        print 'Constructing system permutations'
        print '000.00 perc done',
        perm=0
        last_perc=0
         Init the counters
        import time
        start=time.time()
         Start the loop
        while perm<self.tot_perms:
             Get the specification
            spec=self.get_specs(perm)
            print spec
            self.Data.put(perm,{'configuration':spec,'numgroups':self.number_of_groups})
             Get the time to completion
            now=time.time()
            time_passed=now-start
            perc=float(perm)/float(self.tot_perms)*100.0+0.00001  To avoid zerodivision error
            total_time=time_passed/(perc/100.0)
            time_to_completion=total_time-time_passed
            text='%5.2f perc done. Complete in %.2f minutes (= %.2f hours or %.2f days)          ' %(perc,time_to_completion/60.0,time_to_completion/60.0/60.0,
                                                                                           time_to_completion/60.0/60.0/24.0)
            text=(len(text)+4)*'\b'+text
            print text,
             Calculate titration curves for this permutation
            new_data=self.do_one_pKa_calc(perm)
            self.Data.put(perm,new_data)
            perm=perm+1
        return
def construct_permutations ( self ) : import large_dataset_manager , os self . options . dir = os . path . join ( os . getcwd ( ) , options . dir ) if not os . path . isdir ( self . options . dir ) : os . mkdir ( options . dir ) self . Data = large_dataset_manager . data_manager ( self . options . dir ) print 'Constructing system permutations' print '000.00 perc done' , perm = 0 last_perc = 0 import time start = time . time ( ) while perm < self . tot_perms : spec = self . get_specs ( perm ) self . Data . put ( perm , { 'configuration' : spec , 'numgroups' : self . number_of_groups } ) now = time . time ( ) time_passed = now - start perc = float ( perm ) / float ( self . tot_perms ) * 100.0 + 0.00001 total_time = time_passed / ( perc / 100.0 ) time_to_completion = total_time - time_passed text = '%5.2f perc done. Complete in %.2f minutes (= %.2f hours or %.2f days)          ' % ( perc , time_to_completion / 60.0 , time_to_completion / 60.0 / 60.0 , time_to_completion / 60.0 / 60.0 / 24.0 ) text = ( len ( text ) + 4 ) * '\b' + text print text , new_data = self . do_one_pKa_calc ( perm ) self . Data . put ( perm , new_data ) perm = perm + 1 return
Construct the specification for all possible permutations specified in __init__
Construct the specification for all possible permutations specified in __init__
"""Construct the specification for all possible permutations specified in __init__""" # # Make pickled files for each configuration # # # Init the counters # # # Start the loop # # # Get the specification # #print spec # # Get the time to completion # # To avoid zerodivision error # # Calculate titration curves for this permutation #
self