QCMDSystem< TPSolver > Class Template Reference

#include <QCMDSystem.hpp>

Inheritance diagram for QCMDSystem< TPSolver >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class TPSolver>
class QCMDSystem< TPSolver >

This class contains a set molecular System obtained by the partitionning of the whole molecule.

class : QCMDSystem

Definition at line 85 of file QCMDSystem.hpp.

Public Types

typedef TPSolver TSolver

Public Member Functions

void addAtom (const QCPoint3D &coords, int type, int globalIdx, int domainIdx, QCSubDomainZone zone, int atomIdx)
void addLevels (QCFloat &sumNbElecs, const int *nbOM, QCTopEnergyLevel *topEnergyLevels)
template<class TPMDSystem>
void adjustFermiEnergy (TPMDSystem &mdsystem, QCMemory &memory)
template<class TPMDSystem>
void adjustFermiEnergyNew (TPMDSystem &mdsystem, QCMemory &memory)
template<class TPMDSystem>
void adjustFermiEnergySeq (TPMDSystem &mdsystem, QCMemory &memory)
template<class TPSystem>
void allocatePartitioner (QCPartitioner< TPSystem > *&partitioner, const QCGeneralData &data)
void allocDomains (const int nb, const int offset=0)
void allocStructures (int sbdId, int nbatoms, int nbAO, int nbovlp, int *sbdIds, int *nbshared)
 Allocate the structures of subdomain and neigboors.
template<class TPParam>
QCFloat applyOptimalDamping (const TPParam *QCRestrict params)
template<class TPParam>
QCFloat applyOptimalDamping (const TPParam *__restrict__ params)
QCIterator begin (void)
template<class TPManager>
void buildMatrices (TPManager &manager)
template<class TPSystem>
void buildPartitioner (QCPartitioner< TPSystem > *&partitioner, const QCGeneralData &data, const QCFiles &files, const int *charge, const int nb)
bool checkData (const QCGeneralData &data)
template<class TPManager>
void completeDensityMatrices (TPManager &manager)
template<class TPManager>
QCFloat completeFockMatricesAndElecEnergy (TPManager &manager, bool isFirstCall, int iter)
 compute the Fock matrice and the electronic energy of the whole system.
template<class TPManager>
void completeHamiltonMatrices (TPManager &manager)
void computeElecEnergy ()
template<class TPManager>
void computeEnergyDerivatives (TPManager &)
QCFloat computeSumOfEigenValOccupied ()
QCIterator end (void)
void fillMaps (const std::vector< QCAtomIn > &v)
void fillMaps (int nbsbd, const int *domainIdxs, const QCSubDomainZone *zones, const int *atomIdxs)
void getGlobalMinMax (QCFloat &, QCFloat &)
QCIterator getIterator (int idx)
int getNbDomains (void) const
int getNproc (void) const
int getRank (void) const
const QCSystemgetRootSystem (void) const
QCSystemgetRootSystem (void)
QCSubDomaingetSubDomain (const int i) const
void getTotalSumNbElecs (QCFloat *, int)
QCFloat getTotalSumTrace (void)
template<class TPManager>
void init (TPManager &manager, const string &path)
template<class TPManager>
void prepareFockMatrices (TPManager &manager, bool isFirstCall)
template<class TPManager>
void prepareIterations (TPManager &manager)
 QCMDSystem (int &, char **&)
 QCMDSystem (void)
void readDensityFromFileAscii (const QCFiles &files, const string &path)
void readDistDensityFromFileAscii (std::ifstream &data, const int nproc)
void readSharedDensityFromFileAscii (std::ifstream &data, const std::string &fileName)
void removeLevels (QCFloat &sumNbElecs, QCTopEnergyLevel *topEnergyLevels)
template<class TPParam>
void setDomainsNumbers (const TPParam *__restrict__ params)
void sortSDOverlapments (void)
bool testConvergence (QCFloat &error, QCFloat threshold)
 Test the convergence of the SCF algorithm Test the convergence of the SCF algorithm. Compute the error between two iterations by

\[ error = \max(\|ElectEnergy^{n+1}-ElectEnergy^{n}\|, \|DensityP_{i,j} - DensityP^{n-1}_{i,j}|) \]

and return true if the errror is less than the threshold parameter.

template<class TPManager>
void writeDensityOnFileAscii (TPManager &manager, const std::string &path)
template<class TPManager>
void writeDensityOnFileAscii (TPManager &manager, const string &path)
 save the global shared density matrix in a File Save the global shared density matrix in a File. The format is : BASIC-SHARED numberOfSubdomains foreach subdomain BASIC numberOfCurrentSubdomain MAtrixDimension NumberOfNonZeroElements foreach NonZeroElements iloc jloc iglob jglob flag Density[iloc][jloc]
