PyMOL Users Manual

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

4/8/2016PyMOL Users Manual

Contents Previous Next

Command Syntax and Atom Selections

Syntax

A typed PyMOL command always starts with a keyword that calls PyMOL to execute an action. It ends with a carriage return ("enter" on your keyboard).

The simplest commands consist of a keyword alone. For example, typing quit will end your PyMOL session. The quit command never takes an argument.

Many commands have default arguments, so you can type the keyword alone and PyMOL will supply the rest. For example, the default argument to zoom is the selection-expression all:

E X A M P L E

P y M O L>z o o m#A l l v i s i b l e r e p r e s e n t a t i o n s

#a r e i n c l u d e d i n t h e v i e w.

For some keywords, certain arguments are required and others are supplied by default. For example, the keyword color requires one argument, the color-name. As

for zoom, the default selection-expression is all:

S Y N T A X

c o l o r c o l o r-n a m e

c o l o r c o l o r-n a m e,s e l e c t i o n-e x p r e s s i o n

E X A M P L E S

P y M O L>c o l o r r e d#A l l t h e r e p r e s e n t a t i o n s

#a r e c o l o r e d r e d.

P y M O L>c o l o r r e d,n a m e c a#O n l y t h e r e p r e s e n t a t i o n s o f

#a t o m s n a m e d c-a l p h a a r e c o l o r e d r e d.

When you type a command that has more than one argument, color color-name, selection-expression in this case, a comma must separate the arguments.

Selection-expression s are an essential type of keyword argument. They can be simple or complex, with several different kinds of syntax.

Selection-expressions

Selection-expression s stand for lists of atoms in arguments that are subject to PyMOL commands. You can name the selections to facilitate their re-use, or you can specify them anonymously (without names). Object and selection names may include the upper or lower case characters A/a to Z/z, numerals 0 to 9, and the underscore character (_). Characters to avoid include:

!@#$%^&*()'"[]{}\|~`<>.?/

Selection-expression s describe the class of atoms you are referencing. Most of them require identifiers to complete the specification. For example, the selector resi references biopolymer residues by sequence number, and the identifier gives the number. The selector name references atoms according to the names described in

the PDB, and the identifier gives the name (ca for alpha carbons, cb for beta carbons, etc). A handful of selection-expression s don't require identifiers, but most do. PyMOL uses several logical operators to increase the generality or specificity of selection-expression s. Logical combinations of selectors can get complex, so PyMOL accepts short forms and macros that express them with a minimum of keystrokes. This section describes named-selections, and then gives the syntax for making selections in a progression from simple one-word selectors to complex combinations of selectors, using macros and short forms.

Named Atom Selections

Atom selections can be named for repeated use by using the select command:

S Y N T A X

s e l e c t s e l e c t i o n-n a m e,s e l e c t i o n-e x p r e s s i o n

#T h e s e l e c t i o n-n a m e a n d

#t h e s e l e c t i o n-e x p r e s s i o n

#a r e b o t h a r g u m e n t s t o s e l e c t

#s o t h e y a r e s e p a r a t e d b y a c o m m a.

E X A M P L E

P y M O L>s e l e c t b b,n a m e c+o+n+c a#C r e a t e a n a t o m s e l e c t i o n n a m e d"b b"

#i n c l u d i n g a l l a t o m s n a m e d

#"C","O","N",o r"C A";

P y M O L>c o l o r r e d,b b#c o l o r t h e s e l e c t i o n r e d,

P y M O L>h i d e l i n e s,b b#h i d e t h e l i n e r e p r e s e n t a t i o n,

P y M O L>s h o w s t i c k s,b b#s h o w i t u s i n g t h e s t i c k r e p r e s e n t a t i o n,

P y M O L>z o o m b b#a n d z o o m i n o n i t.

In this case, the selection-expression is the property selector name, which takes the list of identifiers ca+c+n+o to complete the specification. Property selectors and their identifiers are discussed below.

Named atom selections appear in the PyMOL names list in the control panel. They are distinguished from objects by a surrounding set of parentheses. The control panel options available under the diamond menu differ between objects and atom-selections, because objects and named selections play slightly different roles in PyMOL. Named selections are pointers to subsets of data that are found under an object name. After an object is deleted, the data are no longer available, unless you reload the object. Any named selections that refer to atoms in that object will no longer work. But when named selections are deleted, the data are still available under the object name. Disabling objects eliminates them from the viewer, but disabling named-selections just turns off the pink dots that highlight them in the viewer.

Atom-selections, named or not, can span multiple objects:

E X A M P L E

/newman/user/S0220commands.html1/6

相关文档
最新文档