00001 // $Id: mmdb_selmngr.h $ 00002 // ================================================================= 00003 // 00004 // CCP4 Coordinate Library: support of coordinate-related 00005 // functionality in protein crystallography applications. 00006 // 00007 // Copyright (C) Eugene Krissinel 2000-2013. 00008 // 00009 // This library is free software: you can redistribute it and/or 00010 // modify it under the terms of the GNU Lesser General Public 00011 // License version 3, modified in accordance with the provisions 00012 // of the license to address the requirements of UK law. 00013 // 00014 // You should have received a copy of the modified GNU Lesser 00015 // General Public License along with this library. If not, copies 00016 // may be downloaded from http://www.ccp4.ac.uk/ccp4license.php 00017 // 00018 // This program is distributed in the hope that it will be useful, 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 // GNU Lesser General Public License for more details. 00022 // 00023 // ================================================================= 00024 // 00025 // 15.09.13 <-- Date of Last Modification. 00026 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00027 // ----------------------------------------------------------------- 00028 // 00029 // **** Module : mmdb_selmngr <interface> 00030 // ~~~~~~~~~ 00031 // Project : MacroMolecular Data Base (MMDB) 00032 // ~~~~~~~~~ 00033 // **** Classes : mmdb::Manager ( MMDB atom selection manager ) 00034 // ~~~~~~~~~ 00035 // 00036 // (C) E. Krissinel 2000-2013 00037 // 00038 // ================================================================= 00039 // 00040 00041 #ifndef __MMDB_SelMngr__ 00042 #define __MMDB_SelMngr__ 00043 00044 #include "mmdb_coormngr.h" 00045 #include "mmdb_mask.h" 00046 00047 namespace mmdb { 00048 00049 // ======================= SelManager ========================== 00050 00051 // Selection keys. These specify how the requested selection 00052 // operation applies to the existing selection for the given mask: 00053 // SKEY_NEW previous selection is wiped out 00054 // SKEY_OR new selection is added to the already selected set; 00055 // if no selection preexists, SKEY_NEW and SKEY_OR 00056 // are equivalent. This key is the default one in 00057 // all selection functions. 00058 // SKEY_AND new selection is made on the already selected set; 00059 // this corresponds to logical 'and' of former and 00060 // current selections. If no selection preexists, 00061 // no selection will be made. 00062 // SKEY_XOR only those atoms will be left which are found 00063 // in either former or newly selected sets, but not 00064 // in both of them; this corresponds to logical 00065 // 'exclusive or' of previous and current selections. 00066 // If no selection preexists, it is equivalent to 00067 // SKEY_OR. 00068 enum SELECTION_KEY { 00069 SKEY_NEW = 0, 00070 SKEY_OR = 1, 00071 SKEY_AND = 2, 00072 SKEY_XOR = 3, 00073 SKEY_CLR = 4, 00074 SKEY_XAND = 100 // used internally 00075 }; 00076 00077 // Selection types 00078 enum SELECTION_TYPE { 00079 STYPE_INVALID = -1, 00080 STYPE_UNDEFINED = 0, 00081 STYPE_ATOM = 1, 00082 STYPE_RESIDUE = 2, 00083 STYPE_CHAIN = 3, 00084 STYPE_MODEL = 4 00085 }; 00086 00087 // Residue properties for SelectProperties() 00088 enum SELECTION_PROPERTY { 00089 SELPROP_Solvent = 0, 00090 SELPROP_Aminoacid = 1, 00091 SELPROP_Nucleotide = 2, 00092 SELPROP_Sugar = 3, 00093 SELPROP_ModRes = 4 00094 }; 00095 00096 // comparison rules for SelectUDD function 00097 enum UDD_CMP_RULE { 00098 UDSCR_LT = 1, 00099 UDSCR_LE = 2, 00100 UDSCR_EQ = 3, 00101 UDSCR_NE = 4, 00102 UDSCR_GE = 5, 00103 UDSCR_GT = 6, 00104 UDSCR_LTcase = 7, 00105 UDSCR_LEcase = 8, 00106 UDSCR_EQcase = 9, 00107 UDSCR_NEcase = 10, 00108 UDSCR_GEcase = 11, 00109 UDSCR_GTcase = 12, 00110 UDSCR_LTn = 13, 00111 UDSCR_LEn = 14, 00112 UDSCR_EQn = 15, 00113 UDSCR_NEn = 16, 00114 UDSCR_GEn = 17, 00115 UDSCR_GTn = 18, 00116 UDSCR_LTncase = 19, 00117 UDSCR_LEncase = 20, 00118 UDSCR_EQncase = 21, 00119 UDSCR_NEncase = 22, 00120 UDSCR_GEncase = 23, 00121 UDSCR_GTncase = 24, 00122 UDSCR_Substr = 25, 00123 UDSCR_NoSubstr = 26, 00124 UDSCR_Substr1 = 27, 00125 UDSCR_NoSubstr1 = 28 00126 }; 00127 00128 DefineClass(SelManager); 00129 DefineStreamFunctions(SelManager); 00130 00131 class SelManager : public CoorManager { 00132 00133 public : 00134 00135 SelManager (); 00136 SelManager ( io::RPStream Object ); 00137 ~ SelManager(); 00138 00139 00140 // ==================== Selecting atoms ======================= 00141 00142 // NewSelection() creates a new selection mask and returns its 00143 // handle. A handle is always a positive (non-zero) integer. 00144 // Calling NewSelection() is the only way to create a new 00145 // selection mask. Notice however that masks will be automatically 00146 // copied from another MMDB (see Copy(..) in CMMDBManager) if 00147 // coordinates are copied; if this is the case, the mask handles 00148 // will be inherited from the source MMDB as well. The masks will 00149 // also be automatically deleted (see Delete(..) in CMMDBManager()) 00150 // if coordinates are deleted. 00151 int NewSelection (); 00152 00153 int GetSelType ( int selHnd ); // returns STYPE_XXXX 00154 00155 // DeleteSelection(..) deletes the specified selection mask 00156 // and removes the corresponding selection attributes from 00157 // all atoms, which were selected with this mask. If an atom 00158 // was selected also with other mask(s), the other selection(s) 00159 // will remain, provided that the corresponding masks are valid. 00160 // After DeleteSelection() returns, the corresponding mask 00161 // becomes invalid. 00162 void DeleteSelection ( int selHnd ); 00163 00164 // DeleteAllSelections() deletes all selection masks and 00165 // unselects all atoms in the file. All mask handles become 00166 // invalid. 00167 void DeleteAllSelections(); 00168 00169 // SelectAtoms(..) selects atoms in the serial number range 00170 // of iSer1 to iSer2 by adding them to the set of atoms 00171 // marked by the given mask. If iSer1=iSer2=0 then all atoms 00172 // are selected. Each atom may be selected by a number of masks 00173 // simultaneously. 00174 void SelectAtoms ( int selHnd, int iSer1, int iSer2, 00175 SELECTION_KEY selKey=SKEY_OR // selection key 00176 ); 00177 00178 // SelectAtoms(..) selects atoms with serial numbers given in 00179 // vector asn[0..nsn-1]. 00180 void SelectAtoms ( int selHnd, ivector asn, int nsn, 00181 SELECTION_KEY selKey=SKEY_OR // selection key 00182 ); 00183 00184 // UnselectAtoms(..) clears the specified mask for atoms in 00185 // the serial number range of iSer1 to iSer2. If iSer1=iSer2=0 00186 // then all atoms are cleared of the specified mask. If selHnd 00187 // is set to 0, then the atoms are cleared of any mask. 00188 void UnselectAtoms ( int selHnd, int iSer1, int iSer2 ); 00189 00190 // SelectAtom(..) selects a single atom according to the value 00191 // of selection key. If makeIndex is false, then the routine 00192 // does not update the selection index. This saves time, but 00193 // prevents GetSelIndex(..) from accessing all selected atoms. 00194 // In order to update the index after all single-atom selections 00195 // are done, use MakeSelIndex(selHnd) found next. 00196 void SelectAtom ( int selHnd, PAtom A, 00197 SELECTION_KEY selKey=SKEY_OR, 00198 bool makeIndex=true ); 00199 00200 // SelectResidue(..), SelectChain(..) and SelectModel(..) 00201 // select a single residue, chain or model, or all their 00202 // hierarchical descendants depending on the value of sType 00203 // (i.e. atoms, residues (in chain and model) and chains 00204 // (in model only). Ascending hierarchical objects should be 00205 // selected explicitely, e.g. atom->GetResidue()->SelectResidue(..) 00206 void SelectResidue ( int selHnd, PResidue Res, 00207 SELECTION_TYPE sType, 00208 SELECTION_KEY sKey, 00209 bool makeIndex ); 00210 void SelectChain ( int selHnd, PChain chain, 00211 SELECTION_TYPE sType, 00212 SELECTION_KEY sKey, 00213 bool makeIndex ); 00214 void SelectModel ( int selHnd, PModel mdl, 00215 SELECTION_TYPE sType, 00216 SELECTION_KEY sKey, 00217 bool makeIndex ); 00218 00219 00220 // MakeSelIndex(.) calculates selection index for selection 00221 // adressed by selHnd. All selection functions except the 00222 // SelectAtom(..) above, update selection index automatically. 00223 // This function is for use after a series of calls to 00224 // SelectAtom(..) with makeIndex parameter set false. This 00225 // combination of SelectAtom - MakeSelIndex considerably saves CPU 00226 // at extensive selections. 00227 // MakeSelIndex(.) returns the number of selected objects. 00228 int MakeSelIndex ( int selHnd ); 00229 void MakeAllSelIndexes(); 00230 00231 // Selecting by atom ID, space condition (a sphere) and some 00232 // other bits. 00233 void SelectAtoms ( 00234 int selHnd, // must be obtained from NewSelection() 00235 int iModel, // model number; iModel=0 means 00236 // 'any model' 00237 cpstr Chains, // may be several chains "A,B,W"; "*" 00238 // means 'any chain' (in selected 00239 // model(s)) 00240 int ResNo1, // starting residue sequence number 00241 cpstr Ins1, // starting residue insertion code; "*" 00242 // means 'any code' 00243 int ResNo2, // ending residue sequence number. 00244 cpstr Ins2, // ending residue insertion code; "*" 00245 // means 'any code'. Combination of 00246 // ResNo1=ResNo2=ANY_RES and 00247 // Ins1=Ins2="*" means 'any residue' 00248 // (in selected chain(s)) 00249 cpstr RNames, // may be several residue names 00250 // "ALA,GLU,CIS"; "*" means 'any 00251 // residue name' 00252 cpstr ANames, // may be several names "CA,CB"; "*" 00253 // means 'any atom' (in selected 00254 // residue(s)) 00255 cpstr Elements, // may be several element types 00256 // 'H,C,O,CU'; "*" means 'any element' 00257 cpstr altLocs, // may be several alternative 00258 // locations 'A,B'; "*" means 00259 // 'any alternative location' 00260 cpstr Segments, // may be several segment IDs 00261 // like "S1,S2,A234"; "*" means 00262 // 'any segment' 00263 cpstr Charges, // may be several charges like 00264 // "+1,-2, "; "*" means 'any charge' 00265 realtype occ1, // lowest occupancy 00266 realtype occ2, // highest occupancy; occ1=occ2<0.0 00267 // means "any occupancy" 00268 realtype x0, // reference x-point 00269 realtype y0, // reference y-point 00270 realtype z0, // reference z-point 00271 realtype d0, // selection distance from the 00272 // reference point; d0<=0.0 00273 // means "any distance" and values 00274 // of x0, y0 and z0 are ignored 00275 SELECTION_KEY selKey=SKEY_OR // selection key 00276 ); 00277 00278 // Selecting by just atom ID, no other conditions 00279 void SelectAtoms ( 00280 int selHnd, // must be obtained from NewSelection() 00281 int iModel, // model number; iModel=0 means 00282 // 'any model' 00283 cpstr Chains, // may be several chains "A,B,W"; "*" 00284 // means 'any chain' (in selected 00285 // model(s)) 00286 int ResNo1, // starting residue sequence number 00287 cpstr Ins1, // starting residue insertion code; "*" 00288 // means 'any code' 00289 int ResNo2, // ending residue sequence number. 00290 cpstr Ins2, // ending residue insertion code; "*" 00291 // means 'any code'. Combination of 00292 // ResNo1=ResNo2=ANY_RES and 00293 // Ins1=Ins2="*" means 'any residue 00294 // number' (in selected chain(s)) 00295 cpstr RNames, // may be several residue names 00296 // "ALA,GLU,CIS"; "*" means 'any 00297 // residue name' 00298 cpstr ANames, // may be several names "CA,CB"; "*" 00299 // means 'any atom' (in selected 00300 // residue(s)) 00301 cpstr Elements, // may be several element types 00302 // "H,C,O,CU"; "*" means 'any element' 00303 cpstr altLocs, // may be several alternative 00304 // locations 'A,B'; "*" means 00305 // 'any alternative location' 00306 SELECTION_KEY selKey=SKEY_OR // selection key 00307 ); 00308 00309 00310 // Selecting by integer User-Defined Data 00311 void SelectUDD ( 00312 int selHnd, // must be obtained from NewSelection() 00313 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00314 int UDDhandle, // UDD handle 00315 int selMin, // lower selection boundary 00316 int selMax, // upper selection boundary 00317 SELECTION_KEY sKey // selection key 00318 ); 00319 void SelectUDD ( 00320 int selHnd, // must be obtained from NewSelection() 00321 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00322 int UDDhandle, // UDD handle 00323 realtype selMin, // lower selection boundary 00324 realtype selMax, // upper selection boundary 00325 SELECTION_KEY sKey // selection key 00326 ); 00327 void SelectUDD ( 00328 int selHnd, // must be obtained from NewSelection() 00329 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00330 int UDDhandle, // UDD handle 00331 cpstr selStr, // selection string 00332 int cmpRule, // comparison rule 00333 SELECTION_KEY sKey // selection key 00334 ); 00335 00336 00337 // Selecting a sphere 00338 void SelectSphere ( 00339 int selHnd, // must be obtained from NewSelection() 00340 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00341 realtype x, // x-coordinate of the sphere's center 00342 realtype y, // y-coordinate of the sphere's center 00343 realtype z, // z-coordinate of the sphere's center 00344 realtype r, // radius of the sphere 00345 SELECTION_KEY sKey=SKEY_OR // selection key 00346 ); 00347 00348 // Selecting a cylinder 00349 void SelectCylinder ( 00350 int selHnd, // must be obtained from NewSelection() 00351 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00352 realtype x1, // x-coordinate of the cylinder axis' 1st end 00353 realtype y1, // y-coordinate of the cylinder axis' 1st end 00354 realtype z1, // z-coordinate of the cylinder axis' 1st end 00355 realtype x2, // x-coordinate of the cylinder axis' 2nd end 00356 realtype y2, // y-coordinate of the cylinder axis' 2nd end 00357 realtype z2, // z-coordinate of the cylinder axis' 2nd end 00358 realtype r, // radius of the cylinder 00359 SELECTION_KEY sKey=SKEY_OR // selection key 00360 ); 00361 00362 // Selecting all atoms on a given distance from a plane 00363 void SelectSlab ( 00364 int selHnd, // must be obtained from NewSelection() 00365 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00366 realtype a, // a-parameter of the plane ax+by+cz=d 00367 realtype b, // b-parameter of the plane ax+by+cz=d 00368 realtype c, // c-parameter of the plane ax+by+cz=d 00369 realtype d, // d-parameter of the plane ax+by+cz=d 00370 realtype r, // distance to the plane 00371 SELECTION_KEY sKey=SKEY_OR // selection key 00372 ); 00373 00374 // Selecting all atoms on a given distance from already selected 00375 void SelectNeighbours ( 00376 int selHnd, // must be obtained from NewSelection() 00377 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00378 PPAtom sA, // array of already selected atoms 00379 int alen, // length of A 00380 realtype d1, // minimal distance to already selected atoms 00381 realtype d2, // maximal distance to already selected atoms 00382 SELECTION_KEY sKey=SKEY_OR // selection key 00383 ); 00384 00385 00386 int GetSelLength ( int selHnd ); 00387 00388 // Getting an array of atoms selected for a certain mask 00389 void GetSelIndex ( 00390 int selHnd, // selection mask 00391 PPAtom & SelAtom, // continuous index of selected 00392 // atoms; application must not 00393 // dispose either index or atoms 00394 int & nSelAtoms // length of index 00395 // [0..nSelectedAtoms-1] 00396 ); 00397 00398 // Getting an array of residues selected for a certain mask 00399 void GetSelIndex ( 00400 int selHnd, // selection mask 00401 PPResidue & SelResidues, // continuous index of selected 00402 // residues; application must 00403 // not dispose either index or 00404 // residues 00405 int & nSelResidues // length of index 00406 // [0..nSelResidues-1] 00407 ); 00408 00409 // Getting an array of chains selected for a certain mask 00410 void GetSelIndex ( 00411 int selHnd, // selection mask 00412 PPChain & SelChains, // continuous index of selected 00413 // chains; application must not 00414 // dispose either index or chains 00415 int & nSelChains // length of index 00416 // [0..nSelChains-1] 00417 ); 00418 00419 // Getting an array of models selected for a certain mask 00420 void GetSelIndex ( 00421 int selHnd, // selection mask 00422 PPModel & SelModels, // continuous index of selected 00423 // models; application must not 00424 // dispose either index or models 00425 int & nSelModels // length of index 00426 // [0..nSelModels-1] 00427 ); 00428 00429 void GetAtomStatistics ( int selHnd, RAtomStat AS ); 00430 00431 00432 // =============== General selection functions ================ 00433 00434 // Selecting by atom ID, space condition (a sphere) and some 00435 // other bits. 00436 void Select ( 00437 int selHnd, // must be obtained from NewSelection() 00438 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00439 int iModel, // model number; iModel=0 means 00440 // 'any model' 00441 cpstr Chains, // may be several chains "A,B,W"; "*" 00442 // means 'any chain' (in selected 00443 // model(s)) 00444 int ResNo1, // starting residue sequence number 00445 cpstr Ins1, // starting residue insertion code; "*" 00446 // means 'any code' 00447 int ResNo2, // ending residue sequence number. 00448 cpstr Ins2, // ending residue insertion code; "*" 00449 // means 'any code'. Combination of 00450 // ResNo1=ResNo2=ANY_RES and 00451 // Ins1=Ins2="*" means 'any residue' 00452 // (in selected chain(s)) 00453 cpstr RNames, // may be several residue names 00454 // "ALA,GLU,CIS"; "*" means 00455 // 'any residue name' 00456 cpstr ANames, // may be several names "CA,CB"; "*" 00457 // means 'any atom' (in selected 00458 // residue(s)) 00459 cpstr Elements, // may be several element types 00460 // 'H,C,O,CU'; "*" means 'any element' 00461 cpstr altLocs, // may be several alternative 00462 // locations 'A,B'; "*" means 00463 // 'any alternative location' 00464 cpstr Segments, // may be several segment IDs like 00465 // "S1,S2,A234"; "*" means 00466 // 'any segment' 00467 cpstr Charges, // may be several charges like 00468 // "+1,-2, "; "*" means 'any charge' 00469 realtype occ1, // lowest occupancy 00470 realtype occ2, // highest occupancy; occ1=occ2<0.0 00471 // means "any occupancy" 00472 realtype x0, // reference x-point 00473 realtype y0, // reference y-point 00474 realtype z0, // reference z-point 00475 realtype d0, // selection distance from the 00476 // reference point; d0<=0.0 00477 // means "any distance" and values 00478 // of x0, y0 and z0 are ignored 00479 SELECTION_KEY sKey=SKEY_OR // selection key 00480 ); 00481 00482 00483 // Selecting by just atom ID, no other conditions 00484 void Select ( 00485 int selHnd, // must be obtained from NewSelection() 00486 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00487 int iModel, // model number; iModel=0 means 00488 // 'any model' 00489 cpstr Chains, // may be several chains "A,B,W"; "*" 00490 // means 'any chain' (in selected 00491 // model(s)) 00492 int ResNo1, // starting residue sequence number 00493 cpstr Ins1, // starting residue insertion code; "*" 00494 // means 'any code' 00495 int ResNo2, // ending residue sequence number. 00496 cpstr Ins2, // ending residue insertion code; "*" 00497 // means 'any code'. Combination of 00498 // ResNo1=ResNo2=ANY_RES and 00499 // Ins1=Ins2="*" means 'any residue 00500 // number' (in selected chain(s)) 00501 cpstr RNames, // may be several residue names 00502 // "ALA,GLU,CIS"; "*" means 00503 // 'any residue name' 00504 cpstr ANames, // may be several names "CA,CB"; "*" 00505 // means 'any atom' (in selected 00506 // residue(s)) 00507 cpstr Elements, // may be several element types 00508 // "H,C,O,CU"; "*" means 'any element' 00509 cpstr altLocs, // may be several alternative 00510 // locations 'A,B'; "*" means 00511 // 'any alternative location' 00512 SELECTION_KEY sKey=SKEY_OR // selection key 00513 ); 00514 00515 00516 // Selecting by coordinate ID. 00517 // Examples: 00518 // 00519 // 1. /mdl/chn/s1.i1-s2.i2/at[el]:aloc 00520 // 2. /mdl/chn/*(res).ic /at[el]:aloc 00521 // 3. chn/*(res).ic /at[el]:aloc 00522 // 4. s1.i1-s2.i2/at[el]:aloc 00523 // 5. s1.i1 /at[el]:aloc 00524 // 6. /mdl 00525 // 7. chn 00526 // 8. s1.i1-s2.i2 00527 // 9. (res) 00528 // 10. at[el]:aloc 00529 // 11. chn//[el] 00530 // 00531 // mdl - the model's serial number or 0 or '*' for any model 00532 // (default). 00533 // chn - the chain ID or list of chains 'A,B,C' or '*' for 00534 // any chain (default). 00535 // s1,s2 - the starting and ending residue sequence numbers 00536 // or '*' for any sequence number (default). 00537 // i1,i2 - the residues insertion codes or '*' for any 00538 // insertion code. If the sequence number other than 00539 // '*' is specified, then insertion code defaults to "" 00540 // (no insertion code), otherwise the default is '*'. 00541 // at - atom name or list of atom names 'CA,N1,O' or '*' 00542 // for any atom name (default) 00543 // el - chemical element name or list of chemical element 00544 // names 'C,N,O' or '*' for any chemical element name 00545 // (default) 00546 // aloc - the alternative location indicator or '*' for any 00547 // alternate location. If the atom name and chemical 00548 // element name is specified (both may be '*'), then 00549 // the alternative location indicator defaults to "" 00550 // (no alternate location), otherwise the default is 00551 // '*'. 00552 // 00553 // All spaces are ignored. 00554 // 00555 // Returns -1 if numerical format of model is wrong, -2 if 00556 // numerical format for sequence number is wrong, and 0 00557 // otherwise. 00558 00559 int Select ( 00560 int selHnd, // must be obtained from NewSelection() 00561 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00562 cpstr CID, // coordinate ID 00563 SELECTION_KEY sKey // selection key 00564 ); 00565 00566 // Propagating the selection up and down coordinate hierarchy 00567 void Select ( 00568 int selHnd1, // must be obtained from NewSelection() 00569 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00570 int selHnd2, // must be obtained from NewSelection() 00571 // and have been used for selection 00572 SELECTION_KEY sKey=SKEY_OR // selection key 00573 ); 00574 00575 void SelectProperty ( 00576 int selHnd, // must be obtained from NewSelection() 00577 SELECTION_PROPERTY propKey, // property key SELPROP_XXXXXXX 00578 SELECTION_TYPE sType, // selection type STYPE_XXXXX 00579 SELECTION_KEY sKey // selection key 00580 ); 00581 00582 // In SelectDomain, domainRange is of the following format: 00583 // "*", "(all)" - take all file 00584 // "-" - take chain without chain ID 00585 // "a:Ni-Mj,b:Kp-Lq,..." - take chain a residue number N 00586 // insertion code i to residue numberM 00587 // insertion code j plus chain b 00588 // residue number K insertion code p to 00589 // residue number L insertion code q 00590 // and so on. 00591 // "a:,b:..." - take whole chains a and b and so on 00592 // "a:,b:Kp-Lq,..." - any combination of the above. 00593 int SelectDomain ( int selHnd , cpstr domainRange, 00594 SELECTION_TYPE sType, 00595 SELECTION_KEY sKey, 00596 int modelNo=1 ); 00597 00598 void DeleteSelObjects ( int selHnd ); 00599 00600 00601 protected : 00602 00603 // --- SELECTION DATA NOT FOR PUBLIC ACCESS 00604 int nSelections; // number of selections 00605 PPMask mask; // vector of selections 00606 SELECTION_TYPE *selType; // vector of selection types 00607 ivector nSelItems; // numbers of selected items 00608 PPMask * selection; // vector of selected items 00609 00610 // --------------- Stream I/O ----------------------------- 00611 void write ( io::RFile f ); 00612 void read ( io::RFile f ); 00613 00614 void InitSelManager(); 00615 void SelectAtom ( PAtom atm, int maskNo, 00616 SELECTION_KEY sKey, int & nsel ); 00617 void SelectObject ( SELECTION_TYPE sType, PAtom atm, 00618 int maskNo, SELECTION_KEY sKey, 00619 int & nsel ); 00620 void SelectObject ( PMask object, int maskNo, 00621 SELECTION_KEY sKey, int & nsel ); 00622 void MakeSelIndex ( int selHnd, SELECTION_TYPE sType, 00623 int nsel ); 00624 00625 void ResetManager(); 00626 00627 PMask GetSelMask ( int selHnd ); 00628 00629 }; 00630 00631 } // namespace mmdb 00632 00633 #endif 00634
1.7.2