Custom building Coot from source code: Difference between revisions

organized section better with subheadings
(organized section better with subheadings)
Line 71: Line 71:


====Fourth, configure and build coot like this:====
====Fourth, configure and build coot like this:====
=====Start a root shell session=====


If root is enabled, log into a root shell, or else if you have sudo (debian, ubuntu, etc), use the command
If root is enabled, log into a root shell, or else if you have sudo (debian, ubuntu, etc), use the command
Line 77: Line 79:


(or whatever shell) to open a root shell, and issue the following commands as indicated.
(or whatever shell) to open a root shell, and issue the following commands as indicated.
=====Fix a configure bug=====


First, issue the following command to fix a configure bug when compiling with gpp4:
First, issue the following command to fix a configure bug when compiling with gpp4:
Line 82: Line 87:
  perl -pi -e 's|lccp4c|lgpp4|g' configure  
  perl -pi -e 's|lccp4c|lgpp4|g' configure  


Now configure this way:
=====Now configure this way: =====


<pre>
<pre>
Line 101: Line 106:
</pre>
</pre>


Then, remake the  src/coot_wrap_python.cc and src/coot_wrap_guile.cc files:
=====Then, remake the  src/coot_wrap_python.cc and src/coot_wrap_guile.cc files: =====


  /bin/rm -f **/coot_wrap_**.cc
  /bin/rm -f **/coot_wrap_**.cc
Line 111: Line 116:
  cd ..
  cd ..


Now compile coot:
=====Now compile coot:=====
  make  
  make  
  make -i install
  make -i install
=====To make it play nice with python, I have had to do the following: =====
perl pi -e 's|PYTHONHOME=\$COOT_PREFIX|\#PYTHONHOME=\$COOT_PREFIX|g' bin/coot
  cp src/coot.py python/.
  cp src/coot.py python/.
  cp src/coot.py share/coot/python/.
  cp src/coot.py share/coot/python/.
   
   
Now add the reference structures:
=====Now add the reference structures: =====
  cd share/coot
  cd share/coot
  wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz
  wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz
  tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz
  tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz


Now add the refmac dictionaries (eg using coot-0.5 and refmac 5.4; change as required):
===== Now add the refmac dictionaries=====
(eg using coot-0.5 and refmac 5.4; change as required):
 
  cd /tmp
  cd /tmp
  wget  wget http://www.ysbl.york.ac.uk/refmac/data/refmac5.4_dictionary.tar.gz
  wget  wget http://www.ysbl.york.ac.uk/refmac/data/refmac5.4_dictionary.tar.gz
Line 129: Line 139:
  cp -r dic /usr/local/xtal/coot-0.5/lib/data/monomers
  cp -r dic /usr/local/xtal/coot-0.5/lib/data/monomers


Export the COOT_REFMAC_LIB_DIR variable (you can edit bin/coot):
=====Export the COOT_REFMAC_LIB_DIR variable =====
(you can edit bin/coot):  
   export COOT_REFMAC_LIB_DIR=$COOT_PREFIX/lib
   export COOT_REFMAC_LIB_DIR=$COOT_PREFIX/lib


=====Notes on the above: =====
The configure command is all one line; I've escaped the return. Using --prefix=$PWD simply keeps everything self-contained.  You can use any install prefix you want to (it defaults to /usr/local; another sensible choice is /usr/local/xtal.  Avoid /usr as a prefix, as it can mess with your system).
The configure command is all one line; I've escaped the return. Using --prefix=$PWD simply keeps everything self-contained.  You can use any install prefix you want to (it defaults to /usr/local; another sensible choice is /usr/local/xtal.  Avoid /usr as a prefix, as it can mess with your system).


126

edits