delphi_cb
 All Classes Namespaces Files Functions Variables Macros
CIO Class Reference

Inherited by CSite.

Public Member Functions

 CIO ()
 
 CIO (delphi_real fDielecIn, delphi_real fEPKTIn)
 
 ~CIO ()
 
void readForceFile (const string &strFile)
 
void readPdbFile (const string &strPdbFile, const int &iPdbFormat, const bool &bPdbUnformat)
 
void writeUnformatPdb (const string &strPdbFile)
 
void writeModifiedPdb (const string &strPdbFile, const int &iModPdbFormatOut)
 
void setDelphiAtom (const bool &bSolvePB, const bool &bSurfCrgInSite, const string &strSizeFile, const string &strCrgFile, const string &strPdbFile, const int &iPdbFormat, const bool &bPdbUnformat)
 
SGrid< delphi_real > readFrcFile (const string &strFrcFile, const SGrid< delphi_real > &fgOffCenter, const delphi_real &fScale)
 
void writeEpsMap (const delphi_integer &iAtomNumIn, const delphi_integer &iObjectNumIn, const delphi_integer &iGrid, const delphi_real &fScale, const SGrid< delphi_real > &fgBoxCenter, const vector< SGrid< delphi_integer > > &vctigEpsMap, const vector< bool > &vctbDielecMap, const string &strEpsFile)
 

Public Attributes

delphi_integer iMediaNum
 
delphi_integer iObjectNum
 
delphi_integer iAtomNum
 
delphi_integer iResidueNum
 
bool bOnlyMolecule
 
vector< CAtomPdbvctapAtomPdb
 
vector< delphi_real > vctfMediaEps
 
vector< string > vctstrObject
 
vector< delphi_integer > vctiAtomMediaNum
 

Protected Member Functions

string toUpperCase (const string &strLine)
 
string removeSpace (const string &strLine)
 
bool checkFileFormat (const string &strFile)
 
void readFileInNotPKFormat (ifstream &ifFileStream, const int &iFileType)
 
void readFileInPKFormat (ifstream &ifFileStream, const int &iFileType)
 
delphi_integer FindRecordIndex (const string &strAtom, const string &strResidue, const string &strResidueNum, const string &strChain, const delphi_integer &iRecordNum, vector< CForce > *prgaf)
 
delphi_integer FindRecord (const string &strAtom, const string &strResidue, const string &strResidueNum, const string &strChain, const int &iFileType, delphi_real &fValue)
 
void readStdPdbFile (ifstream &ifPdbFileStream)
 
void readModFile1 (ifstream &ifPdbFileStream)
 
void readModFile4 (ifstream &ifPdbFileStream)
 
void readPqrFile (ifstream &ifPdbFileStream)
 
void readMod4File (ifstream &ifPdbFileStream)
 
void readPqr4File (ifstream &ifPdbFileStream)
 
void readUnformattedPdb (const string &strPdbFile, ifstream &ifPdbFileStream, bool &bPostProcess)
 

Protected Attributes

const delphi_real fDielec
 
const delphi_real fEPKT
 
delphi_integer iObjectMediaNum
 
bool bExistRadiiInfo
 
vector< delphi_integer > prgiObjectMediaNum
 

Static Protected Attributes

static delphi_integer iRadiusNum = 0
 
static vector< CForceprgas
 
static delphi_integer iCrgNum = 0
 
static vector< CForceprgac
 

Constructor & Destructor Documentation

CIO::CIO ( )
inline

constructor I using default Dielectric constant and epkt values

CIO::CIO ( delphi_real  fDielecIn,
delphi_real  fEPKTIn 
)
inline

constructor II using user-specified Dielectric constant and epkt values

CIO::~CIO ( )
inline

destructor

Member Function Documentation

bool CIO::checkFileFormat ( const string &  strFile)
protected

function to check if the input file is formatted or not

