Eric, this looks great, but I actually am on a Windows machine. I tried to make it work using the "type" command but unfortunately Windows won't let me combine the two files, even if I run Chimera as an administrator. Writing the files in the first place works fine (and requires me to run Chimera as an administrator), as does combining the two files <i>outside </i>of Chimera through a command prompt run in administrator mode. So I'm close....so close. If you don't know off the top of your head how to make this work in Windows, don't worry about it. I'll either install cygwin or borrow a Mac.<div>
Thanks</div><div><br></div><div>Dan</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 12, 2012 at 4:18 PM, Eric Pettersen <span dir="ltr"><<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="im"><div>On Dec 12, 2012, at 11:03 AM, Daniel Gurnon wrote:</div></div><div>
<div class="im"><br><blockquote type="cite">Hi all,<div><br></div><div>I'm using Chimera to prepare multi-model pdbs for use in ePMV. I've run into two issues:</div><div><br></div><div>1) When saving a portion of a trajectory in one pdb file, frame numbers are used as model numbers. But only 4 digits are supported. Above 9999, the model number becomes ****. Could you enable 7 digits? I'm taking frames from the end of a long trajectory. <br>
<div><br></div><div>2) I was hoping that I could retain the effect of "hold selection steady" by saving as a pdb with transformed coordinates, but this isn't the case. Is there a way to make this work?</div>
</div></blockquote><div><br></div></div><div>Hi Dan,</div><div><br></div>I could probably easily change Chimera to use a non-PDB-standard larger field width in the MODEL record, but we're in a code freeze right now in preparation for the 1.7 candidate production release so I can't do so for a day or two. I will do it soonest, but I have a suggestion (below) that I hope obviates your immediate need for it. </div>
<div><br></div><div>Having "hold selection steady" reflected directly in the written PDB is pretty hard since the PDB-writing code only knows about whatever the current transformation matrix is as the write is performed, whereas the hold-selection-steady code changes the transformation matrix on the fly as the trajectory is played.</div>
<div><br></div><div>My suggested solution for your situation, assuming you aren't on a Windows box and that the frames you want are either consecutive or evenly spaced, is to write a series of PDB files and collate them together on the fly by using a per-frame script. The script below, if put in MD Movie's Per-Frame script dialog (set to "Chimera commands") will write the current frame to a temporary PDB file, and append that to a another PDB file, bookended by MODEL/ENDMDL records. So when you are done playing through the relevant frames you will have the final PDB file in /var/tmp/all.pdb. Note the in the second line of the script the "<FRAME>" part is literally that string -- MD Movie will replace that with the appropriate frame number.<br>
<br></div><div><div>write 0 /var/tmp/x.pdb</div><div>system echo MODEL <FRAME> >> /var/tmp/all.pdb</div><div>system /bin/cat /var/tmp/x.pdb >> /var/tmp/all.pdb</div><div>system echo ENDMDL >> /var/tmp/all.pdb</div>
<div><br></div><div>The all.pdb file will have a lot of extra records (headers and whatnot) between the MODEL/ENDMDL records that are not usually found there. I suspect that ePMV will accept the file as is without complaint. If it does not, just read the file back into Chimera and write it back out again. The rewritten file will be 100% PDB compliant.</div>
<div><br></div><div>--Eric</div></div><br><div>
<span style="border-spacing:0px 0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:16px;white-space:normal;font-family:Helvetica;word-spacing:0px"><p style="margin:0.0px 0.0px 0.0px 0.0px">
<font face="Helvetica" size="5" style="font:16.0px Helvetica"><span> <span> </span></span>Eric Pettersen</font></p><p style="margin:0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font:16.0px Helvetica"><span> <span> </span></span>UCSF Computer Graphics Lab</font></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font:16.0px Helvetica"><span> </span><a href="http://www.cgl.ucsf.edu" target="_blank">http://www.cgl.ucsf.edu</a></font></p>
<br></span>
</div>
<br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>____________________________<br><br>Daniel Gurnon, Ph. D.<br>Associate Professor of Chemistry and Biochemistry<br>DePauw University<br>Greencastle, IN 46135<br>
<br>p: 765-658-6279<br>e: <a href="mailto:danielgurnon@depauw.edu" target="_blank">danielgurnon@depauw.edu</a><br>
</div>