Jul 1 2004 |
[ gl | niceimage | imagerotation | moltranslation | imageannotation | isp | cbe | ic | cbb | cbh | cba | cbc ]
nouns: wire, cpk, ball, stick, xstick, surface, skin, ribbon, label, residue, atom ; selection : e.g. a_1. # the first object a_1.1 # the first molecule a_1.1/5:10 # residues from 5 to 10 a_1.1//ca,c,n # the backbone atoms Sphere(a_1.1 a_2. 10.) # atoms around a_1.1 in a_2.colors: white, black, blue, green, etc. (see file icm.clr ). output image formats: png , tif (default) , targa, gif , rgb . Now start from the command word and type what you need, and use controls to rotate, translate, label, zoom, mark and color. Example: read pdb "1crn" display ribbon color ribbon a_/4:8 blue display xstick a_1.1/10 green center a_/6:12 display residue label a_/6:12 display string "Crambin" 36 red write image rgb "crn" # use IRIX imgview to check the image write image window=2*View(window) # hi-res pictureMore advanced topics: connect , graphics objects .
1) image display. Display your molecule or molecule the way you like. Running the nice macro (e.g. nice "1est") is a good start. 2) background. Change background color with Ctrl-E and Ctrl-Q to your liking. 3) fog. It is a great visual effect. Use it! Switch on the depth-cueing effect, i.e. fog with Ctrl-D (depth). Move the bright front clipping planes with Ctrl-MidMB and move the back clipping plane closer with vertical movements with MidMB at the right margin of your graphics window (the mapping of the mouse controls to effects is defined by the icm.clr file). You may color the fog with color volume color command and modify fogStart to increase or decrease the unfogged slice of the molecule. 4) grobs. Make them smooth with select g_.. and pressing Ctrl-X and unselecting with the Esc button. To shine light from outside sometimes you need to say display reverse . 5) quality of graphic elements. set IMAGE.quality=12 or 15. This parameter determines the number of triangles in shapes like spheres and cylinders. The default value is only 5. because at routine interactive work you prefer speed to quality. 6) image resolution. Let us count pixels. Your screen window is usually about 600x600 pixels which corresponds to 2x2inch picture at 300dpi resolution, or 1x1 inch at 600dpi. Therefore, if you want to generate image at high resolution use two tricks: (i) make your window as large as possible; (ii) use the write image command with option window= and select a factor 2 or 3 to generate 2 or 3 times large image respecively, e.g. write image png window= 2 * View(window)Be careful, the window option will not save the text labels. It is preferable to add text labels outside ICM anyway. 7) The picture is ready. Enjoy the attention.
read pdb "2ins" center a_b connect a_b # use mouse LB to rotate and translate
To achieve the second goal from a script, learn about these elementary operations Memorizing and resetting position of an ICM object To memorize rotation and translation of an object or a group of molecules in an object, use the Value function and memorize the values of six positional variables for each molecule which have names tvt1,avt1,bvt1,tvt2,avt2,tvt3 and can be selected as v_molecules//?vt* . buildpep "AAA;GGG;WERR" # (or read pdb and convertObject ) v1 = Value( v_1,2//?vt* )# MEMORIZE 6-var per molecule. connect a_1,2 # move the connected 2 molecules around set v_1,2//?vt* v1 # RESET the values Translating the selected molecules buildpep "AAA;GGG;WEGG" translate a_1,2 add {0., 0., 1.} for i=1,10 translate a_1,2 add i*{0.,0.,0.2} # incremental translation endfor Calculating translation vectors Follow these steps:
buildpep "AAA;GGG;WEGG" for i=1,10 translate a_1 0.1*i*vtr endfor Rotating selected molecules around specified axes. First one needs to do the following:
Making grob gradually disappear in the backround One needs to use Color(grob) function. See examples in the description of the color grob command.
write image and write postscript for details.
color background white # or color background black # or color background aquamarineNote that numeric values may also be used, for example: display string "background\ncolor test" 0.4, 0.9 ncolor = 127 for icolor = 1, ncolor, 1 color background icolor display string "color number " + String (icolor) delete label 2 endfor delete label display string "the end" color background blackSee also icm.clr file.
Examples: read pdb "1crn" color a_1crn.//* Bfactor(a_1crn.//*)
read object "4pti" display a_//!h* white display surface a_1.1 a_1.1 s_method = "surface" # s_method = "xstick" or "cpk" is also possible # hydrophobic color $s_method yellow a_/ala,val,phe,ile,leu,pro,met/!c,n,o,hn # polar color $s_method pink a_/ser,thr,tyr,cys,asn,gln,his,trp,gly # charged (+) color $s_method blue a_/lys,arg/nz,hz*,nh*,hh* # charged (-) color $s_method red a_/asp,glu/oe*,od* display string yellow "hydrophobic: yellow" 25, -0.9, 0.9 display string pink "polar: pink" 25, -0.9, 0.6 display string blue "charged(-)" 25, -0.9, 0.8 display string red "charged(+)" 25, -0.9, 0.7See also How to color atoms according to their charges.
Example: read object "crn" show surface area # calculate the surface energy contribution # (hence, the accessibilities are also calculated) assign sstructure a_/* "_" # remove current secondary structure assignment # for "tube" representation display ribbon # calculate smoothed relative accessibilities # and color the tube according # to the accessibilities of the residues color ribbon a_/* Smooth(Area(a_/*)/Area(a_/* type) 5) # plot residue accessibility profile plot Count(1 Nof(a_/*)) Smooth(Area(a_/*)/Area(a_/* type) 5) display
read object "crn" display surface color a_//* Charge(a_//*) Another example is selected residues coloring: display a_*./asp,glu/o?* cpk red display a_*./lys,arg/nz,n?* cpk blue
|
Copyright© 1989-2004, Molsoft,LLC - All Rights Reserved. |
This document contains proprietary and confidential information of
Molsoft, LLC. The content of this document may not be disclosed to third parties, copied or duplicated in any form, in whole or in part, without the prior written permission from Molsoft, LLC. |