<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Jan 17, 2007, at 10:47 PM, Brady Bernard wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><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; "><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">is there a way to do this with --nogui so that i can automate it in a script?</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">thanks,</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">brady</SPAN></FONT></DIV></SPAN></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>It's pretty easy to make a Python script that opens a file, loops through open molecules and then their atoms, and prints our the atom identifier and IDATM type to that file. Here's an example:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>import chimera</DIV><DIV>f = open("types.txt", "w")</DIV><DIV>for m in chimera.openModels.list(modelTypes=[chimera.Molecule]):</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, a.idatmType</DIV><DIV>f.close()</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If you save the above into a file with a ".py" suffix (e.g. types.py), then you could save all the types of 1gcn with "chimera --nogui pdb:1gcn types.py", which would create a file named "types.txt" (in the same folder as types.py) with the types listed. BTW, you need to preserve the indentation of the Python code above -- it matters to Python.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If you're automating this in a shell script, it may be simpler to just print the info to standard output and redirect that into a file, rather than open the file in the Python script. The command would then be "chimera --nogui --nostatus pdb:1gcn types.py > 1gcn_types.txt" (note the "--nostatus" flag so that status messages don't get mixed into the output). The Python script becomes:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>import chimera</DIV><DIV>for m in chimera.openModels.list(modelTypes=[chimera.Molecule]):</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 a, a.idatmType</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>--Eric<BR><BLOCKQUOTE type="cite"><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; "><BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; ">----- Original Message -----</SPAN></DIV><DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">From:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> </SPAN><A title="pett@cgl.ucsf.edu" href="mailto:pett@cgl.ucsf.edu"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13.3333px; -khtml-text-decorations-in-effect: underline; ">Eric Pettersen</SPAN></A><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "></SPAN></DIV><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">To:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> </SPAN><A title="bradyb@u.washington.edu" href="mailto:bradyb@u.washington.edu"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13.3333px; -khtml-text-decorations-in-effect: underline; ">Brady Bernard</SPAN></A><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "></SPAN></DIV><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">Cc:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> </SPAN><A title="goddard@cgl.ucsf.edu" href="mailto:goddard@cgl.ucsf.edu"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13.3333px; -khtml-text-decorations-in-effect: underline; ">Thomas Goddard</SPAN></A><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> ; </SPAN><A title="meng@cgl.ucsf.edu" href="mailto:meng@cgl.ucsf.edu"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13.3333px; -khtml-text-decorations-in-effect: underline; ">Elaine Meng</SPAN></A><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "></SPAN></DIV><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">Sent:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> Tuesday, January 16, 2007 4:40 PM</SPAN></DIV><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">Subject:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> Re: Export idatmType</SPAN></DIV><DIV><BR></DIV><DIV>Hi Brady,</DIV><DIV><SPAN class="Apple-tab-span" style="WHITE-SPACE: pre"></SPAN>Tom forwarded your mail to me. There almost is a way. In the 1.2318 snapshot, the Render By Attribute tool allows you to save attribute values to a file using that tool's "File->Save Attributes..." menu item (saved in the format that Define Attribute accepts). So, why "almost"? The idatmType attribute is screened out of the list of available attributes since it can be expensive to compute the values -- and since you could already select by IDATM type using the regular selection menu. But now that save exists I will have to improve Render By Attribute so that it can know that idatmType values are strings ahead of time (so it doesn't have to ask for any values to figure that out).</DIV><DIV><SPAN class="Apple-tab-span" style="WHITE-SPACE: pre"></SPAN>Anyway, for your purposes it is not too hard to force Render By Attribute to show you idatmType. First, get the 1.2318 release. Then edit the file <your Chimera>/share/ShowAttr/__init__.py (on a Mac: Chimera.app/Contents/Resources/share/ShowAttr/__init__.py) and edit line 24. It will look like this:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="WHITE-SPACE: pre"></SPAN>'name': False, 'idatmType': False, 'idatmIsExplicit': False,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>change it to:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="WHITE-SPACE: pre"></SPAN>'name': False, 'idatmIsExplicit': False,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Save the file and thereafter Render By Attribute should show you the idatmType attribute.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>--Eric</DIV><DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 222); "><FONT style="FONT: 16px Helvetica; color: rgb(0, 0, 222); " face="Helvetica" size="5"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 222); ">hi tom - is there a quick way to save the atom types from idatmType to a text/log file along with the atom name or number?</SPAN></FONT></DIV></BLOCKQUOTE></DIV><BR></BLOCKQUOTE><BR class="Apple-interchange-newline"></SPAN></BLOCKQUOTE></DIV><BR></BODY></HTML>