In brief, a regular selection allows matching to multiple possibilities, instead of just one character.Table 5.9 shows some of the methods that can be used.There are many ways to do some selections. For example, choosing atoms with a name of eitherCA or CB can be done in the following ways:name CA CBname "CA|CB"name "C[AB]"name "C(A|B)"Several caveats for those who already understand regular expressions. <strong>VMD</strong> automaticallyprepends “^(” and appends “)$” to the selection string. This makes the selection O match onlyO and not OG or PRO. On the other hand, putting ^ and $ into the command won’t really affectanything, selections that match on a substring must be preceded and followed by “.*”, as in .*O.*,and some illegal selections could be accepted as correct, but strange, as in C)|(O ,whichgetsconverted to ^(C)|(O)$ and matches anything starting with a C or ending with an O.A regular expression is similar to wildcard matching in X-PLOR. Table 5.10 is a list of conversionsfrom X-PLOR style wildcards to the matching regular expression.5.3.6 Comparison selectionsComparisons can be used in <strong>VMD</strong> to do atom selections like mass < 5, which selects atoms withmass less than 5 amu, and name eq CA, which is another way of choosing the CA atoms. Theunderlying idea for the comparison selection is also based on the concept that every atom has aproperty as specified by a keyword. When the keyword is given in the expression, the array (orvector) of the corresponding values is constructed, and the size of the array is the same as thenumber of atoms in the molecule. (If a single number or string is given instead of a keyword, thearray consists of copies of that given value.) The operations, like addition, multiplication, stringmatching, and comparison, are then applied element-wise along the array. This type of selection issimilar to the vector statement in X-PLOR.Take the example mass < 5 when applied on water, which has an oxygen of mass 15.9994 andtwo hydrogens of mass 1.008. <strong>VMD</strong> sees the keyword mass and constructs the array [15.9994,1.008, 1.008], then sees the “5” and makes the array [5, 5, 5]. It then compares each term of thearray and returns with the boolean array [False, True, True] (since 15.9994 is not less than 5, but1.008 is). This final boolean array is then used to determine which atoms are selected; in this case,the hydrogens.More complicated comparison selections can be constructed, either from arithmetic operationsor by using some of the standard math functions (the functions are listed in Table 5.7). Probablythe most often used function will be sqr, which squares each element of the array. Thus, thecommand to select all atoms within 5 Å of a point (x,y,z) = (3,4,-5) in space is:sqr(x-3)+sqr(y-4)+sqr(z+5)
the numeric sense) or greater than ‘11’ (in the lexographical sense). Instead of trying to resolvethis problem through some sort of internal heuristics, <strong>VMD</strong> leaves it up to the user so that 8 < 11but 11 lt 8. (Perl users should recognize this solution.)The numeric comparisons are the standard ones: , and!=. The correspondingstring comparisons are: lt, le, eq, ge, gt, andne. As in perl there is a “match” operator, =~, sothat’CA’ =~ "C.*"segname =~ "VP[1-4]" (matches VP1, VP2, VP3, and VP4, present in somevirus structures)are valid. No distinction is made between single and double quotes.5.3.8 Other selectionssequence<strong>VMD</strong> supports selection based on the one-letter amino acid sequence with the sequence selectionkeyword. This allows selections of the formsequence APDsequence "C..C" (might be used to pick out zinc fingers)sequence AATCGGATUnlike the other string selection commands which take one of three types of strings, all thestrings for sequence are taken as regular expressions (though strings with non-alphanumerics muststill be quoted to get past the input parser). The method works by taking each of the proteinand nucleic acid fragments (pfrag and nfrag) in turn and constructing the one-letter amino acidsequence. If a regular expression matches any of the sequence, the atoms in the matching residuesare selected. Multiple matches are allowed, though they cannot overlap. As is usual with regularexpressions, the largest possible match is made, so take care with expressions like C.*C.within and sameTwo useful types of selection mechanisms available in <strong>VMD</strong>are: within of and same as . The first selects all atoms within the specified distance (inÅ) from a selection, including the selection itself. Therefore, the command:within 5 of name FEselects all atoms within 5 Å of atoms named FE. One common use for this command is to limit theregion of atoms shown on the screen. Another is to find atoms that may be involved in interactions.For instance:protein within 5 of nucleicfinds the protein atoms that are nearby nucleic acids. Some selections may be sped up by shortcircuiting [§5.3.3].A related atom selection construct is exwithin, short for ’exclusive within’. The atom selection(within 3 of protein) and not protein is equivalent to exwithin 3 of protein.The same as finds all the atoms which have the same ‘keyword’ asthe atoms in the selection. This can be used for selections like75
- Page 1 and 2:
VMD User’s GuideVersion 1.8.6Apri
- Page 3 and 4:
4.4.4 Molecule File Browser Form .
- Page 5 and 6:
8.3.20 molecule . . . . . . . . . .
- Page 7 and 8:
List of Figures2.1 Sample VMD sessi
- Page 9 and 10:
Chapter 1IntroductionVMD is a molec
- Page 11 and 12:
1.4 AcknowledgmentsThe authors woul
- Page 13 and 14:
• TachyonThe Tachyon multiprocess
- Page 15 and 16:
Figure 2.1: Sample VMD session disp
- Page 17 and 18:
2.5 An Introduction to Atom Selecti
- Page 19 and 20:
selection: protein and (name CA or
- Page 21 and 22:
no coordinate information. It must
- Page 23 and 24: Chapter 4User Interface ComponentsV
- Page 25 and 26: • Center (hot key ’c’)This mo
- Page 27 and 28: Hot Key Command Purposer, R mouse m
- Page 29 and 30: Hot Key Command Purpose+,f,F animat
- Page 31 and 32: information. Atoms shows the number
- Page 33 and 34: Animation SpeedThe rate of playback
- Page 35 and 36: can change the view of the scene, e
- Page 37 and 38: • Perspective - The view of the s
- Page 39 and 40: 4/3 SCRHEIGHTi.e. 8.0YViewer’sEye
- Page 41 and 42: Hiding a rep. To hide a rep, double
- Page 43 and 44: Periodic TabThe Periodic tab contro
- Page 45 and 46: • Name - the name of the atom as
- Page 47 and 48: Figure 4.10: The Material Formslide
- Page 49 and 50: force-feedback (haptic) devices suc
- Page 51 and 52: the simulated spring is connected t
- Page 53 and 54: Figure 4.13: The Sequence formmolec
- Page 55 and 56: • Selections by chain: When there
- Page 57 and 58: Chapter 5Molecular Drawing MethodsE
- Page 59 and 60: When three or more bonds join at on
- Page 61 and 62: segment pieces are colored accordin
- Page 63 and 64: • Representation Method - The sur
- Page 65 and 66: 5.1.19 BeadsA bounding sphere is dr
- Page 67 and 68: those names to color the atoms. Mol
- Page 69 and 70: Figure 5.1: RGB color scale: the th
- Page 71 and 72: esname ALA to CYS TYRselects atoms
- Page 73: esname ’A 1’More importantly, r
- Page 77 and 78: Keyword Arg Descriptionall bool eve
- Page 79 and 80: FunctionDescriptionsqr(x) square of
- Page 81 and 82: Chapter 6Viewing ModesThere are man
- Page 83 and 84: sci-fi and horror movie showings. T
- Page 85 and 86: Name Description Default Render Com
- Page 87 and 88: • Dotted spheres are not drawn wi
- Page 89 and 90: Chapter 8Tcl Text InterfaceThe Tcl
- Page 91 and 92: • speed n: Set animation speed to
- Page 93 and 94: last frame. If the frame is a speci
- Page 95 and 96: - BWG - Blue to white to green.- Bl
- Page 97 and 98: • antialias < on | off >: Turn an
- Page 99 and 100: • cylinder {x1 y1 z1} {x2 y2 z2}
- Page 101 and 102: • kill: Disconnect from the simul
- Page 103 and 104: - ambient- specular- diffuse- shini
- Page 105 and 106: the area contributions are coming f
- Page 107 and 108: 8.3.19 molLoad, modify, or delete a
- Page 109 and 110: • modselect rep number molecule n
- Page 111 and 112: • index n: Returns the id of the
- Page 113 and 114: 8.3.26 rockRotate the current scene
- Page 115 and 116: 8.3.33 vmdinfo(Tcl) Returns informa
- Page 117 and 118: • -minmax {{ x min y min z min }
- Page 119 and 120: In the VMD script library at http:/
- Page 121 and 122: Sourceraster3dmsmsfaqbiocoretachyon
- Page 123 and 124: Table 8.4: Description of Tcl callb
- Page 125 and 126:
version (2.2). Thus if you have Pyt
- Page 127 and 128:
• align(ref=None, move=None, fram
- Page 129 and 130:
esid5.frame()50>>> resid5.frame(22)
- Page 131 and 132:
ef=AtomSel(’backbone’,frame=0)f
- Page 133 and 134:
functions (e.g., listall()) overlap
- Page 135 and 136:
• update ui():• update on():Upd
- Page 137 and 138:
9.5.7 labelPython operations availa
- Page 139 and 140:
• add volumetric(molid, name, ori
- Page 141 and 142:
• set colorupdate(molid, rep, ono
- Page 143 and 144:
9.6 High-level Python InterfaceVMD
- Page 145 and 146:
9.6.2 MoleculeRepThe MoleculeRep cl
- Page 147 and 148:
Chapter 10Vectors and MatricesTcl d
- Page 149 and 150:
• veccross v1 v2 - Returns the ve
- Page 151 and 152:
• transaxis amount [deg|rad|pi]
- Page 153 and 154:
-axiszamount [rad|deg|pi] - Adds a
- Page 155 and 156:
Chapter 11Molecular Analysis11.1 Us
- Page 157 and 158:
vmd> set sel [atomselect top "water
- Page 159 and 160:
The decimal in ”1.0” is importa
- Page 161 and 162:
# get the sidechain atoms (CB and o
- Page 163 and 164:
Applying this to the alanin.pdb coo
- Page 165 and 166:
have the same number of atoms, then
- Page 167 and 168:
set transformation_matrix [measure
- Page 169 and 170:
}display update offfor {set i 0} {$
- Page 171 and 172:
Chapter 12Customizing VMD SessionsT
- Page 173 and 174:
• -nt : Do not display the VMD ti
- Page 175 and 176:
• VMDIMMERSADESKFLIP : Enable a s
- Page 177 and 178:
axes location lowerleftstage locati
- Page 179 and 180:
Index.mailcap, 177.vmdrc, 26, 89, 1
- Page 181 and 182:
VMDHTMLVIEWER, 174VMDIMAGEVIEWER, 1
- Page 183 and 184:
move, 35atom, 35fragment, 35highlig
- Page 185 and 186:
short circuit logic, 72, 75sleepcom