
Dear all, a small question. I know how to calculate the distance between two atoms calling the "distance" command and I generally use it embedded in the scripts I write. However, this time, I'd like to have access through my script only to the values of the distances (nothing related to the display) in order to stock them. I thought I would find my way through by using the StructMeasure module, but I am not able to do so. How could I just have a return of the distances between two atoms in the shell? Thanks a lot, JD Dr. Jean-Didier Maréchal Professor Lector Unitat de Química Física Departament de Química Universitat Autònoma de Barcelona Edifici C.n. 08193 Cerdanyola (Barcelona) Tel: +34.935814936 e-mail: JeanDidier.Marechal@uab.es ----- Missatge original ----- De: chimera-users-request@cgl.ucsf.edu Data: Dimecres, Agost 8, 2007 9:00 pm Assumpte: Chimera-users Digest, Vol 52, Issue 6
Send Chimera-users mailing list submissions to chimera-users@cgl.ucsf.edu
To subscribe or unsubscribe via the World Wide Web, visit http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users or, via email, send a message with subject or body 'help' to chimera-users-request@cgl.ucsf.edu
You can reach the person managing the list at chimera-users-owner@cgl.ucsf.edu
When replying, please edit your Subject line so it is more specific than "Re: Contents of Chimera-users digest..."
Today's Topics:
1. writing translation/rotation (Thomas C. Marlovits) 2. Re: writing translation/rotation (Elaine Meng) 3. Re: writing translation/rotation (Eric Pettersen)
-------------------------------------------------------------------- --
Message: 1 Date: Wed, 8 Aug 2007 14:19:43 +0200 From: "Thomas C. Marlovits" <marlovits@imp.univie.ac.at> Subject: [Chimera-users] writing translation/rotation To: chimera-users@cgl.ucsf.edu Message-ID: <BAFCFCAA-D911-4E0C-8F5E-B41430E8E1B6@imp.univie.ac.at> Content-Type: text/plain; charset="us-ascii"
Hi,
am looking for an analysis tool in Chimera that would write out - let's say a matrix for translation/rotation of a pdb-file in respect to another one.
Usage: would like to align chain A and chain B present in a pdb- file and want to know which translation/rotation matrix has to be applied in order to convert the non-aligned pdb-coordinates of chain B to the 'new" aligned pdb-coordinates.
Thanx for your help, -Thomas
-------------------------------------------------------------------- ---- -------
Thomas C. Marlovits, PhD, M.A.S.
IMP-IMBA Research Center - Research Institute of Molecular Pathology (IMP) - Institute of Molecular Biotechnology, Austrian Academy of Sciences (IMBA)
Dr. Bohr-Gasse 3 Room IMBA/6.02 A-1030 Vienna Austria, Europe
fone: (++43-1) 79044-4630 fax: (++43-1) 79044-4401 email: marlovits@imp.univie.ac.at

Hi JD, I assume we're talking about Python here since Chimera commands don't return values. So, in Python if your atoms are in variables 'a1' and 'a2' then the distance between them is: chimera.distance(a1.xformCoord(), a2.xformCoord()) or alternatively: a1.xformCoord().distance(a2.xformCoord()) If the atoms are in the same molecule, you can get away with using .coord() instead of .xformCoord() since rotations/translations won't affect the inter-atom distance in that case. --Eric On Jul 23, 2008, at 9:21 AM, Jean Didier Pie Marechal wrote:
Dear all,
a small question. I know how to calculate the distance between two atoms calling the "distance" command and I generally use it embedded in the scripts I write. However, this time, I'd like to have access through my script only to the values of the distances (nothing related to the display) in order to stock them. I thought I would find my way through by using the StructMeasure module, but I am not able to do so. How could I just have a return of the distances between two atoms in the shell?
Thanks a lot,
JD

Hi JD, In addition to what Eric said, you'll probably need to get the atom objects in Python. A previous message on chimera-users provides some python code for that. http://www.cgl.ucsf.edu/pipermail/chimera-users/2008-July/002823.html Tom
participants (3)
-
Eric Pettersen
-
Jean Didier Pie Marechal
-
Tom Goddard