Skip to content

Broken dummy atoms logic in SOMD #408

@jmichel80

Description

@jmichel80

The move to 2023 seems to have broken SOMD. The example below attempts to carry out an RBFE calculation on a protein-ligand system.

I am using feature_pmefep_2023 ; Sire version: 2023.0.0 (28ff974/GitHub/2022-08-25T07:52:15+01:00)

To reproduce the runtime error extract the attached inputs, with that Sire version in your environement

debug.zip

unzip debug.zip 
cd debug/output/lambda-0.00
bash RUNME

Generates on my test computer


(...)
### Running Single Topology Molecular Dynamics Free Energy (v0.2) on node01 ###
###================Setting up calculation=====================###
New run. Loading input and creating restart
lambda is 0.0
Create the System...
Selecting dummy groups
Traceback (most recent call last):
  File "/export/users/julien/miniforge3/envs/sire-dev/share/Sire/scripts/somd-freenrg.py", line 161, in <module>
    OpenMMMD.runFreeNrg(params)
  File "/export/users/julien/miniforge3/envs/sire-dev/lib/python3.9/site-packages/sire/legacy/Tools/__init__.py", line 175, in inner
    retval = func()
  File "/export/users/julien/miniforge3/envs/sire-dev/lib/python3.9/site-packages/sire/legacy/Tools/OpenMMMD.py", line 2275, in runFreeNrg
    system = createSystemFreeEnergy(molecules)
  File "/export/users/julien/miniforge3/envs/sire-dev/lib/python3.9/site-packages/sire/legacy/Tools/OpenMMMD.py", line 1273, in createSystemFreeEnergy
    solute_ref_todummy = solute_ref_todummy.add(
UserWarning: SireError::incompatible_error: The molecules "", number 0, and "LIG", number 1004, are different, and therefore incompatible. (call sire.error.get_last_error_details() for more info)

Manually editing the pert file in debug/input/system.pert to reset all atom types chante to 'du' to a non dummy type resolves the runtime error.

The runtime error is caused by the following line of code

       for x in range(0, ndummies):
            dummy_index = dummies[x].index()
            solute_ref_hard = solute_ref_hard.subtract(
                solute.select(dummy_index)
            )
            solute_ref_todummy = solute_ref_todummy.add(
                solute.select(dummy_index)
            )

@annamherz - could you confirm the provide inputs run without error on a pre-2023 build ?

Metadata

Metadata

Labels

2023.0Work related to the 2023 releasebug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions