CatPDB
From Computational Biophysics and Materials Science Group
WritePDB
foreach i [list 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24] { set filename "1chain+P$i+wt+CA" set sel [atomselect top "segname P$i"] $sel writepdb $filename.pdb }
It's a tcl script and runs in Tk Console