<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Damien,<div><span class="Apple-tab-span" style="white-space:pre"> </span>You can use "open" with the full path to the file, or you can "cd" to the folder and then just use the file's name. See below...</div><div><br><div><div>On Aug 19, 2009, at 6:44 AM, Damien Larivière wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear all,<br><br>Sorry for this simple question : Is there an example of how to use a <br>command in a script ? For example, the command "open" is described in <br>the documentation but I confess (i'm not a programmer) that I do not <br>understand how to use it for opening a pdb file in a specific directory <br>: C:\Users\damien\Fondation\LifeExplorer\3D <br>models\FtsZ_ring\Bond_Set\Docking_Hex\Results_190809\dock0001.pdb<br><br>I would like to create a script that does :<br><br>1/ Open a PDB file (dock0001.pdb)<br></div></blockquote><div><br></div>Either:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>open C:\Users\damien\ ... \Results_190809\dock001.pdb</div><div><br></div><div>-or-:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>cd C:\Users\damien\ ... \Docking_Hex\Results_190809</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>open dock001.pdb</div><div><br></div><div>The latter might be better if you are going to save files and would like them to go into that folder as well without specifying a big long path.</div><div><br><blockquote type="cite"><div>2/ open Tools - Structure analysis - Sequence<br>3/ select residues 203 to 227 chain A<br></div></blockquote><div><br></div>sel :203-227.A</div><div><br></div><div>":203-227.A" is the "atom specifier" for residues 203 to 227 of chain A. There is an extensive explanation of atom specifiers here: <a href="http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/frameatom_spec.html">http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/frameatom_spec.html</a></div><div><br><blockquote type="cite"><div>4/ Actions Color Red<br></div></blockquote><div><br></div>color red sel</div><div><br><blockquote type="cite"><div>5/ open Tools - Structure analysis - Sequence<br>6/ select residues 54 to 87 chain A<br></div></blockquote><div><br></div>sel :54-87.A</div><div><br><blockquote type="cite"><div>7/ Actions Color Magenta<br></div></blockquote><div><br></div>color magenta sel</div><div><br></div><div>If the only reason you are making the selection is in order to color it magenta (i.e. you aren't going to do any other operations on it) then you could just cut out the selection step and:</div><div><br></div><div>color magenta :54-87.A</div><div><br></div><div>--Eric</div><div><br></div><div><span class="Apple-style-span" style="font-size: 16px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "> Eric Pettersen</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "> UCSF Computer Graphics Lab</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "> <a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></div><br class="Apple-interchange-newline"></div></span></div></div></body></html>