‘5_phosphate’ do not match any expected parameters for module 'topoaa'

I’m testing out HADDOCK3 to refine a protein–DNA complex interface and need the DNA’s 5′ end to be phosphorylated, but I’m getting this error when I run it:


[2025-07-18 16:41:36,584 libutil ERROR] The following parameters do not match any expected parameters for module 'topoaa': 
 * '5_phosphate' did you mean 'nhise'?.
Traceback (most recent call last):
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/hd3-p39-openmm/lib/python3.9/site-packages/haddock/libs/libutil.py", line 378, in log_error_and_exit
    yield
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/hd3-p39-openmm/lib/python3.9/site-packages/haddock/clis/cli.py", line 151, in main
    params, other_params = setup_run(
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/hd3-p39-openmm/lib/python3.9/site-packages/haddock/gear/prepare_run.py", line 391, in setup_run
    validate_modules_params(modules_params, max_mols)
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/hd3-p39-openmm/lib/python3.9/site-packages/haddock/gear/prepare_run.py", line 159, in wrapper
    return func(*args, **kwargs)
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/hd3-p39-openmm/lib/python3.9/site-packages/haddock/gear/prepare_run.py", line 616, in validate_modules_params
    raise ConfigurationError(_msg)
haddock.core.exceptions.ConfigurationError: The following parameters do not match any expected parameters for module 'topoaa': 
 * '5_phosphate' did you mean 'nhise'?.
[2025-07-18 16:41:36,585 libutil ERROR] The following parameters do not match any expected parameters for module 'topoaa': 

This is part of configuration. I did see this option in the help documentation—am I just using it incorrectly?

run_dir = "082640"
mode = "local"
ncores = 10
molecules =  [
    "082640_fordock.pdb",
    ]
clean = true

[topoaa]
5_phosphate = true

[flexref]
....

Do you have the latest haddock3 version installed?

And this parameter should be defined under a sub molecule part of the topoaa module:

E.g.

[topoaa.mol1]
5_phosphate = true

But in refinement mode where you provide directly a complex, we need to check if this is actually accepted!

I’ve actually already used:

[topoaa.mol1]
5_phosphate = true

but I’m still getting the same error.
I’m using the latest version from GitHub.

I do not get this error when testing it locally…

But there is an issue as defining the 5_phosphate as true does not do anything…

We will open an issue about this.

But most likely the version you are using is not the latest otherwise it would not raise the error about the 5_phosphate parameter. You might have to update the installation (and not only the code).

FYI: Option to add 5phosphate to nucleic acids does not anything · Issue #1325 · haddocking/haddock3 · GitHub

Dear Westpsf,

In my opinion, there is an issue with the configuration file.
The [topoaa] module should be called first, followed by [topoaa.mol1] to be able to specify molecule specific parameters (in this case molecule 1).

The configuration file should be:

run_dir = "082640"
mode = "local"
ncores = 10
molecules =  [
    "082640_fordock.pdb",
    ]
clean = true

# Initiate workflow with topoaa module to generate topology and parameters (.psf) files for all input molecules
[topoaa]
# Specify molecule 1 parameters for the topoaa module
# this is the same behavior as for histidine protonation, cyclic peptides, charged_cter, charged_nter
# we do it that way so we can define different parameters for each input molecule
[topoaa.mol1]
5_phosphate = true

[flexref]
...

I just tested it on the main branch, and it is functional.

I hope this will fix your issue.

Also, there is a pending pull request on the haddock3 user manual that describes (well) how to deal with this parameter, but not yet merged.
In the future, it will be properly documented. Sorry you had to use this parameter before the release of the documentation describing this parameter.

Cheers

I’ve used this module this way before:
[topoaa]
[topoaa.mol1]
5_phosphate = true

I just reinstalled Haddock3 in a new environment using pip install haddock3 , and then reran the script:

run_dir = "082640"  
mode = "local"  
ncores = 10  
molecules =  [  
    "082640_fordock.pdb",  
    ]  
clean = true  
[topoaa]  
[topoaa.mol1]  
5_phosphate = true  

But I’m still getting the same error.

[2025-07-19 01:08:06,453 libutil ERROR] The following parameters do not match any expected parameters for module 'topoaa': 
 * '5_phosphate' did you mean 'nhise'?.
Traceback (most recent call last):
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/haddock3/lib/python3.9/site-packages/haddock/libs/libutil.py", line 378, in log_error_and_exit
    yield
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/haddock3/lib/python3.9/site-packages/haddock/clis/cli.py", line 151, in main
    params, other_params = setup_run(
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/haddock3/lib/python3.9/site-packages/haddock/gear/prepare_run.py", line 391, in setup_run
    validate_modules_params(modules_params, max_mols)
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/haddock3/lib/python3.9/site-packages/haddock/gear/prepare_run.py", line 159, in wrapper
    return func(*args, **kwargs)
  File "/home/zengjianyangLab/panshengfei/miniconda3/envs/haddock3/lib/python3.9/site-packages/haddock/gear/prepare_run.py", line 616, in validate_modules_params
    raise ConfigurationError(_msg)
haddock.core.exceptions.ConfigurationError: The following parameters do not match any expected parameters for module 'topoaa': 
 * '5_phosphate' did you mean 'nhise'?.
[2025-07-19 01:08:06,455 libutil ERROR] The following parameters do not match any expected parameters for module 'topoaa': 
 * '5_phosphate' did you mean 'nhise'?.
[2025-07-19 01:08:06,455 libutil ERROR] An error has occurred, see log file. And contact the developers if needed.

I’m really confused about this. Could it be an issue with the input file?

I can’t reproduce this problem.

The 5_phospate parameter works perfectly on my side.

Share your config file and input PDB file if you want us to test it on our side.

Here are my config file and input file, I really appreciate the effort you’ve put into this problem!

run_dir = "082640"  
mode = "local"  
ncores = 1  
molecules =  [  
    "082640_fordock.pdb",  
    ]  
clean = true  
[topoaa]  
[topoaa.mol1]  
5_phosphate = true

082640_fordock.pdb (497.9 KB)

No issues on my side. I runs perfectly. I added a emref step to the workflow. But it also works without it. Attached the resulting minimised PDB file.

and my config file looks like:

run_dir = "082640"
mode = "local"
ncores = 1
molecules =  [
    "082640_fordock.pdb",
    ]
clean = true
[topoaa]
[topoaa.mol1]
5_phosphate = true
[emref]

emref_1.pdb (655.8 KB)

At this stage my guess is you have some old haddock3 version still around in your system.
I run this on my laptop (OSX system).

It worked successfully after I switched from installing via ‘pip install haddock3’ to using the source code. But they both show the same version: v2025.5.0.

Thank you once again for your efforts on this issue!

Indeed the pip install haddok3 installs the last official release, and the 5phosphate support was added after that.

We will create soon a new release.

To have the latest version, installing from the code is the better route.
Note that you can still use pip for that as:

pip install .

We will update things so that the log file also reflect the git commit hash code.

Yes, I suppose I should have tried updating installation from the source code earlier.

Sorry for spending too much time on this issue.