VMD-L Mailing List
From: Tim Lo (timlo_at_connect.hku.hk)
Date: Fri Nov 06 2015 - 22:38:19 CST
- Next message: Nima Soltani: "can I change the axes type to look like something like a graduated coordinate?"
- Previous message: Josh Vermaas: "Re: VMD script variable is"
- In reply to: Sourav Ray: "Shifting the Geometric Center of entire set of molecules to origin"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi Sourav,
Try this:
set A [atomselect top all]
set minus_com [vecsub {0.0 0.0 0.0} [measure center $A]]
$A moveby $minus_com
Is it what you want to do?
Regards,
Tim
Research Associate
Department of Chemistry
The University of Hong Kong
On 4/11/2015 18:33, Sourav Ray wrote:
> Greetings
>
> I tried using geom_center to do that, but running the tcl or even proc
> directly with the selection of atoms (as input) is not working.
> " invalid command name 'geom_center'.
>
> Also tried to shift the geometric center using the code below, but
> move command is displaying error as "invalid command name <current
> geometric center>"
>
> set sel [atomselect top all]
> set gec [measure center $sel]
> $gec moveto {0 0 0}
> $sel moveby [vecscale -1.0 $gec]
> $sel moveby $gec
>
> Thanks and regards
> Sourav Ray
- Next message: Nima Soltani: "can I change the axes type to look like something like a graduated coordinate?"
- Previous message: Josh Vermaas: "Re: VMD script variable is"
- In reply to: Sourav Ray: "Shifting the Geometric Center of entire set of molecules to origin"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]