Skip to content

Commit 94854a7

Browse files
author
Yuanqi Du
committed
minor
1 parent 1325b4a commit 94854a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tps_baseline.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,21 +342,25 @@ def step_langevin_backward(_x, _v, _key):
342342
], alpha=0.7)
343343
plt.savefig(f'{savedir}/paths.png', bbox_inches='tight')
344344
plt.show()
345+
plt.clf()
345346

346347
plot_path_energy(paths, jax.vmap(U))
347348
plt.ylabel('Maximum energy')
348349
plt.savefig(f'{savedir}/max_energy.png', bbox_inches='tight')
349350
plt.show()
351+
plt.clf()
350352

351353
plot_path_energy(paths, jax.vmap(U), reduce=jnp.median)
352354
plt.ylabel('Median energy')
353355
plt.savefig(f'{savedir}/median_energy.png', bbox_inches='tight')
354356
plt.show()
357+
plt.clf()
355358

356359
plot_path_energy(list(zip(paths, velocities)), langevin_log_path_density, reduce=lambda x: x, already_ln=True)
357360
plt.ylabel('Path Density')
358361
plt.savefig(f'{savedir}/path_density.png', bbox_inches='tight')
359362
plt.show()
363+
plt.clf()
360364

361365
for i, path in tqdm(enumerate(paths)):
362366
save_trajectory(mdtraj_topology, jnp.array([kabsch_align(p.reshape(-1, 3), B.reshape(-1, 3))[0] for p in path]),

0 commit comments

Comments
 (0)