|
|
g selectTable of contentsThe g_select program is similar to make_ndx in that it is used to create index groups. In contrast to make_ndx, however, g_select is capable of using much more advanced syntax and can create dynamic indices. While make_ndx produces a group of fixed size that is applied to whatever coordinate file or trajectory file the user may have, dynamic indices can vary in size over various frames. Their utility in GROMACS programs is currently very limited, though this is an aspect of current development. Understanding the InputAll of the input files that g_select accepts are listed as optional, the reason being that the invocation of the program and correct options depends upon what the user intends to do. For processing a single coordinate file, nothing more than the Understanding the OutputPlease refer to g_select -h for a discussion on available output files. This information will not be recapitulated here. Selection SyntaxTo view the instructions for creating selections and to access several examples, issue the following command: g_select -select 'help all' The documentation provides a large amount of information. Of the examples provided, there are several points that will be discussed here. First, it should be stated that selections provided to the "Close to protein" resname LIG and within 0.5 of group "Protein" To use this selection on the command line, enclose the entire string in single quotes, i.e.: '"Close to protein" resname LIG and within 0.5 of group "Protein"' Now what does this selection do? The first part ("Close to protein") sets a name that will be written to the output index file (if specified). The remainder of the string specifies how the selection is made. Atoms in a residue named LIG ("resname LIG") that are within 0.5 nm of a group called "Protein" are then written to the index group. The use of the "group" keyword implies that the name that follows is present in an index file supplied with "Close to Asp" resname SOL and within 0.5 of resname ASP The use of "resname ASP" does not require an index group, as g_select will simply parse through the input coordinate file(s) and look for residues named ASP. Using selection.datIn some cases, selections are more complex and cannot be written in a single statement. In these cases, providing a text file to the waterO = group "SOL" and name OW; between = waterO and within 0.5 of group "Protein_A" and within 0.5 of group "Protein_B"; between; The first line assigns all OW atoms in water ("SOL") to a new selection called "waterO" that can be used later. On the second line, a new selection using the "waterO" group (called "between") is created by assigning it all the waterO atoms that fall within 0.5 nm of Protein_A and also Protein_B. The last line returns the selection so that g_select knows which group we want written to our output, much like a function returns a value in the source code of a program. |