PDBAtom Class Reference

#include <PDBData.h>

Inheritance diagram for PDBAtom:

PDBData PDBAtomRecord PDBHetatm List of all members.

Public Types

 STYPE = 1
 SSERIAL = 7
 SNAME = 13
 SALT = 17
 SRESNAME = 18
 SCHAIN = 22
 SRESSEQ = 23
 SINSERT = 27
 SX = 31
 SY = 39
 SZ = 47
 SOCC = 55
 STEMPF = 61
 SFOOT = 68
 SSEGNAME = 73
 SELEMENT = 77
 LTYPE = 6
 LSERIAL = 5
 LNAME = 4
 LALT = 1
 LRESNAME = 4
 LCHAIN = 1
 LRESSEQ = 4
 LINSERT = 1
 LCOOR = 8
 LCOORPREC = 3
 LOCC = 6
 LOCCPREC = 2
 LTEMPF = 6
 LTEMPFPREC = 2
 LFOOT = 3
 LSEGNAME = 4
 LELEMENT = 2
enum  Start {
  STYPE = 1, SSERIAL = 7, SNAME = 13, SALT = 17,
  SRESNAME = 18, SCHAIN = 22, SRESSEQ = 23, SINSERT = 27,
  SX = 31, SY = 39, SZ = 47, SOCC = 55,
  STEMPF = 61, SFOOT = 68, SSEGNAME = 73, SELEMENT = 77
}
enum  Length {
  LTYPE = 6, LSERIAL = 5, LNAME = 4, LALT = 1,
  LRESNAME = 4, LCHAIN = 1, LRESSEQ = 4, LINSERT = 1,
  LCOOR = 8, LCOORPREC = 3, LOCC = 6, LOCCPREC = 2,
  LTEMPF = 6, LTEMPFPREC = 2, LFOOT = 3, LSEGNAME = 4,
  LELEMENT = 2
}

Public Member Functions

 PDBAtom (void)
virtual ~PDBAtom (void)
void parse (const char *s)
void sprint (char *s, PDBFormatStyle usestyle=COLUMNS)
int serialnumber (void)
void serialnumber (int newserialnumber)
const char * name (void)
void name (const char *newname)
const char * alternatelocation (void)
void alternatelocation (const char *newalternatelocation)
const char * residuename (void)
void residuename (const char *newresiduename)
const char * chain (void)
void chain (const char *newchain)
int residueseq (void)
void residueseq (int newresidueseq)
const char * insertioncode (void)
void insertioncode (const char *newinsertioncode)
BigReal xcoor (void)
void xcoor (BigReal newxcoor)
BigReal ycoor (void)
void ycoor (BigReal newycoor)
BigReal zcoor (void)
void zcoor (BigReal newzcoor)
const BigRealcoordinates (void)
void coordinates (const BigReal *newcoordinates)
BigReal occupancy (void)
void occupancy (BigReal newoccupancy)
BigReal temperaturefactor (void)
void temperaturefactor (BigReal newtemperaturefactor)
int footnote (void)
void footnote (int newfootnote)
const char * segmentname (void)
void segmentname (const char *newsegmentname)
const char * element (void)
void element (const char *newelement)

Static Public Attributes

static const int default_serial = -1
static const int default_residueseq = -1
static const BigReal default_coor = 9999.000
static const BigReal default_occupancy = 1.00
static const BigReal default_temperaturefactor = 0.00
static const int no_footnote = 0

Protected Types

 USE_ATOM = ATOM
 USE_HETATM = HETATM
enum  PDBPossibleAtoms { USE_ATOM = ATOM, USE_HETATM = HETATM }

Protected Member Functions

 PDBAtom (const char *data, PDBPossibleAtoms whichatom)

Detailed Description

Definition at line 134 of file PDBData.h.


Member Enumeration Documentation

enum PDBAtom::Length

Enumerator:
LTYPE 
LSERIAL 
LNAME 
LALT 
LRESNAME 
LCHAIN 
LRESSEQ 
LINSERT 
LCOOR 
LCOORPREC 
LOCC 
LOCCPREC 
LTEMPF 
LTEMPFPREC 
LFOOT 
LSEGNAME 
LELEMENT 

Definition at line 147 of file PDBData.h.

00147                 {LTYPE=6, LSERIAL=5, LNAME=4, LALT=1, LRESNAME=4, LCHAIN=1, 
00148                  LRESSEQ=4, LINSERT=1, LCOOR=8,
00149                  LCOORPREC=3, LOCC=6, LOCCPREC=2, LTEMPF=6, 
00150                  LTEMPFPREC=2, LFOOT=3, LSEGNAME=4, LELEMENT=2};

enum PDBAtom::PDBPossibleAtoms [protected]

Enumerator:
USE_ATOM 
USE_HETATM 

Definition at line 181 of file PDBData.h.

enum PDBAtom::Start

Enumerator:
STYPE 
SSERIAL 
SNAME 
SALT 
SRESNAME 
SCHAIN 
SRESSEQ 
SINSERT 
SX 
SY 
SZ 
SOCC 
STEMPF 
SFOOT 
SSEGNAME 
SELEMENT 