template<class TPManager>
void writeLocalDensityOnFilesAscii (TPManager &manager, const std::string &path)
template<class TPManager>
void writeLocalDensityOnFilesAscii (TPManager &manager, const string &path)
template<class TPManager>
void writeOrbitalPartition (TPManager &manager, const std::string &path)
template<class TPManager>
void writeOrbitalPartition (TPManager &manager, const string &path)
void writeSystemOnFile (const QCFiles &files, const string &path)
 ~QCMDSystem (void)

Protected Types

enum  QCWay { ASC, DESC }

Protected Member Functions

template<class TPMDSystem>
void adjustFermiEnergyDichotomy (TPMDSystem &system, int *nbOM, QCTopEnergyLevel *topLevel, QCFloat sumNE, QCFloat bmin, QCFloat bmax, QCWay way)
template<class TPMDSystem>
void adjustFermiEnergyMonotone (TPMDSystem &system, int *nbOM, QCTopEnergyLevel *topLevel)
QCFloat calculateLambdaOptDamp (const QCFloat &globalTraceFP1_PP1OfSD, const QCFloat &globalTraceF_PP1OfSD, const QCFloat &globalTraceFP1_POfSD, const QCFloat &globalTraceF_POfSD)
template<class TPMDSystem>
void computeDichotomyBounds (TPMDSystem &system, int *nbOM, QCFloat &bmin, QCFloat &bmax)

Protected Attributes

QCPartitionType _partitionType
QCSubDomaindomains
bool fermiFCall
int nbDomains
int offset
int totalNbDomains

Friends

class QCIterator
class QCReader

Classes

class  QCIterator


Member Typedef Documentation

template<class TPSolver>
typedef TPSolver QCMDSystem< TPSolver >::TSolver
 

Definition at line 103 of file QCMDSystem.hpp.


Member Enumeration Documentation

template<class TPSolver>
enum QCMDSystem::QCWay [protected]
 

Enumerator:
ASC 
DESC 

Definition at line 412 of file QCMDSystem.hpp.


Constructor & Destructor Documentation

template<class TPSolver>
QCMDSystem< TPSolver >::QCMDSystem void   ) 
 

Definition at line 51 of file QCMDSystem.cpp.

Referenced by QCMDSystem< TPSolver >::QCMDSystem().

template<class TPSolver>
QCMDSystem< TPSolver >::QCMDSystem int &  ,
char **& 
[inline]
 

Definition at line 113 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::QCMDSystem().

Here is the call graph for this function:

template<class TPSolver>
QCMDSystem< TPSolver >::~QCMDSystem void   ) 
 

Definition at line 60 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, and QC_TRACE_END.


Member Function Documentation

template<class TPSolver>
void QCMDSystem< TPSolver >::addAtom const QCPoint3D coords,
int  type,
int  globalIdx,
int  domainIdx,
QCSubDomainZone  zone,
int  atomIdx
 

Definition at line 89 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCOrdering::getParamIndexAt(), QCMDSystem< TPSolver >::getRootSystem(), QCSubDomain::setGlobalIdx(), QCOrdering::setParamIndexAt(), QCAtoms::setPointAt(), QCAtoms::setType(), and QCSubDomain::setZone().

Here is the call graph for this function:

template<class TPSolver>
void QCMDSystem< TPSolver >::addLevels QCFloat sumNbElecs,
const int *  nbOM,
QCTopEnergyLevel topEnergyLevels
 

Definition at line 1169 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCTopEnergyLevel::energyLevel, QCEnergies::fermiEnergy, QCSubDomain::getBFactor(), QCModelMatrices::getEigenVal(), QCMDSystem< TPSolver >::nbDomains, QCSystem::nbElectrons, QCTopEnergyLevel::numOM, QCTopEnergyLevel::numSD, QC_TRACE_ENER, QC_TWO, QC_ZERO, QCSubDomain::setNbFilledOccupiedOM(), and QCSubDomain::setOrbitalOccupN().

Here is the call graph for this function:

template<class TPSolver>
template<class TPMDSystem>
void QCMDSystem< TPSolver >::adjustFermiEnergy TPMDSystem &  mdsystem,
QCMemory memory
 

Definition at line 776 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCEnergies::fermiEnergy, QCSubDomain::getBFactor(), QCModelMatrices::getEigenVal(), QCSystem::getNbAtomicOrbitals(), QCSubDomain::getNbFilledOM(), QCSubDomain::getNbOccupiedOM(), QCSubDomain::getOrbitalOccupN(), QCMDSystem< TPSolver >::nbDomains, QCSystem::nbElectrons, QC_TRACE_ENER, QC_TWO, QC_ZERO, and QCTopEnergyLevel::setAttributes().

