00001 // $Id: mmdb_manager.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_manager <interface> 00030 // ~~~~~~~~~ 00031 // Project : MacroMolecular Data Base (MMDB) 00032 // ~~~~~~~~~ 00033 // **** Classes : mmdb::Manager ( MMDB file manager ) 00034 // ~~~~~~~~~ 00035 // 00036 // (C) E. Krissinel 2000-2013 00037 // 00038 // ================================================================= 00039 // 00040 00041 #ifndef __MMDB_Manager__ 00042 #define __MMDB_Manager__ 00043 00044 #include "mmdb_bondmngr.h" 00045 00046 namespace mmdb { 00047 00048 // ======================= Manager =========================== 00049 00050 // copy masks 00051 enum COPY_MASK { 00052 MMDBFCM_None = 0x00000000, 00053 MMDBFCM_All = 0xFFFFFFFF, 00054 MMDBFCM_Title = 0x00000001, 00055 MMDBFCM_TitleKeepBM = 0x00000002, 00056 MMDBFCM_Cryst = 0x00000004, 00057 MMDBFCM_Coord = 0x00000008, 00058 MMDBFCM_SecStruct = 0x00000010, 00059 MMDBFCM_HetInfo = 0x00000020, 00060 MMDBFCM_Links = 0x00000040, 00061 MMDBFCM_CisPeps = 0x00000080, 00062 MMDBFCM_SA = 0x00000100, 00063 MMDBFCM_SB = 0x00000200, 00064 MMDBFCM_SC = 0x00000400, 00065 MMDBFCM_Footnotes = 0x00000800, 00066 MMDBFCM_ChainAnnot = 0x00001000, 00067 MMDBFCM_Flags = 0x00002000, 00068 MMDBFCM_Buffer = 0x80000000, 00069 MMDBFCM_Top = 0xFFFFFFF7 00070 }; 00071 00072 DefineStreamFunctions(Manager); 00073 00074 class Manager : public BondManager { 00075 00076 public : 00077 00078 Manager (); 00079 Manager ( io::RPStream Object ); 00080 ~Manager(); 00081 00082 00083 // --------------- Copying/Deleting ----------------------- 00084 00085 // Copy(..) will transfer different sort of information 00086 // between two MMDB's according to the copy mask given 00087 // (cf. MMDBFCM_XXXXX values). Note that the copying content 00088 // replaces the corresponding information (e.g. copying 00089 // coordinates will replace existing coordinates rather than 00090 // add to them). 00091 void Copy ( PManager MMDB, COPY_MASK CopyMask ); 00092 00093 // Delete(..) deletes different sort of information from 00094 // the MMDB according to the delete mask given. 00095 void Delete ( word DelMask ); // DelMask is the same as CopyMask 00096 00097 PTitleContainer GetRemarks(); 00098 PTitleContainer GetJournal(); 00099 00100 realtype GetResolution(); // -1.0 means no resolution record in file 00101 00102 int ParseBiomolecules(); // returns the number of biomolecules, 00103 // -2 for general format error 00104 // -3 for errors in BIOMT records 00105 int GetNofBiomolecules(); 00106 void GetBiomolecules ( PPBiomolecule & BM, int & nBMs ); 00107 00108 PBiomolecule GetBiomolecule ( int bmNo ); // bmno=0,1,.. 00109 // returns NULL if bmNo is incorrect 00110 PManager MakeBiomolecule ( int bmNo, int modelNo=1 ); 00111 00112 00113 protected : 00114 00115 // --------------- Stream I/O ----------------------------- 00116 void write ( io::RFile f ); 00117 void read ( io::RFile f ); 00118 00119 }; 00120 00121 } // namespace mmdb 00122 00123 #endif 00124
1.7.2