openmmforcefields icon indicating copy to clipboard operation
openmmforcefields copied to clipboard

File locking for molecule cache to prevent corruption

Open rosemary-mantell-cresset opened this issue 3 years ago • 1 comments

At the moment, SmallMoleculeTemplateGenerator does not implement any file locking for the small molecule cache database. This means that the cache file can become corrupted if several processes try to access it at once. It would be good if this could be fixed in a way that also works with NFS. We have had some success in fixing the issue in our own copy of the code with the NFS-safe file locking library flufl.lock (https://pypi.org/project/flufl.lock/).