RMSF Per Residue Base Aggregation Facade
GitHub Link to Code.
Base facade for per-residue RMSF aggregation services.
- class mdxplain.analysis.structure.services.rmsf_per_residue_base_agg_facade.BaseRMSFPerResidueAggFacade
Abstract base facade for per-residue RMSF aggregation services.
Provides common delegation methods for per-residue RMSF calculations that forward to the concrete service. Subclasses must implement the service property to provide their specific aggregation configuration.
Returns
- BaseRMSFPerResidueAggFacade
Abstract base facade exposing delegation methods.
Examples
>>> # Subclasses provide concrete service >>> facade = RMSFPerResidueMeanAggFacade(pipeline_data, "mean") >>> result = facade.to_mean_reference() {...}
- abstract property service: RMSFPerResidueService
Return the configured per-residue RMSF service.
Subclasses must implement this property to provide a service instance with the appropriate metric and aggregator configuration.
Parameters
- None
The property accepts no parameters.
Returns
- RMSFPerResidueService
Service configured with specific metric and aggregator.
Examples
>>> facade = RMSFPerResidueMeanAggFacade(pipeline_data, "mean") >>> isinstance(facade.service, RMSFPerResidueService) True
- to_mean_reference(traj_selection: int | str | List[int | str] | all = 'all', atom_selection: str = 'all', cross_trajectory: bool = False, reference_traj_selection: int | str | List[int | str] | all | None = None) Dict[str, ndarray]
Calculate per-residue RMSF values for the mean reference structure.
Delegates to the configured service’s to_mean_reference method while forwarding all trajectory/atom selections and reference configuration.
Parameters
- traj_selectionUnion[int, str, list[Union[int, str]], ‘all’], optional
Selection describing which trajectories to analyse. Defaults to
"all".- atom_selectionstr, optional
MDTraj atom selection string forwarded to the calculation. Defaults to
"all".- cross_trajectorybool, optional
Combine all selected trajectories into a single RMSF profile when
True. Defaults toFalse.- reference_traj_selectionUnion[int, str, list[Union[int, str]], ‘all’] | None, optional
Trajectories used to compute the mean reference structure. Uses
traj_selectionwhenNone. Defaults toNone.
Returns
- dict[str, np.ndarray]
Mapping of trajectory names – or
"combined"whencross_trajectoryisTrue– to per-residue RMSF arrays.
Examples
>>> facade = RMSFPerResidueMeanAggFacade(pipeline_data, "mean") >>> facade.to_mean_reference(traj_selection="all") {...}
- to_median_reference(traj_selection: int | str | List[int | str] | all = 'all', atom_selection: str = 'all', cross_trajectory: bool = False, reference_traj_selection: int | str | List[int | str] | all | None = None) Dict[str, ndarray]
Calculate per-residue RMSF values for the median reference structure.
Delegates to the configured service’s to_median_reference method while forwarding all trajectory/atom selections and reference configuration.
Parameters
- traj_selectionUnion[int, str, list[Union[int, str]], ‘all’], optional
Selection describing which trajectories to analyse. Defaults to
"all".- atom_selectionstr, optional
MDTraj atom selection string forwarded to the calculation. Defaults to
"all".- cross_trajectorybool, optional
Combine all selected trajectories into a single RMSF profile when
True. Defaults toFalse.- reference_traj_selectionUnion[int, str, list[Union[int, str]], ‘all’] | None, optional
Trajectories used to compute the median reference structure. Uses
traj_selectionwhenNone. Defaults toNone.
Returns
- dict[str, np.ndarray]
Mapping of trajectory names – or
"combined"whencross_trajectoryisTrue– to per-residue RMSF arrays.
Examples
>>> facade = RMSFPerResidueMeanAggFacade(pipeline_data, "mean") >>> facade.to_median_reference(traj_selection="all") {...}