David Goodsell's ILLUSTRATE - Biomolecular Illustration Tool standard hemoglobin demo

This uses the included input script and PDB file for hemoglobin to run through using the Fortran code to generate output. The output .pnm file is then converted to a PNG.

Everything is installed and ready to run if you are accessing this using a link that involves MyBinder.org.

Learn more about David Goodsell's work and software here and here.

You can exectute Run all to run the code all in one step or step through each cell entering shift-enter to trigger running each.


Preparation

Copy the input files from the previously cloned repository to the current working directory. (See postBuild for previous set-up steps and compiling.)

In [1]:
cp ~/.local/bin/Illustrate/* .

Show the compiled fortran code for illustrate is now in the working directory along with input files, 2hhb.inp (script file) and 2hhb.pdb (standard structure file in PDB format).

In [2]:
!ls 
2hhb_image.png		demo_colors.ipynb   illustrate_std_demo.ipynb
2hhb.inp		demo_fetch.ipynb    image.png
2hhb.pdb		demo_orient.ipynb   LICENSE
2hhb.pnm		demo_palette.ipynb  README.md
converted_image.png	illustrate
demo_apply_combo.ipynb	illustrate.f

Run Illustrate

In [3]:
!./illustrate < 2hhb.inp
  atom descriptors:           15
 type, color, radius            1  0.500000000      0.500000000      0.500000000       0.00000000    
 type, color, radius            2  0.500000000      0.500000000      0.500000000       0.00000000    
 type, color, radius            3  0.500000000      0.500000000      0.500000000       0.00000000    
 type, color, radius            4   1.00000000      0.600000024      0.600000024       1.60000002    
 type, color, radius            5   1.00000000      0.500000000      0.500000000       1.79999995    
 type, color, radius            6   1.00000000      0.500000000      0.500000000       1.50000000    
 type, color, radius            7   1.00000000      0.600000024      0.600000024       1.60000002    
 type, color, radius            8   1.00000000      0.500000000      0.500000000       1.79999995    
 type, color, radius            9   1.00000000      0.500000000      0.500000000       1.50000000    
 type, color, radius           10   1.00000000      0.800000012      0.600000024       1.60000002    
 type, color, radius           11   1.00000000      0.699999988      0.500000000       1.79999995    
 type, color, radius           12   1.00000000      0.699999988      0.500000000       1.50000000    
 type, color, radius           13   1.00000000      0.800000012       0.00000000       1.79999995    
 type, color, radius           14   1.00000000      0.300000012      0.300000012       1.60000002    
 type, color, radius           15   1.00000000      0.100000001      0.100000001       1.50000000    
 Number of BIOMT            0
 Chains in Biological Assembly
           1 A
           2 B
           3 C
           4 D

 Number of BIOMT            1
 BIOMAT            1   1.00000000       0.00000000       0.00000000       0.00000000    
 BIOMAT            1   0.00000000       1.00000000       0.00000000       0.00000000    
 BIOMAT            1   0.00000000       0.00000000       1.00000000       0.00000000    
  atoms read:         4556  from: 2hhb.pdb                                                                        
  number of subunits:            8
  
 translation vector :    0.00000000       0.00000000       0.00000000    

 scale factor :    12.0000000    

 z rotation :    90.0000000    
  background inten. :    1.00   1.00   1.00
  fog intensity :        1.00   1.00   1.00
  upper fog percent :  100.00
  lower fog percent :  100.00
  draw conical shadow
 input value for image size         -30         -30
 illustration parameters
 l parameters:    3.00000000       10.0000000    
 g parameters:    3.00000000       8.00000000    

  *begin calculation*

 min coordinates :   -26.4710026      -34.0060005      -29.9990005    
 max coordinates :    27.4800034       34.3030014       29.9880009    
 automating centering
 centering vector :  -0.504499435     -0.148502350      -52.5879974    

 applying autosizing
 x and y frame width:           30          30
 xsize and ysize:          750         922

 output pnm filename: 2hhb.pnm                                                                        
           0  spheres added of type:            1
           0  spheres added of type:            2
           0  spheres added of type:            3
         685  spheres added of type:            4
           3  spheres added of type:            5
         381  spheres added of type:            6
         685  spheres added of type:            7
           3  spheres added of type:            8
         381  spheres added of type:            9
        1448  spheres added of type:           10
           6  spheres added of type:           11
         792  spheres added of type:           12
           4  spheres added of type:           13
         136  spheres added of type:           14
          32  spheres added of type:           15
 shading maps written into depth buffer
 zpix_min,zpix_max   -818.827271      -253.199951    
  Pixel processing beginning 
99999999999999999999999999999999999999999999999
99999999999999109884999990095999999999999999999
99999999999999995899999999989887799999999999999
99999999999968994878899999768789976999999999999
99999999992798889999693957746519995999999999999
99999999967697998982898045194898995999999999999
99999999907698999989989986889899688890999999999
99999990778888980888989957688988888888999999999
99999977776708981729999979967888777788828999999
99999288869898870988588809978807089656788999999
99990998799977868929888789878869997859967809999
99976499709898998979899889577059999789978879999
99979888889988990887839899007748699889978709999
99999989987899867881880888885769997899668999999
99999099987999989998988986900549998905678999999
99997588762888886998089869998969989989378999999
99997687086899889896269887899988988998567879999
99999909989999998899889988888999498890895999999
99999904638900996999787908989958798899816999999
99995885499998999998994639881989598888561699999
99999886099989999099998800448728885886789978099
99999884899899999696969995898178889908898538999
99999877999978154776599998909998888308908999999
99998987763296668870007999989906759890968979999
99968846367760650998088897888878999899898709999
99999667688887756998099995890989987491078879999
99999878778088987488899989998970078867578989999
99999789798509998298485788479957888888889999999
99999999888888882665446889988772888086832999999
99999999979998958862059988977268899967899999999
99999999989998989986769948908897884578999999999
99999999908999989906778808978898978657999999999
99999999999999556876899999787909959799999999999
99999999999056588788999999188568986799999999999
99999999999999887998999999997977999999999999999
99999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999

That produces the file 2hhb.pnm, which is in the portable anymap format, see here.

In [4]:
!ls 2hhb.pnm
2hhb.pnm

Convert output from portable anymap format to standard PNG format

Conversion uses the Netpbm project's pnmtopng.

In [5]:
!pnmtopng 2hhb.pnm > 2hhb_image.png

Display the output here.

In [6]:
from IPython.display import Image
Image("2hhb_image.png")
Out[6]: