IRL2 / nanover-server-py

https://irl2.github.io/nanover-docs/#
Other
0 stars 1 forks source link

Fix units of NanoVer quantities in ASE simulations and deliver system and user forces separately #300

Closed hjstroud closed 1 week ago

hjstroud commented 1 week ago

This PR corrects the units of the velocities and forces that were not being converted from ASE units to NanoVer units when being added to the FrameData for ASESimulations. In addition, this PR separates the user forces (resulting from iMD interactions) and system forces (resulting from interactions between the particles in the system) and delivers these separately in the frame, under the keys particle_forces_system and user_forces, respectively.

I have tested the changes made in this PR locally using a single Argon atom system, and comparing the results with those of an equivalent iMD simulation using the OpenMMSimulation class, which we know delivers the results correctly. I have also added tests that check that the unit conversions for velocities and forces give the correct results when delivered in the frame data, and added a test that checks that the system forces on a single atom system are zero when an iMD force is applied, analogous to my local tests.

image