Accessing the results
- class gorder.results.AnalysisResults
Container for all results of an analysis.
Provides access to overall results, per-molecule results, average order parameters, average order maps, and optionally collected leaflet classification data.
- average_order()
Get average order parameters across all bond types of all molecules.
- Returns:
Collection of average order parameters.
- Return type:
- average_ordermaps()
Get average order parameter maps across all bond types of all molecules.
- Returns:
Collection of average order maps.
- Return type:
- get_molecule(name)
Get results for a molecule type with the specified name.
- Parameters:
name (str) – Name of the molecule type.
- Returns:
Results for the specified molecule type.
- Return type:
- Raises:
APIError – If no molecule type with the given name exists.
- leaflets_data()
Get collected leaflet classification data.
- Returns:
Leaflet classification data if stored; otherwise None.
- Return type:
Notes
Leaflet classification data are not stored by default. To store them, you must explicitly request collection during analysis.
- molecules()
Get results for all individual molecule types.
- Returns:
A list of results for each molecule type.
- Return type:
List[MoleculeResults]
- n_analyzed_frames()
Get the total number of analyzed frames.
- Returns:
Number of frames processed in the analysis.
- Return type:
int
- normals_data()
Get collected membrane normals.
- Returns:
Membrane normals data if stored; otherwise None.
- Return type:
NormalsData
Notes
Membrane normals are not stored by default. To store them, you must explicitly request collection during analysis. Collecting membrane normals is only supported when they are dynamically calculated.
- write()
Write the results into output files.
- Raises:
WriteError – If writing fails due to file system or internal errors.
- class gorder.results.AtomResults
Results of the analysis for a single atom type.
Provides access to per-atom type order parameters, order maps, and the bond results associated with this atom type.
- atom()
Get the type of the atom for which these results were calculated.
- Returns:
The atom type for which these results were calculated.
- Return type:
AtomType
- bonds()
Get the results for each bond type of this atom type.
- Returns:
Results for all bond types involving this atom type.
- Return type:
List[BondResults]
- get_bond(relative_index)
Get the results for a bond types between this atom type and a hydrogen type (AA) or virtual hydrogen type (UA).
- Parameters:
relative_index (int) – Relative index (zero-based) of the bonded hydrogen atom type.
- Returns:
Results for the specified bond type.
- Return type:
- Raises:
APIError – If the specified (virtual) hydrogen type does not exist.
- molecule()
Get the name of the molecule type for this atom type.
- Returns:
Name of the molecule containing this atom type.
- Return type:
str
- order()
Get order parameters calculated for this atom type.
- Returns:
Collection of order parameters for this atom type.
- Return type:
- ordermaps()
Get order maps calculated for this atom type.
- Returns:
Collection of order maps for this atom type.
- Return type:
- class gorder.results.BondResults
Results of the analysis for a single bond type.
Provides access to the molecule name, the atom types involved (if available), and the order parameters and order maps for this bond type.
- atoms()
Get the atom types involved in this bond type.
- Returns:
The two atom types forming this bond type.
- Return type:
Tuple[AtomType, AtomType]
- Raises:
APIError – If the bond type is a virtual united-atom bond type (UA), where only one real atom type exists.
- molecule()
Get the name of the molecule type for this bond type.
- Returns:
Name of the molecule containing this bond type.
- Return type:
str
- order()
Get order parameters calculated for this bond type.
- Returns:
Collection of order parameters for this bond type.
- Return type:
- ordermaps()
Get order maps calculated for this bond type.
- Returns:
Collection of order maps for this bond type.
- Return type:
- class gorder.results.Convergence
Stores information about the convergence of order parameter calculations for a single molecule.
Provides cumulative averages over time for the full membrane and for individual leaflets.
- frames()
Get the indices of trajectory frames for which order parameters were calculated.
The first analyzed frame is assigned an index of 1. For example, if the analysis starts at 200 ns, the frame at or just after 200 ns is indexed as 1.
- Returns:
Indices of the analyzed frames.
- Return type:
List[int]
- lower()
Get cumulative average order parameters for the lower leaflet.
- Returns:
Cumulative averages for the lower leaflet, or None if not available.
- Return type:
List[float]
- total()
Get cumulative average order parameters for the entire membrane.
Each element represents the cumulative average up to that frame.
- Returns:
Cumulative averages for the full membrane, or None if not available.
- Return type:
List[float]
- upper()
Get cumulative average order parameters for the upper leaflet.
- Returns:
Cumulative averages for the upper leaflet, or None if not available.
- Return type:
List[float]
- class gorder.results.LeafletsData
Stores collected leaflet classification data.
- frames()
Get the indices of trajectory frames for which leaflet classification was performed.
The first analyzed frame is assigned an index of 1. For example, if the analysis starts at 200 ns, the frame at or just after 200 ns is indexed as 1.
- Returns:
Indices of the frames for which leaflet classification was performed.
- Return type:
List[int]
- get_molecule(molecule)
Get leaflet classification data for the specified molecule type.
- Parameters:
molecule (str) – Name of the molecule type to query.
- Returns:
A 2D array where rows correspond to analyzed trajectory frames and columns to individual molecules. Values are 1 for molecules in the upper leaflet and 0 for molecules in the lower leaflet. Returns None if no leaflet classification data exists for the specified molecule type.
- Return type:
numpy.ndarray of shape (n_frames, n_molecules), dtype=uint8
Notes
This is a potentially expensive operation, as it involves copying and converting from the internal Rust representation into a NumPy array.
- class gorder.results.Map
Map of order parameters.
- extract()
Extract the order map into NumPy arrays.
- Returns:
A tuple of NumPy arrays: - The first array (1D) contains positions of the grid tiles along the first dimension of the map (typically x). - The second array (1D) contains positions of the grid tiles along the second dimension of the map (typically y). - The third array (2D) contains the calculated order parameters.
- Return type:
Tuple[np.ndarray[float32], np.ndarray[float32], np.ndarray[float32]]
- get_at(x, y)
Get the order parameter at the specified coordinates.
- Parameters:
x (float) – Coordinate along the first dimension of the map.
y (float) – Coordinate along the second dimension of the map.
- Returns:
Order parameter at the given coordinates, or None if out of bounds.
- Return type:
float
- span_x()
Get the span of the map along the first dimension of the map.
- Returns:
Minimum and maximum coordinates along the first dimension of the map.
- Return type:
Tuple[float, float]
- span_y()
Get the span of the map along the second dimension of the map.
- Returns:
Minimum and maximum coordinates along the second dimension of the map.
- Return type:
Tuple[float, float]
- tile_dim()
Get the dimensions of a single grid tile in the map.
- Returns:
Width and height of a single tile of the map.
- Return type:
Tuple[float, float]
- class gorder.results.MoleculeResults
Results of the analysis for a single molecule type.
Provides access to average order parameters, average order maps, and per-atom or per-bond results, as well as convergence data when available.
- atoms()
Get results for each heavy atom type of the molecule.
- Returns:
Per-atom type results.
- Return type:
List[AtomResults]
- Raises:
APIError – If results are obtained for a coarse-grained system (atom-level results unavailable).
- average_order()
Get average order parameters for this molecule type.
- Returns:
Collection of average order parameters across all bond types.
- Return type:
- average_ordermaps()
Get average order parameter maps for this molecule type.
- Returns:
Collection of average order maps across all bond types.
- Return type:
- bonds()
Get results for each bond type of the molecule.
- Returns:
Per-bond type results.
- Return type:
List[BondResults]
- convergence()
Get convergence data for the molecule.
- Returns:
Convergence data if available; otherwise None.
- Return type:
- get_atom(relative_index)
Get results for a heavy atom type with the specified relative index.
- Parameters:
relative_index (int) – Relative index (zero-based) of the atom type within the molecule type.
- Returns:
Results for the specified atom type.
- Return type:
- Raises:
APIError – If the atom type does not exist or results are obtained for a coarse-grained system.
- get_bond(relative_index_1, relative_index_2)
Get results for a bond type involving atom types with the specified relative indices.
- Parameters:
relative_index_1 (int)
relative_index_2 (int) – Relative indices (zero-based) of the bonded atom types.
- Returns:
Results for the specified bond type.
- Return type:
- Raises:
APIError – If the bond type does not exist or the results are obtained for a united-atom system.
- molecule()
Get the name of the molecule type.
- Returns:
Name of the molecule type.
- Return type:
str
- class gorder.results.Order
Single order parameter value, optionally with its estimated error.
- error()
Get the estimated error for this order parameter.
- Returns:
Estimated error of the order parameter, or None if not available.
- Return type:
float
- value()
Get the value of the order parameter (mean from the analyzed frames).
- Returns:
Mean value of the order parameter.
- Return type:
float
- class gorder.results.OrderCollection
Order parameters for a single object (atom type, bond type, molecule type, system) calculated for the full membrane, the upper leaflet, and the lower leaflet.
- lower()
Get the order parameter calculated from the lower leaflet.
- Returns:
Order parameter for the lower leaflet. Returns None if not available.
- Return type:
- total()
Get the order parameter calculated from the whole membrane.
- Returns:
Order parameter for the whole membrane. Returns None if not available.
- Return type:
- class gorder.results.OrderMapsCollection
Order maps for a single object (atom type, bond type, molecule type, system) calculated for the full membrane, the upper leaflet, and the lower leaflet.
- lower()
Get the order map calculated from the lower leaflet.
- Returns:
Order map for the lower leaflet, or None if not available.
- Return type:
- total()
Get the order map calculated from the whole membrane.
- Returns:
Order map for the whole membrane, or None if not available.
- Return type: