File: example2.script

package info (click to toggle)
raster3d 3.0-3-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,916 kB
  • ctags: 1,557
  • sloc: fortran: 9,536; ansic: 1,060; makefile: 318; sh: 250; csh: 15
file content (43 lines) | stat: -rwxr-xr-x 1,408 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# E A Merritt March 1993
# Illustration of composed figure using Raster3D
# (assumes ImageMagick installed, if not then don't pipe output from render)
#
export TMPFILE=`mktemp /tmp/ex2.XXXXXX` || exit 1
export TMPBALLS=`mktemp /tmp/ex2.XXXXXX` || exit 1
export TMPSUGAR=`mktemp /tmp/ex2.XXXXXX` || exit 1
#
# figure consists of E. coli enterotoxin (protein as spheres)
# binding to GM1 pentasaccharide (sugars represented as rods)
# protruding from cell membrane (plane)
# 
# Attach atom colouring to front of PDB file
#
cat chaincolours.pdb LT.pdb > $TMPFILE
#
# space-filling representation of protein atoms
#
balls -h < $TMPFILE > $TMPBALLS
#
# draw oligosaccharide as stick model
#
cat sugarcolours.pdb sugars.pdb > $TMPFILE
rods  -h < $TMPFILE > $TMPSUGAR
#
# combine protein description with sugar description and 
# add in description of plane surface lying below both.
# At the front goes a file containing the header records
# describing the view angle, image size, lighting, etc.
#
cat header2.r3d plane.r3d $TMPSUGAR $TMPBALLS > $TMPFILE
#
# Feed the composite description through the rendering progran
# and pipe the output to the ImageMagick display utility.
# If you have built the SGI libimage version instead, then use
#  render example1.rgb < $TMPFILE; ipaste example1.rgb
#
render -png < $TMPFILE | display png:-
#
# Clean up before leaving
#
rm -f $TMPFILE $TMPSUGAR $TMPBALLS