Definition at line 138 of file PDBData.h.

00138                {STYPE=1,SSERIAL=7, SNAME=13, SALT=17, SRESNAME=18, SCHAIN=22, 
00139                 SRESSEQ=23, SINSERT=27, SX=31, SY=39, SZ=47,
00140                 SOCC=55, STEMPF=61, SFOOT=68, SSEGNAME=73, SELEMENT=77};


Constructor & Destructor Documentation

PDBAtom::PDBAtom ( const char *  data,
PDBPossibleAtoms  whichatom 
) [protected]

Definition at line 203 of file PDBData.C.

References parse().

00204         : PDBData( atomclass==USE_HETATM ? PDBData::HETATM : PDBData::ATOM)
00205 {
00206  parse(data);
00207 };

PDBAtom::PDBAtom ( void   ) 

Definition at line 210 of file PDBData.C.

References alternatelocation(), chain(), default_coor, default_occupancy, default_residueseq, default_serial, default_temperaturefactor, element(), footnote(), insertioncode(), name(), no_footnote, occupancy(), residuename(), residueseq(), segmentname(), serialnumber(), temperaturefactor(), xcoor(), ycoor(), and zcoor().

00210                       : PDBData( PDBData:: ATOM)
00211 {
00212   serialnumber(default_serial);
00213   name("");
00214   alternatelocation("");
00215   residuename("");
00216   chain("");
00217   residueseq(default_residueseq);
00218   insertioncode("");
00219   xcoor(default_coor);
00220   ycoor(default_coor);
00221   zcoor(default_coor);
00222   occupancy(default_occupancy);
00223   temperaturefactor(default_temperaturefactor);
00224   footnote(no_footnote);
00225   segmentname("");
00226   element("");
00227 }

PDBAtom::~PDBAtom ( void   )  [virtual]

Definition at line 230 of file PDBData.C.

00230                        {
00231 }


Member Function Documentation

void PDBAtom::alternatelocation ( const char *  newalternatelocation  ) 

Definition at line 394 of file PDBData.C.

References LALT.

00395 { strncpy(myalternatelocation, newalternatelocation, LALT);
00396   myalternatelocation[LALT]=0;}

const char * PDBAtom::alternatelocation ( void   ) 

Definition at line 392 of file PDBData.C.

Referenced by PDB::PDB(), and PDBAtom().

00393 { return myalternatelocation; }

void PDBAtom::chain ( const char *  newchain  ) 

Definition at line 407 of file PDBData.C.

References LCHAIN.

00408 { strncpy(mychain, newchain, LCHAIN); mychain[LCHAIN]=0;}

const char * PDBAtom::chain ( void   ) 

Definition at line 405 of file PDBData.C.

Referenced by PDBAtom().

00406 { return mychain; }

void PDBAtom::coordinates ( const BigReal newcoordinates  ) 

Definition at line 440 of file PDBData.C.

00441 { for (int i=0; i<3; i++) mycoor[i] = newcoordinates[i]; }

const BigReal * PDBAtom::coordinates ( void   ) 

Definition at line 438 of file PDBData.C.

Referenced by PDB::PDB().

00439 { return mycoor; }

void PDBAtom::element ( const char *  newelement  ) 

Definition at line 472 of file PDBData.C.

References LELEMENT.

00473 { strncpy(myelement, newelement, LELEMENT); myelement[LELEMENT]=0;}

const char * PDBAtom::element ( void   ) 

Definition at line 470 of file PDBData.C.

Referenced by PDBAtom().

00471 { return myelement; }

void PDBAtom::footnote ( int  newfootnote  ) 

Definition at line 458 of file PDBData.C.

00459 { myfootnote = newfootnote; }

int PDBAtom::footnote ( void   ) 

Definition at line 456 of file PDBData.C.

Referenced by PDBAtom().

00457 { return myfootnote; }

void PDBAtom::insertioncode ( const char *  newinsertioncode  ) 

Definition at line 419 of file PDBData.C.

References LINSERT.

00420 { strncpy(myinsertioncode, newinsertioncode, LINSERT); 
00421   myinsertioncode[LINSERT]=0;}

const char * PDBAtom::insertioncode ( void   ) 

Definition at line 417 of file PDBData.C.

Referenced by PDBAtom().

00418 { return myinsertioncode; }

void PDBAtom::name ( const char *  newname  ) 

Definition at line 388 of file PDBData.C.

References LNAME.

00389 { strncpy(myname, newname, LNAME); myname[LNAME]=0; }

const char * PDBAtom::name ( void   ) 

Definition at line 386 of file PDBData.C.

Referenced by PDB::PDB(), and PDBAtom().

00387 { return myname; }

void PDBAtom::occupancy ( BigReal  newoccupancy  ) 

Definition at line 446 of file PDBData.C.

00447 { myoccupancy = newoccupancy; }

BigReal PDBAtom::occupancy ( void   ) 

Definition at line 444 of file PDBData.C.

Referenced by PDB::PDB(), PDBAtom(), and Molecule::prepare_qm().

00445 { return myoccupancy ;}

void PDBAtom::parse ( const char *  s  ) 

