00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef __MMDB_Model__
00055 #define __MMDB_Model__
00056
00057 #include "mmdb_io_stream.h"
00058 #include "mmdb_utils.h"
00059 #include "mmdb_chain.h"
00060 #include "mmdb_defs.h"
00061
00062 namespace mmdb {
00063
00064
00065
00066 DefineClass(HetCompound);
00067 DefineStreamFunctions(HetCompound);
00068
00069 class HetCompound : public io::Stream {
00070
00071 public :
00072
00073 ResName hetID;
00074 pstr comment;
00075 int nSynonyms;
00076 psvector hetSynonym;
00077 int compNum;
00078 char wc;
00079 pstr Formula;
00080
00081 HetCompound ( cpstr HetName );
00082 HetCompound ( io::RPStream Object );
00083 ~HetCompound();
00084
00085 void AddKeyWord ( cpstr W, bool Closed );
00086 void HETNAM_PDBDump ( io::RFile f );
00087 void HETSYN_PDBDump ( io::RFile f );
00088 void FORMUL_PDBDump ( io::RFile f );
00089
00090 void FormComString ( pstr & F );
00091 void FormSynString ( pstr & F );
00092 void FormForString ( pstr & F );
00093
00094 void Copy ( PHetCompound hetCompound );
00095
00096 void write ( io::RFile f );
00097 void read ( io::RFile f );
00098
00099 protected :
00100
00101 void InitHetCompound ( cpstr HetName );
00102 void FreeMemory ();
00103
00104 };
00105
00106
00107
00108
00109 DefineClass(SSContainer);
00110 DefineStreamFunctions(SSContainer);
00111
00112 class SSContainer : public ClassContainer {
00113
00114 public :
00115
00116 SSContainer () : ClassContainer() {}
00117 SSContainer ( io::RPStream Object )
00118 : ClassContainer ( Object ) {}
00119 ~SSContainer () {}
00120
00121 PContainerClass MakeContainerClass ( int ClassID );
00122
00123 };
00124
00125
00126
00127
00128 DefineClass(Helix);
00129 DefineStreamFunctions(Helix);
00130
00131 class Helix : public ContainerClass {
00132
00133 public :
00134 int serNum;
00135 HelixID helixID;
00136 ResName initResName;
00137 ChainID initChainID;
00138 int initSeqNum;
00139 InsCode initICode;
00140 ResName endResName;
00141 ChainID endChainID;
00142 int endSeqNum;
00143 InsCode endICode;
00144 int helixClass;
00145 pstr comment;
00146 int length;
00147
00148 Helix ();
00149 Helix ( cpstr S );
00150 Helix ( io::RPStream Object );
00151 ~Helix();
00152
00153 void PDBASCIIDump ( pstr S, int N );
00154 void MakeCIF ( mmcif::PData CIF, int N );
00155 ERROR_CODE ConvertPDBASCII ( cpstr S );
00156 ERROR_CODE GetCIF ( mmcif::PData CIF, int & n );
00157 CLASS_ID GetClassID () { return ClassID_Helix; }
00158
00159 void Copy ( PContainerClass Helix );
00160
00161 void write ( io::RFile f );
00162 void read ( io::RFile f );
00163
00164 protected :
00165
00166 void InitHelix();
00167
00168 };
00169
00170
00171
00172
00173
00174 DefineClass(Strand);
00175 DefineStreamFunctions(Strand);
00176
00177 class Strand : public io::Stream {
00178
00179 public :
00180
00181 StrandID sheetID;
00182 int strandNo;
00183 ResName initResName;
00184 ChainID initChainID;
00185 int initSeqNum;
00186 InsCode initICode;
00187 ResName endResName;
00188 ChainID endChainID;
00189 int endSeqNum;
00190 InsCode endICode;
00191 int sense;
00192
00193 AtomName curAtom;
00194 ResName curResName;
00195
00196 ChainID curChainID;
00197 int curResSeq;
00198
00199 InsCode curICode;
00200 AtomName prevAtom;
00201 ResName prevResName;
00202
00203 ChainID prevChainID;
00204 int prevResSeq;
00205
00206 InsCode prevICode;
00207
00208 Strand ();
00209 Strand ( io::RPStream Object );
00210 ~Strand();
00211
00212 void PDBASCIIDump ( pstr S );
00213 void MakeCIF ( mmcif::PData CIF );
00214 ERROR_CODE ConvertPDBASCII ( cpstr S );
00215 int GetCIF ( mmcif::PData CIF, cpstr sheet_id );
00216
00217 void Copy ( PStrand Strand );
00218
00219 void write ( io::RFile f );
00220 void read ( io::RFile f );
00221
00222 protected :
00223
00224 void InitStrand();
00225
00226 };
00227
00228
00229
00230
00231 DefineClass(Sheet);
00232 DefineStreamFunctions(Sheet);
00233
00234 class Sheet : public io::Stream {
00235
00236 public :
00237 SheetID sheetID;
00238 int nStrands;
00239 PPStrand strand;
00240
00241 Sheet ();
00242 Sheet ( io::RPStream Object );
00243 ~Sheet();
00244
00245 void FreeMemory();
00246 void OrderSheet();
00247
00248 void PDBASCIIDump ( io::RFile f );
00249 void MakeCIF ( mmcif::PData CIF );
00250 ERROR_CODE ConvertPDBASCII ( cpstr S );
00251 int GetCIF ( mmcif::PData CIF );
00252
00253 void Copy ( PSheet sheet );
00254
00255 void write ( io::RFile f );
00256 void read ( io::RFile f );
00257
00258 protected :
00259 void InitSheet ();
00260 void CIFFindStrands ( mmcif::PData CIF, cpstr Category );
00261 void TryStrand ( int strand_no );
00262 int GetStrand ( int strand_no );
00263
00264 };
00265
00266
00267
00268
00269 DefineClass(Sheets);
00270 DefineStreamFunctions(Sheets);
00271
00272 class Sheets : public io::Stream {
00273
00274 public :
00275 int nSheets;
00276 PPSheet sheet;
00277
00278 Sheets ();
00279 Sheets ( io::RPStream Object );
00280 ~Sheets();
00281
00282 void FreeMemory();
00283
00284 void PDBASCIIDump ( io::RFile f );
00285 void MakeCIF ( mmcif::PData CIF );
00286 ERROR_CODE ConvertPDBASCII ( cpstr S );
00287 int GetCIF ( mmcif::PData CIF );
00288
00289 void Copy ( PSheets Sheets );
00290
00291 void write ( io::RFile f );
00292 void read ( io::RFile f );
00293
00294 protected :
00295 void InitSheets ();
00296 void CIFFindSheets ( mmcif::PData CIF, cpstr Category );
00297
00298 };
00299
00300
00301
00302
00303 DefineClass(Turn);
00304 DefineStreamFunctions(Turn);
00305
00306 class Turn : public ContainerClass {
00307
00308 public :
00309 int serNum;
00310 TurnID turnID;
00311 ResName initResName;
00312 ChainID initChainID;
00313 int initSeqNum;
00314 InsCode initICode;
00315 ResName endResName;
00316 ChainID endChainID;
00317 int endSeqNum;
00318 InsCode endICode;
00319 pstr comment;
00320
00321 Turn ();
00322 Turn ( cpstr S );
00323 Turn ( io::RPStream Object );
00324 ~Turn();
00325
00326 void PDBASCIIDump ( pstr S, int N );
00327 void MakeCIF ( mmcif::PData CIF, int N );
00328 ERROR_CODE ConvertPDBASCII ( cpstr S );
00329 ERROR_CODE GetCIF ( mmcif::PData CIF, int & n );
00330 CLASS_ID GetClassID () { return ClassID_Turn; }
00331
00332 void Copy ( PContainerClass turn );
00333
00334 void write ( io::RFile f );
00335 void read ( io::RFile f );
00336
00337 protected :
00338
00339 void InitTurn();
00340
00341 };
00342
00343
00344
00345
00346
00347 DefineClass(HetCompounds);
00348 DefineStreamFunctions(HetCompounds);
00349
00350 class HetCompounds : public io::Stream {
00351
00352 public :
00353
00354 int nHets;
00355 PPHetCompound hetCompound;
00356
00357 HetCompounds ();
00358 HetCompounds ( io::RPStream Object );
00359 ~HetCompounds();
00360
00361 void FreeMemory ();
00362
00363 void PDBASCIIDump ( io::RFile f );
00364 void ConvertHETNAM ( cpstr S );
00365 void ConvertHETSYN ( cpstr S );
00366 void ConvertFORMUL ( cpstr S );
00367
00368 void MakeCIF ( mmcif::PData CIF );
00369 ERROR_CODE GetCIF ( mmcif::PData CIF );
00370
00371 void Copy ( PHetCompounds hetCompounds );
00372
00373 void write ( io::RFile f );
00374 void read ( io::RFile f );
00375
00376 protected :
00377 bool Closed;
00378
00379 void InitHetCompounds();
00380 int AddHetName ( cpstr H );
00381
00382 };
00383
00384
00385
00386
00387 DefineClass(LinkContainer);
00388 DefineStreamFunctions(LinkContainer);
00389
00390 class LinkContainer : public ClassContainer {
00391
00392 public :
00393
00394 LinkContainer () : ClassContainer() {}
00395 LinkContainer ( io::RPStream Object )
00396 : ClassContainer ( Object ) {}
00397 ~LinkContainer () {}
00398
00399 PContainerClass MakeContainerClass ( int ClassID );
00400
00401 };
00402
00403
00404
00405
00406 DefineClass(Link);
00407 DefineStreamFunctions(Link);
00408
00409 class Link : public ContainerClass {
00410
00411 public :
00412 AtomName atName1;
00413 AltLoc aloc1;
00414 ResName resName1;
00415 ChainID chainID1;
00416 int seqNum1;
00417 InsCode insCode1;
00418 AtomName atName2;
00419 AltLoc aloc2;
00420 ResName resName2;
00421 ChainID chainID2;
00422 int seqNum2;
00423 InsCode insCode2;
00424 int s1,i1,j1,k1;
00425 int s2,i2,j2,k2;
00426
00427 Link ();
00428 Link ( cpstr S );
00429 Link ( io::RPStream Object );
00430 ~Link();
00431
00432 void PDBASCIIDump ( pstr S, int N );
00433 void MakeCIF ( mmcif::PData CIF, int N );
00434 ERROR_CODE ConvertPDBASCII ( cpstr S );
00435 ERROR_CODE GetCIF ( mmcif::PData CIF, int & n );
00436 CLASS_ID GetClassID () { return ClassID_Link; }
00437
00438 void Copy ( PContainerClass link );
00439
00440 void write ( io::RFile f );
00441 void read ( io::RFile f );
00442
00443 protected :
00444
00445 void InitLink();
00446
00447 };
00448
00449
00450
00451 DefineClass(LinkRContainer);
00452 DefineStreamFunctions(LinkRContainer);
00453
00454 class LinkRContainer : public ClassContainer {
00455
00456 public :
00457
00458 LinkRContainer () : ClassContainer() {}
00459 LinkRContainer ( io::RPStream Object )
00460 : ClassContainer ( Object ) {}
00461 ~LinkRContainer () {}
00462
00463 PContainerClass MakeContainerClass ( int ClassID );
00464
00465 };
00466
00467
00468
00469
00470 DefineClass(LinkR);
00471 DefineStreamFunctions(LinkR);
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502 class LinkR : public ContainerClass {
00503
00504 public :
00505 LinkRID linkRID;
00506 AtomName atName1;
00507 AltLoc aloc1;
00508 ResName resName1;
00509 ChainID chainID1;
00510 int seqNum1;
00511 InsCode insCode1;
00512 AtomName atName2;
00513 AltLoc aloc2;
00514 ResName resName2;
00515 ChainID chainID2;
00516 int seqNum2;
00517 InsCode insCode2;
00518 realtype dist;
00519
00520 LinkR ();
00521 LinkR ( cpstr S );
00522 LinkR ( io::RPStream Object );
00523 ~LinkR();
00524
00525 void PDBASCIIDump ( pstr S, int N );
00526 void MakeCIF ( mmcif::PData CIF, int N );
00527 ERROR_CODE ConvertPDBASCII ( cpstr S );
00528 ERROR_CODE GetCIF ( mmcif::PData CIF, int & n );
00529 CLASS_ID GetClassID () { return ClassID_LinkR; }
00530
00531 void Copy ( PContainerClass LinkR );
00532
00533 void write ( io::RFile f );
00534 void read ( io::RFile f );
00535
00536 protected :
00537
00538 void InitLinkR();
00539
00540 };
00541
00542
00543
00544
00545
00546 DefineClass(CisPepContainer);
00547 DefineStreamFunctions(CisPepContainer);
00548
00549 class CisPepContainer : public ClassContainer {
00550
00551 public :
00552
00553 CisPepContainer () : ClassContainer() {}
00554 CisPepContainer ( io::RPStream Object )
00555 : ClassContainer ( Object ) {}
00556 ~CisPepContainer () {}
00557
00558 PContainerClass MakeContainerClass ( int ClassID );
00559
00560 };
00561
00562
00563
00564
00565 DefineClass(CisPep);
00566 DefineStreamFunctions(CisPep);
00567
00568 class CisPep : public ContainerClass {
00569
00570 public :
00571 int serNum;
00572 ResName pep1;
00573 ChainID chainID1;
00574 int seqNum1;
00575 InsCode icode1;
00576 ResName pep2;
00577 ChainID chainID2;
00578 int seqNum2;
00579 InsCode icode2;
00580 int modNum;
00581 realtype measure;
00582
00583 CisPep ();
00584 CisPep ( cpstr S );
00585 CisPep ( io::RPStream Object );
00586 ~CisPep();
00587
00588 void PDBASCIIDump ( pstr S, int N );
00589 ERROR_CODE ConvertPDBASCII ( cpstr S );
00590 CLASS_ID GetClassID () { return ClassID_CisPep; }
00591
00592 void Copy ( PContainerClass cisPep );
00593
00594 void write ( io::RFile f );
00595 void read ( io::RFile f );
00596
00597 protected :
00598
00599 void InitCisPep();
00600
00601 };
00602
00603
00604
00605
00606
00607 enum SSE_RC {
00608 SSERC_Ok = 0,
00609 SSERC_noResidues = 1,
00610 SSERC_noAminoacids = 2,
00611 SSERC_noSSE = 3
00612 };
00613
00614 enum SORT_CHAIN_DIR {
00615 SORT_CHAIN_ChainID_Asc = 0,
00616 SORT_CHAIN_ChainID_Desc = 1
00617 };
00618
00619 DefineFactoryFunctions(Model);
00620
00621 class Model : public ProModel {
00622
00623 friend class Manager;
00624 friend class BondManager;
00625 friend class SelManager;
00626 friend class CoorManager;
00627 friend class Root;
00628 friend class Chain;
00629 friend class Residue;
00630 friend class Atom;
00631
00632 public :
00633
00634 Model ();
00635 Model ( PManager MMDBF, int serialNum );
00636 Model ( io::RPStream Object );
00637 ~Model();
00638
00639 void SetMMDBManager ( PManager MMDBM, int serialNum );
00640 PManager GetCoordHierarchy() { return manager; }
00641
00642
00643
00644
00645
00646
00647
00648
00649 PChain GetChainCreate ( const ChainID chID,
00650 bool enforceUniqueChainID );
00651
00652
00653
00654
00655
00656
00657 PChain CreateChain ( const ChainID chID );
00658
00659 cpstr GetEntryID ();
00660 void SetEntryID ( const IDCode idCode );
00661
00662 int GetSerNum ();
00663
00664 cpstr GetModelID ( pstr modelID );
00665
00666 int GetNumberOfModels ();
00667 int GetNumberOfAtoms ( bool countTers );
00668
00669 int GetNumberOfResidues();
00670
00671
00672
00673
00674
00675 int GetNumberOfChains();
00676 bool GetNewChainID ( ChainID chID, int length=1 );
00677
00678
00679
00680 PChain GetChain ( const ChainID chID );
00681 PChain GetChain ( int chainNo );
00682
00683
00684 void GetChainTable ( PPChain & chainTable,
00685 int & NumberOfChains );
00686
00687
00688
00689 int DeleteChain ( const ChainID chID );
00690 int DeleteChain ( int chainNo );
00691 int DeleteAllChains ();
00692 int DeleteSolventChains();
00693 void TrimChainTable ();
00694
00695
00696
00697 int AddChain ( PChain chn );
00698
00699
00700
00701 void SortChains ( int sortKey );
00702
00703
00704
00705 int GetNumberOfResidues ( const ChainID chainID );
00706 int GetNumberOfResidues ( int chainNo );
00707 PResidue GetResidue ( const ChainID chainID, int seqNo,
00708 const InsCode insCode );
00709 PResidue GetResidue ( const ChainID chainID, int resNo );
00710 PResidue GetResidue ( int chainNo, int seqNo,
00711 const InsCode insCode );
00712 PResidue GetResidue ( int chainNo, int resNo );
00713 int GetResidueNo ( const ChainID chainID, int seqNo,
00714 const InsCode insCode );
00715 int GetResidueNo ( int chainNo, int seqNo,
00716 const InsCode insCode );
00717 void GetResidueTable ( PPResidue & resTable,
00718 int & NumberOfResidues );
00719 void GetResidueTable ( const ChainID chainID,
00720 PPResidue & resTable,
00721 int & NumberOfResidues );
00722 void GetResidueTable ( int chainNo, PPResidue & resTable,
00723 int & NumberOfResidues );
00724
00725
00726
00727 int DeleteResidue ( const ChainID chainID, int seqNo,
00728 const InsCode insCode );
00729 int DeleteResidue ( const ChainID chainID, int resNo );
00730 int DeleteResidue ( int chainNo, int seqNo,
00731 const InsCode insCode );
00732 int DeleteResidue ( int chainNo, int resNo );
00733 int DeleteAllResidues ( const ChainID chainID );
00734 int DeleteAllResidues ( int chainNo );
00735 int DeleteSolvent ();
00736
00737
00738
00739 int DeleteAllResidues ();
00740
00741
00742
00743 int AddResidue ( const ChainID chainID, PResidue res );
00744 int AddResidue ( int chainNo, PResidue res );
00745
00746
00747
00748 int GetNumberOfAllAtoms();
00749
00750 PPAtom GetAllAtoms ();
00751
00752 int GetNumberOfAtoms ( const ChainID chainID, int seqNo,
00753 const InsCode insCode );
00754 int GetNumberOfAtoms ( int chainNo, int seqNo,
00755 const InsCode insCode );
00756 int GetNumberOfAtoms ( const ChainID chainID, int resNo );
00757 int GetNumberOfAtoms ( int chainNo, int resNo );
00758
00759 PAtom GetAtom ( const ChainID chID,
00760 int seqNo,
00761 const InsCode insCode,
00762 const AtomName aname,
00763 const Element elmnt,
00764 const AltLoc aloc );
00765 PAtom GetAtom ( const ChainID chID, int seqNo,
00766 const InsCode insCode, int atomNo );
00767 PAtom GetAtom ( const ChainID chID,
00768 int resNo,
00769 const AtomName aname,
00770 const Element elmnt,
00771 const AltLoc aloc );
00772 PAtom GetAtom ( const ChainID chID, int resNo, int atomNo );
00773 PAtom GetAtom ( int chNo, int seqNo,
00774 const InsCode insCode,
00775 const AtomName aname,
00776 const Element elmnt,
00777 const AltLoc aloc );
00778 PAtom GetAtom ( int chNo, int seqNo, const InsCode insCode,
00779 int atomNo );
00780 PAtom GetAtom ( int chNo, int resNo,
00781 const AtomName aname,
00782 const Element elmnt,
00783 const AltLoc aloc );
00784 PAtom GetAtom ( int chNo, int resNo, int atomNo );
00785
00786 void GetAtomTable ( const ChainID chainID, int seqNo,
00787 const InsCode insCode,
00788 PPAtom & atomTable, int & NumberOfAtoms );
00789 void GetAtomTable ( int chainNo, int seqNo,
00790 const InsCode insCode,
00791 PPAtom & atomTable, int & NumberOfAtoms );
00792 void GetAtomTable ( const ChainID chainID, int resNo,
00793 PPAtom & atomTable, int & NumberOfAtoms );
00794 void GetAtomTable ( int chainNo, int resNo,
00795 PPAtom & atomTable, int & NumberOfAtoms );
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806
00807 void GetAtomTable1 ( const ChainID chainID, int seqNo,
00808 const InsCode insCode,
00809 PPAtom & atomTable, int & NumberOfAtoms );
00810 void GetAtomTable1 ( int chainNo, int seqNo,
00811 const InsCode insCode,
00812 PPAtom & atomTable, int & NumberOfAtoms );
00813 void GetAtomTable1 ( const ChainID chainID, int resNo,
00814 PPAtom & atomTable, int & NumberOfAtoms );
00815 void GetAtomTable1 ( int chainNo, int resNo,
00816 PPAtom & atomTable, int & NumberOfAtoms );
00817
00818 void GetAtomStatistics ( RAtomStat AS );
00819 void CalAtomStatistics ( RAtomStat AS );
00820
00821
00822
00823
00824 int DeleteAtom ( const ChainID chID,
00825 int seqNo,
00826 const InsCode insCode,
00827 const AtomName aname,
00828 const Element elmnt,
00829 const AltLoc aloc );
00830 int DeleteAtom ( const ChainID chID, int seqNo,
00831 const InsCode insCode, int atomNo );
00832 int DeleteAtom ( const ChainID chID,
00833 int resNo,
00834 const AtomName aname,
00835 const Element elmnt,
00836 const AltLoc aloc );
00837 int DeleteAtom ( const ChainID chID, int resNo, int atomNo );
00838 int DeleteAtom ( int chNo, int seqNo,
00839 const InsCode insCode,
00840 const AtomName aname,
00841 const Element elmnt,
00842 const AltLoc aloc );
00843 int DeleteAtom ( int chNo, int seqNo, const InsCode insCode,
00844 int atomNo );
00845 int DeleteAtom ( int chNo, int resNo,
00846 const AtomName aname,
00847 const Element elmnt,
00848 const AltLoc aloc );
00849 int DeleteAtom ( int chNo, int resNo, int atomNo );
00850
00851 int DeleteAllAtoms ( const ChainID chID, int seqNo,
00852 const InsCode insCode );
00853 int DeleteAllAtoms ( const ChainID chID, int resNo );
00854 int DeleteAllAtoms ( const ChainID chID );
00855 int DeleteAllAtoms ( int chNo, int seqNo, const InsCode insCode );
00856 int DeleteAllAtoms ( int chNo, int resNo );
00857 int DeleteAllAtoms ( int chNo );
00858 int DeleteAllAtoms ();
00859
00860
00861
00862
00863
00864
00865
00866 int DeleteAltLocs();
00867
00868
00869
00870
00871 int AddAtom ( const ChainID chID, int seqNo,
00872 const InsCode insCode, PAtom atom );
00873 int AddAtom ( const ChainID chID, int resNo, PAtom atom );
00874 int AddAtom ( int chNo, int seqNo, const InsCode insCode,
00875 PAtom atom );
00876 int AddAtom ( int chNo, int resNo, PAtom atom );
00877
00878
00879
00880
00881
00882
00883
00884
00885
00886 ERROR_CODE ConvertPDBString ( pstr PDBString );
00887
00888
00889
00890 void PDBASCIIDumpPS ( io::RFile f );
00891
00892
00893 void PDBASCIIDumpCP ( io::RFile f );
00894
00895
00896
00897 void PDBASCIIDump ( io::RFile f );
00898
00899 void MakeAtomCIF ( mmcif::PData CIF );
00900 void MakePSCIF ( mmcif::PData CIF );
00901 ERROR_CODE GetCIF ( mmcif::PData CIF );
00902
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924 void MoveChain ( PChain & m_chain, PPAtom m_atom,
00925 PPAtom atom, int & atom_index,
00926 int chain_ext );
00927
00928 void GetAIndexRange ( int & i1, int & i2 );
00929
00930 void MaskAtoms ( PMask mask );
00931 void MaskResidues ( PMask mask );
00932 void MaskChains ( PMask mask );
00933 void UnmaskAtoms ( PMask mask );
00934 void UnmaskResidues ( PMask mask );
00935 void UnmaskChains ( PMask mask );
00936
00937
00938
00939
00940 int GetNumberOfHelices ();
00941 int GetNumberOfSheets ();
00942
00943 PHelix GetHelix ( int serialNum );
00944
00945 void GetSheetID ( int serialNum, SheetID sheetID );
00946
00947
00948 PSheet GetSheet ( int serialNum );
00949 PSheet GetSheet ( const SheetID sheetID );
00950 int GetNumberOfStrands ( int sheetSerNum );
00951 int GetNumberOfStrands ( const SheetID sheetID );
00952 PStrand GetStrand ( int sheetSerNum,
00953 int strandSerNum );
00954 PStrand GetStrand ( const SheetID sheetID,
00955 int strandSerNum );
00956
00957 inline PSSContainer GetHelices() { return &helices; }
00958 inline PSheets GetSheets () { return &sheets; }
00959
00960 void RemoveSecStructure();
00961 int CalcSecStructure ( bool flagBulge=true,
00962 int aminoSelHnd=-1 );
00963
00964
00965 PHetCompounds GetHetInfo() { return &hetCompounds; }
00966 void RemoveHetInfo ();
00967
00968
00969
00970
00971 int GetNumberOfLinks ();
00972 PLink GetLink ( int serialNum );
00973 PLinkContainer GetLinks() { return &links; }
00974
00975 void RemoveLinks();
00976 void AddLink ( PLink link );
00977
00978
00979
00980 int GetNumberOfLinkRs ();
00981 PLinkR GetLinkR ( int serialNum );
00982 PLinkRContainer GetLinkRs() { return &linkRs; }
00983
00984 void RemoveLinkRs();
00985 void AddLinkR ( PLinkR linkR );
00986
00987
00988
00989
00990 int GetNumberOfCisPeps();
00991 PCisPep GetCisPep ( int CisPepNum );
00992 PCisPepContainer GetCisPeps() { return &cisPeps; }
00993
00994 void RemoveCisPeps();
00995 void AddCisPep ( PCisPep cisPep );
00996
00997
00998
00999 void ApplyTransform ( mat44 & TMatrix );
01000
01001
01002
01003 bool isInSelection ( int selHnd );
01004
01005
01006
01007 int PutUDData ( int UDDhandle, int iudd );
01008 int PutUDData ( int UDDhandle, realtype rudd );
01009 int PutUDData ( int UDDhandle, cpstr sudd );
01010
01011 int GetUDData ( int UDDhandle, int & iudd );
01012 int GetUDData ( int UDDhandle, realtype & rudd );
01013 int GetUDData ( int UDDhandle, pstr sudd, int maxLen );
01014 int GetUDData ( int UDDhandle, pstr & sudd );
01015
01016
01017 void Copy ( PModel model );
01018 void CopyHets ( PModel model );
01019 void CopySecStructure ( PModel model );
01020 void CopyLinks ( PModel model );
01021 void CopyLinkRs ( PModel model );
01022 void CopyCisPeps ( PModel model );
01023
01024 void write ( io::RFile f );
01025 void read ( io::RFile f );
01026
01027 protected :
01028
01029 int serNum;
01030 PManager manager;
01031
01032 HetCompounds hetCompounds;
01033 SSContainer helices;
01034 Sheets sheets;
01035 SSContainer turns;
01036 LinkContainer links;
01037 LinkRContainer linkRs;
01038 CisPepContainer cisPeps;
01039
01040 int nChains;
01041 int nChainsAlloc;
01042 PPChain chain;
01043
01044 bool Exclude;
01045
01046 void InitModel ();
01047 void FreeMemory ();
01048 void ExpandChainArray ( int nOfChains );
01049 ERROR_CODE GetCIFPSClass ( mmcif::PData CIF, int ClassID );
01050
01051
01052
01053
01054 int _ExcludeChain ( const ChainID chainID );
01055
01056
01057
01058 void _copy ( PModel Model );
01059
01060
01061
01062
01063
01064 void _copy ( PModel Model, PPAtom atom, int & atom_index );
01065
01066 void CheckInAtoms ();
01067
01068 };
01069
01070 }
01071
01072 #endif
01073