|
请问一下各位老师,我看文献里有这样的描述: αij is the position of particle α relative to the center-ofmass position of the entire system
所以我在用MDAnalysis里提取原子的位置时候想这样处理
time = 0
anion_positions = np.zeros((len(times)+1, len(anions), 3))
cation_positions = np.zeros((len(times)+1, len(cations), 3))
for ts in run.trajectory[int(run_start/dt_collection):]:
anion_positions[time, :, :] = anions.positions - run.atoms.center_of_mass(wrap = True, compound = 'group')
cation_positions[time, :, :] = cations.positions - run.atoms.center_of_mass(wrap = True, compound = 'group')
time += 1
结果发现当我计算质心的时候如果选择unwrap = True 就会出现AtomGroup was not contiguous from bonds, process failed的错误,选择wrap = True就能编译通过,是不是说明我在处理轨迹的时候PBC没有处理好,导致我分子是碎裂了,所以只能通过wrap的方式 |
|