Parameters
strFilename of the input file
Returns
true if the file formatted, false otherwise.
delphi_integer CIO::FindRecord ( const string &  strAtom,
const string &  strResidue,
const string &  strResidueNum,
const string &  strChain,
const int &  iFileType,
delphi_real &  fValue 
)
protected

function to find a particular record matching the specified atom

Parameters
strAtomatom name
strResidueresidue name
strResidueNumresidue number
strChainchain name
iFileTypefile type
fValuevalue (charge or radius) associated with this atom
Returns
-1 if unfounded, index otherwise
delphi_integer CIO::FindRecordIndex ( const string &  strAtom,
const string &  strResidue,
const string &  strResidueNum,
const string &  strChain,
const delphi_integer &  iRecordNum,
vector< CForce > *  prgaf 
)
protected

function to get index of a specified atom in the record

Parameters
strAtomatom name
strResidueresidue name
strResidueNumresidue number
strChainchain name
iRecordNumtotal number of records
prgafpointer to the vector of records
Returns
-1 if no record is found, index otherwise.
void CIO::readFileInNotPKFormat ( ifstream &  ifFileStream,
const int &  iFileType 
)
protected

read a .siz or .crg file in non-PK format

Parameters
ifFileStreaminput file stream
iFileTypeinput file type
void CIO::readFileInPKFormat ( ifstream &  ifFileStream,
const int &  iFileType 
)
protected

read a .siz or .crg file in PK format

Parameters
ifFileStreaminput file stream
iFileTypeinput file type
void CIO::readForceFile ( const string &  strFile)

function for reading atom force (radii/size and charge) file

Parameters
strFilefile name
SGrid< delphi_real > CIO::readFrcFile ( const string &  strFrcFile,
const SGrid< delphi_real > &  fgOffCenter,
const delphi_real &  fScale 
)

function for reading FRC file

Parameters
strFrcFilename of frc file
fgOffCenteroffset from box center
fScalescale used for calculations
Returns
position of box center
void CIO::readMod4File ( ifstream &  ifPdbFileStream)
protected

function to read mod4 pdb file

Parameters
ifPdbFileStreaminput .pdb file stream
void CIO::readModFile1 ( ifstream &  ifPdbFileStream)
protected

function to read modified .pdb file (type = 1)

Parameters
ifPdbFileStreaminput .pdb file stream
void CIO::readModFile4 ( ifstream &  ifPdbFileStream)
protected

function to read modified .pdb file (type = 4)

Parameters
ifPdbFileStreaminput .pdb file stream
void CIO::readPdbFile ( const string &  strPdbFile,
const int &  iPdbFormat,
const bool &  bPdbUnformat 
)

function for reading PDB file in various formats

Parameters
strPdbFilepdb file name
iPdbFormatpdb file format
bPdbUnformattrue if unformatted pdb file
void CIO::readPqr4File ( ifstream &  ifPdbFileStream)
protected

function to read pqr4 file

Parameters
ifPdbFileStreaminput .pdb file stream
void CIO::readPqrFile ( ifstream &  ifPdbFileStream)
protected

function to read .pqr file

Parameters
ifPdbFileStreaminput .pqr file stream
void CIO::readStdPdbFile ( ifstream &  ifPdbFileStream)
protected

function to read standard .pdb file

Parameters
ifPdbFileStreaminput .pdb file stream
void CIO::readUnformattedPdb ( const string &  strPdbFile,
ifstream &  ifPdbFileStream,
bool &  bPostProcess 
)
protected

function to read unformatted pdb file

Parameters
strPdbFileinput .pdb file name
ifPdbFileStreaminput .pdb file stream
bPostProcessflag for post processing
string CIO::removeSpace ( const string &  strLine)
protected

function to remove spaces from a string

Parameters
strLineinput string
Returns
converted string without spaces
void CIO::setDelphiAtom ( const bool &  bSolvePB,
const bool &  bSurfCrgInSite,
const string &  strSizeFile,
const string &  strCrgFile,
const string &  strPdbFile,
const int &  iPdbFormat,
const bool &  bPdbUnformat 
)

