VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Oct 29 2013 - 05:36:28 CDT
- Next message: Joaquim Rui de Castro Rodrigues: "RE: Creating custom molecule in VMD scripting"
- Previous message: Luká¹ Pravda: "Creating custom molecule in VMD scripting"
- In reply to: Luká¹ Pravda: "Creating custom molecule in VMD scripting"
- Next in thread: Joaquim Rui de Castro Rodrigues: "RE: Creating custom molecule in VMD scripting"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Tue, Oct 29, 2013 at 10:40 AM, Lukáš Pravda <xpravda_at_ncbr.muni.cz> wrote:
dear lukas,
> 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}}
stop!
you are missing one important step here. when you do "mol new atoms 3"
you create a 'molecule', but you do not create a time step. you need
to do "animate dup $m" here. that will create and empty time step and
*then* you can set coordinates.
axel.
>
> $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
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 International Centre for Theoretical Physics, Trieste. Italy.
- Next message: Joaquim Rui de Castro Rodrigues: "RE: Creating custom molecule in VMD scripting"
- Previous message: Luká¹ Pravda: "Creating custom molecule in VMD scripting"
- In reply to: Luká¹ Pravda: "Creating custom molecule in VMD scripting"
- Next in thread: Joaquim Rui de Castro Rodrigues: "RE: Creating custom molecule in VMD scripting"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]