Referenced by QCMDSystem< TPSolver >::adjustFermiEnergyNew(), and QCMDSystem< TPSolver >::adjustFermiEnergySeq().

Here is the call graph for this function:

template<class TPSolver>
template<class TPMDSystem>
void QCMDSystem< TPSolver >::adjustFermiEnergyDichotomy TPMDSystem &  system,
int *  nbOM,
QCTopEnergyLevel topLevel,
QCFloat  sumNE,
QCFloat  bmin,
QCFloat  bmax,
QCWay  way
[protected]
 

Definition at line 580 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::ASC, QCEnergies::deltaFermiEnergy, QCMDSystem< TPSolver >::DESC, QCMDSystem< TPSolver >::domains, QCEnergies::fermiEnergy, FQCAbs(), QCSubDomain::getBFactor(), QCModelMatrices::getEigenVal(), QCSubDomain::getId(), QCSystem::getNbAtomicOrbitals(), QCSubDomain::getNbFilledOM(), QCSubDomain::getNbOccupiedOM(), QCSubDomain::getOrbitalOccupN(), QCMDSystem< TPSolver >::nbDomains, QCSystem::nbElectrons, QCTopEnergyLevel::numOM, QC_HALF, QC_TRACE_ENER, QC_TWO, QC_ZERO, and QCSubDomain::setNbFilledOccupiedOM().

Referenced by QCMDSystem< TPSolver >::adjustFermiEnergyNew().

Here is the call graph for this function:

template<class TPSolver>
template<class TPMDSystem>
void QCMDSystem< TPSolver >::adjustFermiEnergyMonotone TPMDSystem &  system,
int *  nbOM,
QCTopEnergyLevel topLevel
[protected]
 

Definition at line 764 of file QCMDSystem.cpp.

References QC_TRACE_ENER.

template<class TPSolver>
template<class TPMDSystem>
void QCMDSystem< TPSolver >::adjustFermiEnergyNew TPMDSystem &  mdsystem,
QCMemory memory
 

Definition at line 488 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::adjustFermiEnergy(), QCMDSystem< TPSolver >::adjustFermiEnergyDichotomy(), QCMDSystem< TPSolver >::ASC, QCMDSystem< TPSolver >::computeDichotomyBounds(), QCMDSystem< TPSolver >::domains, QCMDSystem< TPSolver >::fermiFCall, QCSystem::getNbAtomicOrbitals(), QCSubDomain::getNbOccupiedOM(), QCSubDomain::getOrbitalOccupN(), QCMDSystem< TPSolver >::nbDomains, QC_TRACE_ENER, QC_ZERO, and QCRestrict.

Here is the call graph for this function:

template<class TPSolver>
template<class TPMDSystem>
void QCMDSystem< TPSolver >::adjustFermiEnergySeq TPMDSystem &  mdsystem,
QCMemory memory
[inline]
 

Just for compatibility with the distributed version. here we call adjustFermiEnergy method.

Definition at line 335 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::adjustFermiEnergy().

Here is the call graph for this function:

template<class TPSolver>
template<class TPSystem>
void QCMDSystem< TPSolver >::allocatePartitioner QCPartitioner< TPSystem > *&  partitioner,
const QCGeneralData data
 

Select partitioner

Definition at line 152 of file QCMDSystem.cpp.

References QCGeneralData::getPartitionerType(), QC_KIMIKA, QC_LINEAR, and QC_TRACE_PART.

Referenced by QCMDSystem< TPSolver >::buildPartitioner(), and QCMDSystem< TPSolver >::init().

Here is the call graph for this function:

template<class TPSolver>
void QCMDSystem< TPSolver >::allocDomains const int  nb,
const int  offset = 0
[inline]
 

Definition at line 600 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::domains, QCMDSystem< TPSolver >::getRootSystem(), QCMDSystem< TPSolver >::nbDomains, QC_TRACE, QCSubDomain::setId(), QCSubDomain::setRootSystem(), and QCMDSystem< TPSolver >::totalNbDomains.

Here is the call graph for this function:

template<class TPSolver>
void QCMDSystem< TPSolver >::allocStructures int  sbdId,
int  nbatoms,
int  nbAO,
int  nbovlp,
int *  sbdIds,
int *  nbshared
[inline]
 

Allocate the structures of subdomain and neigboors.

Allocate the structures of subdomain and neigboors.

Parameters:
nbatoms the number of atoms in the subdomain.
nbao the number of overlap in the subdomain.
nbovrlp the number of subdomains which intercep this subdomain.
sbdIds an array of the Ids of subdomains which intercep this subdomain.
nbshared an array of the number of atoms shared (nbshared[i]) by the current subdomain and sbdIds[i] subdomains

Definition at line 620 of file QCMDSystem.hpp.

References QCSubDomain::allocStructures(), QCMDSystem< TPSolver >::domains, QC_TRACE_INIT, and QCSubDomain::setGlobalIndex().

