QCReader Class Reference

#include <QCReader.hpp>

List of all members.


Detailed Description

Definition at line 43 of file QCReader.hpp.

Public Member Functions

void closeFile (void)
void openFile (const string &filename, const string &path=".")
 QCReader (void)
void readAtomsFile (const string &name, QCSystem &system, const string &path=".")
void readGeneralFile (const string &name, QCGeneralData &data, const string &path=".")
template<class Numeric>
void readLiteralAndVal (const string &literal, Numeric &ref)
void readMasterFile (const string &name, QCFiles &files, const string &path=".")
template<class TPParam>
void readParameterFile (const string &name, TPParam *&params, int &nbParams, const string &path=".")
template<class TPMDSystem>
void readPartitionFile (const string &name, QCGeneralData &data, TPMDSystem &mdSystem, const string &path=".")
template<class Numeric>
void readValAfterLiteral (const string &literal, Numeric &ref)
 ~QCReader (void)

Static Public Attributes

static const string ATOMS_FILE
static const string BUFFER1_RADIUS
static const string BUFFER2_RADIUS
static const string BUFFER_DIAMETER
static const string COMMENT
static const string COMMENT_BIS
static const string COMPUTATION_TYPE
static const string CUT_RADIUS
static const string DELTA_Q
static const string DENSITY_FILE
static const string DERIV_SHIFT_BHVR
static const string DERIVATION_TYPE
static const string DIAGO_ALGORITHM
static const string ENERGY_MAX_ITER
static const string ENERGY_THRESHOLD
static const string GENERAL_FILE
static const string INIT_DENSITY_MATRIX
static const string INTG_ACQUISITION_METHOD
static const string MAIN_ALGORITHM
static const string MODEL_TYPE
static const string NB_ATOM_TYPES
static const string NB_ATOMS
static const string NB_ATOMS_PART
static const string NB_PARTITIONS
static const string NB_SUBDOMAIN
static const string PARAMETER_FILE
static const string PARAMETER_TYPE
static const string PARTITION
static const string PARTITION_DESCRIPTION
static const string PARTITION_FILE
static const string PARTITION_TYPE
static const string PARTITION_TYPEP
static const string PARTITIONER_TYPE
static const string READ_PARTITION_FILE
static const string RESULT_FILE
static const string SHIFT_LEVEL_PARAM
static const string SPIN_MULTIPLICITY
static const string SYSTEM_CHARGE

Private Member Functions

void gotoNextLine (void)
void gotoNextValidLine (void)
bool lineIsValid (void)
void readAtomLine (std::string &type, QCFloat *coords, const int dim, int &nfrag, int &nbAA, std::string &fragStr, std::vector< int > &connect)
void readCoordLine (std::string &type, QCFloat *coords, const int dim, int &nfrag)
istringstream * readMultiLiteral (const string &literal)
template<class TPMDSystem>
void readNewPartitionFile (QCGeneralData &data, TPMDSystem &mdSystem)
template<class TPMDSystem>
void readOldPartitionFile (QCGeneralData &data, TPMDSystem &mdSystem)

Private Attributes

string filename
ifstream * input
string inputPath
string * line

Static Private Attributes

static const int MAX_LENGTH


Constructor & Destructor Documentation

QCReader::QCReader void   )  [inline]
 

Definition at line 52 of file QCReader.hpp.

QCReader::~QCReader void   )  [inline]
 

Definition at line 57 of file QCReader.hpp.

References closeFile().

Here is the call graph for this function:


Member Function Documentation

void QCReader::closeFile void   ) 
 

Definition at line 137 of file QCReader.cpp.

References filename, input, and line.

Referenced by readAtomsFile(), readGeneralFile(), readMasterFile(), readParameterFile(), readPartitionFile(), and ~QCReader().

void QCReader::gotoNextLine void   )  [private]
 

Definition at line 716 of file QCReader.cpp.

References input, line, MAX_LENGTH, and trim().

Referenced by gotoNextValidLine().

Here is the call graph for this function:

void QCReader::gotoNextValidLine void   )  [private]
 

