VMD User's Guide
VMD User's Guide
VMD User's Guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
• keywords: Return a list of all recognized keywords in an atom selection text.• macro name selection: Create a new singleword atom selection out of existing atom selections.name must be a single word starting with a non-numeric character and contain no spaces orspecial characters. selection can be any valid atom selection, and can even contain othermacros. You should ensure that your macros do not contain themselves, either directly orthrough a chain of other macros. If <strong>VMD</strong> detects this situation, it will abort the evaluationof the atom selection.If no selection is given, the macro for the given name is returned.If no name is given, a list of all macro names is returned.If a macro already exists for the given name, the old selection will be replaced with the newselection. Singlewords that are not defined as macros, like protein and water, cannot beredefined with the macro command.• delmacro name: Delete the macro corresponding to name. Singlewords that are not definedas macros cannot be deleted.• molecule id selection text [frame frame number] Creates a new atom selection and returnsits name. The returned name can be used as a Tcl proc in order to access the atom selection.The selection text is the same language used in the Graphics form [§ 4.4.7] and described inChapter 5.3. It is used to pick a given subset of the atom. The text cannot be changed oncea selection is made. Some of the terms in the selection depend on data that change duringa trajectory (so far only the keywords ’x’, ’y’, and ’z’ can change over time). For these, theoptional ’frame value’ is used to determine which specific frame to use. The frame numbercan be a non-negative integer, the word now (the current frame), the word first (for frame0) and last (for the last frame).Some examples are:vmd> atomselect top "name CA"atomselect0vmd> atomselect 3 "resid 25" frame lastatomselect1vmd> atomselect top "within 5 of resname LYR" frame 23atomselect2The newly created atom selection is a Tcl proc, which takes the following options:–num: Return the number of atoms in the selection.– list: Return a list of the atom indices in the selection (BTW, this is the same as getindex).–text: Return the text used to create this selection.– molid: Returns the molecule id used to create this selection.–frame: Returns the animation frame associated with this selection. The result will beeither now, last, or an integer corresponding to the frame. When the frame is now,the atom selection will use atomic coordinates from the current frame for its associatedmolecule. If the frame is last, the atom selection will always use coordinates from the92