Esempio n. 1
0
    def showSticks(self, managerName, pdb, colors, radius):
        self.ManagersList[managerName].setPDB(pdb)
        theFilter = self.filter
        drawer = ConstraintDrawer()
        selectedConstraints = []
        if len(self.ManagersList[managerName]):
            if self.ManagersList[managerName].associateToPDB():
                filteredConstraints = self.filter.filterConstraints(self.ManagersList[managerName].constraints)
                selectedConstraints = []
                for constraint in filteredConstraints:
                    if constraint not in self.displayedConstraints:
                        selectedConstraints.append(constraint)
                self.displayedConstraints = self.displayedConstraints+selectedConstraints
                results = drawer.drC(selectedConstraints, radius, colors)
                stdout.write(str(results['DrawnConstraints']) + " constraints drawn on a total of " +
                             str(len(self.ManagersList[managerName])) + "\n")
                selection = createSelection([self.ManagersList[managerName].pdb] + results['Residueslist'])
                select('involRes', selection)
                zoom(selection)

        else:
            stderr.write("No constraints to draw ! You might want to load a few of them first ...\n")