aln = <alignment> | Used for detecting loop regions | |
pick_atoms_set = <int:1> | 1 | index of the selected atoms set: 1 | 2 | 3 |
selection_search = <str:1> | 'SEGMENT' | search method: 'SPHERE' | 'SEGMENT' | 'SPHERE_SEGMENT' |
res_types = <str:1> | 'ALL' | residue type selection: 'ALL' | 'HET' | 'BLK' | 'STD' | CHARMM 4-letter codes |
atom_types = <str:1> | 'ALL' | atom type selection: 'ALL' | 'SDCH' | 'MNCH' | IUPAC atom names |
selection_from = <str:1> | 'ALL' | selecting from: 'ALL' | 'SELECTED' |
selection_mode = <str:1> | 'ATOM' | selecting what: 'ATOM' | 'RESIDUE' |
selection_status = <str:1> | 'INITIALIZE' | what to do with selected atoms: 'ADD' | 'REMOVE' | 'INITIALIZE' |
For selection_search = 'SEGMENT': | ||
selection_segment = <str:2> | '' '' | 'RES:CHN' ids for the first and last residues in a chain/segment; or 'LOOPS' |
gap_extension = <int:2> | 2 1 | extend insertions/deletions for that many residues, in PICK_ATOMS |
minmax_loop_length = <int:2> | 5 15 | minimal/maximal length of a loop in PICK_ATOMS |
For selection_search = 'SPHERE': | ||
sphere_center = <str:2> | 'undefined' 'undefined' | '#RES1:C' 'ATOM_NAME' |
sphere_radius = <float:1> | 10.0 | sphere radius for atoms selection |
selection_slab = <float:5> | 9999 9999 0 0 0 | slab for atoms selection: 'dz1' 'dz2' 'xtrans' 'ytrans' 'ztrans' |
For selection_search = 'SPHERE_SEGMENT': | ||
selection_segment = <str:2> | '' '' | 'RES:CHN' ids for the first and last residues in a chain/segment; or 'LOOPS' |
gap_extension = <int:2> | 2 1 | extend insertions/deletions for that many residues, in PICK_ATOMS |
sphere_radius = <float:1> | 10.0 | sphere radius for atoms selection |
pick_atoms_set specifies the set of selected atoms. Set 1 is used in the model.restraints.pick(), model.rotate_dihedrals(), model.randomize_xyz() and model.mutate() commands. Sets 2 and 3 are used in the model.restraints.make() command.
selection_status determines whether the selected atoms are added ('ADD'), removed ('REMOVE'), or a set is initialized and then the selected atoms are added ('INITIALIZE').
The selection of atoms is a hierarchical two level process. The first level of selection consists of specifying how the atoms will be scanned. The second level consists of selecting by the specified atom and residue names.
How the atoms are scanned is specified by setting the selection_search variable to either 'SEGMENT', 'SPHERE', or 'SPHERE_SEGMENT':
If selection_from is 'SELECTED', scanning specified above is restricted only to the atoms that were already selected before calling model.pick_atoms().
Once the method for scanning the atoms is specified, each of the scanned atoms is checked against the specified atom name(s) (atom_types) and residue name(s) (res_types). If selection_mode is 'RESIDUE', all atoms in a residue with at least one atom that matches both the residue and atom name criteria are selected. Otherwise, only those atoms that have both the specified residue and atom names are selected. The res_types and atom_types keywords can contain several residue and atom names in one quoted string or in several quoted strings. For example, both 'CA' 'N' and 'CA N' are valid specifications selecting the CA and N atoms. The following groups of residues and atoms are defined:
# Example for: model.pick_atoms() # This will pick various subsets of atoms in the MODEL and compare them # with MODEL2. env = environ() log.level(1, 1, 1, 1, 0) # Set some defaults (the same as in top.ini): env.selection_mode = 'ATOM' # only the selected atoms, not whole residues env.selection_from = 'ALL' # scanning of all atoms, not selected atoms env.selection_search = 'SEGMENT' # scan over a segment env.selection_segment = ('FIRST:', 'LAST:') # the whole chain as a segment env.res_types = 'ALL' # all residue types env.pick_atoms_set = 1 # put the selected atoms in set 1 env.selection_status = 'INITIALIZE' # select only the selected atoms # Read the models and the alignment: mdl = model(env, file='1fas') mdl2 = model(env, file='2ctx') aln = alignment(env, file='toxin.ali', align_codes=('1fas', '2ctx')) aln.write(file='toxin.pap', alignment_format='PAP') # Pick and superpose mainchain atoms: mdl.pick_atoms(aln, atom_types='MNCH') mdl.superpose(mdl2, aln) # Pick and superpose sidechain atoms: mdl.pick_atoms(aln, atom_types='SDCH') mdl.superpose(mdl2, aln) # Pick and superpose CA and CB atoms: mdl.pick_atoms(aln, atom_types='CA CB') mdl.superpose(mdl2, aln) # Pick and superpose all atoms: mdl.pick_atoms(aln, atom_types='ALL') mdl.superpose(mdl2, aln) # Pick and superpose CA and CB atoms in one segment only: mdl.pick_atoms(aln, atom_types='CA CB', selection_segment=('2:', '10:')) mdl.superpose(mdl2, aln) # Pick and superpose all atoms within 6 angstroms of the 'CA' atom in residue '10:': mdl.pick_atoms(aln, atom_types='ALL', sphere_radius=6.0, selection_search='SPHERE', sphere_center=('10:', 'CA')) mdl.superpose(mdl2, aln) # Pick and superpose all atoms within 6 angstroms of any atom in # segment 2: to 10: mdl.pick_atoms(aln, atom_types='ALL', selection_segment=('2:', '10:'), selection_search='SPHERE_SEGMENT', sphere_radius=6.0) mdl.superpose(mdl2, aln) # Pick and superpose all atoms in all loops (ie residues within 2 positions # of any gap in the alignment): mdl.pick_atoms(aln, atom_types='ALL', selection_segment=('LOOPS', ''), selection_search='SEGMENT', gap_extension=(2, 2)) mdl.superpose(mdl2, aln) # Pick and superpose all atoms within 6 angstroms of all loops (ie residues # within 2 positions of any gap in the alignment): mdl.pick_atoms(aln, atom_types='ALL', selection_segment=('LOOPS', ''), selection_search='SPHERE_SEGMENT', sphere_radius=6.0, gap_extension=(2, 2)) mdl.superpose(mdl2, aln)