VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Wed May 06 2009 - 18:18:54 CDT
- Next message: Thomas Evangelidis: "calculate charges of the binding site residues with psfgen"
- Previous message: Edward Lyman: "memory allocation issue"
- In reply to: Pawel Kedzierski: "Display not updated when using move() from Python in VMD 1.8.6"
- Next in thread: Thomas Evangelidis: "calculate charges of the binding site residues with psfgen"
- Reply: Thomas Evangelidis: "calculate charges of the binding site residues with psfgen"
- Reply: Pawel Kedzierski: "Re: Display not updated when using move() from Python in VMD 1.8.6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Wed, 2009-05-06 at 20:50 +0200, Pawel Kedzierski wrote:
> Hi,
> I use VMD 1.8.6 (binary distribution) with Python 2.2.2 and Numeric 23.1.
> This is installed on Mandriva Linux 2007.1.
> When I use e.g. the following Python code:
>
> mol = VMD.atomsel.atomsel('all')
> vec = (10.0, 0.0, 0.0)
> mol.moveby(vec)
>
> the (top) molecule selected does not move in the OpenGL window.
> I tried also mol.move() with appropriate matrix. Trials to do
> mol.update(), VMD.display.update() or VMD.display.update_ui() didn't
> help.
pawel,
it works for me in the tcl script interface of version 1.8.6 and
with a self-compiled version of the current development sources
using the native python installation.
if you only want to do a simple transformation like this,
the corresponding tcl code is:
set sel [atomselect top all]
set vec {10.0 0.0 0.0}
$sel moveby $vec
cheers,
axel.
>
> However, the coordinates _are_ affected within VMD: if there are any
> Labels, the Labels do shift according to the translation vector or the
> transformation applied. Also, when I create a new graphical
> representation, it appears in the new position. Therefore I tried to
> do:
> VMD.molrep.set_autoupdate(molid, rep_num, 1)
> prior to moving the molecule, but it didn't help, either.
> As it seem to me, the only way to go is to:
> 1) delete all representations;
> 2) move; and then
> 3) create representation(s) again.
>
> Is there a better way to get the graphical representations to move with
> the molecular coordinates, or have I just discovered a bug?
>
> With many thanks for the great program,
> Pawel
>
-- ======================================================================= Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu http://www.cmm.upenn.edu Center for Molecular Modeling -- University of Pennsylvania Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323 tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425 ======================================================================= If you make something idiot-proof, the universe creates a better idiot.
- Next message: Thomas Evangelidis: "calculate charges of the binding site residues with psfgen"
- Previous message: Edward Lyman: "memory allocation issue"
- In reply to: Pawel Kedzierski: "Display not updated when using move() from Python in VMD 1.8.6"
- Next in thread: Thomas Evangelidis: "calculate charges of the binding site residues with psfgen"
- Reply: Thomas Evangelidis: "calculate charges of the binding site residues with psfgen"
- Reply: Pawel Kedzierski: "Re: Display not updated when using move() from Python in VMD 1.8.6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]