1 / 44

Selections, Scripting and Command Language

Selections, Scripting and Command Language. ICM – The Basics. # ICM The Basics aa=2.4

carver
Télécharger la présentation

Selections, Scripting and Command Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. 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)

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

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

  7. 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

  8. 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

  9. Constants

  10. Regular Expressions

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

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

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

  14. Jump Examples

  15. Logical Operations

  16. Logical Operations (contd)

  17. Comparison Operators

More Related