Here is the call graph for this function:

template<class TPSolver>
template<class TPParam>
QCFloat QCMDSystem< TPSolver >::applyOptimalDamping const TPParam *QCRestrict  params  ) 
 

Definition at line 946 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::calculateLambdaOptDamp(), QCMDSystem< TPSolver >::domains, QCSubDomain::modifyMatricesAndEnergy(), QCMDSystem< TPSolver >::nbDomains, QC_TRACE_SCF, QC_ZERO, and QCSubDomain::traceProductCoreShell1().

Here is the call graph for this function:

template<class TPSolver>
template<class TPParam>
QCFloat QCMDSystem< TPSolver >::applyOptimalDamping const TPParam *__restrict__  params  ) 
 

template<class TPSolver>
QCIterator QCMDSystem< TPSolver >::begin void   )  [inline]
 

Definition at line 143 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::QCIterator.

Referenced by QCMDSystem< TPSolver >::buildMatrices(), QCMDSystem< TPSolver >::init(), QCMDSystem< TPSolver >::prepareFockMatrices(), and QCMDSystem< TPSolver >::prepareIterations().

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::buildMatrices TPManager &  manager  )  [inline]
 

Build the following matrices in each subdomain

  • Overlapp matrice
  • Hamiltonian matrice
  • Fock Matrice

Definition at line 634 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::begin(), QCMDSystem< TPSolver >::end(), QC_DENSITY_FROM_FILE, and QCMDSystem< TPSolver >::readDensityFromFileAscii().

Here is the call graph for this function:

template<class TPSolver>
template<class TPSystem>
void QCMDSystem< TPSolver >::buildPartitioner QCPartitioner< TPSystem > *&  partitioner,
const QCGeneralData data,
const QCFiles files,
const int *  charge,
const int  nb
 

Definition at line 180 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::allocatePartitioner(), QCPartitioner< TPSystem >::init(), QC_TRACE_PART, and QCPartitioner< TPSystem >::setLoad().

Here is the call graph for this function:

template<class TPSolver>
QCFloat QCMDSystem< TPSolver >::calculateLambdaOptDamp const QCFloat globalTraceFP1_PP1OfSD,
const QCFloat globalTraceF_PP1OfSD,
const QCFloat globalTraceFP1_POfSD,
const QCFloat globalTraceF_POfSD
[protected]
 

Calculation of trace(F*P), trace(F*P~), trace(F~*P) , trace(F~*P~) and lambda optimal.
These traces are used by the Optimal Damping algorithm.

Definition at line 992 of file QCMDSystem.cpp.

References QC_HALF, QC_ONE, QC_TRACE_SCF, QC_TWO, and QC_ZERO.

Referenced by QCMDSystem< TPSolver >::applyOptimalDamping().

template<class TPSolver>
bool QCMDSystem< TPSolver >::checkData const QCGeneralData data  ) 
 

Check data for the divide and conquer algorithm. Today only the main algorithm is checked

Definition at line 69 of file QCMDSystem.cpp.

References QCGeneralData::getMainAlgorithmStr(), QCGeneralData::isDCComputation(), QCGeneralData::isReadPartitionFromFile(), and QC_TRACE_INIT.

Here is the call graph for this function:

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::completeDensityMatrices TPManager &  manager  ) 
 

On recupere avec des restricts pour le calcul les structures qui contiennent les donnees a manipuler

Definition at line 875 of file QCMDSystem.cpp.

References QCSymMatrix::copy(), QCMDSystem< TPSolver >::domains, QCModelMatrices::getDensityP(), QCSubDomain::getId(), QCMatElemGtr< TPMatrix >::getMatrix(), QCSubDomain::getRemDomainId(), QCModelMatrices::getWeightedDensityP(), QCDensityGtr< TPMatrix >::mergeDensity(), QCMDSystem< TPSolver >::nbDomains, QCSymMatrix::printInFile(), QC_TRACE_DENSITY, and QCRestrict.

Here is the call graph for this function:

template<class TPSolver>
template<class TPManager>
QCFloat QCMDSystem< TPSolver >::completeFockMatricesAndElecEnergy TPManager &  manager,
bool  isFirstCall,
int  iter
 

compute the Fock matrice and the electronic energy of the whole system.

Compute the electronic terms in the Fock matrice due to the atoms in other partitions and the electronic energy. After this step the Fock matrice of the whole system is obtained. Here we, complete the Fock matrice by atoms in sub systems shared by the curent processor. For the sequential version of the code the communications are simulated and we use a ring. All systems interact with a system, there is no approximation (with the distance like in Dixon and Mertz).
WARNING : this method must be called after prepareFockMatrices.

Definition at line 333 of file QCMDSystem.cpp.

