11.07.2015 Views

VMD User's Guide

VMD User's Guide

VMD User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Table 5.7 lists the built-in functions which may be used in atom selection expressions withkeywords which take on a numeric value.Table 5.8 lists the built-in atom selection keywords which may be used in atom selection expressionsto query the values of an underlying volumetric map in the same molecule. These areread-only.5.3.2 Boolean KeywordsSome selections take no values. For example, backbone selects the backbone atoms of the proteinand nucleic acids and protein selects protein atoms. Giving options to these selections is an error.The selections can be used in the same way as other selections, as in:protein and backbonenucleic or proteinIn addition, if neither and nor or are located after a boolean keyword, then an implicit and isinserted, so that the following are valid:protein name CAnucleic backbone(same as: protein and name CA)5.3.3 Short CircuitingThe boolean logic in <strong>VMD</strong> does short circuit evaluation on an element-wise basis. For instance,given one atom, if X is true then X or Y will be true regradless of the value of Y, so there is noneed to evaluate it. Similarly, if X is false, then X and Y will also be false, so Y again need not beevaluated.Knowing how short circuit selections work can speed up several types of selections. Consider asystem with a large number of waters and a protein. The expression protein and segname < 10is faster than segname < 10 and protein since in the first selection only the atoms which areproteins have the segname converted to a number, while in the second selection, all the segmentnames are converted.The within selection has its own form of short circuiting. The command can be interpreted as“find the atoms of A which are withing a given distance from B,” and if A isn’t given, search allthe atoms. The search done in <strong>VMD</strong> takes a time roughly proportional to the number of atomsin A multiplied by the number of atoms in B, so reducing the number of atoms in A (i.e., by nottesting every atoms) make the search faster.Using the system with a lot of water and a protein, compare the selectionprotein within 5 of resid 1to (within 5 of resid 1) and protein.The first is very fast as it does a distance search between all the protein atoms and all the atomsin resid 1. However, the second selection searches through all the atoms for those which are within5 Å of resid and then finds which of those are protein atoms.5.3.4 Quoting with Single Quotes<strong>VMD</strong> allows two types of quoting mechanisms, single and double quotes. Single quotes are usedto include spaces and other non-alphanumeric characters. Believe it or not, there are some residuenames with a space in them, so they can be referenced as, for example,72

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!