Next: , Previous: 2nd Example of Sphere Drawing, Up: Usage of Sphere Drawing


26.1.10 Example 3 — Nine Drawings in One Image

In this example, we prepare an image which has 9 pictures generated from time points in a molecular dynamics calculation of McPC 603. Only the hypervariable loops are displayed and the loop are color coded so that they can be distinguished.

     Display of 9 images of hypervariable loops of McPC 603
     *
     OPEN NAME CGDATA:RTOPH8.MOD UNIT 01 READ UNFORM
     OPEN NAME CGDATA:PARAM5.MOD UNIT 03 READ UNFORM
     OPEN NAME [BRUC.SEARCH]M603VPSF.MOD UNIT 12 READ UNFORM
     OPEN NAME [BRUC.M603.A.NEW]M6VAMN18.MOD UNIT 14 READ UNFORM
     READ      RTF UNIT 1
     READ      PARAMETER UNIT    3
     READ PSF FILE UNIT 12
     READ COOR FILE UNIT 14
     !
     ! At this point, everything we need except the trajectory has been read.
     ! We now orient the coordinates to a standard orientation.
     !
     COOR ORIENT CLEAR ATOM H 22 CA ATOM H 98 CA ATOM L 23 CA ATOM L 94 CA
     OPEN UNIT 20 NAME MCPDYN.IMG WRITE UNFORM       ! File where image will go
     SPHERE
     TL ;         McPC 603 DYNAMICS, 500 K. 0,6,12,20,34,54,74,94,114 PS;
     !
     ! Display only the hypervariable loops.
     !
     RM ALL
     AD CLEAR RANGE H 31 N H 35 O -
              RANGE H 51 N H 65 O -
              RANGE H 101 N H 107 O -
              RANGE L 24 N L 40 O -
              RANGE L 56 N L 62 O -
              RANGE L 95 N L 103 O
     AS 3.2                                          ! Need three fold reduction
     YR 180                                          ! Reorient for better view.
     CO 1 CLEAR RANGE H 31 N H 35 O                  ! Color the loops
     CO 2 CLEAR RANGE H 51 N H 65 O
     CO 3 CLEAR RANGE H 101 N H 107 O
     CO 2 CLEAR RANGE L 24 N L 40 O
     CO 1 CLEAR RANGE L 56 N L 62 O
     CO 4 CLEAR RANGE L 95 N L 103 O
     OC -4.3 3.8                             ! First picture in top left
     TR                                      ! Make spheres for first picture
     EX                                      ! Back to CONGEN for more work
     OPEN UNIT 14 NAME D18.CRD UNFORM READ   ! Trajectory
     READ COOR FILE UNIT 14 IFILE 30         ! Get fresh coordinates
     !
     ! Reorient like the first set
     !
     COOR ORIENT CLEAR ATOM H 22 CA ATOM H 98 CA ATOM L 23 CA ATOM L 94 CA
     SPHERE
     OC 4 0                                  ! Second picture to right of first.
     TR                                      ! Add spheres for next picture. The
                                             ! previous transformation applies.
     EX
     !
     ! Spheres for the next seven pictures are generated the same way.
     !
     OPEN UNIT 14 NAME D18.CRD UNFORM READ
     READ COOR FILE UNIT 14 IFILE 60
     COOR ORIENT CLEAR ATOM H 22 CA ATOM H 98 CA ATOM L 23 CA ATOM L 94 CA
     SPHERE
     OC 4 0                                  ! Third picture to right of second.
     TR
     EX
     OPEN UNIT 14 NAME D18.CRD UNFORM READ
     READ COOR FILE UNIT 14 IFILE 100
     COOR ORIENT CLEAR ATOM H 22 CA ATOM H 98 CA ATOM L 23 CA ATOM L 94 CA
     SPHERE
     OC -8 -3.7                              ! Fourth picture at middle left
     TR
     EX
     OPEN UNIT 14 NAME D18.CRD UNFORM READ
     READ COOR FILE UNIT 14 IFILE 170
     COOR ORIENT CLEAR ATOM H 22 CA ATOM H 98 CA ATOM L 23 CA ATOM L 94 CA
     SPHERE
     OC 4 0                                  ! Fifth picture at center.
     TR
     EX
     OPEN UNIT 14 NAME D18.CRD UNFORM READ
     READ COOR FILE UNIT 14 IFILE 270
     COOR ORIENT CLEAR ATOM H 22 CA ATOM H 98 CA ATOM L 23 CA ATOM L 94 CA
     SPHERE
     OC 4 0                                  ! Sixth picture at center right
     TR
     EX
     OPEN UNIT 14 NAME D18.CRD UNFORM READ
     READ COOR FILE UNIT 14 IFILE 370
     COOR ORIENT CLEAR ATOM H 22 CA ATOM H 98 CA ATOM L 23 CA ATOM L 94 CA
     SPHERE
     OC -8 -3.7                              ! Seventh picture at bottom left
     TR
     EX
     OPEN UNIT 14 NAME D18.CRD UNFORM READ
     READ COOR FILE UNIT 14 IFILE 470
     COOR ORIENT CLEAR ATOM H 22 CA ATOM H 98 CA ATOM L 23 CA ATOM L 94 CA
     SPHERE
     OC 4 0                                  ! Eighth picture at bottom center
     TR
     EX
     OPEN UNIT 14 NAME D18.CRD UNFORM READ
     READ COOR FILE UNIT 14 IFILE 570
     COOR ORIENT CLEAR ATOM H 22 CA ATOM H 98 CA ATOM L 23 CA ATOM L 94 CA
     SPHERE
     OC 4 0                                  ! Ninth picture at bottom right
     TR
     EX
     SPHERE
     IM                                      ! Finally, construct the image from
                                             ! all the spheres we've collected.
     WI 20                                   ! Write the image out
     EX                                      ! All done.