DINO: Visualizing Structural Biology |
|
User Manual
|
The DINO shell provides an interface between program and user, just as the UNIX shell provides an interface between operating system and user. The DINO shell offers a prompt in the terminal, where commands can be typed in. In essence, the input is parsed, some syntax rules are applied and the command line is broken down into words. The first word is checked against the internal shell commands, if no match is found the command line is passed to the database manager.
Words beginning with a $ are interpreted as variables and are replaced with the value of the variable. (see commands set and unset below).
An expression enclosed in square brackets is considered a subprompt. It is evaluated first, and the result (return value) of the sub-expression is inserted at the position of the subprompt. Consider the following input:
> expression1 [expression2 arg]
expression2 arg is treated as a separate command, its result result2 is inserted in the place of the original subprompt and becomes:
> expression1 result2
A script is called with the @ sign, followed by the filename. Additional words are interpreted as parameters and are passed as variables to the script, accessible as $1 , $2 ... $n (n = number of arguments).
Syntax: @scriptfile [param1 ...]
Two slashes denote a comment (C++ style) and can appear anywhere in the line, with the rest of the line (up to newline) treated as a comment.
Example: // this is a comment
The command echo prints all of its arguments to the terminal. The output can be redirected into a file with > (write) or >> (append):
Syntax: echo WORD1 [WORD2 ...] [>[>] file.out]
Variables are defined and removed with set and unset . The command var will list all currently defined variables with their values.
Syntax: set VAR VALUE unset VAR [VAR ...]
An alias is a special form of variable. It is defined with alias and removed with unalias .
Syntax: alias ALIAS EXPRESSION unalias ALIAS
If the first word on the command line (or the first word in a subprompt!) matches ALIAS , it will be replaced by EXPRESSION (which can consist of multiple words). alias by itself will list all defined aliases.
In a script, the command pause will stop execution until a key is pressed. If the key is ESC, script execution is stopped.
In a script, the command break will discontinue script execution and return one level up, either to the calling script or the command prompt.
Use system or ! to execute a command in a unix shell
Example: system gimp pic1.png !ls -l
To quit DINO use exit . To exit DINO use quit 1.
The commands push , pop , peek , opr , clear , dup and show manipulate the arithmetic RPN stack2. push moves all arguments onto the stack (from left to right). pop retrieves values from the stack, optionally into supplied variable names. peek returns the topmost value without removing it from the stack. opr takes a list of operator which are applied (left to right) to the stack. clear empties the stack. dup duplicates the top value. show displays the complete stack.
Syntax: push VAL [VAL ...] pop [VAR1 [VAR2 ...]] peek opr OPR clear dup show
The availabe unary and binary operators are shown in Table 1 (P. 11).
protein: (rname=ALA,CYS,ASP,GLU,PHE,GLY,HIS,ILE,LYS,LEU, MET,ASN,PRO,GLN,ARG,SER,THR,VAL,TRP,TYR)
dna: (rname=A,C,G,T)
rna: (rname=A,C,G,U)
aliphatic: (rname=ALA,GLY,ILE,LEU,MET,PRO,VAL)
aromatic: (rname=PHE,TYR,TRP)
hydrophobic: (rname=ALA,VAL,PHE,PRO,MET,ILE,LEU,TRP)
basic: (rname=ARG,LYS)
basic2: ((rname=LYS & aname=NZ) | (rname=ARG & aname=NH1,NH2))
acidic: (rname=ASP,GLU)
acidic2: ((rname=GLU & aname=OE1,OE2) | (rname=ASP & aname=OD1,OD2))
polar: (rname=SER,THR,TYR,HIS,CYS,ASN,GLN)
polar2: ( (rname=SER & aname=OG) | (rname=THR & aname=OG1) | (rname=TYR & aname=OH) | (rname=HIS & aname=ND1,NE2) | (rname=CYS & aname=SG) | (rname=ASN & aname=OD1,ND1) | (rname=GLN & aname=OE1,NE1) | (rname=TRP & aname=NE1))
2. In a nutshell: In RPN (Reverse Polish Notation), a stack is filled with values, and an operator is called that uses the topmost value (unary op, e.g. sqrt) or the two topmost values (binary op, e.g. +), placing the value back on the stack. A simple arithmetic expression as 1+1 becomes 1 1 +, a more complex as (1+2)*(4/5+6) becomes 1 2 + 4 5 / 6 + *. People used to the HP calculators or programming PS will be familiar with this approach.