Definition at line 732 of file QCReader.cpp.

References gotoNextLine(), input, line, and lineIsValid().

Referenced by readAtomLine(), readGeneralFile(), readLiteralAndVal(), readMasterFile(), readOldPartitionFile(), and readValAfterLiteral().

Here is the call graph for this function:

bool QCReader::lineIsValid void   )  [inline, private]
 

Definition at line 119 of file QCReader.hpp.

References COMMENT, COMMENT_BIS, and line.

Referenced by gotoNextValidLine().

void QCReader::openFile const string &  name,
const string &  path = "."
 

FIXME: error management

Definition at line 109 of file QCReader.cpp.

References filename, input, inputPath, and PATH_SEPARATOR().

Referenced by readAtomsFile(), readGeneralFile(), readMasterFile(), readParameterFile(), and readPartitionFile().

Here is the call graph for this function:

void QCReader::readAtomLine std::string &  type,
QCFloat coords,
const int  dim,
int &  nfrag,
int &  nbAA,
std::string &  fragStr,
std::vector< int > &  connect
[private]
 

Definition at line 782 of file QCReader.cpp.

References gotoNextValidLine(), and line.

Referenced by readAtomsFile().

Here is the call graph for this function:

void QCReader::readAtomsFile const string &  name,
QCSystem system,
const string &  path = "."
 

System charge

System charge

System charge

Init system size

Set coords

Set type

FIXME : no such type error table[type] == 0

Set frag number = nombre d'atoms Il y a un probleme ici .

Definition at line 217 of file QCReader.cpp.

References QCAtoms::allocateAtoms(), closeFile(), QCAtoms::DIMENSION, QCAtoms::fragName(), QCAtoms::getConnectivity(), QCAtoms::getNbAtoms(), input, NB_ATOMS, openFile(), QCMax, readAtomLine(), readValAfterLiteral(), QCAtoms::setFragment(), QCAtoms::setNbAA(), QCAtoms::setNbLinks(), QCAtoms::setPointAt(), QCSystem::setSpinMultiplicity(), QCSystem::setSystemCharge(), QCAtoms::setType(), SPIN_MULTIPLICITY, SYSTEM_CHARGE, and table.

Referenced by QCManager< TPModel, TPSystem >::readAtoms().

Here is the call graph for this function:

void QCReader::readCoordLine std::string &  type,
QCFloat coords,
const int  dim,
int &  nfrag
[private]
 

void QCReader::readGeneralFile const string &  name,
QCGeneralData data,
const string &  path = "."
 

FIXME : error unknown literal

value line

read values to be effective

Definition at line 182 of file QCReader.cpp.

References closeFile(), QCGeneralData::getMap(), gotoNextValidLine(), input, line, openFile(), QCGeneralData::reportStrValues(), and QCGeneralData::setIsDCComputation().

Referenced by main().

Here is the call graph for this function:

template<class T>
void QCReader::readLiteralAndVal const string &  literal,
Numeric &  ref
[inline]
 

Definition at line 261 of file QCReader.hpp.

References DOUBLE_DOT(), gotoNextValidLine(), and readMultiLiteral().

Referenced by QCPm3Param::readSetOfParameters(), QCParameter::readSetOfParameters(), QCMndoParam::readSetOfParameters(), and QCAm1Param::readSetOfParameters().

Here is the call graph for this function:

void QCReader::readMasterFile const string &  name,
QCFiles files,
const string &  path = "."
 

FIXME : error bad literal

value line

Definition at line 154 of file QCReader.cpp.

References closeFile(), QCFiles::getMap(), gotoNextValidLine(), input, line, and openFile().

Referenced by main().

Here is the call graph for this function:

istringstream * QCReader::readMultiLiteral const string &  literal  )  [inline, private]
 

Definition at line 278 of file QCReader.hpp.

References line.

Referenced by readLiteralAndVal().

template<class TPMDSystem>
void QCReader::readNewPartitionFile QCGeneralData data,
TPMDSystem &  mdSystem
[private]
 

Private methods:

