if isinstance(nma, exANM):
attr_dict["type"] = "exANM"
attr_dict["_membrane"] = np.array([nma._membrane, None])
attr_dict["_combined"] = np.array([nma._combined, None])
suffix = "." + attr_dict["type"].lower()
if not filename.lower().endswith(".npz"):
if not filename.lower().endswith(suffix):
After Change
//if len(nma) == 0:
// raise ValueError("nma instance does not contain data")
add_attr = kwargs.pop("attr", [])
dict_ = nma.__dict__
attr_list = ["_title", "_trace", "_array", "_eigvals", "_vars", "_n_atoms",
"_dof", "_n_modes"]
if add_attr:
for attr in add_attr:
if attr not in attr_list:
attr_list.append(attr)
if filename is None:
filename = nma.getTitle().replace(" ", "_")
if isinstance(nma, GNMBase):
attr_list.append("_cutoff")