Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

soapchem.msd

00001 //--------------------------------
00002 // soapchem.msd
00003 //
00004 // Project: PDBe API Framework, EBI 
00005 // Module: SOAP compatible Class Hirarchy of PDBe Data Structure
00006 // for PDBe API Framework 
00007 //
00008 // SOAP User Layer
00009 // Last updated: 25 February 2004 10:17
00010 // (C) Siamak Sobhany
00011 //--------------------------------
00012 
00013 // SOAP compatible Class Hirarchy of PDBe Data Structure:
00014 // 
00015 // PDBe Definitions: 
00016 //  Groups
00017 //   A Group of Assemblies is defined as a family of structures/sequence that can be aligned 
00018 //   together. Since alignment is based on the chain structure/sequence of the molecules it is 
00019 //   possible to have multiple groups with the same membership by combination of the different 
00020 //   chains within a set of molecules. 
00021 //  
00022 //  Assembly
00023 //   The Assembly is our name for the biological reconstruction of a molecule and is often 
00024 //   different from the flat PDB file. Experimental procedures that generate atomic coordinates 
00025 //   produce correct experimental representations of that molecule. For X-ray this is the 
00026 //   asymmetric unit, and for NMR this means multiple solutions. A program PQS is run on these 
00027 //   PDB files that identifies a single or a small number of ambiguous compact molecules that are 
00028 //   sensible guestimates of biological molecules. These can be matched to the physio-chemical 
00029 //   properties of these molecules such as the sedimentation coefficient. Although we provide a 
00030 //   link to download the original PDB flat file from our Atlas pages, all of our search, 
00031 //   sites and visualization is based on the assembly construction and therefore the biological 
00032 //   context.
00033 //  
00034 //  Chain
00035 //   We define a chain in a macromolecule as a polymer of residues that does not have connectivity 
00036 //   breaks, and contains at least 3 residues. 
00037 //  
00038 //  Residue
00039 //   A residue is a monomer unit that can form a polymer chain, or a discrete group of atoms that 
00040 //   forms a chemical entity. For example, alanine, cytosine, water and adenosine triphosphate.
00041 //  
00042 //  Atom
00043 //   The basic "indivisible" unit which has a single coordinate in 3D.
00044 //   
00045 //   
00046 //   
00047 
00048 
00049 
00050 
00051 
00055 class ns__CHetCompound  {
00056 
00057   public :
00058 
00059     xsd__string  hetID;      // Het identifiers, right-justified
00060     xsd__string     comment;
00061     int      nSynonyms;
00062     struct StrVec hetSynonym; // synonyms
00063     int      compNum;    // component number
00064     char     wc;         // '*' for water, otherwise space
00065     xsd__string     Formula;    // formulas
00066 
00067     ns__CHetCompound ();
00068         ns__CHetCompound ( xsd__string HetName );
00069    
00070     ~ns__CHetCompound();
00071 
00072   
00073 };
00074 //  ====================  CHetCompounds  =======================
00075 
00079 class ns__CHetCompounds: public ns__CHetCompound {
00080   public :
00081     ns__CHetCompound ** __ptr;
00082     int __size;
00083   //int            nHets;
00084     //ns__CHetCompound ** hetCompound;
00085     ns__CHetCompounds ();
00086     ~ns__CHetCompounds();
00087         virtual ns__CHetCompound*& operator[](int i);
00088   protected :
00089     xsd__boolean Closed;
00090 };
00091 
00092 
00093 
00097 class ns__CHelix   {
00098   public :
00099     int     serNum;      // serial number
00100     xsd__string helixID;     // helix ID
00101     xsd__string initResName; // name of the helix's initial residue
00102     xsd__string initChainID; // chain ID for the chain containing the helix
00103     int     initSeqNum;  // sequence number of the initial residue
00104     xsd__string initICode;   // insertion code of the initial residue
00105     xsd__string endResName;  // name of the helix's terminal residue
00106     xsd__string endChainID;  // chain ID for the chain containing the helix
00107     int     endSeqNum;   // sequence number of the terminal residue
00108     xsd__string endICode;    // insertion code of the terminal residue
00109     int     helixClass;  // helix class
00110     xsd__string    comment;     // comment about the helix
00111     int     length;      // length of the helix
00112     ns__CHelix ();
00113     ns__CHelix ( xsd__string S );
00114     ~ns__CHelix();
00115 };
00116 
00117 
00118 
00119 //  ====================  CStrand  ============================
00123 class ns__CStrand   {
00124 
00125   public :
00126 
00127     xsd__string sheetID;     // sheet ID
00128     int      strandNo;    // strand number
00129     xsd__string  initResName; // name of the strand's initial residue
00130     xsd__string  initChainID; // chain ID of initial residue in the strand
00131     int      initSeqNum;  // sequence number of the initial residue
00132     xsd__string  initICode;   // insertion code of the initial residue
00133     xsd__string  endResName;  // name of the strand's terminal residue
00134     xsd__string  endChainID;  // chain ID of terminal residue in the strand
00135     int      endSeqNum;   // sequence number of the terminal residue
00136     xsd__string  endICode;    // insertion code of the terminal residue
00137     int      sense;       // sense of strand with respect to previous strand
00138     xsd__string curAtom;     // registration; atom name in current strand
00139     xsd__string  curResName;  // registration; residue name in current strand
00140     xsd__string  curChainID;  // registration; chain ID in current strand
00141     int      curResSeq;   // registration; res-e seq numb in current strand
00142     xsd__string  curICode;    // registration; ins code in current strand
00143     xsd__string prevAtom;    // registration; atom name in previous strand
00144     xsd__string  prevResName; // registration; residue name in previous strand
00145     xsd__string  prevChainID; // registration; chain ID in previous strand
00146     int      prevResSeq;  // registration; res-e seq numb in previous strand
00147     xsd__string  prevICode;   // registration; ins code in previous strand
00148 
00149     ns__CStrand ();
00150    
00151     ~ns__CStrand();
00152 
00153 };
00154 
00155 //====================== array of CStrands ============================
00159 class ns__CStrands:  public ns__CStrand {
00160   public :
00161     ns__CStrand ** __ptr;    //pointer to array of pointers to ns__CStrands // array of strands
00162     int __size;
00163     ns__CStrands ();
00164     ~ns__CStrands();
00165         virtual ns__CStrand*& operator[](int i);
00166 
00167 };
00168 
00169 
00170 //  ====================  CSheet  ============================
00171 
00172 
00173 
00174 
00178 class ns__CSheet  {
00179 
00180   public :
00181 
00182     xsd__string   sheetID;   // sheet ID
00183     int       nStrands;  // number of strands in the sheet
00184     ns__CStrands Strand;    // array of strands
00185 
00186     ns__CSheet ();
00187     
00188     ~ns__CSheet();
00189 
00190 };
00191 
00192 
00193 //  ====================  array of CSheets  ============================
00194 
00198 class ns__CSheets: public ns__CSheet {
00199 
00200   public :
00201     ns__CSheet ** __ptr;
00202     int __size;
00203   //int      nSheets;
00204     //ns__CSheet ** Sheet;
00205 
00206     ns__CSheets ();
00207    
00208     ~ns__CSheets();
00209         virtual ns__CSheet*& operator[](int i);
00210 
00211 };
00212 
00213 
00214 //  ====================  CTurn  ============================
00215 
00219 class ns__CTurn  {
00220 
00221   public :
00222     int     serNum;      // serial number
00223     xsd__string  turnID;      // turn ID
00224     xsd__string initResName; // name of the turn's initial residue
00225     xsd__string initChainID; // chain ID for the chain containing the turn
00226     int     initSeqNum;  // sequence number of the initial residue
00227     xsd__string initICode;   // insertion code of the initial residue
00228     xsd__string endResName;  // name of the turn's terminal residue
00229     xsd__string endChainID;  // chain ID for the chain containing the turn
00230     int     endSeqNum;   // sequence number of the terminal residue
00231     xsd__string endICode;    // insertion code of the terminal residue
00232     xsd__string    comment;     // comment about the helix
00233 
00234     ns__CTurn ();
00235     ns__CTurn ( xsd__string S );
00236   
00237     ~ns__CTurn();
00238 
00239 };
00240 
00241 
00242 
00243 
00244 
00245 
00249 class ns__CChain;
00250 
00251 class ns__CChainContainer   {
00252 
00253   public :
00254 
00255     ns__CChainContainer  ();
00256    
00257      
00258     ~ns__CChainContainer ();
00259 
00260   
00261 
00262   protected :
00263     ns__CChain * Chain;
00264 
00265 };
00266 
00267 
00268 
00269 
00270 //  ==================  CSeqRes  ========================
00271 
00275 class ns__CSeqRes  {
00276 
00277 
00278   public :
00279  
00280     int       numRes;   // number of residues in the chain
00281     struct StrVec  resName;  // residue names
00282     
00283     ns__CSeqRes ();
00284     
00285     ~ns__CSeqRes();
00286 
00287   protected :
00288     ns__CChain * Chain;
00289     xsd__string chainID;
00290     int     serNum;
00291 
00292 
00293 };
00294 
00295 struct ns__SAtomStat  {
00296 
00297   public :
00298     int       nAtoms;          // number of atoms in statistics
00299 
00300     xsd__double  xmin,ymin,zmin;  // minimums of coordinates
00301     xsd__double  xmax,ymax,zmax;  // maximums of coordinates
00302     xsd__double  xm  ,ym  ,zm;    // mediums  of coordinates
00303     xsd__double  xm2 ,ym2 ,zm2;   // square mediums of coordinates
00304 
00305     xsd__double  occ_min,occ_max; // minimum/maximum occupancy
00306     xsd__double  occ_m  ,occ_m2;  // medium and square medium occupancy
00307 
00308     xsd__double  tFmin,tFmax;     // minimum/maximum temperature factor
00309     xsd__double  tFm  ,tFm2;      // medium and sq. med. temperature factor
00310 
00311     xsd__double  u11_min,u11_max; // minimums and
00312     xsd__double  u22_min,u22_max; //   maximums of
00313     xsd__double  u33_min,u33_max; //     anisotropic
00314     xsd__double  u12_min,u12_max; //       temperature
00315     xsd__double  u13_min,u13_max; //         factors
00316     xsd__double  u23_min,u23_max;
00317 
00318     xsd__double  u11_m,u11_m2;    // mediums and
00319     xsd__double  u22_m,u22_m2;    //   square mediums of
00320     xsd__double  u33_m,u33_m2;    //     anisotropic
00321     xsd__double  u12_m,u12_m2;    //       temperature
00322     xsd__double  u13_m,u13_m2;    //         factors
00323     xsd__double  u23_m,u23_m2;
00324 
00325     xsd__unsignedInt      WhatIsSet;       //   mask field
00326 
00327     //void  Init  ();
00328     //void  Finish();
00329 
00330   private : 
00331     xsd__boolean finished;
00332 
00333 };
00334 
00335 struct ns__SAtomBondI  {
00336   int  index;  // bonded atom index
00337   xsd__unsignedByte order;  // bond order
00338 };
00339 
00340 
00341 
00342 class ns__CResidue;
00343 
00344 
00348 class ns__CAtom   {
00349 
00350   public :
00351 
00352     int       serNum;         // serial number
00353     xsd__string  name;           // atom name (ALIGNED)
00354     xsd__string    altLoc;         // alternate location indicator ("" for none)
00355     ns__CResidue * residue;        // reference to residue
00356     xsd__double  x,y,z;          // orthogonal coordinates in angstroms
00357     xsd__double  occupancy;      // occupancy
00358     xsd__double  tempFactor;     // temperature factor
00359     xsd__string     segID;          // segment identifier
00360     xsd__string   element;        // element symbol (ALIGNED)
00361     xsd__string  charge;         // charge on the atom
00362     xsd__double  sigX,sigY,sigZ; // standard deviations of the stored coords
00363     xsd__double  sigOcc;         // standard deviation of occupancy
00364     xsd__double  sigTemp;        // standard deviation of temperature factor
00365     xsd__double  u11,u22,u33;    // anisotropic temperature
00366     xsd__double  u12,u13,u23;    //    factors
00367     xsd__double  su11,su22,su33; // standard deviations of
00368     xsd__double  su12,su13,su23; //    anisotropic temperature factors
00369     xsd__boolean   Het;            // indicator of atom within non-standard groups
00370     xsd__boolean   Ter;            // chain terminator
00371 
00372     xsd__unsignedInt      WhatIsSet;      //   mask      field
00373                               //  0x0001   atomic coordinates
00374                               //  0x0002   occupancy
00375                               //  0x0004   temperature factor
00376                               //  0x0010   coordinate standard deviations
00377                               //  0x0020   deviation of occupancy
00378                               //  0x0040   deviation of temperature factor
00379                               //  0x0100   anisotropic temperature factors
00380                               //  0x1000   anis. temp. fact-s st-d deviations
00381 
00382     
00383         
00384   int props;
00385  
00386         ns__CAtom ();
00387     
00388     ~ns__CAtom();
00389 
00390 
00391   protected:
00392     int m_nId, m_nSiteId, m_nSupChemId;
00393     // hydrogen bond caracteristics 
00394     int m_nDonorAcceptor;
00395      int m_nDonorHybridisation, m_nAcceptorHybridisation;
00396     int         index;   // index in the file
00397     int         nBonds;  // number of bonds in the lowest byte (!)
00398     struct ns__SAtomBondI * Bond;    // atom bonds
00399 
00400    
00401 };
00402 //======================== Array of CAtoms ============================
00406 class ns__CAtoms:  public ns__CAtom  {
00407 
00408   public :
00409 
00410    ns__CAtom ** __ptr;
00411    int __size;
00412     
00413     ns__CAtoms();
00414     
00415     ~ns__CAtoms();
00416     virtual ns__CAtom*& operator[](int i);
00417   
00418 };
00419 
00420 struct ns__SAtomBond  {
00421   ns__CAtom * atom;  // bonded atom pointer
00422   xsd__unsignedByte  order;  // bond order
00423 };
00424 
00425 
00426 
00427 
00428 //  ======================  CResidue  ==========================
00429 
00430 //#define ALF_NoAltCodes    0x00000000
00431 //#define ALF_EmptyAltLoc   0x00000001
00432 //#define ALF_NoEmptyAltLoc 0x00000002
00433 //#define ALF_Mess          0x00000004
00434 //#define ALF_Occupancy     0x00000008
00435 //
00436 //#define SSE_None          0
00437 //#define SSE_Strand        1
00438 //#define SSE_Bulge         2
00439 //#define SSE_3Turn         3
00440 //#define SSE_4Turn         4
00441 //#define SSE_5Turn         5
00442 //#define SSE_Helix         6
00443 //
00444 
00445 
00446 
00450 class ns__CResidue   {
00451  
00452   public :
00453 
00454     xsd__string  name;     // residue name - all spaces cut
00455     int      seqNum;   // residue sequence number
00456     xsd__string  insCode;  // residue insertion code
00457     ns__CChain * chain;    // reference to chain
00458     int      index;    // index in the chain
00459     int      nAtoms;   // number of atoms in the residue
00460     ns__CAtoms  atom;     // array of atoms
00461     xsd__unsignedByte     SSE;      // SSE type
00462     
00463     ns__CResidue ();
00464     
00465     ~ns__CResidue();
00466 
00467    
00468 
00469   protected:
00470   int m_nId;
00471   int m_nSupChemCompId;
00472   int m_nAssemblyId;
00473   xsd__boolean m_bIsHet;
00474 
00475     int      AtmLen;   // length of atom array
00476     xsd__boolean  Exclude;  // used internally
00477     
00478    
00479 };
00480 
00484 class ns__CListResidue : public ns__CResidue
00485 {  
00486  public:
00487  ns__CListResidue();
00488  virtual ~ns__CListResidue();
00489   
00490   ns__CListResidue* m_pPrev;
00491 };
00492 
00493 
00494 //==================== Array of CResidues =========================
00498 class ns__CResidues:  public ns__CResidue  {
00499 
00500   public :
00501 
00502    ns__CResidue ** __ptr;
00503    int __size;
00504     
00505     ns__CResidues ();
00506     
00507     ~ns__CResidues();
00508     virtual ns__CResidue*& operator[](int i);
00509   
00510 };
00511 
00512 
00513 
00514 
00515 
00516 
00517 //  =================  CChain  =======================
00518 
00519 
00520 
00524 class ns__CChain   {
00525    
00526   public :
00527 
00528     ns__CChainContainer DBReference; // database reference
00529     ns__CChainContainer SeqAdv;      // SEQADV records
00530     ns__CSeqRes         SeqRes;      // Sequence residues, SEQRES records
00531     ns__CChainContainer ModRes;      // modification descriptions
00532     ns__CChainContainer Het;         // non-standard residues descriptions
00533 
00534     ns__CChain ();  // SetModel() MUST be used after this constructor!
00535    
00536     ~ns__CChain();
00537 
00538    
00539   protected :
00540 
00541     xsd__string         chainID;     // chain ID
00542     xsd__string         prevChainID; // if chain is renamed, its original
00543                                  // name may be saved here.
00544     //ns__CProModel  *    model;       // pointer to model class
00545 
00546     int             nWeights;    // used externally for sorting
00547     xsd__double        Weight;      // the chains
00548 
00549     int             nResidues;   // number of residues
00550     ns__CResidues    Residue;     // array of residues
00551 
00552     xsd__boolean         Exclude;     // used internally
00553     int m_nId;
00554     xsd__string  m_szType;
00555     xsd__boolean m_bIsProtein;
00556     xsd__boolean m_bIsNucleoAcid;
00557   
00558 
00559   private :
00560     int  ResLen;      // length of Residue array
00561 
00562 };
00563 
00565 
00568 class ns__CListChain : public ns__CChain
00569 {  
00570  public:
00571   ns__CListChain();
00572   virtual ~ns__CListChain();
00573   ns__CListChain* m_pPrev;
00574 };
00575 
00576 
00577 
00578 //======================== array of CChains =================================
00582 class ns__CChains:  public ns__CChain  {
00583 
00584   public :
00585 
00586    ns__CChain ** __ptr;
00587    int __size;
00588     
00589     ns__CChains ();
00590     
00591     ~ns__CChains();
00592     virtual ns__CChain*& operator[](int i);
00593   
00594 };
00595 
00596 
00597 
00598 class ns__CAssembly;
00599 
00600  // Presents a chain associated with an assembly
00601  // it presents chain and applied matrix (offset plus symmetry operation)
00602  //
00606 class ns__CChainAssembly
00607 {
00608  
00609  public:
00610   //**
00611   // * Empty constructor
00612   // */
00613   ns__CChainAssembly();
00614   ~ns__CChainAssembly();
00615   //**
00616   // * Constructor
00617   // * @param pAssembly pointer to CDBAssembly
00618   // * @param nId integer database id of the chain inside the assembly (chain_id from warehouse or DGAC_ID from deposition db)
00619   // * @param nSymOpId integer database id of the symmetry operation (RSE_ID from warehouse or depostion DB)
00620   // * @param nChainId integer database id of the chain (chain_id from warebouse or DEP_CHAIN_ID from depostion DB)
00621   // * @param t11 double parameter of the transformation matrix
00622   // * @param t12 double parameter of the transformation matrix
00623   // * @param t13 double parameter of the transformation matrix
00624   // * @param t14 double parameter of the transformation matrix
00625   // * @param t21 double parameter of the transformation matrix
00626   // * @param t22 double parameter of the transformation matrix
00627   // * @param t23 double parameter of the transformation matrix
00628   // * @param t24 double parameter of the transformation matrix
00629   // * @param t31 double parameter of the transformation matrix
00630   // * @param t32 double parameter of the transformation matrix
00631   // * @param t33 double parameter of the transformation matrix
00632   // * @param t34 double parameter of the transformation matrix
00633   // */
00634   protected:
00635   t__rmat m_T;
00636   int m_nId;
00637   int m_nSymOpId;
00638   int m_nChainId;
00639   ns__CAssembly* m_pAssembly; // reference to assembly
00640   
00641 };
00642 
00643 //**
00644 // * Presents a connected list of CDBChainAssembly 
00645 // */
00649 class ns__CListChainAssembly : public ns__CChainAssembly
00650 {  
00651  public:
00652   //**
00653   // * Constructor
00654   // * @param pAssembly pointer to CDBAssembly
00655   // * @param nId integer database id of the chain inside the assembly (chain_id from warehouse or DGAC_ID from deposition db)
00656   // * @param nSymOpId integer database id of the symmetry operation (RSE_ID from warehouse or depostion DB)
00657   // * @param nChainId integer database id of the chain (chain_id from warebouse or DEP_CHAIN_ID from depostion DB)
00658   // * @param t11 double parameter of the transformation matrix
00659   // * @param t12 double parameter of the transformation matrix
00660   // * @param t13 double parameter of the transformation matrix
00661   // * @param t14 double parameter of the transformation matrix
00662   // * @param t21 double parameter of the transformation matrix
00663   // * @param t22 double parameter of the transformation matrix
00664   // * @param t23 double parameter of the transformation matrix
00665   // * @param t24 double parameter of the transformation matrix
00666   // * @param t31 double parameter of the transformation matrix
00667   // * @param t32 double parameter of the transformation matrix
00668   // * @param t33 double parameter of the transformation matrix
00669   // * @param t34 double parameter of the transformation matrix
00670   // * @param pPrev pointer to the previous CDBListChainAssembly in the list
00671   // */
00672   ns__CListChainAssembly();
00673   virtual ~ns__CListChainAssembly();
00674   ns__CListChainAssembly* m_pPrev;
00675 };
00676 
00677 
00679 // * Cell in 3D space (unit cell system)
00680 // */
00681 struct ns__SCell 
00682 {
00683   int m_nX;
00684   int m_nY;
00685   int m_nZ;
00686 //####  ns__SCell() : m_nX(0), m_nY(0), m_nZ(0) {}
00687 //####  SCell(int nx, int ny, int nz) 
00688 //####  {
00689 //####    m_nX = nx;
00690 //####    m_nY = ny;
00691 //####    m_nZ = nz;
00692 //####  }
00693 //####  void Set(int nx, int ny, int nz) 
00694 //####  {
00695 //####    m_nX = nx;
00696 //####    m_nY = ny;
00697 //####    m_nZ = nz;
00698 //####  }
00699 //####  ns__SCell(const ns__SCell& cell) 
00700 //####  {
00701 //####    m_nX = cell.m_nX;
00702 //####    m_nY = cell.m_nY;
00703 //####    m_nZ = cell.m_nZ;
00704 //####  }
00705 };
00706 
00707 //####inline bool operator == (const ns__SCell& c1, const ns__SCell& c2) 
00708 //####{
00709 //####  return c1.m_nX == c2.m_nX && c1.m_nY == c2.m_nY && c1.m_nZ == c2.m_nZ;
00710 //####}
00711 //####inline bool operator != (const ns__SCell& c1, const ns__SCell& c2) 
00712 //####{
00713 //####  return 
00714 //####    c1.m_nX != c2.m_nX || c1.m_nY != c2.m_nY || c1.m_nZ != c2.m_nZ;
00715 //####}
00716 
00718 // * Presents model - assembly association
00719 // * 
00720 // * Contains coordinate information that is associated with the model and the assembly
00721 // */
00722 class ns__CModel;
00723 //class ns__CAssembly;
00724 class ns__CManager;
00725 
00729 class ns__CModelAssembly 
00730 {
00731  
00732  public:
00733   
00734  int m_nAtomCount;
00735   //**
00736   // * Constructor 
00737   // * @param pModel pointer to CDBModel
00738   // * @param pAssembly pointer to CDBAssembly
00739   // * @param pMgr pointer to CDBManager
00740   // * @param bBuildAtoms boolean tells whether to extract coordinate information that is associated with the model and the assembly or not (means do it later)
00741   // */
00742   ns__CModelAssembly();
00744   // * Destructor
00745   // */
00746   ~ns__CModelAssembly();
00747 //####    {
00748 //####      for (int i = 0; i < m_nAtomCount; i++)
00749 //####  {
00750 //####    m_vpAtom[i]->SetIndex(-1);
00751 //####    m_vpAtom[i]->SetResidue(NULL);
00752 //####    delete m_vpAtom[i];
00753 //####  }
00754 //####      if (m_vpAtom)
00755 //####  delete [] m_vpAtom;
00756 //####      if (m_vCell)
00757 //####  delete [] m_vCell;
00758 //####/*       if (m_vnCellX) */
00759 //####/*        delete [] m_vnCellX; */
00760 //####/*       if (m_vnCellY) */
00761 //####/*        delete [] m_vnCellY; */
00762 //####/*       if (m_vnCellZ) */
00763 //####/*        delete [] m_vnCellZ; */
00764 //####      for (std::vector<ns__CAtom*>::const_iterator it = m_vpBoundMolAtom.begin(); it !=  m_vpBoundMolAtom.end(); it++)
00765 //####  {
00766 //####    (*it)->SetIndex(-1);
00767 //####    (*it)->SetResidue(NULL);
00768 //####    delete  *it;
00769 //####  }
00770 //####      for (std::vector<ns__CAtom*>::const_iterator it = m_vpSolventAtom.begin(); it !=  m_vpSolventAtom.end(); it++)
00771 //####  {
00772 //####    (*it)->SetIndex(-1);
00773 //####    (*it)->SetResidue(NULL);
00774 //####    delete  *it;
00775 //####  }
00776 //####    }
00777 protected:
00778   ns__CModel* m_pModel; // reference to model
00779   ns__CAssembly* m_pAssembly; // reference to assembly
00780   ns__CManager* m_pMgr;  // reference to manager
00781   // calculated information
00782  
00783   ns__CAtom** m_vpAtom; // copy of atoms with assembly coordinates
00784   //std::vector<ns__CAtom*> m_vpBoundMolAtom;
00785   //std::ns__CAtom*> m_vpSolventAtom;
00786   ns__CAtom** m_vpBoundMolAtom;
00787   ns__CAtom** m_vpSolventAtom;
00788   //int* m_vnCellX;
00789   //int m_nCellXCount;
00790   //int* m_vnCellY;
00791   //int m_nCellYCount;
00792   //int* m_vnCellZ;
00793   //int m_nCellZCount;
00794   int m_nCellCount;
00795   struct ns__SCell* m_vCell;
00796  
00797 };
00798 
00799 //**
00800 // * Connected list of CDBModelAssembly
00801 // */
00805 class ns__CListModelAssembly : public ns__CModelAssembly
00806 {  
00807  public:
00808          ns__CListModelAssembly();
00809     virtual ~ns__CListModelAssembly();
00810   //**
00811   // * Constructor 
00812   // * @param pModel pointer to CDBModel
00813  //  * @param pAssembly pointer to CDBAssembly
00814   // * @param pMgr pointer to CDBManager
00815    //* @param pPrev pointer to previous CDBModelAssembly in the list
00816    //*/
00817   
00818   ns__CListModelAssembly* m_pPrev;
00819 };
00820 
00821 //**
00822 // * Assembly (about assemblies see PQS assemblies on www.ebi.ac.uk/msd)
00823 // *
00824 // * This class is container of array of CDBChainAssembly and array of CDBModelAssembly
00825 // */
00826 class ns__CAssembly
00827 {
00828  
00829  public:
00830  // /**
00831  //  * Constructor
00832  //  * @param pmgr pointer to CDBManager
00833  //  * @param nId integer database id of assembly (DA_ID from deposition db or assembly_id from warehouse)
00834  //  * @param nSerial integer serial number of assembly within the PDB entry
00835  //  */
00836   ns__CAssembly();
00837    
00838  // /**
00839  //  * Destructor
00840  //  */
00841   ~ns__CAssembly();
00842    
00843   protected:
00844   ns__CManager* m_pMgr;
00845   int m_nId;
00846   int m_nSerial;
00847   ns__CChainAssembly** m_vpChainAssembly;
00848   ns__CModelAssembly** m_vpModelAssembly;
00849   int m_nChainAssemblyCount;
00850   int m_nModelAssemblyCount; 
00851   
00852 };
00853 
00854 
00855 
00856 
00857 
00858 
00859 
00860 
00861 
00862 // ===================== CAssembly ==============================
00863 //     class ns__CAssembly {
00864 //      public :
00865 //       int  assembly_id;         
00866 //         accession_code;     
00867 //         assembly_serial;    
00868 //         assembly_class;     
00869 //         assembly_form;      
00870 //         assembly_title;     
00871 //         assembly_type;      
00872 //         entry_id;           
00873 //         num_chains;         
00874 //         num_nstd_atom;      
00875 //         num_residues;       
00876 //         num_xchain_ss;      
00877 //         rel_status;         
00878 //         score              
00879 //         status             
00880 //         n_repeat           
00881 //         repeat_dist        
00882 //         n_unique           
00883 //         helical_height     
00884 //         helical_twist      
00885 //         srch_assembly_type 
00886 //     
00887 //       ns__CAssembly ();
00888 //       ~ns__CAssembly ();
00889 //       
00890 //     };
00891 
00892 
00893 //  ====================  CModel  ===============================
00894 
00898 class ns__CModel  {
00899 
00900  public :
00901     ns__CModel ();  // SetMMDBFile() MUST be used after this constructor!
00902     ~ns__CModel();
00903      protected :
00904      int m_nId;
00905          int             serNum;       // the model serial number
00906    // ns__CMMDBManager *  manager;      // pointer to mmdbmanager class
00907     ns__CHetCompounds   HetCompounds; // information on heterocompounds
00908    // ns__CSSContainer    Helix;        // information on helices
00909     ns__CSheets         Sheets;       // information on sheets
00910    // ns__CSSContainer    Turn;         // information on turns
00911     int             nChains;      // number of chains
00912     int             nChainsAlloc; // actual length of Chain[]
00913     ns__CChains   Chain;        // array of chains
00914     xsd__boolean         Exclude;      // used internally
00915 };
00916 
00917 
00918 
00919 
00920 
00921 //  ==================  CContainerChain  =====================
00922 
00926 class ns__CContainerChain  {
00927 
00928  
00929 
00930   public :
00931 
00932     ns__CContainerChain ();
00933     ~ns__CContainerChain ();
00934     
00935   protected :
00936     ns__CChain * Chain;
00937     xsd__string chainID;  // just a copy of Chain->chainID
00938 
00939 };
00940 
00941 
00942 //  ==================  CDBReference  ========================
00943 
00944 
00945 class ns__CDBReference : public ns__CContainerChain  {
00946 
00947   public :
00948 
00949     int      seqBeg;      // initial sequence number of the PDB seq-ce segment
00950     xsd__string  insBeg;      // initial insertion code of the PDB sequence segm-t
00951     int      seqEnd;      // ending sequence number of the PDB sequence segm-t
00952     xsd__string  insEnd;      // ending insertion code of the PDB sequence segment
00953     xsd__string   database;    // sequence database name
00954     xsd__string dbAccession; // sequence database accession code
00955     xsd__string dbIdCode;    // sequence database identification code
00956     int      dbseqBeg;    // initial sequence number of the database segment
00957     xsd__string  dbinsBeg;    // insertion code of initial residue of the segment
00958     int      dbseqEnd;    // ending sequence number of the database segment
00959     xsd__string  dbinsEnd;    // ins-n code of the ending residue of the segment
00960     
00961     ns__CDBReference ();
00962    
00963     ~ns__CDBReference();
00964 
00965    
00966 };
00967 
00968 
00969 //  ==================  CSeqAdv  ========================
00970 
00971 
00975 class ns__CSeqAdv : public ns__CContainerChain  {
00976 
00977   public :
00978  
00979     xsd__string  resName;     // residue name in conflict
00980     int      seqNum;      // residue sequence number
00981     xsd__string  insCode;     // residue insertion code
00982     xsd__string   database;    // sequence database name
00983     xsd__string dbAccession; // sequence database accession code
00984     xsd__string  dbRes;       // sequence database residue name
00985     int      dbSeq;       // sequence database sequence number
00986     xsd__string     conflict;    // conflict comment
00987     
00988     ns__CSeqAdv ();
00989    
00990     ~ns__CSeqAdv();
00991 
00992 };
00993 
00994 
00995 
00996 
00997 //  ==================  CModRes  ========================
00998 
00999 
01000 class ns__CModRes : public ns__CContainerChain  {
01001 
01002   public :
01003  
01004     xsd__string  resName;     // residue name used
01005     int      seqNum;      // residue sequence number
01006     xsd__string  insCode;     // residue insertion code
01007     xsd__string  stdRes;      // standard residue name
01008     xsd__string     comment;     // description of the residue modification
01009     
01010     ns__CModRes ();
01011    
01012     ~ns__CModRes();
01013 
01014     
01015 };
01016 
01017 
01018 //  ==================  CHetRec  ===========================
01019 
01020 
01024 class ns__CHetRec : public ns__CContainerChain  {
01025 
01026   public :
01027  
01028     xsd__string  hetID;       // Het identifier (right-justified)
01029     int      seqNum;      // sequence number
01030     xsd__string  insCode;     // insertion code
01031     int      numHetAtoms; // number of HETATM records for the
01032                           // group present in the entry
01033     xsd__string     comment;     // text describing Het group
01034     
01035     ns__CHetRec ();
01036     
01037     ~ns__CHetRec();
01038 
01039 };
01040 
01041 
01042 
01043 class ns__CAtomPath  {
01044 
01045   public :
01046 
01047     int      modelNo;
01048     xsd__string  chainID;
01049     int      seqNum;
01050     xsd__string  insCode;
01051     xsd__string  resName;
01052     xsd__string atomName;
01053     xsd__string  element;
01054     xsd__string   altLoc;
01055     int      isSet;
01056 
01057     ns__CAtomPath  ();
01058     
01059     ~ns__CAtomPath ();
01060 
01061     //  SetPath(..) parses the Atom Path ID string, which
01062     //  may be incomplete. Below {..} means blocks that
01063     //  may be omitted; any elements within such blocks
01064     //  may be omitted as well.
01065     //
01066     //  1. If ID starts with '/' then the ID must be of
01067     //     the following form:
01068     //   /mdl{/chn{/seq(res).i{/atm[elm]:a}}}
01069     //
01070     //  2. If ID starts with a letter:
01071     //        chn{/seq(res).i{/atm[elm]:a}}
01072     //
01073     //  3. If ID starts with a number or '(':
01074     //            seq(res).i{/atm[elm]:a}
01075     //
01076     //  4. If ID contains colon ':' or '[' then
01077     //     it may be just
01078     //                       atm[elm]:a
01079     //
01080     //  The following are valid samples of IDs:
01081     //
01082     //     /1      model number 1
01083     //     /1/A/23(GLU).A/CA[C]:A  model number 1, chain A,
01084     //             residue 23 GLU insertion code A, C-alpha
01085     //             atom in alternative location A
01086     //     A/23    residue 23 of chain A
01087     //     CA[C]:  atom C-alpha
01088     //     [C]     a carbon
01089     //     *[C]:*  same as above
01090     //     :A      an atom with insertion code A
01091     //     5       residue number 5
01092     //     (GLU)   residue GLU
01093     // 
01094     //   All spaces are ignored. SetPath(..) sets bit of isSet
01095     // for each element present. Any element may be a wildcard
01096     // '*'. Wildcard for model will set modelNo=0, for sequence
01097     // number will set seqNum=MinInt4.
01098     //
01099     // Returns:
01100     //   0   <-> Ok
01101     //   -1  <-> wrong numerical format for model
01102     //   -2  <-> wrong numerical format for sequence number
01103    
01104 };
01105 
01106 //####class ns__CDBSupChemPlane
01107 //####{
01108 //####  int m_nId;
01109 //####  int m_nCompId;
01110 //####  int m_vnAtomId[100]; // vector of atoms in the plane
01111 //####  int m_nAtomCount;
01112 //####
01113 //####};
01114 //####
01115 //####class CDBPlaneAtom : public virtual CDBAtom
01116 //####{
01117 //####protected:
01118 //####  algebra::vec3 m_Norm;
01119 //####  CDBSupChemPlane* m_pPlane;
01120 //####};
01121 //####
01122 
01123 class ns__CListAtom : public  ns__CAtom
01124 {  
01125  public:
01126   ns__CListAtom();
01127   virtual ~ns__CListAtom();
01128  // /**
01129  //  * Constructor
01130  //  * @param nId integer id of atoms location in DB (see CDBAtom)
01131  //  * @param nSiteId integer id of atom in DB (see CDBAtom)
01132  //  * @param nSupChemId integer id of reference data about atom type (see CDBAtom)
01133  //  * @param pPrev pointer to the previous CDBListAtom in the list
01134  //  */
01135  
01136   //**
01137  //  * pointer to the previous CDBListAtom in the list
01138  //  */ 
01139   ns__CListAtom* m_pPrev;
01140 };
01141 
01142 
01143 
01144 
01145 
01146 struct ns__SContact  {
01147   int      id1,id2;
01148   xsd__long     group;
01149   xsd__double dist;
01150   
01151 };
01152 
01153 
01154 // ========================  CMContact  =============================
01155 
01156 
01160 class ns__CMContact  {
01161 
01162   public :
01163     int       nStruct;
01164     int       contactID;
01165     t__ivec   nAtoms;
01166     ns__CAtom *** Atom;
01167     t__imat   id;
01168 
01169     ns__CMContact ();
01170     ~ns__CMContact();
01171 
01172 
01173 
01174   protected:
01175     t__ivec nAlloc;
01176 
01177 };
01178 
01182 class ns__CManager 
01183 {
01184  
01185  public:
01186   int m_nAtomIndex;
01187   int m_nResidueIndex;
01188   xsd__boolean m_bIgnorePlanes;
01189 
01192   // */
01193   ns__CManager();
01195   // * Destructor, performs cleanup
01196   // */
01197   ~ns__CManager();
01198 //###    {
01199 //###      for (int i = 0; i < m_nAssemblyCount; i++)
01200 //###   delete m_vpAssembly[i];
01201 //###      for (int i = 0; i < m_nSupChemPlaneCount; i++)
01202 //###   delete m_vpSupChemPlane[i];
01203 //###      if (m_vpSupChemPlane)
01204 //###   delete [] m_vpSupChemPlane;
01205 //###      if (m_vpAssembly)
01206 //###   delete [] m_vpAssembly;
01207 //###      for (std::vector<CCalcGraph*>::const_iterator it = m_vpSupChemCompGraph.begin();
01208 //###      it != m_vpSupChemCompGraph.end(); it++)
01209 //###   delete (*it);
01210 //###    }
01211  protected:
01212   ns__CAssembly **m_vpAssembly;
01213   int m_nAssemblyCount;
01214   //ns__CSupChemPlane **m_vpSupChemPlane;
01215   //int m_nSupChemPlaneCount;
01216   //  int m_nLigandChainCount;
01217  
01218   // helper for load data
01219   int m_nLigandChainCount; 
01220 };
01221 

Generated on Fri Apr 16 13:47:45 2004 for MSDAPI by doxygen 1.3.4-20031005