From: Giacomo Fiorin (giacomo.fiorin_at_gmail.com)
Date: Thu Jun 27 2019 - 11:03:11 CDT

Hi Bart, the best option for this would be to assign the custer IDs to one
of the fields "user", "user2", etc. This way you can make the selections
simple and dynamic and also color the representation very easily.

If you have the IDs as numpy arrays (one per frame) you may be able to
assign them using the Python VMD interface. This may be difficult to do
with the precompiled binaries, but you can use Robin Betz's recipe to
simplify the recompilation:
https://robinbetz.com/blog/2015/01/08/compiling-vmd-with-python-support/
Note: she may have an updated recipe, so I'm CC'ing her just in case.

Giacomo

On Thu, Jun 27, 2019 at 11:32 AM Bart Bruininks <b.m.h.bruininks_at_rug.nl>
wrote:

> Heya,
>
> I am currently working on some cool clustering scripts and what I would
> like to do is show the clustering in VMD. However, to do so, I need to be
> able to make an adaptive selection based on a full trajectory spanning
> cluster array (numpy) per atom e.g.:
>
> [
> [frame 1
> atom1 1
> atom2 3
> atom3 1
> . ..
> ]
> [frame 2
> atom1 1
> atom2 2
> ...
> ]
> ]
>
> I would like to use the atom clusters per frame as my selection and color
> them based on cluster name. However, this seems to be more complex then I
> had hoped. I do know some tcl etc so I could figure it out, I am just
> wondering what would be a wise path to take.
>
> Cheers,
>
> Bart Bruininks
> MD Groningen (Martini)
>

-- 
Giacomo Fiorin
Associate Professor of Research, Temple University, Philadelphia, PA
Research collaborator, National Institutes of Health, Bethesda, MD
http://goo.gl/Q3TBQU
https://github.com/giacomofiorin