g_select(1) selects groups of atoms based on flexible textual selections


g_select -f traj.xtc -s topol.tpr -sf selection.dat -n index.ndx -os size.xvg -oc cfrac.xvg -oi index.dat -om mask.dat -on index.ndx -[no]h -[no]version -nice int -b time -e time -dt time -xvg enum -[no]rmpbc -[no]pbc -select string -selrpos enum -seltype enum -[no]dump -[no]norm -[no]cfnorm -resnr enum


g_select writes out basic data about dynamic selections. It can be used for some simple analyses, or the output can be combined with output from other programs and/or external analysis programs to calculate more complex things. Any combination of the output options is possible, but note that -om only operates on the first selection.

With -os, calculates the number of positions in each selection for each frame. With -norm, the output is between 0 and 1 and describes the fraction from the maximum number of positions (e.g., for selection 'resname RA and x 5' the maximum number of positions is the number of atoms in RA residues). With -cfnorm, the output is divided by the fraction covered by the selection. -norm and -cfnorm can be specified independently of one another.

With -oc, the fraction covered by each selection is written out as a function of time.

With -oi, the selected atoms/residues/molecules are written out as a function of time. In the output, the first column contains the frame time, the second contains the number of positions, followed by the atom/residue/molecule numbers. If more than one selection is specified, the size of the second group immediately follows the last number of the first group and so on. With -dump, the frame time and the number of positions is omitted from the output. In this case, only one selection can be given.

With -on, the selected atoms are written as a index file compatible with make_ndx and the analyzing tools. Each selection is written as a selection group and for dynamic selections a group is written for each frame.

For residue numbers, the output of -oi can be controlled with -resnr: number (default) prints the residue numbers as they appear in the input file, while index prints unique numbers assigned to the residues in the order they appear in the input file, starting with 1. The former is more intuitive, but if the input contains multiple residues with the same number, the output can be less useful.

With -om, a mask is printed for the first selection as a function of time. Each line in the output corresponds to one frame, and contains either 0/1 for each atom/residue/molecule possibly selected. 1 stands for the atom/residue/molecule being selected for the current frame, 0 for not selected. With -dump, the frame time is omitted from the output.


-f traj.xtc Input, Opt.
 Trajectory: xtc trr trj gro g96 pdb cpt 

-s topol.tpr Input, Opt.
 Structure+mass(db): tpr tpb tpa gro g96 pdb 

-sf selection.dat Input, Opt.
 Generic data file 

-n index.ndx Input, Opt.
 Index file 

-os size.xvg Output, Opt.
 xvgr/xmgr file 

-oc cfrac.xvg Output, Opt.
 xvgr/xmgr file 

-oi index.dat Output, Opt.
 Generic data file 

-om mask.dat Output, Opt.
 Generic data file 

-on index.ndx Output, Opt.
 Index file 


 Print help info and quit

 Print version info and quit

-nice int 19
 Set the nicelevel

-b time 0
 First frame (ps) to read from trajectory

-e time 0
 Last frame (ps) to read from trajectory

-dt time 0
 Only use frame when t MOD dt = first time (ps)

-xvg enum xmgrace
 xvg plot formatting:  xmgrace xmgr or  none

 Make molecules whole for each frame

 Use periodic boundary conditions for distance calculation

-select string
 Selection string (use 'help' for help)

-selrpos enum atom
 Selection reference position:  atom res_com res_cog mol_com mol_cog whole_res_com whole_res_cog whole_mol_com whole_mol_cog part_res_com part_res_cog part_mol_com part_mol_cog dyn_res_com dyn_res_cog dyn_mol_com or  dyn_mol_cog

-seltype enum atom
 Default analysis positions:  atom res_com res_cog mol_com mol_cog whole_res_com whole_res_cog whole_mol_com whole_mol_cog part_res_com part_res_cog part_mol_com part_mol_cog dyn_res_com dyn_res_cog dyn_mol_com or  dyn_mol_cog

 Do not print the frame time (-om, -oi) or the index size (-oi)

 Normalize by total number of positions with -os

 Normalize by covered fraction with -os

-resnr enum number
 Residue number output type:  number or  index