function to set DelPhi-style atom list vctapAtomPdb(iAtomNum), i.e, (delphipdb(natom))

Parameters
bSolvePBtrue if solving PB equation
bSurfCrgInSitetrue if writing surface chagre info into site file
strSizeFilename of .siz file
strCrgFilename of .crg file
strPdbFilename of .pdb file
iPdbFormat.pdb file format
bPdbUnformattrue if unformatted pdb file
string CIO::toUpperCase ( const string &  strLine)
protected

function to convert a string to upper case

Parameters
strLineinput string
Returns
converted string in upper case
void CIO::writeEpsMap ( const delphi_integer &  iAtomNumIn,
const delphi_integer &  iObjectNumIn,
const delphi_integer &  iGrid,
const delphi_real &  fScale,
const SGrid< delphi_real > &  fgBoxCenter,
const vector< SGrid< delphi_integer > > &  vctigEpsMap,
const vector< bool > &  vctbDielecMap,
const string &  strEpsFile 
)

function for writing EPS file

Parameters
iAtomNumInnumber of atoms
iObjectNumInnumber of objects
iGridnumber of grid points on each direction
fScalescale used for calculations
fgBoxCenterposition of box center
vctigEpsMapvector of epsilon map
vctbDielecMapvector of dielectric constants map
strEpsFileoutput eps file name
void CIO::writeModifiedPdb ( const string &  strPdbFile,
const int &  iModPdbFormatOut 
)

function for writing modified pdb file

Parameters
strPdbFilepdb file name
iModPdbFormatOutfile format
void CIO::writeUnformatPdb ( const string &  strPdbFile)

function for writing unformatted pdb file

Parameters
strPdbFilepdb file name

Member Data Documentation

bool CIO::bExistRadiiInfo
protected

F95 var.: iatrad whether there is radius info

bool CIO::bOnlyMolecule

F95 var.: ionlymol true if there are only molecules in the system (no objects)

const delphi_real CIO::fDielec
protected

F95 var.: repsin

const delphi_real CIO::fEPKT
protected

F95 var.: epkt

delphi_integer CIO::iAtomNum

F95 var.: natom

of atoms

delphi_integer CIO::iCrgNum = 0
staticprotected

F95 var.: nchrec

of entries in charge file

delphi_integer CIO::iMediaNum

F95 var.: nmedia

of media

delphi_integer CIO::iObjectMediaNum
protected

F95 var.: imedianumb number of objects read from .pdb file

delphi_integer CIO::iObjectNum

F95 var.: nobject

of objects

delphi_integer CIO::iRadiusNum = 0
staticprotected

F95 var.: nrmax

of entries in radius file

delphi_integer CIO::iResidueNum

F95 var.: resnummax maximum residue number

vector< CForce > CIO::prgac
staticprotected

F95 var.: charge(:) a vector containing all charges read from .crg file

vector< CForce > CIO::prgas
staticprotected

F95 var.: radii(:) a vector containing all radius read from .siz file

vector<delphi_integer> CIO::prgiObjectMediaNum
protected

F95 var.: tmpiatmmed(nobjectmax) vector containing internal media-number per object

vector<CAtomPdb> CIO::vctapAtomPdb

F95 var.: delphipdb(Natom) array of structure to store info read from pdb file

vector<delphi_real> CIO::vctfMediaEps

F95 var.: medeps(0:nmediamax) vector containing correspondence media<->epsilon/epkt

vector<delphi_integer> CIO::vctiAtomMediaNum

F95 var.: iatmmed(Natom+Nobjectmax) vector containing internal media-number per atom and object

vector<string> CIO::vctstrObject

F95 var.: dataobject(nobjectmax,2) vector containing string with object data, and pre-elab data changed it to vctstrObject(2*nobjectmax)


The documentation for this class was generated from the following files: