IRL2 / nanover-server-py

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

Simulation in `ase_basic_example.ipynb` is running very slowly #273

Closed hjstroud closed 3 weeks ago

hjstroud commented 1 month ago

When connecting a VR client to the copper matrix simulation in the ASE basic example, the simulation appears to be running with a very low frame rate. Not sure if this is a result of the new runner, I remember this being an issue a couple of months ago, maybe for a different system: @Ragzouken do you know what's going on here?

Ragzouken commented 4 weeks ago

Will have to look into it, but there was an issue before that ASE was guessing the bonds every frame instead of just for the first frame--if it's that it should be an easy fix.

Ragzouken commented 3 weeks ago

Don't think it's that. Advance to next report takes 160ms apparently, which seems a lot..

Ragzouken commented 3 weeks ago

Actually, it seems all time is spent running 5 frames of ASE dynamics, so I think ASE is just that slow, at least for that system. We could reduce the frame interval to make it smoother (but advance less simulation time per real world second)

hjstroud commented 3 weeks ago

I see. It may be that the specific calculator used in the example takes a long time to calculate each step, but if we have a lot of examples that use the OMM calculator (which seems fast enough), perhaps the best course of action would be to explicitly set the frame rate in the notebook itself for the specific example and add a comment to explain what's happening, but leave the default settings on the server as 5 simulation steps per frame. I will do this and check whether this fixes the behaviour.