The modifications to constraints_shake_vv mainly concern loops over k in . In the original there are a number of loops over all the possible constraints, and in each of these loops tests are performed to determine whether a pair of atoms is affected by this loop. Instead in the optimised version in the first loop a list is created of the atoms which are affected, and subsequent loops are only over this, shorter, list. In more detail (see the algorithm below) the new list, , is of i, j and k for which , and so avoiding all these condiotns in later loops. has been stored because some external function calls or arrays use which, in those calls, corresponds to the old k. The k-loops became loops over over k in for which , and the condition is tested.

Results obtained for the no frozen atoms version of constraints_shake_vv show a speed up when compared to the generic version. This version is obtained from the previous optimised version when taking off all the If conditions over lfrzn. This version is not presented as the main changes are presented on the pseudo algorithm [[*]].

All those modifications are shown below in the algorithms [[*]] and [[*]].

Valène Pellissier 2011-08-24