[Chimera-users] Fwd: CCL: Coordinate system rotation
meng at cgl.ucsf.edu
Thu Jun 19 15:28:03 PDT 2014
On Jun 19, 2014, at 8:33 AM, "Radoslaw Kaminski rkaminski.rk,+,gmail.com" <owner-chemistry at ccl.net> wrote:
> Sent to CCL by: "Radoslaw Kaminski" [rkaminski.rk]=[gmail.com]
> Dear All,
> A trivial question. I have a XYZ file with a molecule in some coordinate
> system. I would like to have a Z axis be in a certain direction along A...B
> atoms. Is there any program that can easily change my coordinate system by
> choosing some 3 atoms? I can of course do all transformations by hand (for
> example in Excel) but its tedious. I know that ADF is capable of transforming
> the coordinates to some specified coordination system (Prof. Baerends' CCL post
> from several years ago), but is there any other program that can just make such
> transformations quickly?
> Thanks in advance,
From: Elaine Meng <meng at cgl.ucsf.edu>
Subject: Re: CCL: Coordinate system rotation
Date: June 19, 2014 9:57:00 AM PDT
With Chimera you could align 2 atoms front->back and then save a PDB file with the transformed coordinates. Not sure if that is exactly what you needed, or whether it is quick enough, but you could automate looping through multiple files with a little bit of Python.
(1) open XYZ file (e.g. menu File…Open, choose file.xyz, or command "open file.xyz")
That will automatically assign unique atom names by element and order in file, for example the first C will be C1, the first N will be N1.
(2) use "align" command to put atoms A,B in center of view along the line of sight (laboratory Z axis) with A in front and B in back (e.g.: align @c1 at o1)
(3) save PDB with transformed coordinates (e.g. menu File…Save PDB, un-check "use untransformed coordinates" or command something like "write #0 file.pdb")
(4) close structure (e.g. command "close #0" or "close all") … if multiple structures to process, loop back to step 1. See here for writing looping scripts for Chimera:
I hope this helps,
Elaine C. Meng, Ph.D.
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco
More information about the Chimera-users