<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Jay,<div><span class="Apple-tab-span" style="white-space:pre"> </span>We thought as much really. Well, you are going to have to use a Python script. The good news is that it's a really simple Python script. Put the following in a file whose name ends in ".py":</div><div><br></div><div>from chimera import openModels, Molecule</div><div>for m in openModels.list(modelTypes=[Molecule]):</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>from OpenSave import osOpen</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>f = osOpen("~/surfData/%s.data" % m.name, "w")</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>for a in m.atoms:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>print>>f, a, getattr(a, "areaSES", 0.0)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>f.close()</div><div><br></div><div>The indentation matters, so make sure to preserve it.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Then once you open your model and surface it, you can run the above script simply by opening it with the "open" command. It will create a file with a list of atoms and corresponding surface areas. The file will be named <model name>.data and it will be in the "surfData" folder in your home directory, so make sure that folder exists beforehand or modify the script to have it go to another location.</div><div><br></div><div>--Eric</div><br><div> Eric Pettersen<br> UCSF Computer Graphics Lab<br> <a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a><br></div><div><br><div><div>On Jan 14, 2014, at 5:56 AM, "Eifler, Jay Q. (UMKC-Student)" wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div fpstyle="1" ocsi="0" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; "><div style="direction: ltr; font-family: Tahoma; font-size: 10pt; ">Actually I'm doing ab-initio quantum mechanical calculations and need<div>to analyze on a atom and residue basis. I've already been able to</div><div>save the atom and residue results but can't figure out how to automate</div><div>it since you have got to click buttons in the render/select attribute. The</div><div>Chimera notes seem to imply it should be possible to save attributes to</div><div>file. However, areaSAS is supposed to be an attribute but doesn't seem</div><div>to belong to the model attributes.</div><div><div style="font-family: 'Times New Roman'; font-size: 16px; "><hr tabindex="-1"><div id="divRpF100960" style="direction: ltr; "><font face="Tahoma" size="2"><b>From:</b><span class="Apple-converted-space"> </span>Eric Pettersen<br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, January 13, 2014 4:05 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Eifler, Jay Q. (UMKC-Student)<br><b>Cc:</b><span class="Apple-converted-space"> </span><<a href="mailto:Chimera-users@cgl.ucsf.edu">Chimera-users@cgl.ucsf.edu</a>> List<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [Chimera-users] batch writing of attributes<br></font><br></div><div></div><div><div><div>On Jan 11, 2014, at 1:58 PM, Jay Eifler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>I'm trying to automate saving the areaSAS for a bunch<br>of models. I've got no problem loading the models, etc.<br>The problem is simply how do I use command line<br>arguments to save the areaSAS. I've tried writesel. This<br>works all fine in Render/Select by attribute simply<br>because it has a feature to save the areaSAS to a file.<br>Thanks.</blockquote><br></div><div>Hi Jay,</div><div><span class="Apple-tab-span" style="white-space: pre; "></span>Do you really need the values on a per-atom basis? If you just need the grand total, it's reported in the reply log so you could just open and surface your structures one by one via a script (one by one to avoid possibly running out of memory) and then afterward save the reply log contents to a file manually (there's a "Save" button on the reply log).</div><div><br></div><div>--Eric</div><br><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; font-size: 16px; "><div style="margin: 0px; "><font face="Helvetica" size="5" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: normal; font-family: Helvetica; "><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>Eric Pettersen</font></div><div style="margin: 0px; "><font face="Helvetica" size="5" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: normal; font-family: Helvetica; "><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>UCSF Computer Graphics Lab</font></div><div style="margin: 0px; "><font face="Helvetica" size="5" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: normal; font-family: Helvetica; "><span class="Apple-converted-space"> </span><a href="http://www.cgl.ucsf.edu/" target="_blank">http://www.cgl.ucsf.edu</a></font></div></span></div></div></div></div></div></div></blockquote></div><br></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><br class="Apple-interchange-newline"></span>
</div>
<br></body></html>