There was an error while loading. Please reload this page.
2 parents 76f7289 + 465d6b1 commit a29f5c0Copy full SHA for a29f5c0
pylammpsmpi/wrapper/ase.py
@@ -342,6 +342,15 @@ def interactive_stress_getter(self, enable_stress_computation=True):
342
ss = np.einsum("nij,kj->nik", ss, self._prism.R)
343
return ss
344
345
+ def interactive_velocities_getter(self):
346
+ velocity = np.reshape(
347
+ np.array(self._interactive_library.gather_atoms("v", 1, 3)),
348
+ (len(self._structure), 3),
349
+ )
350
+ if _check_ortho_prism(prism=self._prism):
351
+ velocity = np.matmul(velocity, self._prism.R.T)
352
+ return velocity
353
+
354
def close(self):
355
if self._interactive_library is not None:
356
self._interactive_library.close()
0 commit comments