00001
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 #ifndef CLIPPER_MMDB
00046 #define CLIPPER_MMDB
00047
00048
00049 #include "../core/coords.h"
00050
00051 #include <mmdb/mmdb_manager.h>
00052
00053
00054 namespace clipper {
00055
00056 namespace mmdb {
00057 typedef ::CAtom CAtom;
00058 typedef ::CResidue CResidue;
00059 typedef ::CChain CChain;
00060 typedef ::CModel CModel;
00061 typedef ::CMMDBManager CMMDBManager;
00062
00063 typedef ::PCAtom PCAtom;
00064 typedef ::PCResidue PCResidue;
00065 typedef ::PCChain PCChain;
00066 typedef ::PCModel PCModel;
00067 typedef ::PCMMDBManager PCMMDBManager;
00068
00069 typedef ::PPCAtom PPCAtom;
00070 typedef ::PPCResidue PPCResidue;
00071 typedef ::PPCChain PPCChain;
00072 typedef ::PPCModel PPCModel;
00073 typedef ::PPCMMDBManager PPCMMDBManager;
00074 }
00075
00076
00077
00079
00082 class Sig_Coord_orth : public Vec3<>
00083 {
00084 public:
00085 Sig_Coord_orth() {}
00086 explicit Sig_Coord_orth( const Vec3<>& v ) :
00087 Vec3<>( v ) {}
00088 Sig_Coord_orth( const ftype& sigx, const ftype& sigy, const ftype& sigz ) :
00089 Vec3<>( sigx, sigy, sigz ) {}
00090 const ftype& sigx() const { return (*this)[0]; }
00091 const ftype& sigy() const { return (*this)[1]; }
00092 const ftype& sigz() const { return (*this)[2]; }
00093 };
00094
00096
00099 class Sig_U_aniso_orth : public Mat33sym<>
00100 {
00101 public:
00103 Sig_U_aniso_orth() {};
00105 explicit Sig_U_aniso_orth( const Mat33sym<>& m ) : Mat33sym<>(m) {}
00107 Sig_U_aniso_orth( const ftype& su11, const ftype& su22, const ftype& su33,
00108 const ftype& su12, const ftype& su13, const ftype& su23 ) :
00109 Mat33sym<>( su11, su22, su33, su12, su13, su23 ) {}
00110 };
00111
00112
00114
00119 class MMDBAtom : public mmdb::CAtom
00120 {
00121 public:
00123 MMDBAtom() {}
00125 MMDBAtom( const mmdb::CAtom& a ) : mmdb::CAtom(a) {}
00126
00127
00128 String id() const;
00129 String element() const;
00130 Coord_orth coord_orth() const;
00131 ftype occupancy() const;
00132 ftype u_iso() const;
00133 U_aniso_orth u_aniso_orth() const;
00134 void set_id( const String& n );
00135 void set_element( const String& n );
00136 void set_coord_orth( const Coord_orth& v );
00137 void set_occupancy( const ftype& v );
00138 void set_u_iso( const ftype& v );
00139 void set_u_aniso_orth( const U_aniso_orth& v );
00140 Sig_Coord_orth sig_coord_orth() const;
00141 ftype sig_occupancy() const;
00142 ftype sig_u_iso() const;
00143 Sig_U_aniso_orth sig_u_aniso_orth() const;
00144 void set_sig_coord_orth( const Sig_Coord_orth& s );
00145 void set_sig_occupancy( const ftype& s );
00146 void set_sig_u_iso( const ftype& s );
00147 void set_sig_u_aniso_orth( const Sig_U_aniso_orth& s );
00148
00149 String altconf() const;
00150 int serial_num() const;
00151 String charge() const;
00152 };
00153
00155
00160 class MMDBResidue : public mmdb::CResidue
00161 {
00162 public:
00164 MMDBResidue() {}
00166 MMDBResidue( const mmdb::CResidue& a ) : mmdb::CResidue(a) {}
00167
00168
00169 String type() const;
00170 int seqnum() const;
00171 String inscode() const;
00172 void set_type( const String& n );
00173 void set_seqnum( const int& n );
00174 void set_inscode( const String& n );
00175 };
00176
00178
00183 class MMDBChain : public mmdb::CChain
00184 {
00185 public:
00187 MMDBChain() {}
00189 MMDBChain( const mmdb::CChain& a ) : mmdb::CChain(a) {}
00190
00191
00192 String id() const;
00193 void set_id( const String& n );
00194 };
00195
00197
00202 class MMDBModel : public mmdb::CModel
00203 {
00204 public:
00206 MMDBModel() {}
00208 MMDBModel( const mmdb::CModel& a ) : mmdb::CModel(a) {}
00209
00210
00211 String id() const;
00212 void set_id( const String& n );
00213 };
00214
00216
00221 class MMDBManager : public mmdb::CMMDBManager
00222 {
00223 public:
00224 enum TYPE { Default=-1, PDB, CIF, Binary };
00225 MMDBManager();
00226 ~MMDBManager();
00227 Spacegroup spacegroup() const;
00228 Cell cell() const;
00229 void set_spacegroup( const Spacegroup& spacegroup );
00230 void set_cell( const Cell& cell );
00231
00232
00233
00234
00235 };
00236
00238
00241 class MMDBAtom_list : public Atom_list
00242 {
00243 public:
00245 MMDBAtom_list( const mmdb::PPCAtom ppcatom, const int natom );
00246 };
00247
00248
00249 }
00250
00251 #endif