Select a subset of atoms from a trajectory file with MDanalysis

Usage:

./select_atoms_from_dcd.py topology.[pdb,psf,crd,gro] trajectory.[dcd,xtc,trr,xyz] outfile.[dcd,npy] 'selection string'

See MDAnalysis documentation for accepted input files for topology and trajectory.

If the output file name is with npy extension a numpy file is outputted with an array containing the atomic coordinates of the selected atoms. This file format can be convenient to perform analysis on coordinates with python.

See MDAnalysis documentation for selection syntax.

If you want to ask me a question or leave me a message add @bougui505 in your comment.