Copyright © 2020, Molsoft LLC Nov 24 2024
|
[ Graphics learning | Nice image | Image rotation | Mol translation | Image annotation | Image | Color background example | Image center | Color by bfactor | Color by hydrophobicity | Color by accessibility | Color by charge ]
To master ICM graphics you only need to know the following words: commands: display, undisplay, color, center, delete, connect ; nouns: wire, cpk, ball, stick, xstick, surface, skin, ribbon, label, residue, atom ; selections : 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 .
So called computational biology is primarily about generating nice pictures. Here are a few tips.
First, you need to move the molecule of interest to the center of the screen: center to this molecule and use the connect a_molselection command to 'connect' your mouse to just this molecule and leave everything else unchanged. You will see that E.g. read pdb "2ins" center a_b connect a_b # use mouse LB to rotate and translate
You can rotate/translate/zoom the whole scene with all molecules (see the set view command), or rotate/translate a selection of molecules with respect to the rest. 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* . build string "AAA;GGG;WE-sep-RR" # (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 build string "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:
build string "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.
Simply use display string command allowing to place a string into the graphics screen. The string can be dragged later to any location with the middle mouse button. You can set font, color and positions you like. Obsolete strings can also be undisplayed or removed by the command delete label, or by the BACKSPACE key when the cursor is in the graphics window (see keyboard and mouse controls ).
Save the image using write image command, preview it with the IRIX imgview, convert it to the PostScript format and print it. You may also save image directly in PostScript format, either as a bitmap snapshot or as a vectorized high-quality model of linear, triangular and string primitives, as they are rendered on your display. See write image and write postscript for details.
The color background command allows one to set any color from those specified in the file icm.clr, for example 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, set color .
See also Image , make image , set background image.
Use the center command.
Command color can use any real array as a set of individual color numerical specifications. The smallest number corresponds to the red color, the largest number to the blue one. Function Bfactor( as_ ) returns the real array of B-values for each selected atom. Examples: read pdb "1crn" color a_1crn.//* Bfactor(a_1crn.//*)
It is very simple: 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.
Function Area is required. 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
Use function Charge . For example: 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-2024, Molsoft,LLC - All Rights Reserved. Copyright© 1989-2024, 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. |