References QCFockGtr< TPMatrix >::completeElems(), QCMDSystem< TPSolver >::domains, QCEnergies::elecEnergy, QCSubDomain::fillDensityArray(), QCModelMatrices::getFockF(), QCSubDomain::getId(), QCGeneralData::getIntgAcquisitionMethod(), QCRepInterElec::getIntgReader(), QCMatElemGtr< TPMatrix >::getMatrix(), QCModelMatrices::getRepInterElecIntegrals(), QCSubDomain::initWeightedDensity(), QCMDSystem< TPSolver >::nbDomains, QCSymMatrix::printInFile(), QC_INDIRECT_STORAGE, QC_TRACE, QC_ZERO, QCRestrict, qctrace, QCIntgReader::rewindFile(), QCTrace::writeFockMatrix(), and QCTrace::writeVal().

Here is the call graph for this function:

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::completeHamiltonMatrices TPManager &  manager  ) 
 

Definition at line 252 of file QCMDSystem.cpp.

References QCHamiltonGtr< TPMatrix >::completeElems(), QCMDSystem< TPSolver >::domains, QCModelMatrices::getHamiltonH(), QCSubDomain::getId(), QCMatElemGtr< TPMatrix >::getMatrix(), QCMDSystem< TPSolver >::nbDomains, QCSymMatrix::printInFile(), and QCRestrict.

Here is the call graph for this function:

template<class TPSolver>
template<class TPMDSystem>
void QCMDSystem< TPSolver >::computeDichotomyBounds TPMDSystem &  system,
int *  nbOM,
QCFloat bmin,
QCFloat bmax
[protected]
 

Definition at line 546 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCModelMatrices::getEigenVal(), QCSystem::getNbAtomicOrbitals(), and QCMDSystem< TPSolver >::nbDomains.

Referenced by QCMDSystem< TPSolver >::adjustFermiEnergyNew().

Here is the call graph for this function:

template<class TPSolver>
void QCMDSystem< TPSolver >::computeElecEnergy  ) 
 

Compute the Eltronic energy of the system

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::computeEnergyDerivatives TPManager &   )  [inline]
 

Definition at line 355 of file QCMDSystem.hpp.

template<class TPSolver>
QCFloat QCMDSystem< TPSolver >::computeSumOfEigenValOccupied  ) 
 

Definition at line 1291 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCModelMatrices::getEigenVal(), and QCMDSystem< TPSolver >::nbDomains.

Here is the call graph for this function:

template<class TPSolver>
QCIterator QCMDSystem< TPSolver >::end void   )  [inline]
 

Definition at line 148 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::nbDomains, and QCMDSystem< TPSolver >::QCIterator.

Referenced by QCMDSystem< TPSolver >::buildMatrices(), QCMDSystem< TPSolver >::init(), QCMDSystem< TPSolver >::prepareFockMatrices(), and QCMDSystem< TPSolver >::prepareIterations().

template<class TPSolver>
void QCMDSystem< TPSolver >::fillMaps const std::vector< QCAtomIn > &  v  ) 
 

Fill the overlap atom by atom

template<class TPSolver>
void QCMDSystem< TPSolver >::fillMaps int  nbsbd,
const int *  domainIdxs,
const QCSubDomainZone zones,
const int *  atomIdxs
 

Fill the overlap atom by atom

Definition at line 105 of file QCMDSystem.cpp.

References QCSubDomain::addOverlpIndirectionInfo(), QCMDSystem< TPSolver >::domains, QC_CORE, and QC_SHELL2.

Here is the call graph for this function:

template<class TPSolver>
void QCMDSystem< TPSolver >::getGlobalMinMax QCFloat ,
QCFloat
[inline]
 

Definition at line 295 of file QCMDSystem.hpp.

template<class TPSolver>
QCIterator QCMDSystem< TPSolver >::getIterator int  idx  )  [inline]
 

Definition at line 155 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::QCIterator.

template<class TPSolver>
int QCMDSystem< TPSolver >::getNbDomains void   )  const [inline]
 

Return the number of partition of the molecule

Definition at line 124 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::nbDomains.

template<class TPSolver>
int QCMDSystem< TPSolver >::getNproc void   )  const [inline]
 

Definition at line 134 of file QCMDSystem.hpp.

template<class TPSolver>
int QCMDSystem< TPSolver >::getRank void   )  const [inline]
 

Definition at line 139 of file QCMDSystem.hpp.

template<class TPSolver>
const QCSystem& QCMDSystem< TPSolver >::getRootSystem void   )  const [inline]
 

Definition at line 169 of file QCMDSystem.hpp.

References QCSystem::asBase().

Here is the call graph for this function:

template<class TPSolver>
QCSystem& QCMDSystem< TPSolver >::getRootSystem void   )  [inline]
 

