SlideServe
Menu
Préférences
© SlideServe · v2026

Selections, Scripting and Command Language

rwatts avatar
44 diapositives · 514 Views · Jan 04, 2020

Learn the basics of ICM script language including creating variables, making selections, conditional expressions, and loops. Dive into molecule structure display and ICM commands for scripting.

Selections, Scripting and Command Language - slide 1
01 / 44Selections, Scripting and Command Language
1 / 17

Télécharger la présentation

Selections, Scripting and Command Language
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  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