From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Thu Aug 26 2010 - 11:11:07 CDT

On Thu, Aug 26, 2010 at 11:12 AM, Ajasja Ljubetič
<ajasja.ljubetic_at_gmail.com> wrote:
> Hi,
> You could use
> animate write pdb $i.pdb
> to write the frames to pdbs (add an aditional counter so that your frames
> would be numbered 1.pdb 2.pdb etc...) and than use the
> animatepdbs script to load the files in a new trajectory.
>
> Or perhaps you could just delete the frames you don't need from the
> trajectory using animate delete and then save this as a new trajectory using
> animate write dcd traj.dcd or something similar.

this is the better option, but one has to be careful to delete frames
in reverse order (i.e. from high frame number to low), or else the
frame numbers will be off after each delete.

cheers,
    axel.

> Regards,
> Ajasja
> On Thu, Aug 26, 2010 at 16:01, Pat Yee <pyee_at_nd.edu> wrote:
>>
>> Hi VMD users,
>>
>>
>>
>> I’m trying to make a DCD file containing select frames of another DCD
>> file. The frames I want in the new DCD file will be taken when two atoms (in
>> this case atom1 and atom2) are between 3.23 and 3.43 angstroms apart. So far
>> I’ve only made a script that makes a file containing the frames where this
>> happens. For example, my output might say:
>>
>>
>>
>> 123
>>
>> 456
>>
>> 789
>>
>>
>>
>> I want to make a DCD file with only frames 123, 456, and 789.
>>
>>
>>
>> Can anybody tell me how to modify my script to get what I want? I attached
>> the script and a sample output to this email.
>>
>>
>>
>> Pat Yee
>>
>>
>

-- 
Dr. Axel Kohlmeyer    akohlmey_at_gmail.com
http://sites.google.com/site/akohlmey/
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.