Skip to content

Commit

Permalink
Removed unnecessary property decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
timbernat committed May 1, 2024
1 parent 0edb243 commit e84bcd5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions polymerist/maths/lattices/coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def validate_point(self, point : np.ndarray[Shape[N], Num]) -> None:
if not self._point_is_compat(point):
raise ValueError(f'Incompatible point {point}')

@property
def dists_to_point(self, point : np.ndarray[Shape[N], Num], norm_order : Optional[int]=None) -> np.ndarray[Shape[M], Num]:
'''The distance between each point in a coordinate array and a single arbitrary point'''
assert(self._point_is_compat(point))
Expand All @@ -94,11 +93,10 @@ def centroid(self) -> np.ndarray[Shape[N], Num]:
return self.weighted_centroid() # weighed centroid with default unit weights
center_of_mass = COM = centroid

@property
def dists_to_centroid(self, norm_order : Optional[int]=None, weights : Optional[np.ndarray[Shape[M], Num]]=None) -> np.ndarray[Shape[M], Num]:
'''The distance of each coordinate in an array of coordinates to the coordinates' centroid'''
return self.dists_to_point(point=self.weighted_centroid(weights=weights), norm_order=norm_order)
effective_radii = eff_rad = dists_to_centroid
radii = rad = dists_to_centroid

# POINT ORDERINGS
@property
Expand Down

0 comments on commit e84bcd5

Please sign in to comment.