Definition at line 162 of file QCMDSystem.hpp.

References QCSystem::asBase().

Referenced by QCMDSystem< TPSolver >::addAtom(), and QCMDSystem< TPSolver >::allocDomains().

Here is the call graph for this function:

template<class TPSolver>
QCSubDomain& QCMDSystem< TPSolver >::getSubDomain const int  i  )  const [inline]
 

Return the partition i of the molecule

Definition at line 129 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::domains.

Referenced by main().

template<class TPSolver>
void QCMDSystem< TPSolver >::getTotalSumNbElecs QCFloat ,
int 
[inline]
 

Definition at line 303 of file QCMDSystem.hpp.

template<class TPSolver>
QCFloat QCMDSystem< TPSolver >::getTotalSumTrace void   ) 
 

Definition at line 1048 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCModelMatrices::getWeightedDensityP(), QCMDSystem< TPSolver >::nbDomains, and QCMatElemGtr< TPMatrix >::trace().

Here is the call graph for this function:

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::init TPManager &  manager,
const string &  path
 

Read the partitioning of the molecule

Build the partitioning of the molecule

Definition at line 201 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::_partitionType, QCMDSystem< TPSolver >::allocatePartitioner(), QCMDSystem< TPSolver >::begin(), QCMDSystem< TPSolver >::end(), QCGeneralData::getComputationType(), QCAtoms::getNbAA(), QCPartitioner< TPSystem >::getNbPartitions(), QCPartitioner< TPSystem >::getPartitionType(), QCPartitioner< TPSystem >::initData(), QCPartitioner< TPSystem >::partitioning(), QC_DIXON_PART, QC_ENERGY_DERIV, QC_TOOLS, QC_TRACE_INIT, and QCPartitioner< TPSystem >::readFromFile().

Here is the call graph for this function:

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::prepareFockMatrices TPManager &  manager,
bool  isFirstCall
[inline]
 

For each partition of the molecule, we

  • copy H, the hamiltonian, in the Fock matrice
  • compute the electronic term due to the atoms inside partitition This function take into account only local atoms. To compute the matrice of the whole system we need to compute the interaction between local atoms end remote atoms.

Definition at line 665 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::begin(), and QCMDSystem< TPSolver >::end().

Here is the call graph for this function:

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::prepareIterations TPManager &  manager  )  [inline]
 

For each subdomain call the QCModelMatrices::prepareIterations method

Definition at line 651 of file QCMDSystem.hpp.

References QCMDSystem< TPSolver >::begin(), and QCMDSystem< TPSolver >::end().

Here is the call graph for this function:

template<class TPSolver>
void QCMDSystem< TPSolver >::readDensityFromFileAscii const QCFiles files,
const string &  path
 

Read the density matrix in an ascii File. The format is : BASIC-SHARED number of subdomain Pour chaque sous domain on affiche BASIC Subdomain index number of atoms number of elements loop on the number of element i j flag val

flag is 0 or 1, 1 when the value of the density matrix is good

Definition at line 1322 of file QCMDSystem.cpp.

References QCFiles::getDensityFile(), QCMDSystem< TPSolver >::nbDomains, QC_TRACE_INIT, QCMDSystem< TPSolver >::readDistDensityFromFileAscii(), and QCMDSystem< TPSolver >::readSharedDensityFromFileAscii().

Referenced by QCMDSystem< TPSolver >::buildMatrices().

Here is the call graph for this function:

template<class TPSolver>
void QCMDSystem< TPSolver >::readDistDensityFromFileAscii std::ifstream &  data,
const int  nproc
 

Definition at line 1398 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCModelMatrices::getDensityP(), QCMatrix::getDim(), QCMatElemGtr< TPMatrix >::getMatrix(), QC_TRACE_INIT, and QCRestrict.

Referenced by QCMDSystem< TPSolver >::readDensityFromFileAscii().

Here is the call graph for this function:

template<class TPSolver>
void QCMDSystem< TPSolver >::readSharedDensityFromFileAscii std::ifstream &  data,
const std::string &  fileName
 

Definition at line 1369 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCModelMatrices::getDensityP(), QCMatrix::getDim(), QCMatElemGtr< TPMatrix >::getMatrix(), QCMDSystem< TPSolver >::nbDomains, QC_TRACE_INIT, and QCRestrict.

Referenced by QCMDSystem< TPSolver >::readDensityFromFileAscii().

Here is the call graph for this function:

template<class TPSolver>
void QCMDSystem< TPSolver >::removeLevels QCFloat sumNbElecs,
QCTopEnergyLevel topEnergyLevels
 

