From: Joaquim Rui de Castro Rodrigues (joaquim.rodrigues_at_ipleiria.pt)
Date: Tue Oct 29 2013 - 06:45:08 CDT

Hi,

After you created your molecule, you have zero frames. You can create a frame with animate dup and then fill it with coordinates:
set m [mol new atoms 3]
molinfo top get numframes
animate dup $m
molinfo top get numframes
...

Hope this helps,
Rui Rodrigues

________________________________________
De: owner-vmd-l_at_ks.uiuc.edu [owner-vmd-l_at_ks.uiuc.edu] Em Nome De Lukáš Pravda [xpravda_at_ncbr.muni.cz]
Enviado: terça-feira, 29 de Outubro de 2013 9:40
Para: vmd-l_at_ks.uiuc.edu
Assunto: vmd-l: Creating custom molecule in VMD scripting

Dear all, I’m fairly new user to VMD (win32 v. 1.9.1) and I would like to create a custom molecule in VMD using tk scripting. I have found several tutorials for that purpose, however, none of them works fine for me. Let say I’d like to create a molecule of 3 atoms with given radius.

Now I’m doing something like this

set m [mol new atoms 3]
mol top $m
set atom [atomselect top "index 0"]
$atom set {x y z} {{1.0 2.0 3.0}}
$atom set radius 1.4
set atom [atomselect top "index 1"]

mol delrep 0 $m
mol representation VDW 1.000000 18.000000
mol color Name
mol selection {all}
mol material Opaque
mol addrep top
mol selupdate 0 top 0
mol colupdate 0 top 0
mol scaleminmax top 0 0.000000 0.000000
mol smoothrep top 0 0
mol drawframes top 0 {now}

Command for setting x y z coordinates passes without any errors, however, when retrieving the new value with $atom get {x y z} command nothing changes and it’s coordinates are still the default {0.0 0.0 0.0}. Moreover not even a single sphere is drawn. Do you have any idea what am I doing wrong?

Thank you for any piece of advice

Lukas