Ploting clock diagrams - one or more rings around residue name and id (and chain id).
        The rings show the fraction of simulation time this residue has spent in the vicinity of the
        ligand - characterised by distance.

def plot_clock_diagrams(self, colormap="summer"):
        """
        Ploting clock diagrams - one or more rings around residue name and id (and chain id).
        The rings show the fraction of simulation time this residue has spent in the vicinity of the
        ligand - characterised by distance.
        """
        cmap = plt.get_cmap(colormap)
        for res in self.topology_data.dict_of_plotted_res:
            colors = [cmap(i) for i in numpy.linspace(0, 1, len(self.topology_data.dict_of_plotted_res[res]))]
            traj_colors_ = {traj:colors[i] for i,traj in enumerate(self.topology_data.dict_of_plotted_res[res])}
            plt.figure(figsize=(2.25, 2.25))
            ring_number=[sum(1 for x in v if x) for k,v in self.topology_data.dict_of_plotted_res.items()][0]
            self.topology_data.ring_number = ring_number
            rings=[]
            # When only a few rings to plot they can be thicker
            if ring_number<2:
                width = 0.3
            else:
                width = 0.2
            for ring in range(0,ring_number):
                ring,_=plt.pie([self.topology_data.dict_of_plotted_res[res][ring],1-self.topology_data.dict_of_plotted_res[res][ring]],  radius=0.9+width*(ring+1), startangle=90, colors=[colors[ring],"white"], counterclock=False)
                rings=rings+ring
            plt.setp(rings, width=width)
            if len(self.topology_data.universe.protein.segments)<=1:
            #Settings with domain
                plt.text(-0.0,-0.62,res[0]+"\n"+res[1],ha='center',size=32, fontweight='bold')
            else:
                plt.text(-0.0,-0.72,res[0]+"\n"+res[1]+"\n"+res[2],ha='center',size=25, fontweight='bold')
            pylab.savefig(res[1]+res[2]+".svg", dpi=300, transparent=True)