smog-server / OpenSMOG

OpenSMOG is a Python library for performing molecular dynamics simulations using Structure-Based Models. OpenSMOG uses OpenMM.
MIT License
11 stars 6 forks source link

buffer trajectories #44

Open Whitford opened 2 years ago

Whitford commented 2 years ago

I know most programs will buffer the writing of trajectories, so that writing is less frequent. Is this something OpenMM does automatically? Or, will we need to implement something? I noticed a huge slowdown when i write too much, though I may have just put in silly settings...

Whitford commented 2 years ago

I just checked the performance for the ribosome when writing the trajectory every 1000, or 10000 steps.... There is a dramatic slowdown... It appears the performance is about 50% when writing more frequently. There is another factors of 4 slowdown when writing every 100 steps.

rib.AA/rib.AA.10000.timing 2.42156e+07 rib.AA/rib.AA.1000.timing 1.65812e+07 rib.AA/rib.AA.100.timing 4.13759e+06

We need to figure out how to make this faster. Perhaps there is a buffer strategy. It is also possible that this has been a problem in gromacs, we just never noticed it. However, the performance is so fast with opensmog, that perhaps isn't wasn't a big issue before.

Whitford commented 1 year ago

@junioreif and @contessoto Would either of you like to post this question to the OpenMM lists? Perhaps the OpenMM developers know a way to do this without much work, or perhaps it is just something that is out of reach. Perhaps showing them a x10 slowdown would convince them that this would be a good option, if it is not already available.