The following example reads a set of PDB coordinate files and merges them into a single trajectory file. Note that only X,Y,Z coordinates are saved in the trajectory file. The B and Q column information in the PDB file is lost.
evaluate ($count=0)
for $1 in ( a.pdb b.pdb c.pdb d.pdb e.pdb ) loop main
evaluate ($count=$count+1)
if ($count=1) then
write trajectory
output=trajectory.dcd
ascii=false
end
else
write trajectory
next
end
end
write trajectory
reset
end
end loop main