<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Eric,<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I can't find the function. Trying to call it within the chimera idle-python shell I get the following error:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>>>> chimera.StructMeasure.axis()<br>
</span>
<div>Traceback (most recent call last):<br>
</div>
<div>  File "<pyshell#3>", line 2, in <module><br>
</div>
<span>AttributeError: 'module' object has no attribute 'StructMeasure'</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>I can't see it either (or something similarly called) within the functions listed  if a do</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>>>>help(chimera)</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>H.</span><br>
</div>
<div id="Signature">
<div>
<div><font size="2" face="Arial"><a><span>___________________________________<br>
</span></a></font></div>
<div><font size="2" face="Arial"><a><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">Hernando Sosa</span></a><span><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">                                                            
</span><span><br>
</span></span></font></div>
<font size="2" face="Arial"><span><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">Dept. of Physiology and Biophysics
</span></span><br>
</font><font size="2" face="Arial"><span><span></span></span><span><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">Albert Einstein College of Medicine
</span></span><br>
</font><font size="2" face="Arial"><span><span></span></span><span><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">1300 Morris Park Av.
</span></span><br>
</font><font size="2" face="Arial"><span><span></span></span><span><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">Bronx NY 10461
</span></span><br>
</font><font size="2" face="Arial"><span><span></span></span><span><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">phone (718) 430-3456
</span></span><br>
</font><font size="2" face="Arial"><span><span></span></span><span><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">FAX (718) 430-8819
</span></span><br>
</font>
<div><font size="2" face="Arial"><span><span></span></span><span><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">emai: 
</span><span><a href="mailto:hernando.sosa@einsteinmed.org" title="hernando.sosa@einsteinmed.org"><span style="font-size:9pt; font-family:Arial,Helvetica,sans-serif">hernando.sosa@einsteinmed.org</span></a><br>
</span></span></font></div>
<div>
<div><font size="2" face="Arial"><a><span style="font-size:9pt; font-family:"Arial Black",Arial,sans-serif">___________________________________</span><span><br>
</span></a></font></div>
<div><font size="2" face="Arial"><a><span></span></a></font></div>
<br>
<font size="2" face="Arial"><span><span></span></span></font></div>
</div>
</div>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Eric Pettersen <pett@cgl.ucsf.edu><br>
<b>Sent:</b> Friday, July 10, 2020 4:44 PM<br>
<b>To:</b> Hernando J Sosa <hernando.sosa@einsteinmed.org><br>
<b>Cc:</b> chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu><br>
<b>Subject:</b> Re: [Chimera-users] axes</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<table style="background-color:#fe0000; border-collapse:collapse; border:4px solid #CBCBCB; color:#ffcc67; width:100%; text-align:center" cellspacing="3" cellpadding="3" border="4">
<tbody>
<tr>
<td><i>CAUTION: This email comes from an external source; the attachments and/or links may compromise our secure environment. Do not open or click on suspicious emails. Please click on the “Phish Alert” button on the top right of the Outlook dashboard to report
 any suspicious emails.</i></td>
</tr>
</tbody>
</table>
<div>Hi Hernando,
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>Mostly yes.  The function is chimera.StructMeasure.axis().  There is a doc string for the function describing its arguments and return values.  In its simplest form it takes a numpy
 array of xyz values and returns a Point (centroid) instance and a Vector (unit direction vector) instance.  To get a length you would also have to supply the findBounds=True keyword argument, in which case it will return two additional floating-point values,
 the scale factors to apply to the unit vector to get it to the approximate bounds of the axis in each direction (so one of the scale factors will be negative).</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>If you have a list of Atom instances, the easiest way to generate the numpy xyz array is with numpyArrayFromAtoms,
<i class="">e.g.</i><span class="" style="font-style:normal">:</span></div>
<div class=""><br class="">
</div>
<div class="">import chimera</div>
<div class="">xyzs = chimera.numpyArrayForAtoms(atoms)</div>
<div class=""><br class="">
</div>
<div class="">If you only really have an atom spec, let me know and I can help with how to generate a list of Atoms from that.</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">--Eric</div>
<div class=""><br class="">
</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>Eric Pettersen</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>UCSF Computer Graphics Lab</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jul 10, 2020, at 11:54 AM, Hernando J Sosa <<a href="mailto:hernando.sosa@einsteinmed.org" class="">hernando.sosa@einsteinmed.org</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Dear Chimera,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Is there a way to run a  command within a python script equivalent to the chimera command 'define axis' to be able to retrieve the results (length,center, direction) ?  Something like:</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
(length,center,direction) = mydefineaxis(atomspec)</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Thanks</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Hernando<br class="">
</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div class=""><br class="">
<br class="">
</div>
</div>
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">Chimera-users
 mailing list:<span class="x_Apple-converted-space"> </span></span><a href="mailto:Chimera-users@cgl.ucsf.edu" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">Chimera-users@cgl.ucsf.edu</a><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">Manage
 subscription:<span class="x_Apple-converted-space"> </span></span><a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplato.cgl.ucsf.edu%2Fmailman%2Flistinfo%2Fchimera-users&data=02%7C01%7Chernando.sosa%40einsteinmed.org%7Cdf93aa552ac3413bb97708d8251216e0%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C637300106911058025&sdata=8fjGN1Ve%2B4HNUZL4ltu41pBMDoEsEFa3nY7CeNrL%2Fio%3D&reserved=0" originalsrc="https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" shash="EoGAwGU8TBxI+4JyMyudTOUTQbg3JQGR8u2DYVMyet1qXLGjBC6CzHx+uUlUCbeTxIdmxO2swuf7AUfW4jwnkPXDvfhJ3e4wx7GQLa1JvLoQLXdxO3NrM8t8vg4cRmJnKnwUBkEgaUDaoOEmOV3tObrho0y4iA27p6P0bN7lKms=" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</body>
</html>