def simulate_dynamic(self, n_step, dt, pos, mom, cache={}):
mom = mom - 0.5 * dt * self.energy_grad(pos, cache)
pos = pos + dt * la.cho_solve((self.mass_matrix_chol, True), mom)
for s in range(1, n_step):
mom -= dt * self.energy_grad(pos, cache)
pos += dt * la.cho_solve((self.mass_matrix_chol, True), mom)
mom -= 0.5 * dt * self.energy_grad(pos, cache)
return pos, mom, None
unconstrained.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录