From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Aug 28 2014 - 14:14:45 CDT

A cleaner way of doing it than either approach you mentioned
would be to modify your code so that when a frame is determine to
"not be interesting", you could just have your code delete that
frame from memory. You would then load the subsequent DCD file at
the end of the first, and continue processing/deleting until the only
frames left are the ones you want, and then you could use (for 472
good frames):
  mol drawframes top 0 {1:472}

That's much simpler than what you were describing, and it should work fine
with multiple DCD files since you'll only keep the frames that you actually
want to superimpose/display.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Thu, Aug 28, 2014 at 06:58:58PM +0000, Ebert Maximilian wrote:
> Hi,
>
> I will try to make it more clear. I have a trajectory with 10000 frames of a protein with a substrate. I am interested in the position of the substrate. If it is at a certain distance of the protein I want to store its position and display it later. My idea was to write a TCL script which checks in every frame the relative position of the substrate to the protein. This is working fine. I have a script which aligns the system and runs through every frame and checks the relative position. What I did if the relative position indicates that the substrate is at an interesting distance to the protein I safe the substrate by using:
>
> set plm($i) [atomselect top "resname PLM" frame now]
>
> At the end I have an array full of positions of my substrate from different frames. Now I want to go to frame 0 and write out all the substrate position to the main screen. This would superimpose on the protein all the different substrate orientations which meet my criteria. Basically I want the substrate position from different frames all drawn in frame 0 based on a distance criteria. This should look similar to what you get if you go to representations -> trajectory -> Draw multiple frames. I could also use the:
>
> mol drawframes top 0 {1 4 6 7 ?.}
>
> Command but when working with multiple DCD files this approach isn?t working.
>
> Thanks,
>
> Max
>
>
>
> On Aug 28, 2014, at 2:25 PM, Ebert Maximilian <m.ebert_at_umontreal.ca> wrote:
>
> >
> >
> >
> > ________________________________________
> > From: John Stone
> > Sent: Thursday, August 28, 2014 2:25:19 PM (UTC-05:00) Eastern Time (US & Canada)
> > To: Ebert Maximilian
> > Cc: <vmd-l_at_ks.uiuc.edu>
> > Subject: Re: vmd-l: Save position of entire molecule and draw it later
> >
> > Hi,
> > Your question doesn't really make it clear what you mean by
> > "saving the position". If you're loading a simulation trajectory,
> > the atomic coordinates of the structure are already "saved".
> > I'm assuming that what you want is to make a list of the trajectory frames
> > that meet some particular criteria, and then show those at a later time?
> > If you can provide more details and be more specific that would be helpful.
> >
> > Cheers,
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> > On Thu, Aug 28, 2014 at 03:37:34PM +0000, Ebert Maximilian wrote:
> >> Hi there,
> >>
> >> I am looking for a console way to store the position of a molecule in a frame if it meets certain conditions. At the end I want to draw all molecules stored on top of the first frame to analyze the positions of each molecule. In there a way to store an entire molecule in a variable and draw it out later?
> >>
> >> Thanks for your help,
> >> Max
> >
> > --
> > NIH Center for Macromolecular Modeling and Bioinformatics
> > Beckman Institute for Advanced Science and Technology
> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> > http://www.ks.uiuc.edu/Research/vmd/
>

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/