#molecular-dynamics #gro #file-processing #gromacs

app groslicer

Slice gro files by processing a stream of lines

1 unstable release

0.1.2 Jul 21, 2024

#140 in Science

MIT license

8KB
115 lines

groslicer—slice gro files by processing a stream of lines

A small, simple utility to slice gro files according to a set of minimum and maximum x, y, z coordinates. The lines of the input structure file are processed line-by-line. If a position is within the provided range, the line is written verbatim to the output structure file. This means that a very large structure can be sliced efficiently and with very low runtime memory requirements, since the structure is never loaded into memory as a whole.

The eigthyseven library is used for processing the gro atom lines.

Installation

cargo install --git 'https://git.sr.ht/~ma3ke/groslicer'

Or, build it from source.

git clone https://git.sr.ht/~ma3ke/groslicer
cd groslicer
cargo install --path .

Usage

Slice a structure.

Provide slice dimensions in nanometers.

Usage: groslicer [OPTIONS] <INPUT> <OUTPUT>

Arguments:
  <INPUT>
          Structure input path (gro)

  <OUTPUT>
          Structure output path (gro)

Options:
      --minx <MINX>
          

      --maxx <MAXX>
          

      --miny <MINY>
          

      --maxy <MAXY>
          

      --minz <MINZ>
          

      --maxz <MAXZ>
          

  -h, --help
          Print help (see a summary with '-h')

Marieke Westendorp, 2024

Dependencies

~7MB
~182K SLoC