ccp4srs  Version 1.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ccp4srs::Base Class Reference

#include <ccp4srs_base.h>

Inheritance diagram for ccp4srs::Base:
Inheritance graph
[legend]

Public Member Functions

 Base ()
 Constructor. More...
 
 ~Base ()
 Destructor. More...
 
int loadIndex (mmdb::cpstr srsPath)
 
int loadStructure (mmdb::cpstr entryID)
 
PIndex getIndex (mmdb::cpstr entryID)
 
PIndex getIndex (int n)
 
int unloadStructure (mmdb::cpstr entryID)
 
mmdb::pstr getPath (mmdb::pstr &S, mmdb::cpstr FName)
 
mmdb::io::PFile getStructFile ()
 
mmdb::io::PFile getGraphFile ()
 
int n_entries ()
 
int getEntryNo (mmdb::cpstr entryID)
 
PMonomer getMonomer (mmdb::cpstr entryID)
 
PMonomer getMonomer (int entryNo, mmdb::io::PFile structFile)
 
PMonomer getMonomer (mmdb::cpstr entryID, mmdb::io::PFile structFile)
 
int getNofAtoms (mmdb::cpstr entryID)
 Returns the number of atoms in the references monomer. More...
 
int getNofAtoms (int entryNo)
 Returns the number of atoms in the references monomer. More...
 
int getNofAtoms (int entryNo, int &nNonHAtoms, int &nHAtoms)
 Returns number of non-hydrogen and hydrogen atoms for referenced structure. More...
 
int getAtNames (int entryNo, mmdb::PAtomName AtName, int &nAtoms, int &nH)
 Returns atom names, total number of atoms and number of hydrogens (nH) for referenced monomer. More...
 
int getAtNames (mmdb::io::PFile structFile, int entryNo, mmdb::PAtomName AtName, int &nAtoms, int &nH)
 Returns atom names, total number of atoms and number of hydrogens (nH) for referenced monomer. More...
 
int getAtoms (mmdb::cpstr entryID, int &nNonHAtoms, mmdb::PAtomName NonHAtName, int &nHAtoms, mmdb::PAtomName HAtName, mmdb::ivector Hconnect, mmdb::ivector Elem, mmdb::ivector Chiral)
 Retrieves various atom properties for referenced structure. More...
 
int getBonds (mmdb::cpstr entryID, mmdb::ivector nBonds, mmdb::imatrix bondPair, int &nAtoms, int maxNAtoms, int maxNBonds)
 Retrieves bonds for referenced structure. More...
 
int getHetInfo (mmdb::cpstr entryID, mmdb::pstr Formula, mmdb::pstr Hname, mmdb::pstr Hsynonym, mmdb::pstr Hcharge, mmdb::PAtomName &ClinkAtom, mmdb::PElement &ClinkEle, mmdb::PAtomName &SlinkAtom, mmdb::PElement &SlinkEle, int &nLeavingAtoms)
 
int getGraph (mmdb::io::PFile graphFile, mmdb::math::RPGraph G)
 
int getGraph (mmdb::io::PFile graphFile, int entryNo, mmdb::math::RPGraph G, int Hflag)
 
int getGraph (mmdb::io::PFile graphFile, mmdb::math::RPGraph G, int Hflag)
 
int getGraph (int entryNo, mmdb::math::RPGraph G, int Hflag)
 
int getGraph (mmdb::cpstr entryID, mmdb::math::RPGraph G, int Hflag)
 

Protected Member Functions

void init_base ()
 
void freeMemory ()
 

Protected Attributes

MemIO memIO
 
PPIndex index
 
mmdb::pstr srsDir
 
int srsVersion
 
int nEntries
 

Constructor & Destructor Documentation

ccp4srs::Base::Base ( )

Constructor.

ccp4srs::Base::~Base ( )

Destructor.

Member Function Documentation

void ccp4srs::Base::freeMemory ( )
protected
int ccp4srs::Base::getAtNames ( int  entryNo,
mmdb::PAtomName  AtName,
int &  nAtoms,
int &  nH 
)

Returns atom names, total number of atoms and number of hydrogens (nH) for referenced monomer.

Parameters
[in]entryNoentry number (0...n_entries()-1)
[out]AtNamearray of atom names, prealocated with sufficient length
[out]nAtomstotal number of atoms
[out]nHnumber of hydrogens
Returns
CCP4SRS_Ok, CCP4SRS_FileNotFound, CCP4SRS_EntryNotFound and CCP4SRS_ReadErrors.
int ccp4srs::Base::getAtNames ( mmdb::io::PFile  structFile,
int  entryNo,
mmdb::PAtomName  AtName,
int &  nAtoms,
int &  nH 
)

Returns atom names, total number of atoms and number of hydrogens (nH) for referenced monomer.

Parameters
[in]structFilepre-open SRS structure file
[in]entryNoentry number (0...n_entries()-1)
[out]AtNamearray of atom names, prealocated with sufficient length
[out]nAtomstotal number of atoms
[out]nHnumber of hydrogens
Returns
CCP4SRS_Ok, CCP4SRS_FileNotFound, CCP4SRS_EntryNotFound and CCP4SRS_ReadErrors.
int ccp4srs::Base::getAtoms ( mmdb::cpstr  entryID,
int &  nNonHAtoms,
mmdb::PAtomName  NonHAtName,
int &  nHAtoms,
mmdb::PAtomName  HAtName,
mmdb::ivector  Hconnect,
mmdb::ivector  Elem,
mmdb::ivector  Chiral 
)

