From: Axel Kohlmeyer (
Date: Tue Jul 14 2015 - 11:09:18 CDT

On Tue, Jul 14, 2015 at 11:23 AM, John Stone <> wrote:
> Hi,
> You didn't show what you did to run catdcd, so it's hard to say what went
> wrong. When asking questions about why scripts don't run, you need to provide
> all of the steps you performed. Nobody can guess what you might have done
> wrong if you don't show us what was done.


i am fairly certain that this is due to the fact that you cannot
create atom selections when you don't have any coordinate frames
loaded. for example it would happen when you load a .psf file without
a .pdb or .coor or similar file.

perhaps it would help users if this special case (no frames at all in
this molecule) is caught and a specific and more informative error
message is returned.


> Cheers,
> John Stone
> On Wed, Jul 08, 2015 at 06:59:30PM +0200, Life Sciences Inc wrote:
>> Hi all
>> I am trying to strip water and ions from my trajectory file so that I can
>> only have my molecule of interest in trajectory file.
>> I striped water first by using the following commands
>> set sel [atomselect top "not water"]
>> set out [open "indices_nowater.txt" w]
>> puts $out "[$sel list]"
>> close $out
>> $sel writepsf abc.psf
>> and got the psf file and now I am trying to strip ions from the same psf
>> file and want to write the new onw with the same commands
>> set sel [atomselect top "ions"]
>> set out [open "indices_ions.txt" w]
>> puts $out "[$sel list]"
>> close $out
>> $sel writepsf new_abc.psf
>> then from this psf I will use catdcd to generate dcd files.
>> but I am getting an error on writing the psf "atomsel: frame -1 out of
>> range for molecule 0", how to correct this or if someone can have better
>> script to strip water and ions from psf file and to write the new one.. or
>> something like that.
>> I would be really thankful to you all
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> Phone: 217-244-3349

Dr. Axel Kohlmeyer
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.