CNS
The current version is 1.3
The program is located in
/temp4/bio/CNS (garm)
/lunarc/nobackup/projects/bio/CNS
The program is run by (it also sets some environmental
variables):
cns
(link to $CNS_SOLVE/bin/cns)
Help etc
You can get some more info and
commands
by
csh
source
/temp4/bio/CNS/cns_solve_1.3/cns_solve_env
cns_web (will start the web manual)
cns_info (will give some
fundamental
information)
cns_header task-file (to extract
the
input parameter section from a task file)
cns_edit [-help] [-def
defaults-file]
task-file (to edit a task file)
cns_transfer -def defaults-file
-inp
task-file [-out output-file] (to transfer defaults to a task file
without the HTML
interface).
When running cns interactively, you
can
get help by typing:
help
help-global
help-datatypes
To find out if there was any error
in
the batch job.
grep ERR output_file
Useful commands
- $? (gives a list of defined
symbols)
- ? (gives a short description of
the
current system)
Comments
- CNS is not case-sensitive except
for
file names.
- The order in the CNS pdb files is
determined by the order of the atom commands in the topology
files.
To read in a simple protein
structure
topology @CNS_TOPPAR:protein.top
end
{Read
in
the topology file}
parameter @CNS_TOPPAR:protein.param end
{Read
in the protein parameters}
segment chain coordinates @pdb end end
{Define
the structure}
do (name="CD1") (name CD and resname
ile)
{Change the name of CD1 in ILE}
do (name="O") (name
OT1)
{Change the name of terminal oxygen}
do (name="OXT") (name
OT2)
{Change the name of terminal oxygen}
coordinates @pdb {Read coordinates; warnings will be
issued
for hydrogens}
To construct a generate file
- Set up a CNS
generate file .
You should typically change:
1. pdb file names
2. names of other pdb files (water, ligands, etc.)
3. names of the topology and parameter files for the ligands.
4. optionally set the occupancy set flag to true (if alternate
configurations have been removed)
5. crystal data (space group and dimensions)
- Run CNS with this file to obtain a structure file
(generate.mtf)
cns <generate.inp >generate.out
This yields also a pdb-file (generate.pdb)
- Check that the calculation was sucessful with
grep ERR generate.out
grep WRN generate.out
grep INFO generate.out
( %READC-WRN: still 511 missing coordinates
(in
selected subset) can be ignored)
If there many errors, you have probably forgot to add an END row
in all
the pdb files.
To construct a minimize.inp file
- Run CNS on the web again to construct the
refinement:minimize.inp
sample file.
Typically you shall change (for the other fields, default values
are
normally OK):
1. structure file name =mm3.mtf
2. parameter file names, if any (do not forget water.param)
3. coordinate file name =mm3.pdb
4. reflection file name
5. resolution range
6. number of minimisation steps = 0
7. crystal data (space group and dimensions)
8. Possibly also fixed atoms
- Test this program by running
cns <minimize.inp >minimize.out
Check the result, using:
grep ERR mmrun2.out
grep WRN mmrun2.out
grep INFO mmrun2.out
To calculate the number of atoms
show sum (1) (all)
evaluate ($natom=$result) {NB $natom becomes a
real
number, not an integer}
Compilation
- cd cns_directory
- change
setenv CNS_SOLVE '/home/bio/Cns/cns_solve_1.0'
to the correct directory in the file cns_solve_env
- make install
This procedure worked excellently on gefion and aurora 5/10-16
(version 1.3)
On garm, husmodern and whenim64, I instead had to do
make g77install
I also tried:
cd /home/bio/Bin
ln /usr/local/pgcc/bin/pg77 fort77
cd -
make install
but this gave a large number of warnings, some errors and no
executable
code.
8/6-09 Recompilation on
milleotto:
Had to change bin/getarch to recognize the new machine.
make g77install
9/6-09 Compilation on milleotto
with cns-1.21:
make install worked well
I got
lex refloat.l
make[4]: lex: Command not found
make[4]: *** [refloat] Error 127
make[3]: *** [utils] Error 2
make[2]: *** [compile-utils] Error 2
make[1]: *** [utils] Error 2
but the program worked
9/6-09 Compilation on gefion with cns-1.21:
Neither
make install
make install compiler=gfortran
make install compiler=ifort
make install compiler=g77
worked
12/6-14 Compilation of cns-1.3
Failed on gefion (no icc).
Successful (make install) on platon.
5/10-16 Compilation of cns-1.3
make install worked nicely on gefion and aurora
2/4-20 Compilation of cns-1.3
make install worked on kebnekaise, but program failed with:
%SETFPEPS increase value of MXFPEPS2 and recompile
%SETFPEPS error encountered: Could not determine machine epsilon
After searching internet, I found this page:
https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54
I changed the subroutine SETFPEPS in machvar.f (in
cns_solve_1.3/intel-x86_64bit-linux/source) to
SUBROUTINE SETFPEPS
c UR: I replaced the old routine with this from internet:
c https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/16
C
IMPLICIT NONE
C I/O
INCLUDE 'numbers.inc'
INCLUDE 'machvar.inc'
C
C Determine the machine epsilon i.e. the smallest FPEPS such that both
C 1+FPEPS and 1-FPEPS are different from 1.
C
C local
DOUBLE PRECISION ONEDP
DOUBLE COMPLEX DBCOMP
C
C external
C NONE
C
C begin
C
C ONEDP doesn’t really need to be defined - EPSILON() only needs to know
C the type
ONEDP=(1.00)
FPEPS = EPSILON(ONEDP)
DBCOMP = DCMPLX(ZERO,ZERO)
CALL DECLAR('FP_EPSILON', 'DP', ' ', DBCOMP, FPEPS)
RETURN
END
then make cns_solve (still in that directory).
After that cns seems to work.
2/2-21 Compilation on Tetralith (cns-1.3)
- copied and untar the file
- changed setenv CNS_SOLVEset
- module load buildenv-gcc/2018a-eb
- make install compiler=gfortran
- Got the problem %SETFPEPS increase value of MXFPEPS2 and recompile
- Made the changes noted above. Then, it worked.
- in bin: ln ../intel-x86_64bit-linux/bin/cns .
4/2-21 Compilation of nCNS on Tetralith
- copied and untar the file
- changed
setenv CNS_SOLVE /proj/teobio/Bio/CNS/nCNS-1.0.8-Linux
in cns_solve_env - module load buildenv-gcc/2018a-eb
- make install compiler=gfortran
- make g77install
- Seemed to work
- in bin: ln ../intel-x86_64bit-linux/bin/cns .
4/2-21 Compinling nCNS on Kebnekaise
- copied and untar the file (from Aurora)
- changed
setenv CNS_SOLVE /proj/nobackup/teobio/Bio/CNS/nCNS-1.0.8-Linux
in cns_solve_env
- module load GCC/10.2.0
- module load intel/2020a
- make install compiler=gfortran
- make g77install
- export fc=gfortran
- Nothing worked - it always tried to use the fort77 compiler
and giving the error:
sed: -e expression #1, char 11: Invalid range end
(the latter comes from cns_solve_env)
- Tested also csh
- Changed in instlib/machine/supported/linux/Makefile.header
fort77 to gfortran in two places
also deleted the nN2000 compiler option
- Now it mostly compiles, but linking fails:
linking: cns_solve
machine_f.o: In function `xxnxtfi_':
machine_f.f:(.text+0x1cdb): undefined reference to `getenv_'
machine_f.o: In function `cnshelp_':
machine_f.f:(.text+0x22cd): undefined reference to `getenv_'
machine_f.o: In function `getlog_':
machine_f.f:(.text+0x2272): undefined reference to `getenv_'
collect2: error: ld returned 1 exit status
problems with new executable - old version retained
- Gave up after this