Retrieves various atom properties for referenced structure.

Parameters
[in]entryIDmonomer's cif id
[out]nNonHAtomsnumber of non-hydrogen atoms
[out]nNonHAtomNamenon-hydrogen atom names
[out]nHAtomsnumber of hydrogen atoms
[out]nNonHAtomNamehydrogen atom names
[out]Hconnectconnectivity to non-hydrogen atoms: hydrogen HAtName[i] is connected to non-hydrogen NonHAtom[Hconnect[i]], if Hconnect[i]>=0.
[out]Elemelement IDs
[out]Chiralchirality IDs
Returns
CCP4SRS_Ok, CCP4SRS_FileNotFound, CCP4SRS_EntryNotFound, CCP4SRS_ReadErrors and CCP4SRS_BrokenBonds.
int ccp4srs::Base::getBonds ( mmdb::cpstr  entryID,
mmdb::ivector  nBonds,
mmdb::imatrix  bondPair,
int &  nAtoms,
int  maxNAtoms,
int  maxNBonds 
)

Retrieves bonds for referenced structure.

Parameters
[in]entryIDmonomer's cif id
[out]nBondsnumber of bonds for ith atom
[out]bondPairbonded atoms: bondPair[i][j] (0<=i<nAtoms, 0<=j<=nBonds[i]) gives the number of atom connected to ith atom; only pairs i<j are returned
[in]maxNAtomslength of nBonds[] and bondPairs[]
[in]maxNBondslength of bondPairs[][]
Returns
CCP4SRS_Ok, CCP4SRS_FileNotFound, CCP4SRS_EntryNotFound and CCP4SRS_ReadErrors.
int ccp4srs::Base::getEntryNo ( mmdb::cpstr  entryID)
int ccp4srs::Base::getGraph ( mmdb::io::PFile  graphFile,
mmdb::math::RPGraph  G 
)
int ccp4srs::Base::getGraph ( mmdb::io::PFile  graphFile,
int  entryNo,
mmdb::math::RPGraph  G,
int  Hflag 
)
int ccp4srs::Base::getGraph ( mmdb::io::PFile  graphFile,
mmdb::math::RPGraph  G,
int  Hflag 
)
int ccp4srs::Base::getGraph ( int  entryNo,
mmdb::math::RPGraph  G,
int  Hflag 
)
int ccp4srs::Base::getGraph ( mmdb::cpstr  entryID,
mmdb::math::RPGraph  G,
int  Hflag 
)
mmdb::io::PFile ccp4srs::Base::getGraphFile ( )
int ccp4srs::Base::getHetInfo ( mmdb::cpstr  entryID,
mmdb::pstr  Formula,
mmdb::pstr  Hname,
mmdb::pstr  Hsynonym,
mmdb::pstr  Hcharge,
mmdb::PAtomName &  ClinkAtom,
mmdb::PElement &  ClinkEle,
mmdb::PAtomName &  SlinkAtom,
mmdb::PElement &  SlinkEle,
int &  nLeavingAtoms 
)
PIndex ccp4srs::Base::getIndex ( mmdb::cpstr  entryID)
PIndex ccp4srs::Base::getIndex ( int  n)
PMonomer ccp4srs::Base::getMonomer ( mmdb::cpstr  entryID)
PMonomer ccp4srs::Base::getMonomer ( int  entryNo,
mmdb::io::PFile  structFile 
)
PMonomer ccp4srs::Base::getMonomer ( mmdb::cpstr  entryID,
mmdb::io::PFile  structFile 
)
int ccp4srs::Base::getNofAtoms ( mmdb::cpstr  entryID)

Returns the number of atoms in the references monomer.

Parameters
int ccp4srs::Base::getNofAtoms ( int  entryNo)

Returns the number of atoms in the references monomer.

Parameters
[in]entryNoentry number (0...n_entries()-1)
Returns
Non-negative return delivers the number of atoms, otherwise CCP4SRS_EntryNotFound indicates that the requested structure was not found in the database
int ccp4srs::Base::getNofAtoms ( int  entryNo,
int &  nNonHAtoms,
int &  nHAtoms 
)

Returns number of non-hydrogen and hydrogen atoms for referenced structure.

Parameters
[in]entryNoentry number (0...n_entries()-1)
[out]nNonHAtomsnumber of non-hydrogen atoms
[out]nHAtomsnumber of hydrogen atoms
Returns
CCP4SRS_Ok or CCP4SRS_EntryNotFound.
mmdb::pstr ccp4srs::Base::getPath ( mmdb::pstr &  S,
mmdb::cpstr  FName 
)
mmdb::io::PFile ccp4srs::Base::getStructFile ( )
void ccp4srs::Base::init_base ( )
protected
int ccp4srs::Base::loadIndex ( mmdb::cpstr  srsPath)
int ccp4srs::Base::loadStructure ( mmdb::cpstr  entryID)
int ccp4srs::Base::n_entries ( )
inline
int ccp4srs::Base::unloadStructure ( mmdb::cpstr  entryID)

Member Data Documentation

PPIndex ccp4srs::Base::index
protected
MemIO ccp4srs::Base::memIO
protected
int ccp4srs::Base::nEntries
protected
mmdb::pstr ccp4srs::Base::srsDir
protected
int ccp4srs::Base::srsVersion
protected

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