Please refer to the tutorial on the query language for an introduction.
=, !=, >, >=, <=` and `<
rname residue name. type: string rnum residue number. currently only numeric part is honored. type: int rtype residue type as given by the DSSP code, i.e. H for helix, E for extended. type: string aname atom name. type: string ele element of atom. type: string cname chain name. type: string occ occupancy, between 0 and 1. type: float abfac B (temperature) factor of atom. type: float rbfac average B (temperature) factor of residue. type: float. Note that this does not work for views as expected. When running a second selection statement on a view, all atoms of the residue handle and not the view are considered in the calculation ishetatm whether the atom is a hetorogenous atom. type: bool or int (0 for false, 1 for true) peptide whether the residue is peptide linking. type: bool or int (0 for false, 1 for true) x X coordinate of atom. type: float y Y coordinate of atom. type: float z Z coordinate of atom. type: float rindex index of residue in chain. This index is the same for views and handles for GenericProperties see below{1,2,3}, one would write: 5 <> {1,2,3}
not 5 <> {1,2,3}
{1,2,3} Two abbreviations exist for convenience:
Instead of writing `aname=CA or aname=C or aname=O or aname=N`, one can write `aname=CA,N,C,O`. For integral value ranges, one can use the colon syntax: instead of rnum>=10 and rnum<=20` one can write rnum=10:20`
g, followed by an a, r or c for atom, residue or chain level respectively. # set generic properties for atom, residue, chain atom_handle.SetFloatProp("testpropatom", 5.2) resid_handle.SetFloatProp("testpropres", 1.1) chain_handle.SetIntProp("testpropchain", 10) # query statements sel_a=e.Select("gatestpropatom<=10.0") sel_r=e.Select("grtestpropres=1.0") sel_c=e.Select("gctestpropchain>5")
# if one or more atoms have no generic properties sel=e.Select("gatestprop=5") # this will throw an error # you can specify a default value: sel=e.Select("gatestprop:1.0=5") # this will run through smoothly and use 1.0 as # the default value for all atoms that do not # have the generic property 'testprop'
Using this method, you will be warned if a generic property is not set for all atoms, residues or chains unless you specify a default value. So, be careful when you do.
1.5.8