CNS errors before/after recompilation

Did you copy the files provided with HADDOCK in the cns1.3 directory into the cns source directory?

And recompile?

Also make sure to point to the latest compiled version of cns

Thank you very much for your prompt reply.

Unfortunately I still could not solve the problem and topology files are still not generated. I tried the following:
I have copied all files from software/cns13 to software/cns_solve_1.3/intel-x86_64bit-linux/source and run in this folder

make cns_solve

it run but I got a message at the end:

collect2: error: ld returned 1 exit status
problems with new executable - old version retained

Although I have noticed that e.g. parameters in rtf.inc were rewritten.
Thereafter, I went to software/cns_solve_1.3 and under tcsh venvironment run:

source cns_solve_env 

whereby in cns_solve_env setenv is set to the path to cns_solve_13:

setenv CNS_SOLVE 'path_to_software/software/cns_solve_1.3' 

Did I maybe miss some steps or does cns compilation work in some other way?
Thank you.

Make a fresh installation of cns and copy first the haddock-provided files into the main source directory before starting the compilation

Thank you very much for help, everything works now.
Below I just summarize what I have done to install CNS v1.3 on Centos7.7 and to link CNS to the local version of HADDOCK2.4:
-> After registration at http://cns-online.org/cns_request/, download cns_solve_xyz.tar.gz file “xyz = cns_solve downloaded version”
-> Enter the command in terminal: gunzip cns_solve_xyz.tar.gz
-> Then enter: tar xvf cns_solve_xyz.tar
-> This will create a new cns_solve_13 directory. Now copy all files from haddock2.4/cns1.3/ to cns_solve_1.3/source
-> Now enter into cns_solve_1.3 directory and type: make install
-> Copy the path of the directory.
-> Now open the file cns_solve_env and paste the copied path in place of ‘location of CNSsolve directory’
-> Go to the directory cns_solve_1.3/intel-x86_64bit-linux/source
-> Type: make cns_solve
-> Then go back to cns_solve_1.3 directory, and enter the command: tcsh
-> Then you entered into C-shell, now enter the command: source cns_solve_env
-> Then enter: cns
-> Your software should run without any error.

2 Likes

Thanks for describing all the steps!

Note that for the bash fans among you, there is actually a version of cns_solve_env for it.
It is however kind of hidden since it starts with a dot: .cns_solve_env_sh

I ran into an error while compiling CNS 1.3 on MacOS Catalina (10.15.7) using ifort. The compiler for C couldn’t find stdio.h so it couldn’t go on and compile the parts of the program that are written in C.
I made sure that XCode’s CommandLineTools were installed and as up to date as they could be (not the most recent version because that one is for MacOS Big Sur).
I also made sure that ifort and icc were working. I had to source the /opt/intel/oneapi/setvars.sh file for ifort and icc to work.
This was not enough, because the compiler still could not find stdio.h. I had to edit the Makefile of CNS, change CCFLAGS=-O into CCFLAGS="$(CCFLAGS)" (4 lines above the bottom of the file) then in the command line (make sure it’s tcsh) enter:
setenv EXT_CCFLAGS "-I/foo" with foo being the path to the stdio file. Then just enter make install.

1 Like

Thanks for providing those instructions.

Drop me an email and I can share a pre-compiled executable.

Hi @amjjbonvin,
I am trying to figure out the source of an error I am getting when I am running haddock2.4. the structures keep crashing with the following error:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x2b75ae4ebc5d in ???
#1  0x2b75ae4eae95 in ???
#2  0x2b75ae97097f in ???
#3  0x62172f in ???
#4  0x62c5cb in ???
#5  0x62e3ab in ???
#6  0x667c55 in ???
#7  0x66810e in ???
#8  0x434e1c in ???
#9  0x401afc in ???
#10  0x2b75ae95be1a in ???
#11  0x401b39 in ???
#12  0xffffffffffffffff in ???
Segmentation fault (core dumped)

The code tries to re-running the structures with new seeds, but those also crash.

Is this with an executable you compiled yourself?

I assume you have a M1 processor? In that case check the following thread about compiling CNS:

If you are running on an intel Mac, I can provide you with an executable. Reach to me via email

Yes, It’s with the executable I compiled. But it is happening on a Linux cluster:
NAME=“CentOS Linux”
VERSION=“7 (Core)”
using Intel Skylake or Cascadelake cores at 2.4GHz.

I am putting the error here, which might be a help:

The following modules were not unloaded:
  (Use "module --force purge" to unload all):

  1) NiaEnv/2019b

Due to MODULEPATH changes, the following have been reloaded:
  1) mii/1.1.1