Definition at line 1062 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCTopEnergyLevel::energyLevel, QCEnergies::fermiEnergy, QCSubDomain::getBFactor(), QCModelMatrices::getEigenVal(), QCMDSystem< TPSolver >::nbDomains, QCSystem::nbElectrons, QCTopEnergyLevel::numOM, QCTopEnergyLevel::numSD, QC_TRACE_ENER, QC_TWO, QC_ZERO, QCSubDomain::setNbFilledOccupiedOM(), and QCSubDomain::setOrbitalOccupN().

Here is the call graph for this function:

template<class TPSolver>
template<class TPParam>
void QCMDSystem< TPSolver >::setDomainsNumbers const TPParam *__restrict__  params  )  [inline]
 

template<class TPSolver>
void QCMDSystem< TPSolver >::sortSDOverlapments void   )  [inline]
 

template<class TPSolver>
bool QCMDSystem< TPSolver >::testConvergence QCFloat error,
QCFloat  threshold
 

Test the convergence of the SCF algorithm Test the convergence of the SCF algorithm. Compute the error between two iterations by

\[ error = \max(\|ElectEnergy^{n+1}-ElectEnergy^{n}\|, \|DensityP_{i,j} - DensityP^{n-1}_{i,j}|) \]

and return true if the errror is less than the threshold parameter.

Definition at line 1026 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCMDSystem< TPSolver >::nbDomains, and QC_ZERO.

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::writeDensityOnFileAscii TPManager &  manager,
const std::string &  path
 

Definition at line 1436 of file QCMDSystem.cpp.

References computeFlag(), QCMDSystem< TPSolver >::domains, QCModelMatrices::getDensityP(), QCOrdering::getFirstAOAt(), QCSubDomain::getGlobalIdx(), QCSubDomain::getGlobalIdxs(), QCMatElemGtr< TPMatrix >::getMatrix(), QCAtoms::getNbAtoms(), QCOrdering::getParamIndexAt(), QCSubDomain::getZone(), QCMDSystem< TPSolver >::nbDomains, QC_TRACE_OUT, and QCRestrict.

Here is the call graph for this function:

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::writeDensityOnFileAscii TPManager &  manager,
const string &  path
 

save the global shared density matrix in a File Save the global shared density matrix in a File. The format is : BASIC-SHARED numberOfSubdomains foreach subdomain BASIC numberOfCurrentSubdomain MAtrixDimension NumberOfNonZeroElements foreach NonZeroElements iloc jloc iglob jglob flag Density[iloc][jloc]

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::writeLocalDensityOnFilesAscii TPManager &  manager,
const std::string &  path
 

Definition at line 1553 of file QCMDSystem.cpp.

References computeFlag(), QCMDSystem< TPSolver >::domains, QCModelMatrices::getDensityP(), QCOrdering::getFirstAOAt(), QCSubDomain::getGlobalIdxs(), QCMatElemGtr< TPMatrix >::getMatrix(), QCSystem::getNbAtomicOrbitals(), QCAtoms::getNbAtoms(), QCOrdering::getParamIndexAt(), QCSubDomain::getZone(), intToString(), QCMDSystem< TPSolver >::nbDomains, QC_TRACE_OUT, and QCRestrict.

Here is the call graph for this function:

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::writeLocalDensityOnFilesAscii TPManager &  manager,
const string &  path
 

Save the local density matrix in a File (one by domain). The format is : dim_global dim_glabal nbElements_local i_global j_global d[i_loc,j_loc]

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::writeOrbitalPartition TPManager &  manager,
const std::string &  path
 

Definition at line 1632 of file QCMDSystem.cpp.

References QCMDSystem< TPSolver >::domains, QCOrdering::getFirstAOAt(), QCSubDomain::getGlobalIdxs(), QCSystem::getNbAtomicOrbitals(), QCAtoms::getNbAtoms(), QCOrdering::getParamIndexAt(), QCSubDomain::getZone(), QCMDSystem< TPSolver >::nbDomains, QC_CORE, QC_SHELL1, QC_TRACE_OUT, QCRestrict, and QCPartitioner< TPSystem >::writeHeader().

Here is the call graph for this function:

template<class TPSolver>
template<class TPManager>
void QCMDSystem< TPSolver >::writeOrbitalPartition TPManager &  manager,
const string &  path
 

template<class TPSolver>
void QCMDSystem< TPSolver >::writeSystemOnFile const QCFiles files,
const string &  path
 

Save the system of atoms in a File with an ascii format

Definition at line 1728 of file QCMDSystem.cpp.

References QCFiles::getResultFile(), QC_TRACE_OUT, and QCSystem::writeQCIAtomicSystem().

Here is the call graph for this function:


Friends And Related Function Documentation

template<class TPSolver>
friend class QCIterator [friend]
 

Definition at line 100 of file QCMDSystem.hpp.

Referenced by QCMDSystem< TPSolver >::begin(), QCMDSystem< TPSolver >::end(), and QCMDSystem< TPSolver >::getIterator().

