[Chimera-users] Saving trajectories in one pdb file

Daniel Gurnon danielgurnon at depauw.edu
Thu Dec 13 12:07:57 PST 2012

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 *outside *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.


On Wed, Dec 12, 2012 at 4:18 PM, Eric Pettersen <pett at cgl.ucsf.edu> wrote:

> On Dec 12, 2012, at 11:03 AM, Daniel Gurnon wrote:
> Hi all,
> I'm using Chimera to prepare multi-model pdbs for use in ePMV. I've run
> into two issues:
> 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.
> 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?
> Hi Dan,
> 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.
> 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.
> 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.
> write 0 /var/tmp/x.pdb
> system echo MODEL <FRAME> >> /var/tmp/all.pdb
> system /bin/cat /var/tmp/x.pdb >> /var/tmp/all.pdb
> system echo ENDMDL >> /var/tmp/all.pdb
> 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.
> --Eric
>                         Eric Pettersen
>                         UCSF Computer Graphics Lab
>                         http://www.cgl.ucsf.edu


Daniel Gurnon, Ph. D.
Associate Professor of Chemistry and Biochemistry
DePauw University
Greencastle, IN 46135

p: 765-658-6279
e: danielgurnon at depauw.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20121213/3f219072/attachment.html>

More information about the Chimera-users mailing list