Jump to content

Mod:Hunt Research Group/node-script

From ChemWiki

Host hpc

    Hostname login.cx1.hpc.ic.ac.uk


cat .bashrc

  1. Sample .bashrc for SuSE Linux
  2. Copyright (c) SuSE GmbH Nuernberg
  1. There are 3 different types of shells in bash: the login shell, normal shell
  2. and interactive shell. Login shells read ~/.profile and interactive shells
  3. read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all
  4. settings made here will also take effect in a login shell.
  5. NOTE: It is recommended to make language settings in ~/.profile rather than
  6. here, since multilingual X sessions would not work properly if LANG is over-
  7. ridden in every subshell.
  1. Some applications read the EDITOR variable to determine your favourite text
  2. editor. So uncomment the line below and enter the editor of your choice :-)
  3. export EDITOR=/usr/bin/vim
  4. export EDITOR=/usr/bin/mcedit
  1. For some news readers it makes sense to specify the NEWSSERVER variable here
  2. export NEWSSERVER=your.news.server
  1. If you want to use a Palm device with Linux, uncomment the two lines below.
  2. For some (older) Palm Pilots, you might need to set a lower baud rate
  3. e.g. 57600 or 38400; lowest is 9600 (very slow!)
  4. export PILOTPORT=/dev/pilot
  5. export PILOTRATE=115200
  1. export PARA_ARCH=MPI
  2. export PARNODES=2
  3. export TURBODIR=/home/niederme/TURBOMOLE
  4. export PATH=$TURBODIR/scripts:$PATH
  5. export PATH=$TURBODIR/bin/`sysname`:$PATH
  6. export PATH=$PATH:/home/niederme/bin/openbabel/bin/

test -s ~/.alias && . ~/.alias || true

  1. ~/.bashrc: executed by bash(1) for non-login shells.
  2. see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  3. for examples
  1. If not running interactively, don't do anything

[ -z "$PS1" ] && return

  1. don't put duplicate lines in the history. See bash(1) for more options

export HISTCONTROL=ignoredups

  1. ... and ignore same sucessive entries.

export HISTCONTROL=ignoreboth

  1. check the window size after each command and, if necessary,
  2. update the values of LINES and COLUMNS.

shopt -s checkwinsize

  1. make less more friendly for non-text input files, see lesspipe(1)

[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

  1. set variable identifying the chroot you work in (used in the prompt below)

if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then

   debian_chroot=$(cat /etc/debian_chroot)

fi

  1. set a fancy prompt (non-color, unless we know we "want" color)

case "$TERM" in xterm-color)

   PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
   ;;
  • )
   PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
   ;;

esac

  1. Comment in the above and uncomment this below for a color prompt
  2. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  1. If this is an xterm set the title to user@host:dir

case "$TERM" in xterm*|rxvt*)

   PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
   ;;
  • )
   ;;

esac

  1. Alias definitions.
  2. You may want to put all your additions into a separate file like
  3. ~/.bash_aliases, instead of adding them here directly.
  4. See /usr/share/doc/bash-doc/examples in the bash-doc package.
  1. if [ -f ~/.bash_aliases ]; then
  2. . ~/.bash_aliases
  3. fi
  1. enable color support of ls and also add handy aliases

if [ "$TERM" != "dumb" ]; then

   eval "`dircolors -b`"
   alias ls='ls --color=auto'
   #alias dir='ls --color=auto --format=vertical'
   #alias vdir='ls --color=auto --format=long'

fi

  1. some more ls aliases

alias ..='cd ..' alias grepfreq='egrep "SCF D|Low|Zero-point correction|NIm"' alias ll='ls -lh' alias x='exit' alias vic='vi control'

  1. alias gop='rungOpenMol'
  2. alias subturbo='subturbo -v 510'
  3. alias molden='/home/niederme/bin/gmolden4.6.linux -l -m -z -A -S'

alias cpv='cp -v' alias rmv='rm -v' alias gaussview='gview' alias myq='qstat'

  alias home="cd"
  alias work="cd \$WORK"
  alias tmp="cd \$TMPDIR"
  alias force="grep -i 'Maximum Force'"
  alias dist="grep -i 'Maximum Disp'"

module load gaussian module load gnuplot module load scipy/2009-08-25 module load python/2.6.4 module load openbabel/2.2.3 module load java module load gaussview/5.09

  1. alias gop='~/gOpenMol-3.00/bin/rungOpenMol'
  2. alias cq='ssh chemie cq'
  3. alias ort='myq -m'
  4. alias myqstat='myq -acl'
  5. alias la='ls -A'
  6. alias l='ls -CF'
  1. enable programmable completion features (you don't need to enable
  2. this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  3. sources /etc/bash.bashrc).

if [ -f /etc/bash_completion ]; then

   . /etc/bash_completion

fi


  1. !/bin/sh
  1. submit jobs to the que with this script using the following command:
  2. rng4 is this script
  3. jobname is a name you will see in the qstat command
  4. name is the actual file minus .com etc it is passed into this script as ${in}
  5. qsub rng4_8 -N jobname -v in=name
  1. batch processing commands
  2. PBS -l walltime=119:59:00
  3. PBS -lselect=1:ncpus=8:mem=7800MB
  4. PBS -k o
  5. PBS -q pqph
  6. PBS -m ae
  1. load modules

module load gaussian/g09

  1. check for a checkpoint file
  2. variable PBS_O_WORKDIR=directoiry from which the job was sumbited.
  test -r $PBS_O_WORKDIR/${in}.chk
  if [ $? -eq 0 ]
  then
    echo "located $PBS_O_WORKDIR/${in}.chk"
    cp $PBS_O_WORKDIR/${in}.chk $TMPDIR/.
  else
    echo "no checkpoint file $PBS_O_WORKDIR/${in}.chk"
  fi
  1. run gaussian
 g09 $PBS_O_WORKDIR/${in}.com
 cp $TMPDIR/${in}.chk /$PBS_O_WORKDIR/.
  1. cp *.chk /$PBS_O_WORKDIR/pbs_${in}.chk
  2. test -r $TMPDIR/fort.7
  3. if [ $? -eq 0 ]
  4. then
  5. cp $TMPDIR/fort.7 /$PBS_O_WORKDIR/${in}.mos
  6. fi
  7. exit