template<class TPSolver>
friend class QCReader [friend]
 

Reimplemented from QCSystem.

Definition at line 88 of file QCMDSystem.hpp.


Member Data Documentation

template<class TPSolver>
QCPartitionType QCMDSystem< TPSolver >::_partitionType [protected]
 

To Precise

Definition at line 589 of file QCMDSystem.hpp.

Referenced by QCMDSystem< TPSolver >::init().

template<class TPSolver>
QCSubDomain* QCMDSystem< TPSolver >::domains [protected]
 

The array of subdomain of size nbDomains.

Definition at line 577 of file QCMDSystem.hpp.

Referenced by QCMDSystem< TPSolver >::addAtom(), QCMDSystem< TPSolver >::addLevels(), QCMDSystem< TPSolver >::adjustFermiEnergy(), QCMDSystem< TPSolver >::adjustFermiEnergyDichotomy(), QCMDSystem< TPSolver >::adjustFermiEnergyNew(), QCMDSystem< TPSolver >::allocDomains(), QCMDSystem< TPSolver >::allocStructures(), QCMDSystem< TPSolver >::applyOptimalDamping(), QCMDSystem< TPSolver >::completeDensityMatrices(), QCMDSystem< TPSolver >::completeFockMatricesAndElecEnergy(), QCMDSystem< TPSolver >::completeHamiltonMatrices(), QCMDSystem< TPSolver >::computeDichotomyBounds(), QCMDSystem< TPSolver >::computeSumOfEigenValOccupied(), QCMDSystem< TPSolver >::fillMaps(), QCMDSystem< TPSolver >::getSubDomain(), QCMDSystem< TPSolver >::getTotalSumTrace(), QCMDSystem< TPSolver >::QCIterator::operator->(), QCMDSystem< TPSolver >::readDistDensityFromFileAscii(), QCMDSystem< TPSolver >::readSharedDensityFromFileAscii(), QCMDSystem< TPSolver >::removeLevels(), QCMDSystem< TPSolver >::testConvergence(), QCMDSystem< TPSolver >::writeDensityOnFileAscii(), QCMDSystem< TPSolver >::writeLocalDensityOnFilesAscii(), QCMDSystem< TPSolver >::writeOrbitalPartition(), and QCMDSystem< TPSolver >::~QCMDSystem().

template<class TPSolver>
bool QCMDSystem< TPSolver >::fermiFCall [protected]
 

To Precise

Definition at line 585 of file QCMDSystem.hpp.

Referenced by QCMDSystem< TPSolver >::adjustFermiEnergyNew().

template<class TPSolver>
int QCMDSystem< TPSolver >::nbDomains [protected]
 

Number of subdomains shared by the curent. in sequential version this number is the same as totalNbDomains field.

Definition at line 573 of file QCMDSystem.hpp.

Referenced by QCMDSystem< TPSolver >::addLevels(), QCMDSystem< TPSolver >::adjustFermiEnergy(), QCMDSystem< TPSolver >::adjustFermiEnergyDichotomy(), QCMDSystem< TPSolver >::adjustFermiEnergyNew(), QCMDSystem< TPSolver >::allocDomains(), QCMDSystem< TPSolver >::applyOptimalDamping(), QCMDSystem< TPSolver >::completeDensityMatrices(), QCMDSystem< TPSolver >::completeFockMatricesAndElecEnergy(), QCMDSystem< TPSolver >::completeHamiltonMatrices(), QCMDSystem< TPSolver >::computeDichotomyBounds(), QCMDSystem< TPSolver >::computeSumOfEigenValOccupied(), QCMDSystem< TPSolver >::end(), QCMDSystem< TPSolver >::getNbDomains(), QCMDSystem< TPSolver >::getTotalSumTrace(), QCMDSystem< TPSolver >::QCIterator::operator++(), QCMDSystem< TPSolver >::readDensityFromFileAscii(), QCMDSystem< TPSolver >::readSharedDensityFromFileAscii(), QCMDSystem< TPSolver >::removeLevels(), QCMDSystem< TPSolver >::testConvergence(), QCMDSystem< TPSolver >::writeDensityOnFileAscii(), QCMDSystem< TPSolver >::writeLocalDensityOnFilesAscii(), and QCMDSystem< TPSolver >::writeOrbitalPartition().

template<class TPSolver>
int QCMDSystem< TPSolver >::offset [protected]
 

To precise

Definition at line 581 of file QCMDSystem.hpp.

template<class TPSolver>
int QCMDSystem< TPSolver >::totalNbDomains [protected]
 

Number of subdomains in the whole system -used in the parallel version.

Definition at line 569 of file QCMDSystem.hpp.

Referenced by QCMDSystem< TPSolver >::allocDomains().


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