Performing the analysis
- class gorder.Analysis(structure, trajectory, analysis_type, bonds=None, index=None, output_yaml=None, output_tab=None, output_xvg=None, output_csv=None, membrane_normal=None, begin=None, end=None, step=None, min_samples=None, n_threads=None, leaflets=None, ordermap=None, estimate_error=None, geometry=None, handle_pbc=None, silent=None, overwrite=None)
Class describing all the parameters of the analysis.
- Parameters:
structure (str) – Path to a TPR (recommended), PDB, GRO, or PQR file containing the structure and topology of the system.
trajectory (Union[str, Sequence[str]]) – Path to an XTC (recommended), TRR, or GRO trajectory file to be analyzed. You can provide multiple XTC or TRR trajectories and these will be seamlessly concatenated.
analysis_type (Union[AAOrder, CGOrder, UAOrder]) – Type of analysis to perform (e.g., AAOrder or CGOrder).
bonds (Optional[str], default=None) – Path to a file containing bonding information. If specified, this overrides bonds from the structure file.
index (Optional[str], default=None) – Path to an NDX file specifying groups in the system.
output_yaml (Optional[str], default=None) – Path to an output YAML file containing the full analysis results.
output_tab (Optional[str], default=None) – Path to an output TABLE file with human-readable results.
output_xvg (Optional[str], default=None) – Filename pattern for output XVG files storing results. Each molecule type gets a separate file.
output_csv (Optional[str], default=None) – Path to an output CSV file containing analysis results.
membrane_normal (Optional[Union[str, Mapping[str, ndarray[float32]], DynamicNormal]], default=None) – Direction of the membrane normal. Allowed values are x, y, z, path to file, dictionary specifying manual membrane normals or an instance of DynamicNormal. Defaults to the z-axis if not specified.
begin (Optional[float], default=None) – Starting time of the trajectory analysis in picoseconds (ps). Defaults to the beginning of the trajectory.
end (Optional[float], default=None) – Ending time of the trajectory analysis in picoseconds (ps). Defaults to the end of the trajectory.
step (Optional[int], default=None) – Step size for analysis. Every Nth frame will be analyzed. Defaults to 1.
min_samples (Optional[int], default=None) – Minimum number of samples required for each heavy atom or bond type to compute its order parameter. Defaults to 1.
n_threads (Optional[int], default=None) – Number of threads to use for analysis. Defaults to 1.
leaflets (Optional[Union[GlobalClassification, LocalClassification, IndividualClassification, ClusteringClassification, ManualClassification, NdxClassification]], default=None) – Defines how lipids are assigned to membrane leaflets. If provided, order parameters are calculated per leaflet.
ordermap (Optional[OrderMap], default=None) – Specifies parameters for ordermap calculations. If not provided, ordermaps are not generated.
estimate_error (Optional[EstimateError], default=None) – Enables error estimation for each bond if specified.
geometry (Optional[Union[Cuboid, Cylinder, Sphere]], default=None) – Defines a specific region in the simulation box for order parameter calculations. Defaults to the entire system.
handle_pbc (Optional[bool], default=True) – If False, ignores periodic boundary conditions (PBC). Defaults to True.
silent (Optional[bool], default=False) – If True, suppresses standard output messages during analysis.
overwrite (Optional[bool], default=False) – If True, overwrites existing output files and directories without backups.
- static from_file(file)
Read analysis options from a YAML configuration file.
- Parameters:
file (str) – Path to the YAML configuration file.
- Returns:
Analysis instance initialized from the file.
- Return type:
- Raises:
ConfigError – If the file cannot be read or parsed.
- run()
Run the analysis.
Executes the configured analysis on the input data and returns the results.
- Returns:
Results of the analysis.
- Return type:
- Raises:
AnalysisError – If the analysis fails.