Module/Workflow/Library affected
rigidbody module, separate.cns script
Expected behavior
When mol_fix_origin_1 = true the mol_fix_origin_$maxid used in separate.cns should have a valid value between 1 and the number of molecules defined.
Actual behavior
Currently, maxid is initialised to 0 and it can happen in the next code snippet from separate.cns that maxid remains to 0 and this will cause the last line of the code in the snippet to fail because mol_fix_origin_0 is not defined (it starts at 1).
while ($sum_random > 0) loop placemol
evaluate ($maximum = 0)
evaluate ($maxid = 0)
evaluate ($ncount = 0)
! Select molecule with largest random number
while ($ncount < $data.ncomponents) loop selectmol
evaluate ($ncount = $ncount + 1)
if ($random_$ncount > $maximum) then
evaluate ($maximum = $random_$ncount)
evaluate ($maxid = $ncount)
end if
end loop selectmol
if ($mol_fix_origin_$maxid eq false) then
Steps to reproduce the behavior
Difficult to reproduce as it has a random aspect. The problem was observed by a user:
https://ask.bioexcel.eu/t/rigid-body-step-fails-with-100-output-not-generated-tolerance-5/5889/5
Will ask for
Suggestions on how to fix it
Initialise maxid to 1 (third line of the code snippet above)
Version
From user info: HADDOCK3 Version: v2025.9.0
Module/Workflow/Library affected
rigidbody module, separate.cns script
Expected behavior
When
mol_fix_origin_1 = truethe mol_fix_origin_$maxid used in separate.cns should have a valid value between 1 and the number of molecules defined.Actual behavior
Currently, maxid is initialised to 0 and it can happen in the next code snippet from
separate.cnsthat maxid remains to 0 and this will cause the last line of the code in the snippet to fail becausemol_fix_origin_0is not defined (it starts at 1).Steps to reproduce the behavior
Difficult to reproduce as it has a random aspect. The problem was observed by a user:
https://ask.bioexcel.eu/t/rigid-body-step-fails-with-100-output-not-generated-tolerance-5/5889/5
Will ask for
Suggestions on how to fix it
Initialise maxid to 1 (third line of the code snippet above)
Version
From user info: HADDOCK3 Version: v2025.9.0