File: worms

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 (30 lines) | stat: -rwxr-xr-x 847 bytes parent folder | download | duplicates (8)
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
#!/bin/csh
#
# Wrapper for rods program that splits main/sidechain atoms for
# separate treatment. The backbone is drawn as a radius 0.3 worm.
# Sidechains are drawn as 0.15A rods
#
# Save temporary copy of input stream
cat > worms.tmp.0
#
# Backbone first, with or without header as determined by $1 (-h)
#
rm -rf worms.tmp.1
if ($1 == "-h") then
echo "# Worms version 1.0" > worms.tmp.1
echo "# Backbone atoms"   >> worms.tmp.1
else
touch worms.tmp.1
endif
grep -E -w '(^COLOUR.*)|(N)|(C)|(CA)' worms.tmp.0 | rods $1 -r 0.3 >> worms.tmp.1
#
# Now the sidechains (actually everything but the backbone carbonyl bond)
#
echo "# Worms version 1.0" > worms.tmp.2
echo "# Sidechain atoms"  >> worms.tmp.2
grep -E -v ' ((O)|(C)) ' worms.tmp.0 | rods -h -r 0.15 >> worms.tmp.2
#
#
#
cat worms.tmp.1 worms.tmp.2
rm -f worms.tmp.0 worms.tmp.1 worms.tmp.2