Physics, Science, Programming, Deep Dives, Thoughts And Theory.
make_animation(self,filename="KTG_animation.mp4"): #Call the function to create the figure fig=self.create_2D_box() #Create the animation anim=FuncAnimation(fig,self.show_molecules,frames=self.n_iters,interval=50,blit=False) #Save animation as a file anim.save(filename,writer="ffmpeg") There is