From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Mar 18 2014 - 17:12:43 CDT

Hi,
  Here is an example for you:
mol new 4hbc

atoms that are members of all conformations:
  set allconf [atomselect top "altloc \"\""]
  $allconf num
  output of the 'num' query is: 3528

atoms that are only in conformation A, and not any others:
  set aconf [atomselect top "altloc \"A\""]
  $aconf num
  output of the 'num' query is: 63

all atoms that are in conformation A:
  set allAconf [atomselect top "altloc \"\" or altloc \"A\""]
  $allAconf num
  output of the 'num' query is: 3591

You can see what altloc fields exist using the "Selections"
tab of the graphical representations window, and selecting
the "altloc" field in the "Keyword" list in the bottom left pane.

Let us know if you have further questions on this...

Cheers,
  John

On Tue, Mar 18, 2014 at 02:53:18PM -0400, Ivan Gregoretti wrote:
> Hello everybody,
>
> The 4HBC structure from www.pdb.org contains some atoms with alternate
> locations.
>
> "Alternate location indicator" is documented here:
> http://www.wwpdb.org/documentation/format33/sect9.html#ATOM
>
> Could somebody show an example tcl script to show how to select only one
> of the alternate location?
>
> To make it more clear for everybody and for posterity, this is the
> specific case of 4HBC. It has two Glutamates in position 4 and 5 but the
> one at position 4 has atoms with alternate locations. See an excerpt of
> 4HBC.pdf below
>
> ...
> ATOM 23 N GLU H 4 -18.496 13.736 -4.183 1.00
> 15.67 N
> ANISOU 23 N GLU H 4 1974 1712 2266 -240 -130
> -234 N
> ATOM 24 CA AGLU H 4 -19.388 14.888 -4.131 0.50
> 16.69 C
> ANISOU 24 CA AGLU H 4 2047 1755 2537 -198 83
> -300 C
> ATOM 25 CA BGLU H 4 -19.411 14.883 -4.050 0.50
> 16.19 C
> ANISOU 25 CA BGLU H 4 1921 1779 2449 -254 135
> -337 C
> ATOM 26 C GLU H 4 -18.582 16.106 -3.757 1.00
> 17.44 C
> ANISOU 26 C GLU H 4 2129 1850 2645 -409 69
> -49 C
> ATOM 27 O GLU H 4 -17.847 16.090 -2.749 1.00
> 16.19 O
> ANISOU 27 O GLU H 4 2098 1487 2563 -451 125
> -315 O
> ATOM 28 CB AGLU H 4 -20.547 14.696 -3.145 0.50
> 20.39 C
> ANISOU 28 CB AGLU H 4 2213 2491 3041 -473 251
> 61 C
> ATOM 29 CB BGLU H 4 -20.363 14.711 -2.860 0.50
> 17.05 C
> ANISOU 29 CB BGLU H 4 1827 1976 2672 -890 118
> -296 C
> ATOM 30 CG AGLU H 4 -21.763 15.525 -3.538 0.50
> 20.47 C
> ANISOU 30 CG AGLU H 4 2244 2203 3330 -299 617
> 42 C
> ATOM 31 CG BGLU H 4 -21.391 13.611 -3.001 0.50
> 16.46 C
> ANISOU 31 CG BGLU H 4 2070 1310 2875 -662 301
> -564 C
> ATOM 32 CD AGLU H 4 -22.702 15.816 -2.392 0.50
> 26.30 C
> ANISOU 32 CD AGLU H 4 2917 3370 3704 -99 1106
> 151 C
> ATOM 33 CD BGLU H 4 -22.387 13.818 -4.137 0.50
> 18.00 C
> ANISOU 33 CD BGLU H 4 1901 1926 3010 -474 336
> -524 C
> ATOM 34 OE1AGLU H 4 -22.562 15.182 -1.330 0.50
> 33.40 O
> ANISOU 34 OE1AGLU H 4 4469 4323 3897 301 589
> 351 O
> ATOM 35 OE1BGLU H 4 -22.569 14.950 -4.604 0.50
> 19.11 O
> ANISOU 35 OE1BGLU H 4 2342 2121 2795 -217 233
> -484 O
> ATOM 36 OE2AGLU H 4 -23.576 16.695 -2.558 0.50
> 29.87 O
> ANISOU 36 OE2AGLU H 4 2647 3962 4740 -163 1014
> 1053 O
> ATOM 37 OE2BGLU H 4 -23.021 12.822 -4.538 0.50
> 20.78 O
> ANISOU 37 OE2BGLU H 4 2060 2331 3501 -511 275
> -1045 O
>
> ATOM 38 N GLU H 5 -18.726 17.150 -4.589 1.00
> 15.93 N
> ANISOU 38 N GLU H 5 1889 1443 2719 116 120
> -308 N
> ATOM 39 CA GLU H 5 -18.049 18.406 -4.374 1.00
> 16.04 C
> ANISOU 39 CA GLU H 5 1953 2033 2107 -277 81
> -454 C
> ATOM 40 C GLU H 5 -18.937 19.321 -3.565 1.00
> 16.42 C
> ANISOU 40 C GLU H 5 1938 2160 2140 -296 9
> -635 C
> ATOM 41 O GLU H 5 -20.179 19.262 -3.616 1.00
> 18.96 O
> ANISOU 41 O GLU H 5 1998 2422 2783 -619 -28
> -523 O
> ATOM 42 CB GLU H 5 -17.673 19.112 -5.679 1.00
> 16.38 C
> ANISOU 42 CB GLU H 5 2052 1832 2339 -159 121
> -316 C
> ATOM 43 CG GLU H 5 -16.912 18.255 -6.701 1.00
> 17.54 C
> ANISOU 43 CG GLU H 5 2275 2182 2205 191 -327
> -544 C
> ATOM 44 CD GLU H 5 -17.793 17.402 -7.584 1.00
> 16.66 C
> ANISOU 44 CD GLU H 5 1966 1865 2497 -2 -304
> -256 C
> ATOM 45 OE1 GLU H 5 -19.019 17.248 -7.320 1.00
> 17.80 O
> ANISOU 45 OE1 GLU H 5 2167 2177 2419 -16 -252
> -609 O
> ATOM 46 OE2 GLU H 5 -17.227 16.890 -8.585 1.00
> 18.14 O
> ANISOU 46 OE2 GLU H 5 2213 2270 2408 -43 -249
> -110 O
> ...
>
> Thank you,
>
> Ivan
>
> Ivan Gregoretti, PhD
> Bioinformatics

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/