defining planes and axes based on existing ones
Hello, I am trying to define planes and axes that are orthogonal to the planes and axes that I have previously defined. I have an alpha helix, and I only managed to define one plane and two orthogonal axes around the helix. Is it possible to define the rest of the axes and planes? Thanks!
Hello ChuHui, There is an option in “Define axes…” to create “Plane normals,” that is, an axis orthogonal to a plane. http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/structuremeas/structuremeas.html#axes
It can also be done with the “define axis” command: http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/define.html#axis
However, there is no option to define a plane from another object (plane, axis, or centroid), sorry. Planes can only be defined from sets of atoms or markers.
Maybe interesting: you can show the inertia ellipsoid for a set of atoms using command “measure inertia”… the ellipsoid shows the principal axes in 3D: http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/measure.html#inertia ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 7, 2018, at 7:47 AM, ChuHui Fu cfu@haverford.edu wrote:
Hello, I am trying to define planes and axes that are orthogonal to the planes and axes that I have previously defined. I have an alpha helix, and I only managed to define one plane and two orthogonal axes around the helix. Is it possible to define the rest of the axes and planes? Thanks!
Hi Elaine,
Thank you for getting back to me.
I think I managed to add the third axis by changing the session file on python. I am slightly confused about what (-17.1389, 19.0272) refers to in the following lines in session file:
"geomData = {'AxisManager': {(7, 1, 'z', 0, 0.1, (1, 0, 0, 1), (-17.1389, 19.0272), (-2.10322, 14.8383, 52.9855), (-0.15332, 0.981517, -0.114532), True): ([501, 500, 499, 603, 602, 498, 497, 606, 496, 598, 597, 494, 493, 605, 492, 593, 491, 490, 509, 489, 608, 488, 487, 486, 585, 485, 484, 483, 482, 481, 480, 479, 577, 576, 575, 621, 574, 573, 601, 572, 571, 570, 569, 568, 567, 600, 521, 565, 564, 542, 563, 562, 599, 561, 518, 559, 517, 504, 516, 495, 515, 557, 514, 541, 556, 566, 555, 554, 512, 629, 553, 552, 551, 550, 596, 625, 548, 623, 547, 520, 546, 595, 545, 544, 543, 508, 607, 507, 540, 620, 539, 506, 538, 519, 505, 594, 536, 619, 534, 618, 532, 531, 530, 616, 529, 528, 537, 613, 560, 527, 592, 526, 525, 524, 523, 522, 510, 591, 535, 590, 589, 533, 558, 604, 617, 587, 503, 586, 624, 584, 615, 614, 513, 583, 582, 612, 581, 588, 580, 628, 579, 611, 627, 578, 610, 626, 622, 502, 609, 511, 478, 549], [], None), ...."
Does it have to do with length? And is 0 defined as where the axis meets the centroid? I understand that the (1,0,0,1) has to do with color, (-2.10322, 14.8383, 52.9855) has to do with centroid, and (-0.15332, 0.981517, -0.114532) has to do with vector orientation.
I am also slightly confused about the long list of numbers enclosed by the [ ]. I assume they have to do with amino acid residues? What does their order signify?
Thanks again!
CHuHui
On Thu, Jun 7, 2018 at 12:19 PM, Elaine Meng meng@cgl.ucsf.edu wrote:
Hello ChuHui, There is an option in “Define axes…” to create “Plane normals,” that is, an axis orthogonal to a plane. http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/ structuremeas/structuremeas.html#axes
It can also be done with the “define axis” command: http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/define.html#axis
However, there is no option to define a plane from another object (plane, axis, or centroid), sorry. Planes can only be defined from sets of atoms or markers.
Maybe interesting: you can show the inertia ellipsoid for a set of atoms using command “measure inertia”… the ellipsoid shows the principal axes in 3D: http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/ measure.html#inertia
Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 7, 2018, at 7:47 AM, ChuHui Fu cfu@haverford.edu wrote:
Hello, I am trying to define planes and axes that are orthogonal to the planes
and axes that I have previously defined. I have an alpha helix, and I only managed to define one plane and two orthogonal axes around the helix. Is it possible to define the rest of the axes and planes?
Thanks!
Hi ChuHui, The (-17.1389, 19.0272) is how far the axis extends in each direction from the center (-2.10322, 14.8383, 52.9855) along the orientation vector (-0.15332, 0.981517, -0.114532). The list of numbers are IDs for the atoms that were used to define the axis — arbitrary integers assigned by the overall session-saving mechanism.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 7, 2018, at 9:56 AM, ChuHui Fu cfu@haverford.edu wrote:
Hi Elaine,
Thank you for getting back to me.
I think I managed to add the third axis by changing the session file on python. I am slightly confused about what (-17.1389, 19.0272) refers to in the following lines in session file:
"geomData = {'AxisManager': {(7, 1, 'z', 0, 0.1, (1, 0, 0, 1), (-17.1389, 19.0272), (-2.10322, 14.8383, 52.9855), (-0.15332, 0.981517, -0.114532), True): ([501, 500, 499, 603, 602, 498, 497, 606, 496, 598, 597, 494, 493, 605, 492, 593, 491, 490, 509, 489, 608, 488, 487, 486, 585, 485, 484, 483, 482, 481, 480, 479, 577, 576, 575, 621, 574, 573, 601, 572, 571, 570, 569, 568, 567, 600, 521, 565, 564, 542, 563, 562, 599, 561, 518, 559, 517, 504, 516, 495, 515, 557, 514, 541, 556, 566, 555, 554, 512, 629, 553, 552, 551, 550, 596, 625, 548, 623, 547, 520, 546, 595, 545, 544, 543, 508, 607, 507, 540, 620, 539, 506, 538, 519, 505, 594, 536, 619, 534, 618, 532, 531, 530, 616, 529, 528, 537, 613, 560, 527, 592, 526, 525, 524, 523, 522, 510, 591, 535, 590, 589, 533, 558, 604, 617, 587, 503, 586, 624, 584, 615, 614, 513, 583, 582, 612, 581, 588, 580, 628, 579, 611, 627, 578, 610, 626, 622, 502, 609, 511, 478, 549], [], None), ...."
Does it have to do with length? And is 0 defined as where the axis meets the centroid? I understand that the (1,0,0,1) has to do with color, (-2.10322, 14.8383, 52.9855) has to do with centroid, and (-0.15332, 0.981517, -0.114532) has to do with vector orientation.
I am also slightly confused about the long list of numbers enclosed by the [ ]. I assume they have to do with amino acid residues? What does their order signify?
Thanks again!
CHuHui
On Thu, Jun 7, 2018 at 12:19 PM, Elaine Meng <meng@cgl.ucsf.edu mailto:meng@cgl.ucsf.edu> wrote: Hello ChuHui, There is an option in “Define axes…” to create “Plane normals,” that is, an axis orthogonal to a plane. <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/structuremeas/stru... http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/structuremeas/structuremeas.html#axes>
It can also be done with the “define axis” command: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/define.html#axis http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/define.html#axis>
However, there is no option to define a plane from another object (plane, axis, or centroid), sorry. Planes can only be defined from sets of atoms or markers.
Maybe interesting: you can show the inertia ellipsoid for a set of atoms using command “measure inertia”… the ellipsoid shows the principal axes in 3D:
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/measure.html#inertia http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/measure.html#inertia>
Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 7, 2018, at 7:47 AM, ChuHui Fu <cfu@haverford.edu mailto:cfu@haverford.edu> wrote:
Hello, I am trying to define planes and axes that are orthogonal to the planes and axes that I have previously defined. I have an alpha helix, and I only managed to define one plane and two orthogonal axes around the helix. Is it possible to define the rest of the axes and planes? Thanks!
-- ChuHui Fu B.S.Candidate in Chemistry & Mathematics Haverford College, Class of 2019 cfu@haverford.edu mailto:cfu@haverford.edu
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu mailto:Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Dear Chimera,
Is it possible to assign the result of running a chimera command in python to a string or something else? E.g doing something like:
from chimera import runCommand as rc myresult = rc('measure center #0:.A@CA')
And then using the myresults somewhere else in the script after parsing for the relevant values?
Maybe there is a n easier way to accomplish this?
Thanks
Hernando
Hi Hernando, Perhaps runCommand should return a value but it doesn’t. The reasoning there was that the argument to runCommand could be anything, including several commands separated by semi-colons, so in some cases it’s confusing what the return value should be. In any case that ship has sailed and you have to do something else to get the value. In most cases it calling the underlying function that performs the command and using it’s return value, but looking at the code that implements the “measure center” command I can see that it doesn’t return anything either. So in the particular case of the example you provided, I can see two options for getting the value:
Option 1) atoms = chimera.selection.OSLSelection(“#0:.A@CA”).vertices() center = chimera.Point([a.coord() for a in atoms]) x, y, z = center.data()
Option 2) rc(“sel #0:.A@CA”) center = chimera.Point([a.coord() for a in chimera.selection.currentAtoms()]) x, y, z = center.data()
I hope this helps.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 8, 2018, at 11:10 AM, Hernando J Sosa hernando.sosa@einstein.yu.edu wrote:
Dear Chimera,
Is it possible to assign the result of running a chimera command in python to a string or something else? E.g doing something like:
from chimera import runCommand as rc myresult = rc('measure center #0:.A@CA')
And then using the myresults somewhere else in the script after parsing for the relevant values?
Maybe there is a n easier way to accomplish this?
Thanks
Hernando
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu mailto:Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Thanks Eric,
These alternatives is what I was looking for.
Best
Hernando
From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] Sent: Friday, June 08, 2018 7:27 PM To: Hernando J Sosa Cc: chimera-users BB Subject: Re: [Chimera-users] python script
Hi Hernando, Perhaps runCommand should return a value but it doesn’t. The reasoning there was that the argument to runCommand could be anything, including several commands separated by semi-colons, so in some cases it’s confusing what the return value should be. In any case that ship has sailed and you have to do something else to get the value. In most cases it calling the underlying function that performs the command and using it’s return value, but looking at the code that implements the “measure center” command I can see that it doesn’t return anything either. So in the particular case of the example you provided, I can see two options for getting the value:
Option 1) atoms = chimera.selection.OSLSelection(“#0:.A@CA”).vertices() center = chimera.Point([a.coord() for a in atoms]) x, y, z = center.data()
Option 2) rc(“sel #0:.A@CA”) center = chimera.Point([a.coord() for a in chimera.selection.currentAtoms()]) x, y, z = center.data()
I hope this helps.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 8, 2018, at 11:10 AM, Hernando J Sosa <hernando.sosa@einstein.yu.edumailto:hernando.sosa@einstein.yu.edu> wrote:
Dear Chimera,
Is it possible to assign the result of running a chimera command in python to a string or something else? E.g doing something like:
from chimera import runCommand as rc myresult = rc('measure center #0:.A@CA')
And then using the myresults somewhere else in the script after parsing for the relevant values?
Maybe there is a n easier way to accomplish this?
Thanks
Hernando
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edumailto:Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Dear Chimera,
I am writing a Chimera python script and need to get a list of the chains and residue numbers of specific opened models . What would be the command/syntax to do that? or can you point me to a code example where something like this is done.
Thanks
Hernando
From: Chimera-users [mailto:chimera-users-bounces@cgl.ucsf.edu] On Behalf Of Hernando J Sosa Sent: Monday, June 11, 2018 2:46 PM To: Eric Pettersen Cc: chimera-users BB Subject: Re: [Chimera-users] python script
Thanks Eric,
These alternatives is what I was looking for.
Best
Hernando
From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] Sent: Friday, June 08, 2018 7:27 PM To: Hernando J Sosa Cc: chimera-users BB Subject: Re: [Chimera-users] python script
Hi Hernando, Perhaps runCommand should return a value but it doesn’t. The reasoning there was that the argument to runCommand could be anything, including several commands separated by semi-colons, so in some cases it’s confusing what the return value should be. In any case that ship has sailed and you have to do something else to get the value. In most cases it calling the underlying function that performs the command and using it’s return value, but looking at the code that implements the “measure center” command I can see that it doesn’t return anything either. So in the particular case of the example you provided, I can see two options for getting the value:
Option 1) atoms = chimera.selection.OSLSelection(“#0:.A@CA”).vertices() center = chimera.Point([a.coord() for a in atoms]) x, y, z = center.data()
Option 2) rc(“sel #0:.A@CA”) center = chimera.Point([a.coord() for a in chimera.selection.currentAtoms()]) x, y, z = center.data()
I hope this helps.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 8, 2018, at 11:10 AM, Hernando J Sosa <hernando.sosa@einstein.yu.edumailto:hernando.sosa@einstein.yu.edu> wrote:
Dear Chimera,
Is it possible to assign the result of running a chimera command in python to a string or something else? E.g doing something like:
from chimera import runCommand as rc myresult = rc('measure center #0:.A@CA')
And then using the myresults somewhere else in the script after parsing for the relevant values?
Maybe there is a n easier way to accomplish this?
Thanks
Hernando
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edumailto:Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
An additional question: Is it possible to retrieve the atomic coordinates after a transformation (e.g. after an align/superposition operation) rather than the original coordinate values?
e.g. I am currently using the following commands to retrieve the coordinates (x,y,z) of the CA atom in model,residue,chain atom = chimera.selection.OSLSelection("#%d:%d.%c@CA" % (model,residue,chain)).vertices() (x,y,z) = atom[0].coord()
However, this retrieves the original coordinates not the coordinates after a transformation.
Thanks
Hernando
Hernando Sosa Dept. of Physiology and Biophysics Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 FAX (718) 430-8819 email hernando.sosa@einstein.yu.edumailto:hernando.sosa@einstein.yu.edu
From: Chimera-users [mailto:chimera-users-bounces@cgl.ucsf.edu] On Behalf Of Hernando J Sosa Sent: Thursday, October 25, 2018 12:50 PM To: chimera-users BB Subject: [Chimera-users] python script
Dear Chimera,
I am writing a Chimera python script and need to get a list of the chains and residue numbers of specific opened models . What would be the command/syntax to do that? or can you point me to a code example where something like this is done.
Thanks
Hernando
From: Chimera-users [mailto:chimera-users-bounces@cgl.ucsf.edu] On Behalf Of Hernando J Sosa Sent: Monday, June 11, 2018 2:46 PM To: Eric Pettersen Cc: chimera-users BB Subject: Re: [Chimera-users] python script
Thanks Eric,
These alternatives is what I was looking for.
Best
Hernando
From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] Sent: Friday, June 08, 2018 7:27 PM To: Hernando J Sosa Cc: chimera-users BB Subject: Re: [Chimera-users] python script
Hi Hernando, Perhaps runCommand should return a value but it doesn’t. The reasoning there was that the argument to runCommand could be anything, including several commands separated by semi-colons, so in some cases it’s confusing what the return value should be. In any case that ship has sailed and you have to do something else to get the value. In most cases it calling the underlying function that performs the command and using it’s return value, but looking at the code that implements the “measure center” command I can see that it doesn’t return anything either. So in the particular case of the example you provided, I can see two options for getting the value:
Option 1) atoms = chimera.selection.OSLSelection(“#0:.A@CA”).vertices() center = chimera.Point([a.coord() for a in atoms]) x, y, z = center.data()
Option 2) rc(“sel #0:.A@CA”) center = chimera.Point([a.coord() for a in chimera.selection.currentAtoms()]) x, y, z = center.data()
I hope this helps.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 8, 2018, at 11:10 AM, Hernando J Sosa <hernando.sosa@einstein.yu.edumailto:hernando.sosa@einstein.yu.edu> wrote:
Dear Chimera,
Is it possible to assign the result of running a chimera command in python to a string or something else? E.g doing something like:
from chimera import runCommand as rc myresult = rc('measure center #0:.A@CA')
And then using the myresults somewhere else in the script after parsing for the relevant values?
Maybe there is a n easier way to accomplish this?
Thanks
Hernando
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edumailto:Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Hi Hernando,
Here’s some Python that gets the residues of a molecule. There is no Python chain object but the code shows how to get the chain ids. Also it shows atom.xformCoord() that gets the transformed coordinate. The transformed coordinate includes any rotation and translation you did with the mouse.
Tom
import chimera sel = chimera.selection.OSLSelection('#0') sel.models() -> [<_molecule.Molecule object at 0x11696ac10>] m = sel.models[0] r = m.residues len(r) -> 76 type(r) -> <type 'list'> r0 = r[0] r0.id.chainId -> u'A' set(r0.id.chainId for r0 in r) -> set([u'A', u'B']) a = r0.atoms[0] a.xformCoord() -> chimera.Point(15.491, 7.05, 17.165)
On Oct 25, 2018, at 1:35 PM, Hernando J Sosa hernando.sosa@einstein.yu.edu wrote:
An additional question: Is it possible to retrieve the atomic coordinates after a transformation (e.g. after an align/superposition operation) rather than the original coordinate values?
e.g. I am currently using the following commands to retrieve the coordinates (x,y,z) of the CA atom in model,residue,chain atom = chimera.selection.OSLSelection("#%d:%d.%c@CA" % (model,residue,chain)).vertices() (x,y,z) = atom[0].coord()
However, this retrieves the original coordinates not the coordinates after a transformation.
Thanks
Hernando
Hernando Sosa Dept. of Physiology and Biophysics Albert Einstein College of Medicine 1300 Morris Park Av. Bronx NY 10461 phone (718) 430-3456 FAX (718) 430-8819 email hernando.sosa@einstein.yu.edu mailto:hernando.sosa@einstein.yu.edu
From: Chimera-users [mailto:chimera-users-bounces@cgl.ucsf.edu] On Behalf Of Hernando J Sosa Sent: Thursday, October 25, 2018 12:50 PM To: chimera-users BB Subject: [Chimera-users] python script
Dear Chimera,
I am writing a Chimera python script and need to get a list of the chains and residue numbers of specific opened models . What would be the command/syntax to do that? or can you point me to a code example where something like this is done.
Thanks
Hernando
From: Chimera-users [mailto:chimera-users-bounces@cgl.ucsf.edu mailto:chimera-users-bounces@cgl.ucsf.edu] On Behalf Of Hernando J Sosa Sent: Monday, June 11, 2018 2:46 PM To: Eric Pettersen Cc: chimera-users BB Subject: Re: [Chimera-users] python script
Thanks Eric,
These alternatives is what I was looking for.
Best
Hernando
From: Eric Pettersen [mailto:pett@cgl.ucsf.edu mailto:pett@cgl.ucsf.edu] Sent: Friday, June 08, 2018 7:27 PM To: Hernando J Sosa Cc: chimera-users BB Subject: Re: [Chimera-users] python script
Hi Hernando, Perhaps runCommand should return a value but it doesn’t. The reasoning there was that the argument to runCommand could be anything, including several commands separated by semi-colons, so in some cases it’s confusing what the return value should be. In any case that ship has sailed and you have to do something else to get the value. In most cases it calling the underlying function that performs the command and using it’s return value, but looking at the code that implements the “measure center” command I can see that it doesn’t return anything either. So in the particular case of the example you provided, I can see two options for getting the value:
Option 1) atoms = chimera.selection.OSLSelection(“#0:.A@CA”).vertices() center = chimera.Point([a.coord() for a in atoms]) x, y, z = center.data()
Option 2) rc(“sel #0:.A@CA”) center = chimera.Point([a.coord() for a in chimera.selection.currentAtoms()]) x, y, z = center.data()
I hope this helps.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 8, 2018, at 11:10 AM, Hernando J Sosa <hernando.sosa@einstein.yu.edu mailto:hernando.sosa@einstein.yu.edu> wrote:
Dear Chimera,
Is it possible to assign the result of running a chimera command in python to a string or something else? E.g doing something like:
from chimera import runCommand as rc myresult = rc('measure center #0:.A@CA')
And then using the myresults somewhere else in the script after parsing for the relevant values?
Maybe there is a n easier way to accomplish this?
Thanks
Hernando
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu mailto:Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (5)
-
ChuHui Fu
-
Elaine Meng
-
Eric Pettersen
-
Hernando J Sosa
-
Tom Goddard