my $inrange = /^%%Atom Coords/../^%%End Frame/; next unless $inrange; next if $inrange == 1 or $inrange =~ /E/; # skip first and last item of range