コード例 #1
0
    def highlight_Atom(self, atom):

        try:
            cmd.pseudoatom(self.AtomDisplay, pos=atom[5:], vdw=0.30, color='white')
            cmd.hide('nonbonded', self.AtomDisplay)
            cmd.show('spheres', self.AtomDisplay)
            cmd.mask(self.AtomDisplay)
        except:
            self.FlexAID.DisplayMessage("Failed to highlight atom upon selecting atom", 1)
            return
コード例 #2
0
def mask_Objects(lstexc):
    
    lstobj = cmd.get_names('objects')

    for obj in lstobj:
        if lstexc.count(str(obj)) == 0:
            try:
                type = cmd.get_type(str(obj))
                
                if type == 'object:molecule' or type == 'selection':
                    cmd.mask(str(obj))
            except:
                continue
コード例 #3
0
def maskedman(event):
    try:
      if len(maskent.get()) < 1:


        showinfo("Error", 'Please enter the name of an object.')
        interior.mainloop()
      else:
        cmd.mask(maskent.get())
    except:


        showinfo("Error", 'That object is not present')
    interior.mainloop()
コード例 #4
0
ファイル: FlexBonds.py プロジェクト: speleo3/NRGsuite
    def highlight_Atom(self, atom):

        try:
            cmd.pseudoatom(self.AtomDisplay, pos=atom[5:], vdw=0.30, color='white')
            cmd.refresh()

            cmd.hide('nonbonded', self.AtomDisplay)
            cmd.refresh()

            cmd.show('spheres', self.AtomDisplay)
            cmd.refresh()

            cmd.mask(self.AtomDisplay)

        except:
            self.queue.put(lambda: self.top.DisplayMessage("  ERROR: Failed to highlight atom upon selecting atom", 1))
            return
コード例 #5
0
    def highlight_Residue(self, name):

        try:            
            cmd.delete(self.ResidueDisplay)
            cmd.refresh()
        except:
            pass
            
        try:
            cmd.set("auto_zoom", 0)
            
            # Create new object from selection
            cmd.create(self.ResidueDisplay, name + ' & ! n. C+O+N', target_state=self.State)
            cmd.refresh()

            # Visual appearance
            cmd.hide('lines', self.ResidueDisplay)
            cmd.refresh()

            cmd.show('sticks', self.ResidueDisplay)
            cmd.refresh()

            cmd.color('orange', self.ResidueDisplay)
            cmd.refresh()

            cmd.mask(self.ResidueDisplay)

            # Toggle FlexSC obj to overlap ResidueDisplay
            cmd.disable(self.FlexSCDisplay)
            cmd.refresh()

            cmd.enable(self.FlexSCDisplay)
            cmd.refresh()
            
        except:
            self.queue.put(lambda: self.FlexAID.DisplayMessage("  ERROR: Could not highlight residue upon selection", 2))

        cmd.set("auto_zoom", self.auto_zoom)
コード例 #6
0
    def highlight_FlexibleSC(self, selString):

        Error = 0
        
        try:
            cmd.delete(self.FlexSCDisplay)
            cmd.refresh()
        except:
            pass
            
        try:
            cmd.set("auto_zoom", 0)

            # Create new object from selection
            cmd.create(self.FlexSCDisplay, selString, target_state=self.State)
            cmd.refresh()
            
            # Visual appearance
            cmd.hide('lines', self.FlexSCDisplay)
            cmd.refresh()

            cmd.show('sticks', self.FlexSCDisplay)
            cmd.refresh()

            cmd.color('white', self.FlexSCDisplay)
            cmd.refresh()

            cmd.label(self.FlexSCDisplay + " & name CA", "resn+resi")

            cmd.mask(self.FlexSCDisplay)
            
        except:
            Error = 1
        
        cmd.set("auto_zoom", self.auto_zoom)

        return Error
コード例 #7
0
 def testMask(self):
     cmd.fragment('ala')
     cmd.mask('elem C')
     self.assertEqual(3, cmd.count_atoms('masked'))
     cmd.unmask('name CA')
     self.assertEqual(2, cmd.count_atoms('masked'))
コード例 #8
0
 def testMask(self):
     cmd.fragment('ala')
     cmd.mask('elem C')
     self.assertEqual(3, cmd.count_atoms('masked'))
     cmd.unmask('name CA')
     self.assertEqual(2, cmd.count_atoms('masked'))