f_extract.py

Extracts positional data from MD trajectories. The output can be filtered simultaneously by frame selections and CHARMM-style atom selections.

Examples

Extracts frame 100, 200, and 300 from membrane.dcd.

f_extract.py membrane.psf membrane.dcd output.dcd --frames 100:301:100

Extracts the complete trajectories of all atoms that are at most five Angstroms away from the origin in frame 10 (the eleventh frame) while wrapping atom coordinates periodically back to the simulation box.

f_extract.py membrane.psf membrane.dcd output.dcd \
             --charmm 'point 0.0 0.0 0.0 5.0' \
             --selection_frame 10 \
             --periodic

Extracts the last frame of a trajectory.

f_extract.py membrane.psf membrane.dcd output.dcd --frames -1

Shows usage.

f_extract.py -h

Supported formats

All file formats of MDAnalysis are supported. Input files may be compressed using gzip or bzip2.

Note

File formats are recognized by file extension. Therefore, you have to stick to the standard file extensions.

Note

Some output formats may only support writing a single frame.

Warning

Only rectangular simulation boxes are currently supported.

Command line interface

topology

The topology file to work with.

coordinates

The coordinate file to work with.

output

Output file to write to.

--frames

The zero-based frame selection that allows for slicing. The general syntax is ‘start:stop:step’ which would select all frames from start to stop (excluding stop) while skipping step frames inbetween. Selecting single frames by specifying a single number is possible. Negative indices count backwards from the end of the trajectory.

--charmm

Please refer to the section on atom selections.

--selection_frame

Input frame to select on (zero-based). Only interesting for geometric criteria.

--progress

Progress report every time this many frames have been written.

--force

Whether to overwrite existing output files.

--periodic

Whether to wrap atoms for spatial selection criteria back to the original cell.

Open Issues

Todo

Single frame PDB output not functional.

Todo

Progress output: wrap last line.

Todo

Allow for comma-separated list of frames.

Internal functions

f_extract.main()[source]

Wrapper function.

Table Of Contents

Previous topic

Welcome to finley’s documentation!

Next topic

f_timeseries.py

This Page