Closed alexberlaga closed 10 months ago
No issue running this test on my side.
Make sure to have the latest haddock3 version as the code is still evolving fast and still in beta version.
Also check your CNS installation.
What is the content of the 00_topoaa dir?
I just pulled the repository and ran the code again, unfortunately still having the same issue. My CNS is version 1.3. The following files are in my 00_topoaa directory: 4G6K_fv.inp 4G6K_fv.out.gz 4I1B-matched.inp 4I1B-matched.out.gz params.cfg
This is what's inside "params.cfg": [topoaa]
queue = ""
autohis = true
delenph = true
log_level = "quiet"
iniseed = 917
ligand_param_fname = ""
ligand_top_fname = ""
limit = true
tolerance = 0
[topoaa.mol1]
prot_segid = "A"
cyclicpept = false
nhisd = 0
hisd_1 = nan
nhise = 0
hise_1 = nan
[topoaa.mol2]
prot_segid = "B"
cyclicpept = false
nhisd = 0
hisd_1 = nan
nhise = 0
hise_1 = nan
The following happens when I run "cns":
============================================================
| |
| Crystallography & NMR System (CNS) |
| CNSsolve |
| |
============================================================
Version: 1.3 at patch level U
Status: Special UU release with Rg, paramagnetic
and Z-restraints (A. Bonvin, UU 2013)
============================================================
Written by: A.T.Brunger, P.D.Adams, G.M.Clore, W.L.DeLano,
P.Gros, R.W.Grosse-Kunstleve,J.-S.Jiang,J.M.Krahn,
J.Kuszewski, M.Nilges, N.S.Pannu, R.J.Read,
L.M.Rice, G.F.Schroeder, T.Simonson, G.L.Warren.
Copyright (c) 1997-2010 Yale University
============================================================
Running on machine: hostname unknown (x86_64/Linux,64-bit)
Program started by: berlaga
Program started at: 14:52:01 on 14-Dec-2023
============================================================
FFT3C: Using FFTPACK4.1
CNSsolve>
Check the content of the out.gz file in the topoaa directory. You will find the problem at the bottom.
Did you recompile CNS with the instructions and code provided with haddock3. If not then that’s most likely the issue.
Unfortunately there isn't anything in either of my out.gz files. I did use the instructions/code provided with haddock3 to compile CNS.
I do notice that since I cloned the repository, the instructions changed from copying files from "haddock3/varia/cns1.3" to "haddock3/extras/cns1.3". However I don't see an extras folder in the repository. Is that the issue?
Thanks!
Did you try a “git pull” and then reinstall haddock3?
PS: the CNS code is indeed under the varia directory
Got the issue fixed, I was compiling with the wrong GCC version originally. Thanks for the help!
Did you try a “git pull” and then reinstall haddock3?
This error still appears for me. I followed the link you provided above and had to do what it says in the end, because I got the "Error: type mismatch" error. So I made a new file (Makefile.header.6.gfortran) and placed it inside intel-x86_64bit-linux/ before running make install, specifying this compiler file.
I don't know what alexberlaga means by "compiled with the wrong GCC version"; if it is compiled and runs without any errors it is compiled. Running the command cns (or simply "intel-x86_64bit-linux/source/cns_solve-2312300021.exe", which is the executable generated), seems to smoothly run CNS.
Did you compile using the CNS code provided with haddock?
Yes, but I had to use the csh shell and cns_set_env (csh shell file) for some reason, because only modifying the shell/bash file .cns_solve_env_sh yields this when running make install: environmental variable $CNS_SOLVE has been defined incorrectly this variable is set in cns_solve_env - modify this file make: *** [Makefile:38: install] Error 1
Obviously, I am not using the csh shell for the haddock3 conda env (who does in 2023).
Thus, when typing "cns" in the terminal (using shell/bash), the command is not found. However, the walkthrough says to make a symbolic link inside the haddock3 repo anyway (bin/cns), pointing to the .exe file created after make install. So I don't see the problem.
Kind regards, stianale
Check again an .out
file in the 0_topoaa directory and look for an error message at the end.
And just to confirm, before installing CNS, did you copy to your CNS installation source directory the CNS files provided with haddock3 under the varia/cns1.3
directory?
Oh, I am currently just trying to run one of the test examples, ie. under docking-protein-DNA, not running any input data of myself. And yes, I copied over the varia/cns1.3/* to /source directory for cns_solve_1.3 (sorry by the way, but this will have to be a long post).
For compilation of CNS, I followed what it says in https://www.bonvinlab.org/haddock3/CNS.html and made a new Makefile.header file that I named Makefile.header.8.gfortranfinal (and placed it inside instlib/machine/supported/intel-x86_64bit-linux/, because this is my architecture), and the content of the file is this (copied from https://www.bonvinlab.org/haddock3/CNS.html):
# fortran options
F77 = gfortran
F77STD = -fdefault-integer-8 -w -fallow-argument-mismatch
F77OPT = -O3 $(CNS_MALIGN_I86) -funroll-loops -ffast-math -march=native -mtune=native -static
F77FLAGS = $(F77STD) $(F77OPT) $(EXT_F77FLAGS) $(F77BUG)
# C options
CC = gcc
CPP = g++
CCFLAGS = -O -DINTEGER='long int' -DCNS_ARCH_TYPE_$(CNS_ARCH_TYPE) $(EXT_CCFLAGS)
# link options
LD = gfortran
LDFLAGS = -w $(EXT_LDFLAGS)
So I then went on doing:
make install compiler=gfortranfinal
and the console output from this is (I can't figure out what the error about midway is about):
Installation directory: /media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/CNS/cns_solve_1.3/intel-x86_64bit-linux
copying files in instlib directory intel-x86_64bit-linux to intel-x86_64bit-linux
0read.me
arch_env
machine_c.c
machine_f.f
Makefile.header.1.ifort
Makefile.header.2.gfortran
Makefile.header.3.ifort_mp
Makefile.header.4.pgf95
Makefile.header.5.ifort_mp_profile
Makefile.header.6.ifort_mp_tcheck
Makefile.header.7.gfortran_mp
Makefile.header.8.gfortranfinal
Using Makefile template for compiler: gfortranfinal
making source directory in intel-x86_64bit-linux
making bin directory in intel-x86_64bit-linux
making utils directory in intel-x86_64bit-linux
making test directory in intel-x86_64bit-linux
linking source files to intel-x86_64bit-linux/source
linking machine_f.f to source directory
linking machine_c.c to source directory
linking generic fft file to source directory
making Makefile in source directory
making compiler-test directory in intel-x86_64bit-linux
testing Fortran and C compilers
compiling: gcc -O -DINTEGER='long int' -DCNS_ARCH_TYPE_LINUX
C compiler passes test
compiling: gfortran -fdefault-integer-8 -w -fallow-argument-mismatch -O3 -funroll-loops -ffast-math -march=native -mtune=native -static
linking: gfortran -w
Fortran compiler passes test
making utility programs
make[2]: *** No rule to make target 'compile-utils'. Stop.
make[1]: *** [Makefile:60: utils] Error 2
flags:
fortran -> [gfortran] -fdefault-integer-8 -w -fallow-argument-mismatch -O3 -funroll-loops -ffast-math -march=native -mtune=native -static
c -> [gcc] -O -DINTEGER='long int' -DCNS_ARCH_TYPE_LINUX
link -> [gfortran] -w
compiling: angledb.f
compiling: aria.f
compiling: ariass.f
compiling: arical.f
compiling: ariman.f
compiling: arivio.f
compiling: array.f
compiling: carb.f
compiling: cluster.f
compiling: cns.f
compiling: collapse_rgyr.f
compiling: connect.f
compiling: coorio.f
compiling: corman.f
compiling: coup.f
compiling: cstack.f
compiling: cstran.f
compiling: dcartesian.f
compiling: define.f
compiling: diff_anis.f
compiling: distan.f
compiling: dsearch.f
compiling: dtorsion_md.f
compiling: dtorsion_top.f
compiling: dynio.f
compiling: eangle.f
compiling: ebond.f
compiling: enbond.f
compiling: energy.f
compiling: etor.f
compiling: expression.f
compiling: fantacross.f
compiling: fantalin.f
compiling: fastnb.f
compiling: fft.f
compiling: fftvfy.f
compiling: flagmap.f
compiling: genic.f
compiling: heap.f
compiling: heapvfy.f
compiling: hybrid_36_f.f
compiling: imf.f
compiling: initia.f
compiling: lbfgs.f
compiling: lidens.f
compiling: machine_f.f
compiling: machvar.f
compiling: mapyard.f
compiling: matrix.f
compiling: mindist.f
compiling: mmdisg.f
compiling: modes.f
compiling: mrigid.f
compiling: mtfio.f
compiling: nbonds.f
compiling: ncs.f
compiling: noe.f
compiling: onebond.f
compiling: parmio.f
compiling: parser.f
compiling: pick.f
compiling: pig.f
compiling: plane.f
compiling: powell.f
compiling: print.f
compiling: prot.f
compiling: psearch.f
compiling: psfio.f
compiling: rama.f
compiling: read_write.f
compiling: rotate.f
compiling: rotlsq.f
compiling: rotman.f
compiling: rsearch.f
compiling: rtfio.f
compiling: segmnt.f
compiling: selrpn.f
compiling: smf.f
compiling: sort.f
compiling: string.f
compiling: surfac.f
compiling: susc_anis.f
compiling: test.f
compiling: tsmapd.f
compiling: tsmapdlm.f
compiling: tsmap.f
compiling: tsmaplm.f
compiling: tsmaps.f
compiling: update.f
compiling: util.f
compiling: vectangl.f
compiling: vector.f
compiling: vector_func.f
compiling: vfynum.f
compiling: xangle.f
compiling: xasymm.f
compiling: xccr.f
compiling: xdeclare.f
compiling: xdipo_pcs.f
compiling: xdipo_rdc.f
compiling: xdo.f
compiling: xdofft.f
compiling: xdofried.f
compiling: xfalgebra.f
compiling: xfantaccr.f
compiling: xfantadipo.f
compiling: xfft.f
compiling: xfunct.f
compiling: xmalgebra.f
compiling: xmask.f
compiling: xmaskio.f
compiling: xmaverage.f
compiling: xmaxl.f
compiling: xmphisto.f
compiling: xmpsele.f
compiling: xmread.f
compiling: xmulti.f
compiling: xmwrite.f
compiling: xparse.f
compiling: xpeakpik.f
compiling: xpred.f
compiling: xprobab.f
compiling: xprox.f
compiling: xray.f
compiling: xreduce.f
compiling: xreflstar.f
compiling: xremap.f
compiling: xrmani.f
compiling: xropti.f
compiling: xscale.f
compiling: xsdev.f
compiling: xsfsele.f
compiling: xshow.f
compiling: xsigmaa.f
compiling: xskel.f
compiling: xspecial.f
compiling: xstats.f
compiling: xsymm.f
compiling: xt1dist.f
compiling: xtarget.f
compiling: xutil.f
compiling: xyzparse.f
compiling: dmemory.c
compiling: machine_c.c
linking: cns_solve
created executable file cns_solve-2312302258.exe
And yes, I did make a symbolic link in the haddock3 cloned repo (bin/cns), using ln -s on cns_solve-2312302258.exe.
So what I am doing now (inside examples/docking-protein-DNA), after having compiled CNS: haddock3 docking-protein-DNA-test.cfg
The console output from this is:
Starting HADDOCK 3.0.0 on 2023-12-30 22:58:00
Python 3.9.18 | packaged by conda-forge | (main, Dec 23 2023, 16:33:10)
[GCC 12.3.0]
[2023-12-30 22:59:00,822 libworkflow INFO] Reading instructions step 0_topoaa
[2023-12-30 22:59:00,822 libworkflow INFO] Reading instructions step 1_rigidbody
[2023-12-30 22:59:00,823 libworkflow INFO] Reading instructions step 2_caprieval
[2023-12-30 22:59:00,823 libworkflow INFO] Reading instructions step 3_seletop
[2023-12-30 22:59:00,823 libworkflow INFO] Reading instructions step 4_flexref
[2023-12-30 22:59:00,823 libworkflow INFO] Reading instructions step 5_caprieval
[2023-12-30 22:59:00,823 libworkflow INFO] Reading instructions step 6_emref
[2023-12-30 22:59:00,823 libworkflow INFO] Reading instructions step 7_clustfcc
[2023-12-30 22:59:00,823 libworkflow INFO] Reading instructions step 8_seletopclusts
[2023-12-30 22:59:00,823 libworkflow INFO] Reading instructions step 9_caprieval
[2023-12-30 22:59:00,844 base_cns_module INFO] Running [topoaa] module
[2023-12-30 22:59:00,844 __init__ INFO] [topoaa] Molecule 1: cro.pdb
[2023-12-30 22:59:00,845 __init__ INFO] [topoaa] Sanitizing molecule cro.pdb
[2023-12-30 22:59:00,847 __init__ INFO] [topoaa] Topology CNS input created in cro.inp
[2023-12-30 22:59:00,847 __init__ INFO] [topoaa] Molecule 2: dna.pdb
[2023-12-30 22:59:00,847 __init__ INFO] [topoaa] Sanitizing molecule dna.pdb
[2023-12-30 22:59:00,849 __init__ INFO] [topoaa] Topology CNS input created in dna.inp
[2023-12-30 22:59:00,849 __init__ INFO] [topoaa] Running CNS Jobs n=2
[2023-12-30 22:59:00,849 libutil INFO] Selected 2 cores to process 2 jobs, with 16 maximum available cores.
[2023-12-30 22:59:00,849 libparallel INFO] Using 2 cores
[2023-12-30 22:59:00,870 libparallel INFO] >> completed 50%
[2023-12-30 22:59:00,870 libparallel INFO] >> completed 100%
[2023-12-30 22:59:00,870 libparallel INFO] 2 tasks finished
[2023-12-30 22:59:00,870 __init__ INFO] [topoaa] CNS jobs have finished
[2023-12-30 22:59:00,871 libutil ERROR] dictionary changed size during iteration
Traceback (most recent call last):
File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/libs/libutil.py", line 335, in log_error_and_exit
yield
File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/clis/cli.py", line 185, in main
workflow.run()
File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/libs/libworkflow.py", line 43, in run
step.execute()
File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/libs/libworkflow.py", line 155, in execute
self.module.run() # type: ignore
File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/modules/base_cns_module.py", line 61, in run
self._run()
File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/modules/topology/topoaa/__init__.py", line 247, in _run
self.export_io_models(faulty_tolerance=self.params["tolerance"])
File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/modules/__init__.py", line 285, in export_io_models
faulty = io.check_faulty()
File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/libs/libontology.py", line 214, in check_faulty
self.remove_missing()
File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/libs/libontology.py", line 224, in remove_missing
for key2 in element:
RuntimeError: dictionary changed size during iteration
[2023-12-30 22:59:00,871 libutil ERROR] dictionary changed size during iteration
[2023-12-30 22:59:00,871 libutil ERROR] An error has occurred, see log file. And contact the developers if needed.
[2023-12-30 22:59:00,871 libutil INFO] Finished at 30/12/2023 22:59:00. For any help contact us at https://github.com/haddocking/haddock3/issues. Au revoir! Adéu-siau! Agur!.
After recompiling CNS did you update it also in the haddock3/bin directory?
If you are referring to this part:
ln -s /PATH/TO/cns_solve_1.3/intel-x86_64bit-linux/source/cns_solve-2002171359.exe bin/cns
Yes, I did that.
And did you check the output files in the 0_topoaa directory as I asked?
This is where you will find the possible problem…
PS: And I assume you did not execute the command below as is, but put the correct path to the CNS executable…
If you are referring to this part: ln -s /PATH/TO/cns_solve_1.3/intel-x86_64bit-linux/source/cns_solve-2002171359.exe bin/cns
For the command ln -s /PATH/TO/cns_solve_1.3/intel-x86_64bit-linux/source/cns_solve-2002171359.exe bin/cns
, of course I put my correct path. Otherwise haddock3 would not find the executable and I would have got a completely different error.
In the run1-test folder, last lines of dna.out:
RTFRDR>remarks file toppar/ion.top
RTFRDR>remarks topology and masses for common ions
RTFRDR>remarks Dingle atom ion residues are given the name of the element.
RTFRDR>remarks By default the atom will be uncharged (eg. the residue MG will
RTFRDR>remarks contain the atom called MG with zero charge).
RTFRDR>remarks To use the charged species the charge state is appended to
RTFRDR>remarks the atom name (eg to use MG2+ the residue name is MG2, and the
RTFRDR>remarks atom name is MG+2 and has charge +2.0).
RTFRDR>remarks NOTE: not all ionic species are represented
RTFRDR>remarks PDA 02/09/99
RTFRDR>
RTFRDR>set message ? end eval ($old_message=$result) set echo ? end eval ($old_echo=$result)
MESSage=NORM
EVALUATE: symbol $OLD_MESSAGE set to "NORM" (string)
ECHO=TRUE {ON}
EVALUATE: symbol $OLD_ECHO set to TRUE (logical)
RTFRDR>set message=off echo=off end
RTFRDR> end if
RTFRDR> if ( &BLANK%nucl_topology_infile = false ) then
NEXTCD: condition evaluated as true
RTFRDR> @@&nucl_topology_infile
%ADDST-ERR: STMAX too small. Check code
%ASSFIL-ERR: error opening file /media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/cns/toppar/
%ASSFIL error encountered: Error accessing file
(CNS is in mode: SET ABORT=NORMal END)
*****************************************************
ABORT mode will terminate program execution.
*****************************************************
Program will stop immediately.
============================================================
Maximum dynamic memory allocation: 8297488 bytes
Maximum dynamic memory overhead: 960 bytes
Program started at: 22:59:00 on 30-Dec-2023
Program stopped at: 22:59:00 on 30-Dec-2023
CPU time used: 0.0073 seconds
============================================================
cro.out looks similar (last lines also):
RTFRDR>remarks file toppar/ion.top
RTFRDR>remarks topology and masses for common ions
RTFRDR>remarks Dingle atom ion residues are given the name of the element.
RTFRDR>remarks By default the atom will be uncharged (eg. the residue MG will
RTFRDR>remarks contain the atom called MG with zero charge).
RTFRDR>remarks To use the charged species the charge state is appended to
RTFRDR>remarks the atom name (eg to use MG2+ the residue name is MG2, and the
RTFRDR>remarks atom name is MG+2 and has charge +2.0).
RTFRDR>remarks NOTE: not all ionic species are represented
RTFRDR>remarks PDA 02/09/99
RTFRDR>
RTFRDR>set message ? end eval ($old_message=$result) set echo ? end eval ($old_echo=$result)
MESSage=NORM
EVALUATE: symbol $OLD_MESSAGE set to "NORM" (string)
ECHO=TRUE {ON}
EVALUATE: symbol $OLD_ECHO set to TRUE (logical)
RTFRDR>set message=off echo=off end
RTFRDR> end if
RTFRDR> if ( &BLANK%nucl_topology_infile = false ) then
NEXTCD: condition evaluated as true
RTFRDR> @@&nucl_topology_infile
%ADDST-ERR: STMAX too small. Check code
%ASSFIL-ERR: error opening file /media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/cns/toppar/
%ASSFIL error encountered: Error accessing file
(CNS is in mode: SET ABORT=NORMal END)
*****************************************************
ABORT mode will terminate program execution.
*****************************************************
Program will stop immediately.
============================================================
Maximum dynamic memory allocation: 8297488 bytes
Maximum dynamic memory overhead: 960 bytes
Program started at: 22:59:00 on 30-Dec-2023
Program stopped at: 22:59:00 on 30-Dec-2023
CPU time used: 0.0092 seconds
============================================================
I suggest you expand on your walkthrough on how to compile CNS to be compatible with HADDOCK, because as of now it clearly does not account for these errors downstream. Perhaps yml files for conda environments and do thorough testing on various OS.
The problem is that you have a long path name that exceeds a CNS string parameter…
You can try to either:
1) Shorten the path name
2) Recompile CNS after increasing the STMAX parameter (search where it is defined in the .inc files in the source directory)
I would go for 1) :-)
%ADDST-ERR: STMAX too small. Check code %ASSFIL-ERR: error opening file /media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/HADDOCK3/haddock3/src/haddock/cns/toppar/
Thanks. Cloning the repo closer to my root fixed the problem.
Describe the bug When running the tests available in the repository, the following issue happened after [topoaa] CNS jobs have finished:
[2023-12-13 11:18:41,817 libutil ERROR] dictionary changed size during iteration Traceback (most recent call last): File "/project2/andrewferguson/berlaga/haddock3/src/haddock/libs/libutil.py", line 335, in log_error_and_exit yield File "/project2/andrewferguson/berlaga/haddock3/src/haddock/clis/cli.py", line 185, in main workflow.run() File "/project2/andrewferguson/berlaga/haddock3/src/haddock/libs/libworkflow.py", line 43, in run step.execute() File "/project2/andrewferguson/berlaga/haddock3/src/haddock/libs/libworkflow.py", line 152, in execute self.module.run() # type: ignore File "/project2/andrewferguson/berlaga/haddock3/src/haddock/modules/base_cns_module.py", line 61, in run self._run() File "/project2/andrewferguson/berlaga/haddock3/src/haddock/modules/topology/topoaa/init.py", line 247, in _run self.export_io_models(faulty_tolerance=self.params["tolerance"]) File "/project2/andrewferguson/berlaga/haddock3/src/haddock/modules/init.py", line 285, in export_io_models faulty = io.check_faulty() File "/project2/andrewferguson/berlaga/haddock3/src/haddock/libs/libontology.py", line 214, in check_faulty self.remove_missing() File "/project2/andrewferguson/berlaga/haddock3/src/haddock/libs/libontology.py", line 224, in remove_missing for key2 in element: RuntimeError: dictionary changed size during iteration
Steps to reproduce the behavior:
This happens in the protein-protein and protein-peptide tests as well.
Please let me know what could be causing this. Thanks!