A script that combines `change_center.py` and `filter_in.py`, with an additional option to return the file to its original coordinates after the filtering.

$ extract_box.py -h

usage: extract_box.py [-h] [-x X] [-y Y] [-z Z] -s SIDE [--recenter]
                      [input_file] [output_file]

positional arguments:
  input_file            by default, reads from stdin
  output_file           by default, writes to stdout

optional arguments:
  -h, --help            show this help message and exit
  -x X                  0 by default
  -y Y                  0 by default
  -z Z                  0 by default
  -s SIDE, --side SIDE
  --recenter            by default, true
  --no-recenter         keep atoms in original positions

Download scripts