Presentation is loading. Please wait.

Presentation is loading. Please wait.

Selections, Scripting and Command Language

Similar presentations


Presentation on theme: "Selections, Scripting and Command Language"— Presentation transcript:

1 Selections, Scripting and Command Language

2 ICM – The Basics # ICM The Basics aa=2.4
#You have just created a new ICM-shell variable aa and assigned a value of 2.4 to it. You can create a variable with a name which is not already in use in the ICM-shell, does not contain space or delimiters like ".","," and starts from a letter (e.g. 1aag is an illegal name, except for sequences). Let us go on: bb=2.*aa #Now you have created another ICM-shell variable bb and its value is probably 4.8. Find it out by typing: print " bb=", bb #or any of these commands: list "b*" list integers show bb

3 Basics (Contd) #The next step would be to type a conditional expression like: if (bb != 4.8) print "something went wrong" #or something even more elaborate: if (bb != 4.8) then print "something went wrong" else print "It really works" endif #You can always start a for-loop such as: cc={"sushi","sashimi","negi maki","toro","period."} for i=1,Nof(cc) # Nof returns the number of elements. # Index i runs from 1 to 5 print "*** I just like to eat ",cc[i] endfor

4

5 ICM Molecule Introduction
display a_2. cpk # object selection (the second object) display a_1.1 ribbon green # molecule 1 from object 1 display a_1.2/his xstick # residue his12 shown as balls and sticks color a_/1.2/12/n* xstick blue # atoms: color nitrogens in blue prefix _ [ object(s) . ] molecule(s) / residue(s) / atom(s) or variable(s)

6 Making Selections The Prefix defines one of the three selection types:
atoms, residues, molecules and objects ( a_.. ) free variables ( v_.. ) all variables ( V_.. )

7

8

9

10

11

12

13

14

15

16

17

18

19 Free and all variables Example: aa = v_//phi,psi # the backbone torsions unfix only aa unfix only v_/10:15/phi,psi

20

21 ICM Command Language Verbs: read, write delete rename show display undisplay color make set Nouns: object, sequence, alignment, map e.g. read object “…..ob” make sequence “ALKLPLKD” show sequence display ribbon

22 Scripting - An ICM script means a collection of ICM commands stored in a file which can be called from ICM-shell. call s_ScriptFileName [ only ] invokes and executes an ICM-script file. End the script with the quit command, unless you want to continue to work interactively, or use it in other script. option “only” allows you to suppress opening the script file if the call command is inside a block which is not executed. By default the script file is opened and loaded into the ICM history stack anyway, but the commands from the file are not executed. Example: call _startup # execute commands from _startup file

23

24

25

26

27

28

29

30

31 Constants

32 Regular Expressions

33

34

35

36

37

38 Jump Controls break <for-loop> or <while-loop> ...
if ( <logical expression> ) break <end of loop>

39 Jump Controls continue <for-loop> or <while-loop> ...
if ( <logical expression> ) continue <end of loop>

40 Jump Controls goto ... if ( <logical expression> )
goto <label> <label>: ...

41 Jump Examples

42 Logical Operations

43 Logical Operations (contd)

44 Comparison Operators


Download ppt "Selections, Scripting and Command Language"

Similar presentations


Ads by Google