pKa/pKa_MC.py
def calc_matrix(self,group):
        """Calculate the charge-charge interaction matrix for a mutation"""
        #
        # Find the mutation
        #
        import pKD_tools
        resid=pKD_tools.get_resid_from_res(group)
        new_resname=pKD_tools.get_restype_from_titgroup(group)
        pdb_resname=self.parent.PI.resname(resid)
        if pdb_resname==new_resname or new_resname in ['CTERM','NTERM',None]:
            return None,None,None
        mutation='%s:%s:%s' %(resid,pdb_resname,new_resname)
        #
        # Calculate the matrix
        #
        import Design_pKa_help
        if self.parent.mutfile_names.has_key(mutation):
            newfilename=self.parent.mutfile_names[mutation]
            bump_score=0.0
            print 'Using PDB file:',newfilename
        else:
            newfilename,bump_score=Design_pKa_help.make_mutation(pdbfile=self.pdbfile,mutation=mutation,topdir=self.parent.topdir)
        if bump_score<=self.parent.params['mutation_quality'] and not bump_score is False and not bump_score is None:
            #
            # Re-calculate
            #
            print 'Calculating matrix for %s' %mutation
            self.parent.close_stdout()
            matrix,atomdata=Design_pKa_help.run_WI_pKa_calc(pdbfile=newfilename,
                                                            mutated_res='%s:%s' %(resid,new_resname),
                                                            pKarun_params=self.parent.pKarun_params,
                                                            do_matrix=True)
            self.parent.open_stdout()
            return matrix,atomdata,mutation
        else:
            return None,None,None
Calculate the charge-charge interaction matrix for a mutation
Calculate the charge-charge interaction matrix for a mutation
Calculate the charge - charge interaction matrix for a mutation
def calc_matrix(self,group):
         Find the mutation
        import pKD_tools
        resid=pKD_tools.get_resid_from_res(group)
        new_resname=pKD_tools.get_restype_from_titgroup(group)
        pdb_resname=self.parent.PI.resname(resid)
        if pdb_resname==new_resname or new_resname in ['CTERM','NTERM',None]:
            return None,None,None
        mutation='%s:%s:%s' %(resid,pdb_resname,new_resname)
         Calculate the matrix
        import Design_pKa_help
        if self.parent.mutfile_names.has_key(mutation):
            newfilename=self.parent.mutfile_names[mutation]
            bump_score=0.0
            print 'Using PDB file:',newfilename
        else:
            newfilename,bump_score=Design_pKa_help.make_mutation(pdbfile=self.pdbfile,mutation=mutation,topdir=self.parent.topdir)
        if bump_score<=self.parent.params['mutation_quality'] and not bump_score is False and not bump_score is None:
             Re-calculate
            print 'Calculating matrix for %s' %mutation
            self.parent.close_stdout()
            matrix,atomdata=Design_pKa_help.run_WI_pKa_calc(pdbfile=newfilename,
                                                            mutated_res='%s:%s' %(resid,new_resname),
                                                            pKarun_params=self.parent.pKarun_params,
                                                            do_matrix=True)
            self.parent.open_stdout()
            return matrix,atomdata,mutation
        else:
            return None,None,None
def calc_matrix ( self , group ) : import pKD_tools resid = pKD_tools . get_resid_from_res ( group ) new_resname = pKD_tools . get_restype_from_titgroup ( group ) pdb_resname = self . parent . PI . resname ( resid ) if pdb_resname == new_resname or new_resname in [ 'CTERM' , 'NTERM' , None ] : return None , None , None mutation = '%s:%s:%s' % ( resid , pdb_resname , new_resname ) import Design_pKa_help if self . parent . mutfile_names . has_key ( mutation ) : newfilename = self . parent . mutfile_names [ mutation ] bump_score = 0.0 print 'Using PDB file:' , newfilename else : newfilename , bump_score = Design_pKa_help . make_mutation ( pdbfile = self . pdbfile , mutation = mutation , topdir = self . parent . topdir ) if bump_score <= self . parent . params [ 'mutation_quality' ] and not bump_score is False and not bump_score is None : print 'Calculating matrix for %s' % mutation self . parent . close_stdout ( ) matrix , atomdata = Design_pKa_help . run_WI_pKa_calc ( pdbfile = newfilename , mutated_res = '%s:%s' % ( resid , new_resname ) , pKarun_params = self . parent . pKarun_params , do_matrix = True ) self . parent . open_stdout ( ) return matrix , atomdata , mutation else : return None , None , None
Calculate the charge-charge interaction matrix for a mutation
Calculate the charge - charge interaction matrix for a mutation
"""Calculate the charge-charge interaction matrix for a mutation""" # # Find the mutation # # # Calculate the matrix # # # Re-calculate #
self
group