Protool/electrostatics.py
def calculate_matrix_PBE(self,filename=None,eps_map=[],exdi=80,updater=None):
        """Calculate the interaction energy matrix using Chresten and Kaspers
        PBE solver"""
        #
        # And now we calculate the matrix
        #
        import string
        if not getattr(self,'titratable_groups',None):
            self.get_titratable_groups()
        self.matrix={}
        titgrps=self.titratable_groups
        residues=titgrps.keys()
        residues.sort()
        #
        # Get the total number of calcs
        #
        ncalcs=len(residues)*len(residues)
        count=0
        #
        # Loop over all residues
        #
        for residue in residues:
            for group in titgrps[residue]:
                name1=self.get_titgroup_name(residue,group) 
                if not self.matrix.has_key(name1):
                    self.matrix[name1]={}
                #
                # Calculate center of atoms for this group
                #
                center1=self.calculate_group_center(residue,group['atoms'])
                #
                # Place charge at this center and solve PBE
                #
                atomlist=self.writepdb('test.pqr',nowrite=1,pqr=1)
                #
                # Now for the second residue
                #
                for residue2 in titgrps.keys():
                    for group2 in titgrps[residue2]:
                        if updater:
                            updater('%d of %d (%4.1f%% completed)' %(count,ncalcs,float(count)/float(ncalcs)*100.0))
                        count=count+1
                        name2=self.get_titgroup_name(residue2,group2)
                        if self.matrix[name1].has_key(name2):
                            continue
                        #
                        # Get center of atoms for this res
                        #
                        center2=self.calculate_group_center(residue2,group2['atoms'])

        return
Calculate the interaction energy matrix using Chresten and Kaspers
        PBE solver
Calculate the interaction energy matrix using Chresten and Kaspers
PBE solver
Calculate the interaction energy matrix using Chresten and Kaspers PBE solver
def calculate_matrix_PBE(self,filename=None,eps_map=[],exdi=80,updater=None):
         And now we calculate the matrix
        import string
        if not getattr(self,'titratable_groups',None):
            self.get_titratable_groups()
        self.matrix={}
        titgrps=self.titratable_groups
        residues=titgrps.keys()
        residues.sort()
         Get the total number of calcs
        ncalcs=len(residues)*len(residues)
        count=0
         Loop over all residues
        for residue in residues:
            for group in titgrps[residue]:
                name1=self.get_titgroup_name(residue,group) 
                if not self.matrix.has_key(name1):
                    self.matrix[name1]={}
                 Calculate center of atoms for this group
                center1=self.calculate_group_center(residue,group['atoms'])
                 Place charge at this center and solve PBE
                atomlist=self.writepdb('test.pqr',nowrite=1,pqr=1)
                 Now for the second residue
                for residue2 in titgrps.keys():
                    for group2 in titgrps[residue2]:
                        if updater:
                            updater('%d of %d (%4.1f%% completed)' %(count,ncalcs,float(count)/float(ncalcs)*100.0))
                        count=count+1
                        name2=self.get_titgroup_name(residue2,group2)
                        if self.matrix[name1].has_key(name2):
                            continue
                         Get center of atoms for this res
                        center2=self.calculate_group_center(residue2,group2['atoms'])
        return
def calculate_matrix_PBE ( self , filename = None , eps_map = [ ] , exdi = 80 , updater = None ) : import string if not getattr ( self , 'titratable_groups' , None ) : self . get_titratable_groups ( ) self . matrix = { } titgrps = self . titratable_groups residues = titgrps . keys ( ) residues . sort ( ) ncalcs = len ( residues ) * len ( residues ) count = 0 for residue in residues : for group in titgrps [ residue ] : name1 = self . get_titgroup_name ( residue , group ) if not self . matrix . has_key ( name1 ) : self . matrix [ name1 ] = { } center1 = self . calculate_group_center ( residue , group [ 'atoms' ] ) atomlist = self . writepdb ( 'test.pqr' , nowrite = 1 , pqr = 1 ) for residue2 in titgrps . keys ( ) : for group2 in titgrps [ residue2 ] : if updater : updater ( '%d of %d (%4.1f%% completed)' % ( count , ncalcs , float ( count ) / float ( ncalcs ) * 100.0 ) ) count = count + 1 name2 = self . get_titgroup_name ( residue2 , group2 ) if self . matrix [ name1 ] . has_key ( name2 ) : continue center2 = self . calculate_group_center ( residue2 , group2 [ 'atoms' ] ) return
Calculate the interaction energy matrix using Chresten and Kaspers
PBE solver
Calculate the interaction energy matrix using Chresten and Kaspers PBE solver
"""Calculate the interaction energy matrix using Chresten and Kaspers
        PBE solver""" # # And now we calculate the matrix # # # Get the total number of calcs # # # Loop over all residues # # # Calculate center of atoms for this group # # # Place charge at this center and solve PBE # # # Now for the second residue # # # Get center of atoms for this res #
self
filename
eps_map
exdi
updater