The class PDBFile was developed to load a PDB file into the Macromolecular structural representation defined by the PDBlib classes. The PDBFile class contains no knowledge of the representation defined by the PDBlib, but rather consists of a collection of methods which interpret the PDB file and deal with the reported inconsistencies in the data.
The Intrinsic PDBFile class:
class IntrPdbFile {
protected:
IntrPdbFile();
IntrPdbFile(char*, ConnectivityMgr* =0, SpaceGroupMgr* =0 );
~IntrPdbFile();
int _mySpaceGroupMgr;
int _myConnectivityMgr;
char _previousResName[5];
char *_name;
char _inputBuf[83];
char _previousInsertCode;
Compound * _compound;
FILE *_fd;
HetMonomer *_currentHetRes;
int _previousResNum;
LineBuffer * _atomBuf;
LineBuffer * _buf;
SubEntity *_currentSubEntity;
ConnectivityMgr *_cMgr;
SpaceGroupMgr *_spaceGroupMgr;
int GetLineInfo();
void ReConnectSubEntitys();
void PutInBuffer();
void AssignAll(Compound*);
// *************************************************************************
//
// followings functions are to process structure related infomation in PDB file
// it will built a tree as follows:
//
// Compound1------------>Sheet
// / \ \------>Site
// Entity1 Entity2----------->Secondary structure
// / | \ \
// subentity1 ... subentity n
// / | \ | \
// atom 1 .... atom n atom m
//
// This figure also shows the relationships (has_a) among macromolecule
// components.
//
// ***************************************************************************
int atom(); // Process ATOM and HETAM information.
void BuildSubEntities(); // build all primary structure and associated
// Atoms based on SEQRES information.
void PutInAtomBuffer(); // Store atom information temporarily.
void AttachAtoms(); // Attach atom information to proper Atom object.
// **********************************************************************
// secondary structures are ordered by their beginning subentity.
// it has 3 possible elements: helix, strand, turn.
//
// Using SStrucSEIter, we may have a view like this:
// helix1 -> strand1 -> strand2 -> helix2 -> strand3 ->..-> turn1..
//
// Sheet and Site are implemented as
//
// Sheet----------------->Strand 1
// \------------>Strand 2
// \----------->Strand 3
//
//
// Site------------------>SubEntity 1
// \------------>SubEntity 2
// \----------->SubEntity 3
//
// **********************************************************************
int helix(char* line_buffer);
int turn(char* line_buffer);
int site(char* line_buffer);
int sheet(char* line_buffer);
int ssbond(char* line_buffer); // Build disulfide bridge
// ************************************************************************
// following functions are to process text information rows in PDB file
// and load each row as a node in link-list. Each protein will has pointers
// to each link-list.
// ************************************************************************
int crystal();
int origx();
int header();
int obslte();
int compnd();
int source();
int scale();
int expdta();
int author();
int revdat();
int sprsde();
int jrnl();
int matrix();
int remark();
int conect();
int footnote();
int tvect();
char * StrTruncLR(char*); // Truncate leading and trailing blanks.
public:
void SetTo(char*, ConnectivityMgr* =0, SpaceGroupMgr* =0);
Compound* Import(); // Main driver for comversion process.
SpaceGroupMgr * MySpaceGroup() { return _spaceGroupMgr; }
ConnectivityMgr * MyConnectivity() { return _cMgr; }
};
Currently under Heavy Construction, please excuse the mess
jcooper@cuhhca.hhmi.columbia.edu