#!/bin/csh # CCP4 setup file for C-shell (or tcsh) users. -*- shell-script -*- # $Id: ccp4.setup-csh,v 1.139 2012/07/04 09:20:49 ccb Exp $ # This file is site specific and may also contain machine-specifics. The CCP4 # administrator will have to edit this file and then have anyone who wants to # use CCP4 source it from their .login file. They will require the full path # name since no environment variables relevant to CCP4 are known until this is # executed. # For sites with more than one machine, it is recommended that the suite is # installed on a single machine and other machines access the source code, and # shareable files (such as this one) via shared file systems with NFS, RFS # etc. Non-shareable files reside in $CBIN and $CLIB (see below). # Copy this file to ccp4.setup and customise it for your needs. There are # three sections. You MUST check the first section. You may want to check # the second. You don't need to look at the third. ################### THIS SECTION MUST BE EDITED ##################### # CCP4_MASTER is the location of the top-level directory containing `ccp4-' # This is usually the directory in which you ran the tar command to unpack the # code, and is assumed to be shared between machines at a multi-machine site. setenv CCP4_MASTER /xtal setenv CCP4 $CCP4_MASTER/ccp4-6.3.0 # Check for existence of CCP4_MASTER if (! -e $CCP4_MASTER) then echo "********************* WARNING **********************" echo "The directory $CCP4_MASTER" echo "(assigned to CCP4_MASTER) does not exist." echo "The CCP4 programs will not run correctly, and any" echo "installation attempt will have errors or will fail." echo "********************* WARNING **********************" endif # CCP4_SCR: a per-user directory for run-time-generated scratch # files. A dedicated scratch filesystem is probably better than (/usr)/tmp # BINSORT_SCR: a scratch directory for binsort's use; normally same as CCP4_SCR setenv CCP4_SCR /tmp/$USER # check to see if this exists and if not try to make it if (! -e $CCP4_SCR) mkdir $CCP4_SCR if (! -e $CCP4_SCR) \ echo "Unable to make CCP4_SCR. CCP4 progs will not run correctly." setenv BINSORT_SCR $CCP4_SCR ### CCP4i setup - you may need to edit CCP4I_TCLTK ### # CCP4I_TOP - the top directory of the interface setenv CCP4I_TOP ${CCP4}/share/ccp4i # CCP4I_TCLTK - directory containing tclsh,wish and bltwish executables # as used in $CCP4I_TOP/bin/ccp4i,ccp4ish,loggraph # For 'standard' installations this is /usr/local/bin # but note the SGI distributed version of Tcl/Tk is not # appropriate version setenv CCP4I_TCLTK /usr/local/bin # CCP4I_HELP - directory contain ccp4i help - default is $CCP4I_TOP/help setenv CCP4I_HELP ${CCP4I_TOP}/help ### Optional - setting http_proxy environment # The commented out 'setenv' line below may have to be declared to download # and edit protein sequences using the new "Import/Edit Protein Sequences" # (This may also be required for remote job submission in arp/warp.) # task. If so, uncomment this line and replace the example proxy URL with your # relevant URL #setenv HTTP_PROXY wwwblah.blah.ac.uk:xxxx/blah.blah ################### NOVICE USERS STOP HERE ##################### ################### OPTIONS TO CUSTOMISE CCP4 ##################### # By default, CCP4 directories are prepended to the beginning of paths (PATH, # LD_LIBRARY_PATH, and DYLD_LIBRARY_PATH). If ccp4_first_in_path is set # to 0, then they will be appended to the end of paths. # When deciding local policy, bear in mind the possible existence of # other CCP4 installations, and the possibility of non-CCP4 programs # with conflicting names. set ccp4_first_in_path = 1 # The following checks the CCP4 server for available updates, and reports back. # Uncomment this line if you want to know about available updates. #eval python -V >& /dev/null && python $CCP4/etc/ccp4_updates.py -l # Set GFORTRAN_UNBUFFERED_ALL to either 1 or Y to ensure that the logfile # output from programs compiled with Gfortran is in the correct order. # Note that there will be some performance penalty for this. #setenv GFORTRAN_UNBUFFERED_ALL Y # Gfortran 4.3.0 has new GFORTRAN_UNBUFFERED_PRECONNECTED variable # to make only STDOUT and STDERR unbuffered. # Unlike GFORTRAN_UNBUFFERED_ALL it doesn't slow down notably refmac # and probably also other programs. # Details: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33795 setenv GFORTRAN_UNBUFFERED_PRECONNECTED Y # The commented-out switch statement below provides an example of how # to use this file for several machines/architectures sharing $CCP4_MASTER. # If necessary, uncomment and edit this. Otherwise, if you're only supporting # a single system alter the uncommented part as necessary. # # The significance of the environment variables is as follows: # CBIN: location of the executables -- must be on your path (see below); # CLIB: location of (binary) library files such as libccp4.a and libccp4.so; # MANPATH: set this if your system's `man' looks at such an environment # variable to determine where to look for man pages. By adding # $CCP4/man to the normal path you get the CCP4 man pages # with keyword searching as system ones. # MCTYPE: used for LAUE make -- see LAUE documentation # CCP4_BROWSER: set this if you intend to use the html documentation # (recommended). It should have the path and name of a html browser eg # /usr/bin/X11/mozilla or /usr/local/bin/lynx. The browser will be # started with the alias ccp4help and will open the file # $CHTML/INDEX.html. # switch (`hostname`) # edit this switch statement if used # # for multiple systems # case 'foo': setenv CBIN $CCP4/bin setenv CLIB $CCP4/lib setenv CCP4_BROWSER firefox if (${?MANPATH}) then if ($ccp4_first_in_path) then setenv MANPATH ${CCP4}/man:${MANPATH} else setenv MANPATH ${MANPATH}:${CCP4}/man endif else if ($ccp4_first_in_path) then setenv MANPATH ${CCP4}/man:/usr/share/man else setenv MANPATH /usr/share/man:${CCP4}/man endif endif if (-d $CCP4_MASTER/laue) then setenv MCTYPE unix # (only for Laue) endif # breaksw # default: # echo "CCP4 not implemented on this system" # exit 1 # breaksw # endsw switch (`uname`) case 'Darwin': switch (`uname -r`) case 6: case 7: case 8: limit stacksize 65536 breaksw default: breaksw endsw breaksw default: breaksw endsw # The following are for all systems setenv CCP4_LIB $CLIB setenv CCP4_BIN $CBIN # CLASSPATH for Java if (${?CLASSPATH}) then if ($ccp4_first_in_path) then setenv CLASSPATH ${CBIN}:${CLASSPATH} else setenv CLASSPATH ${CLASSPATH}:${CBIN} endif else if ($ccp4_first_in_path) then setenv CLASSPATH ${CBIN}:. else setenv CLASSPATH .:${CBIN} endif endif #Python path for the subprocess fixed module if (${?PYTHONPATH}) then if ($ccp4_first_in_path) then setenv PYTHONPATH ${CCP4}/share/python:${PYTHONPATH} else setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/python endif else setenv PYTHONPATH ${CCP4}/share/python endif ### PLOT_COMMAND PRINT_COMMAND for the XCCPJIFFY programs to compile ### setenv PLOT_COMMAND 'lp -s -dmicrolaser' setenv PRINT_COMMAND 'lp -s -denscript' # HARVESTHOME specifies location of harvesting files (defaults to $HOME) #setenv HARVESTHOME ### CCP4_OPEN ### # CCP4_OPEN may be set to 'UNKNOWN' to stop open failures for files opened # as NEW that already exist. Novices should use 'NEW' to avoid inadvertant # over-writing of existing files, which is then treated as a fatal error. setenv CCP4_OPEN UNKNOWN ### BINSORT_MEM ### # BINSORT_MEM is workspace used by the binsort program. In principle this # value is machine-dependent. It may benefit from being enlarged, but values # higher than 2M have been reported to cause excessive paging on some systems. # You might like to experiment with a program such as fft with different # values -- 102400 (bytes) is the default. csh's `time' command can tell you # about paging. # # setenv BINSORT_MEM 8388608 # LD_LIBRARY_PATH specifies where to find dynamic libraries (e.g. libccp4.so) # at runtime if (${?LD_LIBRARY_PATH}) then if ($ccp4_first_in_path) then setenv LD_LIBRARY_PATH ${CLIB}:${LD_LIBRARY_PATH} else setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${CLIB} endif else setenv LD_LIBRARY_PATH ${CLIB} endif # DYLD_LIBRARY_PATH specifies where to find dynamic libraries (e.g. libccp4.dylib) # at runtime (used on Mac OS X) if (${?DYLD_LIBRARY_PATH}) then if ($ccp4_first_in_path) then setenv DYLD_LIBRARY_PATH ${CLIB}:${DYLD_LIBRARY_PATH} else setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${CLIB} endif else setenv DYLD_LIBRARY_PATH ${CLIB} endif ### XAPPLRESDIR ### # If you want to use xloggraph/xplot84driver, you need to get the application # defaults picked up somehow. As distributed, the file can't just live in an # application defaults directory since it requires reading by xrdb to sort out # the differences for monochrome displays. At Daresbury a version of the file # assuming a monochrome display is kept in the directory # $CCP4_LIB/X11/app-defaults and this is picked up through the # XUSERFILESEARCHPATH environment variable. That means you only see black and # white on a colour display. Alternatively you might make sure that it is # read by xrdb on startup of the X Windows system or delegate the # responsibility to users to run it. There are disadvantages to putting an # invocation of xrdb in here, one being that the correct value of DISPLAY may # not be set at the time this file is read. Thus edit this part as # appropriate. (SunOS will normally want to use /usr/openwin or $OPENWINHOME # instead of /usr; others may want /usr/local/lib or some such): if (-d $CCP4_LIB/X11/app-defaults) then if ($?XUSERFILESEARCHPATH) then setenv XUSERFILESEARCHPATH $CCP4_LIB/X11/app-defaults/%N:$XUSERFILESEARCHPATH else setenv XUSERFILESEARCHPATH $CCP4_LIB/X11/app-defaults/%N:/usr/lib/X11/app-defaults endif endif ### TRAPPFE ### # TRAPFPE is set to ensure (in collaboration with -lfpe) an abort on floating # point exceptions under IRIX. It shouldn't cause harm on other systems, but # edit this to comment it out if necessary. switch (`uname`) case '*IRIX*': setenv TRAP_FPE "OVERFL=ABORT; DIVZERO=ABORT; INVALID=ABORT" breaksw default: breaksw endsw # The following can be used to put a message of the day to announce news about # CCP4 or whatever to CCP4 users. You might also want to edit this part to # have machine-specific messages dependent on `hostname`. if (-e $CCP4/include/ccp4.msg) cat $CCP4/include/ccp4.msg ################### EXPERIENCED USERS STOP HERE ##################### ################### THE REST SHOULDN'T NEED EDITING ##################### ### dbCCP4i database handler setup ### setenv DBCCP4I_TOP ${CCP4}/share/dbccp4i ### IMOSFLM environment is now defined here setenv MOSFLM_EXEC ${CBIN}/ipmosflm setenv MOSFLM_WISH ${CCP4I_TCLTK}/wish ### MMCIFDIC is now defined here. cif_mmdic.lib is a binary file === # so on multiple installs it need to be unique and not in $CLIBD setenv MMCIFDIC $CCP4/share/ccif/cif_mmdic.lib ### MOLREPLIB Point to the location of the files bs-zeros.dat ps.resource symlib.blc # They are distributed with CCP4 in $CLIBD. This env must have the trailing \ or / setenv MOLREPLIB $CCP4/lib/data/monomers/ ### CRANK points to location of Crank automation suite within ccp4i setenv CRANK $CCP4I_TOP/crank setenv CCP4_CRANK 1 ### XIA2 setup # XIAROOT directory (default is under the share folder) if (-e $CCP4/share/xia2/setup.csh) then setenv XIA2_HOME $CCP4/share/xia2 source $CCP4/share/xia2/setup.csh endif # Note: The PATH is updated with the xia2 Applications directory in the # construct below. ### PISA_CONF_FILE is the config file needed to run the stand-alone PISA, # though this can be set on the command line too. if (-e $CCP4/share/pisa/pisa.cfg) then setenv PISA_CONF_FILE $CCP4/share/pisa/pisa.cfg endif ### CLIBD_MON Point to the location of the dictionary files for REFMAC5 # They are distributed with CCP4 in $CLIBD/monomers. This env must have # the trailing \ or / setenv CLIBD_MON $CCP4/lib/data/monomers/ ### PUBLIC_FONT84, CCP4_HELPDIR, HELPDIR, MOSHELPFILE ### # (essential for the relevant programs) setenv PUBLIC_FONT84 $CLIB/data/ccp4/font84.dat # plot84 fonts [used by plot84lib] # location of VMS-style help files required for mosflm [used by hlplib, chelp, # chlp, (ip)mosflm]: setenv CCP4_HELPDIR $CCP4/help/ # NB trailing / # Rasmol path. Needed for prog. to find rasmol.hlp setenv RASMOLPATH $CCP4/x-windows/RasMol/src # CCP4 executables and scripts live in $CBIN and $CETC respectively; put them # on the path in an appropriate order for scripts to be used as wrappers for # binaries of the same name. Put ccp4 stuff after the current path to avoid # confusion with `.' or whatever in the path: # # This construct prevents the path getting longer each time ccp4.setup is # executed (A. Perrakis) set ccp4pathlist = "${CCP4}/etc ${CBIN} ${CCP4I_TOP}/bin ${DBCCP4I_TOP}/bin" # foreach dir ( ${ccp4pathlist} ) if ( ${?PATH} ) then if ( :${PATH}: !~ *:${dir}:* ) then if ($ccp4_first_in_path) then setenv PATH ${dir}:${PATH} else setenv PATH ${PATH}:${dir} endif endif else setenv PATH ${dir} endif end # Optional (useful) additional environment variables setenv CCP4 $CCP4 setenv CDOC $CCP4/doc setenv CHTML $CCP4/html setenv CETC $CCP4/etc setenv CEXAM $CCP4/examples setenv CINCL $CCP4/include setenv CLIBD $CCP4/lib/data setenv CLIBS $CCP4/lib/libccp4 setenv CPROG $CCP4/src # useful aliases, at least for developers alias ccp4 'pushd $CCP4>/dev/null' alias xtal 'pushd $CCP4_MASTER>/dev/null' alias cbin 'pushd $CBIN>/dev/null' alias cetc 'pushd $CETC>/dev/null' alias cprog 'pushd $CPROG>/dev/null' alias cincl 'pushd $CINCL>/dev/null' alias clib 'pushd $CLIB>/dev/null' alias clibd 'pushd $CLIBD>/dev/null' alias clibs 'pushd $CLIBS>/dev/null' alias cbin 'pushd $CBIN>/dev/null' alias cexam 'pushd $CEXAM>/dev/null' alias cdoc 'pushd $CDOC>/dev/null' alias chtml 'pushd $CHTML>/dev/null' alias ccp4help '$CCP4_BROWSER $CHTML/INDEX.html &' ### laue, lget, linkimages ### ### only if we have the Laue software suite... if (-d $CCP4_MASTER/laue) then # Essential aliases for the Laue software suite alias laue '$CCP4_MASTER/laue/cmd/laue.cmd' alias lget '$CCP4_MASTER/laue/cmd/lget.cmd' alias linkimages '$CCP4_MASTER/laue/cmd/linkimages.cmd' # additional useful aliases for Laue directories alias llaue 'pushd $CCP4_MASTER/laue' alias lsrc 'pushd $CCP4_MASTER/laue/src>/dev/null' alias llib 'pushd $CCP4_MASTER/laue/lib>/dev/null' alias llibs 'pushd $CCP4_MASTER/laue/lib/src>/dev/null' alias ldoc 'pushd $CCP4_MASTER/laue/doc>/dev/null' alias lmak 'pushd $CCP4_MASTER/laue/make>/dev/null' alias lutils 'pushd $CCP4_MASTER/laue/utils>/dev/null' alias lcmd 'pushd $CCP4_MASTER/laue/cmd>/dev/null' alias ldl 'pushd $CCP4_MASTER/laue/dl>/dev/null' alias ltestd 'pushd $CCP4_MASTER/laue/testdata>/dev/null' alias lxdl 'pushd $CCP4_MASTER/laue/xdl_view>/dev/null' alias lxdls 'pushd $CCP4_MASTER/laue/xdl_view/src>/dev/null' alias lgnom 'pushd $CCP4_MASTER/laue/gnom>/dev/null' alias lgnoms 'pushd $CCP4_MASTER/laue/gnom/src>/dev/null' alias lbin 'pushd $CBIN>/dev/null' # endif # Set-up cctbx environment if (-e $CCP4/lib/cctbx/cctbx_build/setpaths.csh) source $CCP4/lib/cctbx/cctbx_build/setpaths.csh # Set-up phaser environment #if (-d $CCP4/src/phaser) then # set phaser_mtype = `$CCP4/src/phaser/bin/machine_type` # set phaser_version = `grep PHASER_VERSION $CCP4/src/phaser/conf/version.csh | awk '{print $3}'` # set phaser_setup_file = "${CCP4}/src/phaser/phaser-${phaser_version}/build/${phaser_mtype}/setpaths.csh" # if (-e $phaser_setup_file) source $phaser_setup_file #endif #BALBES root configuration if ( -d $CCP4/share/BALBES/Package) then setenv BALBES_ROOT $CCP4/share/BALBES/Package endif # Test for ARP/wARP 7.3 and source if (-e $CCP4_MASTER/arp_warp_7.3/arpwarp_setup.csh) then source $CCP4_MASTER/arp_warp_7.3/arpwarp_setup.csh endif