Fixed chill ice_cluster_traj() function
This commit is contained in:
parent
6b77ef78e1
commit
363e420cd8
@ -161,8 +161,8 @@ def ice_types(trajectory: Coordinates, segments: int = 10000) -> pd.DataFrame:
|
||||
def ice_clusters_traj(
|
||||
traj: Coordinates, segments: int = 10000, skip: float = 0.1
|
||||
) -> list:
|
||||
def ice_clusters(frame: CoordinateFrame, traj: Coordinates) -> Tuple[float, list]:
|
||||
selection = selector_ice(frame, traj, [0, 1, 2])
|
||||
def ice_clusters(frame: CoordinateFrame) -> Tuple[float, list]:
|
||||
selection = selector_ice(frame, [0, 1, 2])
|
||||
if len(selection) == 0:
|
||||
return frame.time, []
|
||||
else:
|
||||
@ -194,6 +194,6 @@ def ice_clusters_traj(
|
||||
np.int_(np.linspace(len(traj) * skip, len(traj) - 1, num=segments))
|
||||
)
|
||||
all_clusters = [
|
||||
ice_clusters(traj[frame_index], traj) for frame_index in frame_indices
|
||||
ice_clusters(traj[frame_index]) for frame_index in frame_indices
|
||||
]
|
||||
return all_clusters
|
||||
|
Loading…
Reference in New Issue
Block a user