next up previous
Next: advanced model selections Up: Advanced features related to Previous: advanced selections using bracketing

advanced explicit selections

These are available using the select and mask method.
Usage:
select(rwhat, awhat) # rwhat = what residues, awhat = what atoms.
$>$ x.select() # anything is selected, i.e. results in x
$>$ x.select([``ARG'',''CYS'']) # select only arg and cys residues
$>$ x.select([``ARG'',''CYS''],[``CA'',''CB'']) # select only atoms CA and CB of residues ARG and LYS.
$>$ x.select([``''],[``CA'',''CB'']) # select only atoms CA and CB of any residues.

mask(ffrom,tto,mask)
$>$ x.mask(0,10,''X-X-XX-XX'') # residues 0,1,4,5,8,9 are selected.
$>$ x.mask(mask=''X-X-XX-XX'') # the default values for from and tto are 0 and -1. Hence residues 0,1,4,5,8,9 are selected.
$>$ x.mask(0,100,''X-X-XX-XX'') # the mask is shorter than the range specified. Only residues 0,1,4,5,8,9 are selected.
$>$ x.mask(0,10,''X-X-XX-XXXX'') # the mask is longer than the range specified. Only residues 0,1,4,5,8,9 are selected.
$>$ x.mask() # everything is selected.

$>$ x.mask(mask="XX-XX").select(awhat=["CA"]) # the CAs from residues 0,1,3,4 are selected.



Apache 2004-03-20