def frame_profile(frame_idx, serial_data_path, pickle_path,
mol_types, coords, sys_type, assoc_sel_idxs, assoc_type, inx_type):
inxs, system, assoc = profile_coords(mol_types, coords, sys_type, assoc_sel_idxs, assoc_type, inx_type)
# data output
inx_type.pdb_serial_output(inxs[inx_type], serial_data_path, delim=" ")
# persistent storage
with open(pickle_path, 'wb') as f:
pickle.dump(inxs, f)
print("--------------------------------------------------------------------------------")
print("frame", frame_idx)
print("----------------------------------------")
print("size of inxs {}".format(sys.getsizeof(inxs)))
print("size of system {}".format(sys.getsizeof(system)))
print("size of assoc {}".format(sys.getsizeof(assoc)))
if len(inxs[inx_type]) > 0:
print(len(inxs[inx_type]), "intermolecular hydrogen bonds")
for inx in inxs[inx_type]:
inx.pp()
else:
print(0, "intermolecular hydrogen bonds")
评论列表
文章目录