<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Just to add a few tidbits to Elaine's reply:<div><br></div><div><span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 14px; "><blockquote type="cite">2. I also need to superimpose Ca-Ca atoms of 400 structures. But, I <br></blockquote><blockquote type="cite">feel<br></blockquote><blockquote type="cite"> there is a limit to the no. of structures that CHIMERA could handle,<br></blockquote><blockquote type="cite"> thus, at max. I would be superimposing 20-30 structures at a time. <br></blockquote><blockquote type="cite">How<br></blockquote><blockquote type="cite"> could I automatize the same through a script sothat I could run it <br></blockquote><blockquote type="cite">in<br></blockquote><blockquote type="cite"> batches?<br></blockquote><div><br></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: 16px; ">You might consider doing this by opening one structure in model #0 as your reference structure then opening your 400 structures, one at a time, in model #1 and matching them on the reference, pruning the unwanted waters, and then writing them out, closing each one as you finish with it.</span></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;"><br></span></font></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;">As for the script you use, you could use any programming language you know in order to generate a Chimera command script that performs the functions I outlined. If you don't know any programming languages, you might as well try writing a Python script since it's pretty easy to learn Python and Chimera can execute it directly. The most important single thing to know is that you can run any regular Chimera command via Chimera's runCommand() function. Here's a tiny script that opens files model001.pdb through model400.pdb into model #1, colors them red, and then closes them. You can probably figure out how to flesh out the script to do what you want:</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;"><br></span></font></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;">from chimera import runCommand</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;">for i in range(400):</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;"><span class="Apple-tab-span" style="white-space:pre"> </span>runCommand("open 1 model%03d.pdb" % (i+1))<br></span></font></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;"><span class="Apple-tab-span" style="white-space:pre"> </span>runCommand("color red")<br></span></font></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;"><span class="Apple-tab-span" style="white-space:pre"> </span>runCommand("close 1")<br></span></font></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;"><br></span></font></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;">--Eric</span></font></div><div><br></div><div><font class="Apple-style-span" face="Helvetica" size="4"><span class="Apple-style-span" style="font-size: 16px;"><div><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><div><br></div></div></div></span></font></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: 16px; ">On Nov 12, 2008, at 11:04 AM, Elaine Meng wrote:</span></div></span></div><div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Dear Tuhin,<br>The script to perform the actions (your #1 or #2) could be written in <br>python or in Chimera commands. Just opening the python file (*.py) or <br>Chimera command file (*.com) in Chimera will execute it. The trickier <br>part would be how to automatically loop through your multiple <br>structures. You could write a long Chimera command script that <br>includes the names of the structures, or you could use a python script <br>that loops through a list of filenames. The methods can be combined; <br>for example, the python script could merely loop through the names and <br>open the structures, then open a separate Chimera command script. You <br>could also use a shell script to loop through filenames, but I guess <br>that would be slower because it would involve starting a new Chimera <br>for each input (#1) or set of inputs (#2). If that is easier for you, <br>however, it is reasonable.<br><br>Please see this previous posting for examples/discussion of Chimera <br>scripts for processing multiple structures, calling a script from <br>another script, and using aliases:<br><<a href="http://www.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003218.html">http://www.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003218.html</a> <br><blockquote type="cite"><br></blockquote><br>See also Chimera nogui mode:<br><<a href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/options.html#nogui">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/options.html#nogui</a>><br><br>I believe all the actions you want to perform can be done with Chimera <br>commands, for example<br><br>open /location/location/frame20.pdb<br>delete solvent & protein z>5<br>write format pdb relative 0 0 /location/location/frame20zone5.pdb<br>close 0<br><br>or<br><br>open /location/mystruct1.pdb<br>open /location/mystruct2.pdb<br>open /location/mystruct3.pdb<br>matchmaker #0 #1<br>matchmaker #0 #2<br><br>These are just possibilities out of several ways to perform the <br>tasks. For example, the top example assumes your structure is a <br>protein, and in the bottom example, you could use "match" instead of <br>"matchmaker" to superimpose structures.<br><br>I hope this helps,<br>Elaine<br>-----<br>Elaine C. Meng, Ph.D. <a href="mailto:meng@cgl.ucsf.edu">meng@cgl.ucsf.edu</a><br>UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab<br>Department of Pharmaceutical Chemistry<br>University of California, San Francisco<br> <a href="http://www.cgl.ucsf.edu/home/meng/index.html">http://www.cgl.ucsf.edu/home/meng/index.html</a><br><br>On Nov 11, 2008, at 1:41 AM, <a href="mailto:tuhin@iitk.ac.in">tuhin@iitk.ac.in</a> wrote:<br><br><blockquote type="cite">Dear All,<br></blockquote><blockquote type="cite">I have run several simulations. But, I need to analyse a selective <br></blockquote><blockquote type="cite">number<br></blockquote><blockquote type="cite">of structures from each simulation saved at a given time step "t". <br></blockquote><blockquote type="cite">Thus,<br></blockquote><blockquote type="cite">for a 20ns simulation, starting t=0 and incrementing it by 50ps, <br></blockquote><blockquote type="cite">I'll have<br></blockquote><blockquote type="cite">~400 individual structures. Each structure is within a waterbox, which<br></blockquote><blockquote type="cite">contains approx. 20,000 water molecules. Once I get the structures, <br></blockquote><blockquote type="cite">I need<br></blockquote><blockquote type="cite">to do the following using CHIMERA:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">1. Open each structure and save water molecules within a cutoff <br></blockquote><blockquote type="cite">distance of<br></blockquote><blockquote type="cite"> 5.0 Angstrom from the protein. Thus, I'll end-up having a shell <br></blockquote><blockquote type="cite">(<=5.0A)<br></blockquote><blockquote type="cite"> of water molecules around the protein. The saved structure will be <br></blockquote><blockquote type="cite">in<br></blockquote><blockquote type="cite"> .pdb format and include the protein with 5.0A water shell.<br></blockquote><blockquote type="cite"> I know how to do it in CHIMERA using the commandline option/ <br></blockquote><blockquote type="cite">pulldown<br></blockquote><blockquote type="cite"> menu, but, how to do it for 400 structures. Is there a way to run it<br></blockquote><blockquote type="cite"> in a "Batch Job" ?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">2. I also need to superimpose Ca-Ca atoms of 400 structures. But, I <br></blockquote><blockquote type="cite">feel<br></blockquote><blockquote type="cite"> there is a limit to the no. of structures that CHIMERA could handle,<br></blockquote><blockquote type="cite"> thus, at max. I would be superimposing 20-30 structures at a time. <br></blockquote><blockquote type="cite">How<br></blockquote><blockquote type="cite"> could I automatize the same through a script sothat I could run it <br></blockquote><blockquote type="cite">in<br></blockquote><blockquote type="cite"> batches?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks in advance. Any suggestion(s) is welcomed.<br></blockquote><blockquote type="cite">Warm regards,<br></blockquote><blockquote type="cite">Tuhin<br></blockquote><br>_______________________________________________<br>Chimera-users mailing list<br><a href="mailto:Chimera-users@cgl.ucsf.edu">Chimera-users@cgl.ucsf.edu</a><br>http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users<br></div></blockquote></div><br></div></body></html>