Definition at line 336 of file QCReader.cpp.

References input, line, QCAtomIn::localNum, QCAtomIn::numDomain, QC_CORE, QC_SHELL1, QC_SHELL2, QC_TRACE_INIT, QCGeneralData::setNumberOfPartitions(), QCGeneralData::setPartitionType(), QCGeneralData::setRadius(), stringToUpper(), table, and QCAtomIn::typeZone.

Referenced by readPartitionFile().

Here is the call graph for this function:

template<class TPMDSystem>
void QCReader::readOldPartitionFile QCGeneralData data,
TPMDSystem &  mdSystem
[private]
 

Init domain number

Check atom number

Init domain sizes

init domain sructures

Definition at line 616 of file QCReader.cpp.

References BUFFER1_RADIUS, BUFFER2_RADIUS, gotoNextValidLine(), line, NB_ATOMS_PART, NB_SUBDOMAIN, PARTITION, PARTITION_DESCRIPTION, PARTITION_TYPEP, QC_TRACE_INIT, readValAfterLiteral(), QCGeneralData::setNumberOfPartitions(), QCGeneralData::setPartitionType(), QCGeneralData::setRadius(), and stringToUpper().

Referenced by readPartitionFile().

Here is the call graph for this function:

template<class TPParam>
void QCReader::readParameterFile const string &  name,
TPParam *&  params,
int &  nbParams,
const string &  path = "."
 

Definition at line 274 of file QCReader.cpp.

References closeFile(), NB_ATOM_TYPES, openFile(), and readValAfterLiteral().

Referenced by QCManager< TPModel, TPSystem >::readParameters().

Here is the call graph for this function:

template<class TPMDSystem>
void QCReader::readPartitionFile const string &  name,
QCGeneralData data,
TPMDSystem &  mdSystem,
const string &  path = "."
 

Definition at line 297 of file QCReader.cpp.

References closeFile(), input, line, openFile(), QC_TRACE_INIT, readNewPartitionFile(), and readOldPartitionFile().

Referenced by QCPartitioner< TPSystem >::readFromFile().

Here is the call graph for this function:

template<class T>
void QCReader::readValAfterLiteral const string &  literal,
Numeric &  ref
[inline]
 

Definition at line 246 of file QCReader.hpp.

References gotoNextValidLine(), and line.

Referenced by readAtomsFile(), readOldPartitionFile(), and readParameterFile().

Here is the call graph for this function:


Member Data Documentation

const string QCReader::ATOMS_FILE [static]
 

Definition at line 157 of file QCReader.hpp.

Referenced by QCFiles::QCFiles().

const string QCReader::BUFFER1_RADIUS [static]
 

Definition at line 186 of file QCReader.hpp.

Referenced by readOldPartitionFile().

const string QCReader::BUFFER2_RADIUS [static]
 

Definition at line 186 of file QCReader.hpp.

Referenced by readOldPartitionFile().

const string QCReader::BUFFER_DIAMETER [static]
 

Definition at line 181 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::COMMENT [static]
 

Definition at line 150 of file QCReader.hpp.

Referenced by lineIsValid().

const string QCReader::COMMENT_BIS [static]
 

Definition at line 195 of file QCReader.hpp.

Referenced by lineIsValid().

const string QCReader::COMPUTATION_TYPE [static]
 

Definition at line 167 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::CUT_RADIUS [static]
 

Definition at line 182 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::DELTA_Q [static]
 

Definition at line 177 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::DENSITY_FILE [static]
 

Definition at line 160 of file QCReader.hpp.

Referenced by QCFiles::QCFiles().

const string QCReader::DERIV_SHIFT_BHVR [static]
 

Definition at line 176 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::DERIVATION_TYPE [static]
 

Definition at line 175 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::DIAGO_ALGORITHM [static]
 

Definition at line 169 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::ENERGY_MAX_ITER [static]
 

Definition at line 174 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::ENERGY_THRESHOLD [static]
 

Definition at line 173 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

string QCReader::filename [private]
 

Definition at line 211 of file QCReader.hpp.

