mask <mask> [maskout <filename>] [maskpdb <pdbname>] [maskmol2 <mol2name>]

<mask> Atom mask to process.
[maskout <filename>] Write information on atoms in <mask> to <filename>.
[maskpdb <name>] Write PDB of atoms in <mask> to <name>.X.
[maskmol2 <name>] Write Mol2 of atoms in <mask> to <name>.X.

For each frame determine all atoms that correspond to <mask>. This is most useful when using distance-based masks, since the atoms in the mask are updated for every frame read in. If maskout is specified information on all atoms in <mask> will be written to <filename> with format:

#Frame AtomNum Atom ResNum Res MolNum

where #Frame is the frame number, AtomNum is the number of the selected atom, Atom is the name of the selected atom, ResNum is the residue number of the selected atom, Res is the residue name, and MolNum is the molecule number of the selected atom.

If maskpdb or maskmol2 are specified a PDB/Mol2 file corresponding to <mask> will be written out every frame with name “<name>.frame#”.
For example, to write out all atoms within 3.0 Angstroms of residue 195 that are part of residues named WAT to “Res195WAT.dat”, as well as write out corresponding PDB files:

mask “(:195<:3.0)&:WAT” maskout Res195WAT.dat maskpdb Res195WAT.pdb