set selA [atomselect top "same residue as water and z>$zmin and z<$zmax"] set selB [atomselect top "all not {same residue as water and z>$zmin and z<$zmax}"] puts "all not {same residue as water and z>$zmin and z<$zmax}"
set rmwatlen [llength [$selA get resid]];
set rmwatnum [expr $rmwatlen/3];
puts "remove water atom is $rmwatlen, and molecular is $rmwatnum"