Lmod is automatically replacing "intel/2020.1.217" with "gcc/9.3.0".


Due to MODULEPATH changes, the following have been reloaded:
  1) openmpi/4.0.3


##############################################################################
#                                                                            #
# Starting HADDOCK2.4                                                        #
#                                                                            #
#         N-components version of HADDOCK (current maximum is 20)            #
#                                                                            #
#   Copyright 2003-2020 Alexandre Bonvin, Utrecht University.                #
#   Originally adapted from Aria 1.2 from Nilges and Linge, EMBL.            #
#   All rights reserved.                                                     #
#   This code is part of the HADDOCK software and governed by its            #
#   license. Please see the LICENSE file that should have been included      #
#   as part of this package.                                                 #
#                                                                            #
##############################################################################
    
Starting HADDOCK on: 2022-03-03 20:17:20
 
HADDOCK version:   2.4 - May 2021 release
Python version: 2.7.18 (default, May 15 2020, 03:15:48) 
[GCC 9.3.0]
parsing run.cns file
parsing run.param in /gpfs/fs0/project/p/pmkim/mkhatami/work/3hsa/run1/data
reading parameters from the file /gpfs/fs0/project/p/pmkim/mkhatami/work/3hsa/run1/data/run.param
  setting some variables:
  N_COMP set to: 2
  RUN_NUMBER set to: 1
  HADDOCK_DIR set to: /home/p/pmkim/mkhatami/software/haddock2.4-2021-05
  CGTOAA_TBL set to: ./protein_shell_cg.tbl
  PROT_SEGID_2 set to: B
  PROT_SEGID_1 set to: A
  PDB_FILE1 set to: ./P02768-Albumin-1.pdb
  PDB_FILE2 set to: ./P02768-Albumin-2.pdb
  PROJECT_DIR set to: .
  CGPDB_FILE1 set to: ./P02768-Albumin-1_cg.pdb
  CGPDB_FILE2 set to: ./P02768-Albumin-2_cg.pdb
N_COMP 2
RUN_NUMBER 1
HADDOCK_DIR /home/p/pmkim/mkhatami/software/haddock2.4-2021-05
CGTOAA_TBL ./protein_shell_cg.tbl
PROT_SEGID_2 B
PROT_SEGID_1 A
PDB_FILE1 ./P02768-Albumin-1.pdb
PDB_FILE2 ./P02768-Albumin-2.pdb
PROJECT_DIR .
CGPDB_FILE1 ./P02768-Albumin-1_cg.pdb
CGPDB_FILE2 ./P02768-Albumin-2_cg.pdb
looking for existing files
waterdock false
  waiting for the psf files...
looking for iteration 0
working on iteration 0
increased number of structures requested for it0
  ==> regenerating file.nam file.list and file.cns in begin directory
starting DOCKING protocol 
FIX: Modifying random seed for it 0 structure 1
Waiting to restart job...
------------------------------------------------------------
Structure    1: crashed
------------------------------------------------------------

    calculating structure 1
      queue command:
      /bin/csh 3hsa_run1_it0_refine_1.job
------------------------------------------------------------
Structure    1: running
------------------------------------------------------------

Email me directly and I will provide you an executable to test

Thanks for giving me the idea that I could use another working executable. I had one and now the package works like a charm!

Good! Happy docking then :slight_smile:

Dear Amjjbovin,
I’m using the compiled version of CNS and I have got an error like the above:

EVALUATE: symbol $PSF_INFILE_1 set to “RUN:begin/gsk3b1.B99990546.psf” (string)

  • CNSsolve> structure*
  • STRUcture> @@$psf_infile_$nchain1*
  • %ASSFIL-ERR: error opening file .//begin/p1.psf*
  • %ASSFIL error encountered: Error accessing file*
  • (CNS is in mode: SET ABORT=NORMal END)*

  • ABORT mode will terminate program execution.*

How can I fix it?

I would suggest to start a fresh run (as you had issues with that one).

Something went wrong with the initial topo generation.

It’s the same as before.
I think it is sth wrong with my pdb file.
how would I find out the reason for this error?

Check the out files in the begin directory and look for ERR messages starting from the bottom

Alternatively simply try our webserver :slight_smile:

hey can you help me with compilaion error please?

make[3]: *** [Makefile:64: xtarget.o] Error 1
make[3]: Target '../bin/cns_solve' not remade because of errors.
make[2]: *** [Makefile:59: cns_solve] Error 2
make[1]: *** [Makefile:64: cns_solve] Error 2

Here are some online instructions:

https://www.bonvinlab.org/haddock3/CNS.html

With the haddock2.4/5 installation you will find a cns1.3 directory - check also the README file there.