From: Life Sciences Inc (contact.lifesciences.inc_at_gmail.com)
Date: Wed Jul 08 2015 - 11:59:30 CDT

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