GLYLIB
0.3.0b
|
Go to the source code of this file.
Functions | |
assembly | get_moiety_selection_assembly (ensemble *E, int nMS, moiety_selection *MS) |
Returns an assembly pointing to the selections indicated by the entries in a set of moiety_selections.
If two different moiety_selections overlap (select some of the same items), the assembly will not contain redundant entries. For example, if residue A is selected twice in one moiety selection or if it is selected in more than one moiety, the assembly returned will contain one pointer to residue A. If choosing by name, and multiple residues are named "A", there will only be one pointer to each residue of that name no matter how many times "A" is specified as a selection.
Note that a negative moiety_selection does not unselect -- it merely specifies a selection by saying "select all except". Use the function (not written yet) called remove_moiety_selection_from_assembly to unselect items.
The assembly will consist only of pointers to any members any classes represented in the moiety selection. For example, if a moiety selection contains residues A, B and C, there will be pointers to A, B and C, but not to any of the atoms contained within those residues. However, if the moiety selections also contain explicit mention of atoms from any of those residues, the assembly will also contain pointers to those atoms explicitly mentioned. It is up to some other function to prune or clean up or expand, etc.
NOTES:
Definition in file get_moiety_selection_assembly.c.
assembly get_moiety_selection_assembly | ( | ensemble * | E, |
int | nMS, | ||
moiety_selection * | MS | ||
) |
< counters
< Flag used for setting negative selections
< Number of molecule pointers needed for assembly
< Number of residue pointers needed for assembly
< Number of atom pointers needed for assembly
< the assembly to return
< the indices for holding selections
Walk through each m, r, a of the ensemble. Look for matches.
If there is a match, change the corresponding index in IA to equal one. Don't check to see whether it is already one -- that doesn't matter.
For each positive moiety_selection passed to the function
For each negative moiety_selection passed to the function
Definition at line 51 of file get_moiety_selection_assembly.c.
References residue::a, assembly::a, residue_tree_index::ai, moiety_selection::ai, ensemble_tree_index::m, assembly::m, ensemble::m, ensemble_tree_index::mi, moiety_selection::mi, mywhine(), residue_tree_index::na, residue::na, assembly::na, moiety_selection::nai, moiety_selection::naN, moiety_selection::nan, ensemble_tree_index::nm, assembly::nm, ensemble::nm, moiety_selection::nmi, moiety_selection::nmN, moiety_selection::nmn, molecule_tree_index::nr, molecule::nr, assembly::nr, moiety_selection::nri, moiety_selection::nrn, moiety_selection::nrN, molecule_tree_index::r, molecule::r, assembly::r, molecule_tree_index::ri, and moiety_selection::ri.