ADIT-NMR installation from scratch


  • Set up a bridge on host OS. Create /etc/sysconfig/networking/devices/ifcfg-br0 and add symlinks from other sysconfig directories:
NAME="Bridged eth0"
  • Edit /etc/sysconfig/networking/devices/ifcfg-eth0, get rid of all the IP addresses in there and add
  • Restart networking.
  • Configure VMs to use br0. Static IP addresses you give to VMs will be reachable on the network.

Guest OS

Tested on centos 5 and 6. You'll need storage for

  1. root: 10 GB should be plenty.
  2. (Optional) swap: you can create swap disk from virt-manager's hardware details page (mkswap will refuse to work on hda and hdb so either create virtio disk or create a swap partition on it with fdisk later and swap to that instead of the whole disk) and add swap during install, or you can create and add it later with
    mkswap -L 'SWAP-vdb' /dev/vdb; swapon /dev/vdb

    (and add the line to /etc/fstab).

  3. ADIT-NMR installation because svn history can push the total over 10GB – or make the entire root disk bigger.
  4. ADIT-NMR depositions under adit/sessions and adit/scratch: development platform you only needs enough room for a few.
  5. CVS repositories for the depositions: development platform can use just one local repo with enough room for a few depositions.
  • Install a minimal set of packages.
  • RPMs required for all sites: cvs, subversion to get dictionary updates.
  • Build platform only:
    • RPMs required to build native version: gcc-c++ with dependencies, flex, bison, pcre-devel, openssl-devel, glibc-static, openssl-static, perl-CGI, plus subversion to get the code. (For cross-compiling, e.g. building 32-bit binaries on a 64-bit platform you'll need base 32-bit development libraries as well.)
  • Disable SELinux, unnecessary daemons, edit /etc/sysconfig/iptables, configure postfix, reboot.
  • Add adit user and group.
  • Install openjdk Java 1.7, httpd, mod_php.
  • Create directory for ADIT-NMR installation, e.g. /var/www/aditnmr. Change owner to adit.
  • Edit /etc/httpd/conf/httpd.conf,
    • change User to adit,
    • change ServerAdmin e-mail address,
    • uncomment NameVirtualHost *:80
    • and add
      Include /var/www/aditnmr/adit/httpd/conf/vhost.conf

      at the end.

  • Run visudo and add
    adit     ALL=(ALL)       NOPASSWD:       /sbin/service

    to let adit user control apache with

    sudo /sbin/service httpd

    (on centos 6, pu that in a file named adit under /etc/sudoers.d).

  • Set up apache to start at boot:
    chkconfig httpd on
  • mount CVS repository(ies) for the depositions and make sure they are writable by apache (adit user).


(this is done as adit user)

Production only

tested on centos 6

(in adit-nmr install directory)

  • copy migrate-ADIT-NMR-with-dict.tgz over to target directory and untar it,
  • copy over ./adit/config/bmrb-adit/adit-nmr-config.cif and edit it for the new machine,
  • run ./localbin/ to get the dictionaries etc. re-generated,
  • copy over the entire ./icons directory as is doesn't seem to be included in the tarball,
  • copy over the entire ./maxit-v8.12-prod directory to the new machine,
  • copy ./aditnmr/adit/httpd/conf/new.conf to ./aditnmr/adit/httpd/conf/vhost.conf, edit the latter and fix paths etc.,
  • edit /etc/httpd/conf/httpd.conf,
    • uncomment NameVirtualHost and add Include /aditnmr/adit/httpd/conf/vhost.conf to the end,
    • change User and Group – adit accesses filesystem all over the place, not just in sessions directory.
  • Copy dictionaries/refdb.str to adit/config/bmrb-adit.
  • You have to copy over or create id_pool_*_pdb.cif and id_pool_*_bmrb.cif.
  • You have to use nmrif2nmrstr and nmrstr2nmrif built on the same OS because you can't statically link pcrecpp.

BMRB (post-CD&A)

(in adit-nmr install directory)

  • untar the tarball
  • this shouldn't (untested) overwrite any of the existing config or dictionary files.
  • If it's a fresh install,
    • copy ./etc/new.conf to ./etc/vhost.conf, edit the latter and fix paths etc.,
    • edit /etc/httpd/conf/httpd.conf,
      • uncomment NameVirtualHost and add Include /FULL/PATH/etc/vhost.conf to the end,
      • change User and Group – adit accesses filesystem all over the place, not just in sessions directory.
    • Install and generate the dictionaries (adit and validation),
    • copy over or create id_pool_*_pdb.cif and id_pool_*_bmrb.cif,
    • copy ./adit/config/bmrb-adit/adit-nmr-config.SRC to adit-nmr-config.cif and edit the latter.


  • To build 32-bit binaries on a 64-bit platform:
    • Edit make.platform.gnu4.
    • Edit Makefile in starlib2, add -m32 to CPPFLAGS.

(Better yet, roll out a 32-bit VM and build there.)

  • cd ../mmcif-input-tool/etc
  • cd ../my-cifobj-view
  • cd ../cifobj-view-v3.1
  • cd ..
  • cd insert_nmrif_to_ets
  • cd ..CifLoader
    cp bin/CifLoader ../dictionaries
  • In mmcif-input-tool-v14 run make install (ignore the 2 error messages about /bmrb/bin)
  • cd starlib2/examples
  • make
  • cp star_grep_helper ../../../localbin
  • build new cif2star tools: someplace (e.g ~)
    • sudo yum install pcre-devel
    • svn co and run make in c++ subdirectory
    • get RCSB tools (svn login/password is bmrb/bmrb):
      mkdir rcsb
      cd rcsb
      for i in etc cif-file cif-parser common tables ; do svn co${i}/trunk $i --username bmrb ; done
      svn co regex --username bmrb
      mkdir include
      mkdir lib
      cd etc
      • run make in
        1. common
        2. regex
        3. tables
        4. cif-file
        5. cif-parser
    • cd ~
    • cd cif2star
    • make – you'll probably have to edit the Makefile to get RCSB libraries right (-l:all.a -l:regex.a works on centos 6).
    • copy nmrif2nmstr and nmrstr2nmrif to ADIT-NMR's localbin directory.
  • FIXME Not on BMRB-only platform, for now:
    cd ../maxit-v8.12-prod
    cd ../checkfile-tool-v2.0-prod
  • cd /var/www/aditnmr && make install
  • cd /var/www/aditnmr/etc, copy new.conf to vhost.conf and edit the latter:
    • change server name, alias, admin e-mail and DocumentRoot (trailing slash in DocumentRoot is required!)
    • change directory paths
  • Run
    sudo /sbin/service httpd start

At this point you should have a working installation of ADIT-NMR. Make sure you have CifLoader binary (see below) and install the latest dictionaries.

CifLoader, maxit and other goodies

MakeDictObject.csh that generates dictionary binaries calls CifLoader. That's part of CifLoader. Run make in there after making the rest of mmcif-input-tool and copy the binary to dictionaries.

There is a number of binaries in maxit's bin subdirectory that are not built by make. If you ever need to rebuild them, try running make and/or make install in the subdirectories of maxit source tree (and their subdirectories and so on). Better yet, don't delete the original files.

(If you have to) some files come from checkfile-tool-v2.0-prod which is not part of maxit tarball. (Neither is procheck – not sure if it's still used anywhere… in case it is, better not touch procheck directory since nobody knows how to rebuild that.) Top-level make does not make checkfile-tool-v2.0-prod, build it separately and copy files from checkfile-tool-v2.0-prod/bin to top-level bin. You may have to also run make install in checkfile-tool-v2.0 as well as make in cifparse-obj-v7.0 (this is to make Cifparser.h) subdirs to get it all built.

When updating maxit, untar it over the existing maxit-v8.12-prod to keep all the extras and subversion data. Run make, then make binary to build the dictionary ODB files it needs.

obj to nmrif to star to whatever

  • cifobj to nmrif:
cgi-bin/bmrb-adit/obj2cif Table-db.odb Table-db.cif
  • nmrif to nmrstar
localbin/nmrif2nmrstr -f dict.cif Table-db.cif

Output goes to Table-db.str (run the program without parameters to see other options)

  • post-process nmrstar
localbin/aditpost/adit_postprocess_from_cgi Table-db.str

Note that ADIT-NMR calls the output file * and annotators expect to see that name.

TODO: post-processed nmr-star to pdbx for PDB depositions

  • commit to CVS:
/usr/bin/cvs -d '/cvsentries/' import -m 'Initial creation by ADIT-NMR' '<Project name>' ADIT-NMR start