OpenBioSim / sire

Sire Molecular Simulations Framework
https://sire.openbiosim.org
GNU General Public License v3.0
41 stars 11 forks source link

Fix issue #189 #190

Closed lohedges closed 6 months ago

lohedges commented 6 months ago

This PR closes #189 by adding the missing TriclinicBox::maximumCutoff method. This uses the approach from OpenMM, i.e. we use the theoretical maximum of half the norm of the smallest vector when the box isn't in reduced form, but limit it to the minimum diagonal element of the box vector matrix for efficiency when it is in reduced form. (See the discussion here and the linked PR here.)

Suggested reviewers:

@chryswoods

lohedges commented 6 months ago

Just to clarify, I decided to use the approach from OpenMM since it means that a reduced box generated by sire or BioSimSpace will set the correct cutoff when used to create an OpenMM context, which is probably our most typical use case. It should also be fine for other engines too. (It is just on the conservative side.)