Definition at line 193 of file PDBData.C.

References PDBData::field().

Referenced by PDBAtom().

00194 {
00195  char tempstr[100];
00196  field(data, 1, tempstr);  // get info about field #1 (the first one)
00197  if (tempstr[0] == '#')  {
00198    parse_field_data(data);
00199  } else {
00200    parse_column_data(data);
00201  } 
00202 }

void PDBAtom::residuename ( const char *  newresiduename  ) 

Definition at line 401 of file PDBData.C.

References LRESNAME.

00402 { strncpy(myresiduename, newresiduename, LRESNAME); myresiduename[LRESNAME]=0;}

const char * PDBAtom::residuename ( void   ) 

Definition at line 399 of file PDBData.C.

Referenced by PDB::PDB(), and PDBAtom().

00400 { return myresiduename; }

void PDBAtom::residueseq ( int  newresidueseq  ) 

Definition at line 413 of file PDBData.C.

00414 { myresidueseq = newresidueseq; }

int PDBAtom::residueseq ( void   ) 

Definition at line 411 of file PDBData.C.

Referenced by Molecule::build_go_arrays(), PDB::PDB(), and PDBAtom().

00412 { return myresidueseq; }

void PDBAtom::segmentname ( const char *  newsegmentname  ) 

Definition at line 466 of file PDBData.C.

References LSEGNAME.

00467 { strncpy(mysegmentname, newsegmentname, LSEGNAME); mysegmentname[LSEGNAME]=0;}

const char * PDBAtom::segmentname ( void   ) 

Definition at line 464 of file PDBData.C.

Referenced by PDBAtom().

00465 { return mysegmentname; }

void PDBAtom::serialnumber ( int  newserialnumber  ) 

Definition at line 382 of file PDBData.C.

00383 { myserialnumber = newserialnumber; }

int PDBAtom::serialnumber ( void   ) 

Definition at line 380 of file PDBData.C.

Referenced by PDB::PDB(), and PDBAtom().

00381 { return myserialnumber; }

void PDBAtom::sprint ( char *  s,
PDBFormatStyle  usestyle = COLUMNS 
)

Definition at line 615 of file PDBData.C.

References PDBData::COLUMNS.

Referenced by PDB::write().

00616 {
00617  if (usestyle == PDBData::COLUMNS)
00618    sprint_columns( outstr);
00619  else
00620    sprint_fields( outstr);
00621 }

void PDBAtom::temperaturefactor ( BigReal  newtemperaturefactor  ) 

Definition at line 452 of file PDBData.C.

00453 { mytemperaturefactor = newtemperaturefactor; }

BigReal PDBAtom::temperaturefactor ( void   ) 

Definition at line 450 of file PDBData.C.

Referenced by PDB::PDB(), PDBAtom(), and Molecule::prepare_qm().

00451 { return mytemperaturefactor; }

void PDBAtom::xcoor ( BigReal  newxcoor  ) 

Definition at line 427 of file PDBData.C.

00428 { mycoor[0] = newxcoor; }

BigReal PDBAtom::xcoor ( void   ) 

Definition at line 425 of file PDBData.C.

Referenced by Molecule::build_go_arrays(), PDB::find_extremes(), and PDBAtom().

00426 { return mycoor[0]; }

void PDBAtom::ycoor ( BigReal  newycoor  ) 

Definition at line 431 of file PDBData.C.

00432 { mycoor[1] = newycoor; }

BigReal PDBAtom::ycoor ( void   ) 

Definition at line 429 of file PDBData.C.

Referenced by Molecule::build_go_arrays(), PDB::find_extremes(), and PDBAtom().

00430 { return mycoor[1]; }

void PDBAtom::zcoor ( BigReal  newzcoor  ) 

Definition at line 435 of file PDBData.C.

00436 { mycoor[2] = newzcoor; }

BigReal PDBAtom::zcoor ( void   ) 

Definition at line 433 of file PDBData.C.

Referenced by Molecule::build_go_arrays(), PDB::find_extremes(), and PDBAtom().

00434 { return mycoor[2]; }


Member Data Documentation

const BigReal PDBAtom::default_coor = 9999.000 [static]

Definition at line 155 of file PDBData.h.

Referenced by PDBAtom().

const BigReal PDBAtom::default_occupancy = 1.00 [static]

Definition at line 156 of file PDBData.h.

Referenced by PDB::PDB(), and PDBAtom().

const int PDBAtom::default_residueseq = -1 [static]

Definition at line 154 of file PDBData.h.

Referenced by PDBAtom().

const int PDBAtom::default_serial = -1 [static]

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 153 of file PDBData.h.

Referenced by PDBAtom().

const BigReal PDBAtom::default_temperaturefactor = 0.00 [static]

Definition at line 157 of file PDBData.h.

Referenced by PDB::PDB(), and PDBAtom().

const int PDBAtom::no_footnote = 0 [static]

Definition at line 158 of file PDBData.h.

Referenced by PDBAtom().


The documentation for this class was generated from the following files:
Generated on Thu Nov 23 01:17:19 2017 for NAMD by  doxygen 1.4.7