Referenced by closeFile(), and openFile().

const string QCReader::GENERAL_FILE [static]
 

Input literals for master file

Definition at line 155 of file QCReader.hpp.

Referenced by QCFiles::QCFiles().

const string QCReader::INIT_DENSITY_MATRIX [static]
 

Definition at line 172 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

ifstream* QCReader::input [private]
 

Definition at line 215 of file QCReader.hpp.

Referenced by closeFile(), gotoNextLine(), gotoNextValidLine(), openFile(), readAtomsFile(), readGeneralFile(), readMasterFile(), readNewPartitionFile(), and readPartitionFile().

string QCReader::inputPath [private]
 

Definition at line 207 of file QCReader.hpp.

Referenced by openFile().

const string QCReader::INTG_ACQUISITION_METHOD [static]
 

Definition at line 171 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

string* QCReader::line [private]
 

Definition at line 219 of file QCReader.hpp.

Referenced by closeFile(), gotoNextLine(), gotoNextValidLine(), lineIsValid(), readAtomLine(), readGeneralFile(), readMasterFile(), readMultiLiteral(), readNewPartitionFile(), readOldPartitionFile(), readPartitionFile(), and readValAfterLiteral().

const string QCReader::MAIN_ALGORITHM [static]
 

Definition at line 168 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const int QCReader::MAX_LENGTH [static, private]
 

Constants

Definition at line 203 of file QCReader.hpp.

Referenced by gotoNextLine().

const string QCReader::MODEL_TYPE [static]
 

Input literals for general file

Definition at line 165 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::NB_ATOM_TYPES [static]
 

Definition at line 147 of file QCReader.hpp.

Referenced by readParameterFile().

const string QCReader::NB_ATOMS [static]
 

Input literals for atoms file

Definition at line 146 of file QCReader.hpp.

Referenced by readAtomsFile().

const string QCReader::NB_ATOMS_PART [static]
 

Definition at line 192 of file QCReader.hpp.

Referenced by readOldPartitionFile().

const string QCReader::NB_PARTITIONS [static]
 

Definition at line 180 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::NB_SUBDOMAIN [static]
 

Input literals for partition file

Definition at line 191 of file QCReader.hpp.

Referenced by readOldPartitionFile().

const string QCReader::PARAMETER_FILE [static]
 

Definition at line 156 of file QCReader.hpp.

Referenced by QCFiles::QCFiles().

const string QCReader::PARAMETER_TYPE [static]
 

Definition at line 166 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::PARTITION [static]
 

Definition at line 194 of file QCReader.hpp.

Referenced by readOldPartitionFile().

const string QCReader::PARTITION_DESCRIPTION [static]
 

Definition at line 193 of file QCReader.hpp.

Referenced by readOldPartitionFile().

const string QCReader::PARTITION_FILE [static]
 

Definition at line 159 of file QCReader.hpp.

Referenced by QCFiles::QCFiles().

const string QCReader::PARTITION_TYPE [static]
 

Definition at line 184 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::PARTITION_TYPEP [static]
 

Definition at line 186 of file QCReader.hpp.

Referenced by readOldPartitionFile().

const string QCReader::PARTITIONER_TYPE [static]
 

Definition at line 185 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::READ_PARTITION_FILE [static]
 

Definition at line 183 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::RESULT_FILE [static]
 

Definition at line 158 of file QCReader.hpp.

Referenced by QCFiles::QCFiles().

const string QCReader::SHIFT_LEVEL_PARAM [static]
 

Definition at line 170 of file QCReader.hpp.

Referenced by QCGeneralData::QCGeneralData().

const string QCReader::SPIN_MULTIPLICITY [static]
 

Definition at line 149 of file QCReader.hpp.

Referenced by readAtomsFile().

const string QCReader::SYSTEM_CHARGE [static]
 

Definition at line 148 of file QCReader.hpp.

Referenced by readAtomsFile().


The documentation for this class was generated from the following files:
Generated on Sat Jan 28 21:07:34 2006 for QC++ by  doxygen 1.4.4