VMD-L Mailing List
From: Leonardo Trabuco (ltrabuco_at_ks.uiuc.edu)
Date: Tue Dec 15 2009 - 11:30:26 CST
- Next message: Axel Kohlmeyer: "Re: Graphics card for VMD"
- Previous message: Berit Hinnemann: "Graphics card for VMD"
- In reply to: Carsten Olbrich: "IDs of representations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi Carsten,
On Tue, Dec 15, 2009 at 3:30 AM, Carsten Olbrich
<ocarsten_at_googlemail.com> wrote:
> Hallo,
>
> I am wondering, if there is a possibility to get a list of
> representations IDs (repid), which are needed to modify existing
> representations.
> Additionally, it would be nice if the procedure "mol addrep <mol>"
> would return the ID of the new representation, in a way that one can
> use something like "set NewRepID [mol addrep top]".
> Any suggestion this is highly welcome.
You can do something like this to get both the repid and the repname.
Note that the repname is guaranteed to be unique for a given molecule,
but the repid may change if reps are deleted.
mol addrep $molid
set repid [expr [molinfo $molid get numreps] - 1]
# repname is guaranteed to be unique within a molecule
set repname [mol repname $molid $repid]
Later on, if you want to, e.g., delete a rep given the repname, you
can do something like:
set repid [mol repindex $molid $repname]
mol delrep $repid $molid
Cheers,
Leo
> Cheers,
> Carsten
>
>
-- Leonardo Trabuco, Ph.D. candidate Theoretical and Computational Biophysics Group University of Illinois at Urbana-Champaign
- Next message: Axel Kohlmeyer: "Re: Graphics card for VMD"
- Previous message: Berit Hinnemann: "Graphics card for VMD"
- In reply to: Carsten Olbrich: "IDs of representations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]