From: John Stone (
Date: Thu Feb 03 2022 - 23:32:45 CST

  There aren't any prepared examples for doing this via the
Python API, but the task is simple enough that it should be
straightforward if you've got a Python-enabled VMD build.
For performance, you may want to use the "Points" representation
with GLSL rendering mode when you're drawing millions of spheres,
as that will use a special GLSL shader that's particularly fast.

  John Stone

On Tue, Jan 25, 2022 at 11:04:14PM +0330, Ali Sheikholeslam wrote:
> Hello,
> I was seeking utilities that could visualize combinations of spheres
> during my code running and I found VMD is a powerful tool.
> I am working on movements of spheres for dense packing of them in a box in
> an iteration scheme. So, my particles (spheres) are moving a little during
> the solution steps. steps (loops) could be at least 100000 to perhaps
> 1000000 or more (it is not limited) and spheres could be 50000 to 500000
> or 1000000 numbers with various specified radii. In each loop I will get
> numpy arrays of positions and radii of the all spheres which could be used
> for further usages.
> I don't know, VMD is an appropriate tool for visualizing the movements
> during the running time of my code (visualizing such as an animation). I
> would like to see what is happening during my running code to sphere
> positions. Could I use numpy arrays to put all data in a moment (one-step)
> in each step, or it needs just to loop?
> If it could, how could I do this in python? Is there any prepared codes
> anywhere to use for showing spheres' movements (with their radii) during
> the execution?
> I would be very grateful if any one would help doing this or referring to
> a python code to do so.
> best regards,
> Ali

NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801           Phone: 217-244-3349