Feature Selector ResName Parse Helper
GitHub Link to Code.
Resname parser helper for feature selection.
This module provides parsing functionality for resname (res) category selections, which are based on amino acid names with optional sequence ID combinations.
- class mdxplain.feature_selection.helper.feature_selector_resname_parse_helper.FeatureSelectorResnameParseHelper
Helper class for res category - amino acid name based operations.
Provides static methods to parse ‘res’ category selections like “ALA”, “ALA13” to identify matching feature indices based on trajectory metadata.
- static parse_res_category(param_tokens: List[str], features_list: List[list]) Tuple[List[int], Set[int]]
Parse ‘res’ category and return matching feature indices plus matched residue indices. Uses amino acid names from metadata (residue.aaa_code, residue.a_code).
Supports both:
“ALA” → all alanines (any seqid)
“ALA13” → specific alanine at seqid 13
Parameters
- param_tokensList[str]
List of parameter tokens for residue selection
- features_listList[list]
List of features from metadata
Returns
- Tuple[List[int], Set[int]]
Tuple of (feature_indices, matched_residue_indices)
Raises
- ValueError
If the residue specification is invalid