stable_sites now stored as a Nx3 numpy array
The stable_sites attribute for ProbabilityDensityAnalysis objects
was previously stored as a list of lists and numpy arrays.
This commit changes this to store this data as a 3xN numpy array.
@@ -170,6 +170,9 @@ class ProbabilityDensityAnalysis(object):
considered as a low-energy site.
d_cutoff (float): Distance cutoff used in hierachical clustering.
+ Notes:
+ The set of stable sites is stored in the `stable_sites` attribute
+ as a Nx3 numpy array.
"""
# Set of grid points with high probability density.
@@ -219,10 +222,9 @@ class ProbabilityDensityAnalysis(object):
members = np.where(members < -0.5, members + 1.0, members)
members += grid_fcoords[indices[0]]
- stable_sites.append(np.mean(members, axis=0).tolist())
-
- self.stable_sites = stable_sites
+ stable_sites.append(np.mean(members, axis=0))
+ self.stable_sites = np.array(stable_sites)
def get_full_structure(self):
"""
