コード例 #1
0
ファイル: basisset.cpp プロジェクト: ChrisWilliams/avogadro
 void BasisSet::outputAll()
 {
   // Can be called to print out a summary of the basis set as read in
   qDebug() << "\nGaussian Basis Set\nNumber of atoms:" << m_numAtoms;
   for (uint i = 0; i < m_symmetry.size(); ++i) {
     qDebug() << i
         << "\tAtom Index:" << m_atomIndices[i]
         << "\tSymmetry:" << m_symmetry[i]
         << "\tMO Index:" << m_moIndices[i]
         << "\tGTO Index:" << m_gtoIndices[i];
   }
   qDebug() << m_symmetry.size() << m_gtoIndices.size()
       << m_gtoIndices[m_symmetry.size()];
   for (uint i = 0; i < m_symmetry.size(); ++i) {
     switch(m_symmetry[i]) {
       case S:
         qDebug() << "Shell" << i << "\tS\n  MO 1\t"
             << m_moMatrix(0, m_moIndices[i])
             << m_moMatrix(m_moIndices[i], 0);
         break;
       case P:
         qDebug() << "Shell" << i << "\tP\n  MO 1\t"
             << m_moMatrix(0, m_moIndices[i])
             << "\t" << m_moMatrix(0, m_moIndices[i+1])
             << "\t" << m_moMatrix(0, m_moIndices[i+2]);
         break;
       case D:
         qDebug() << "Shell" << i << "\tD\n  MO 1\t"
             << m_moMatrix(0, m_moIndices[i])
             << "\t" << m_moMatrix(0, m_moIndices[i+1])
             << "\t" << m_moMatrix(0, m_moIndices[i+2])
             << "\t" << m_moMatrix(0, m_moIndices[i+3])
             << "\t" << m_moMatrix(0, m_moIndices[i+4])
             << "\t" << m_moMatrix(0, m_moIndices[i+5]);
         break;
       case D5:
         qDebug() << "Shell" << i << "\tD\n  MO 1\t"
             << m_moMatrix(0, m_moIndices[i])
             << "\t" << m_moMatrix(0, m_moIndices[i+1])
             << "\t" << m_moMatrix(0, m_moIndices[i+2])
             << "\t" << m_moMatrix(0, m_moIndices[i+3])
             << "\t" << m_moMatrix(0, m_moIndices[i+4]);
         break;
       default:
         qDebug() << "Error: unhandled type...";
     }
     unsigned int cIndex = m_gtoIndices[i];
     for (uint j = m_gtoIndices[i]; j < m_gtoIndices[i+1]; ++j) {
       qDebug() << cIndex
         << "\tc:" << m_gtoC[cIndex]
         << "\ta:" << m_gtoA[cIndex];
       ++cIndex;
     }
   }
   qDebug() << '\n';
 }
コード例 #2
0
ファイル: gaussianset.cpp プロジェクト: Algerien1970/avogadro
void GaussianSet::outputAll()
{
  // Can be called to print out a summary of the basis set as read in
  qDebug() << "\nGaussian Basis Set\nNumber of atoms:" << m_numAtoms;

  initCalculation();

  if (!isValid()) {
    qDebug() << "Basis set is marked as invalid.";
    return;
  }

  for (uint i = 0; i < m_symmetry.size(); ++i) {
    qDebug() << i
             << "\tAtom Index:" << m_atomIndices[i]
             << "\tSymmetry:" << m_symmetry[i]
             << "\tMO Index:" << m_moIndices[i]
             << "\tGTO Index:" << m_gtoIndices[i];
  }
  qDebug() << "Symmetry:" << m_symmetry.size()
           << "\tgtoIndices:" << m_gtoIndices.size()
           << "\tLast gtoIndex:" << m_gtoIndices[m_symmetry.size()]
           << "\ngto size:" << m_gtoA.size() << m_gtoC.size() << m_gtoCN.size();
  for (uint i = 0; i < m_symmetry.size(); ++i) {
    switch(m_symmetry[i]) {
    case S:
      qDebug() << "Shell" << i << "\tS\n  MO 1\t"
               << m_moMatrix(0, m_moIndices[i])
               << m_moMatrix(m_moIndices[i], 0);
      break;
    case P:
      qDebug() << "Shell" << i << "\tP\n  MO 1\t"
               << m_moMatrix(0, m_moIndices[i])
               << "\t" << m_moMatrix(0, m_moIndices[i] + 1)
               << "\t" << m_moMatrix(0, m_moIndices[i] + 2);
      break;
    case D:
      qDebug() << "Shell" << i << "\tD\n  MO 1\t"
               << m_moMatrix(0, m_moIndices[i])
               << "\t" << m_moMatrix(0, m_moIndices[i] + 1)
               << "\t" << m_moMatrix(0, m_moIndices[i] + 2)
               << "\t" << m_moMatrix(0, m_moIndices[i] + 3)
               << "\t" << m_moMatrix(0, m_moIndices[i] + 4)
               << "\t" << m_moMatrix(0, m_moIndices[i] + 5);
      break;
    case D5:
      qDebug() << "Shell" << i << "\tD5\n  MO 1\t"
               << m_moMatrix(0, m_moIndices[i])
               << "\t" << m_moMatrix(0, m_moIndices[i] + 1)
               << "\t" << m_moMatrix(0, m_moIndices[i] + 2)
               << "\t" << m_moMatrix(0, m_moIndices[i] + 3)
               << "\t" << m_moMatrix(0, m_moIndices[i] + 4);
      break;
    case F:
      std::cout << "Shell " << i << "\tF\n  MO 1";
      for (short j = 0; j < 10; ++j)
        std::cout << "\t" << m_moMatrix(0, m_moIndices[i] + j);
      std::cout << std::endl;
      break;
    case F7:
      std::cout << "Shell " << i << "\tF7\n  MO 1";
      for (short j = 0; j < 7; ++j)
        std::cout << "\t" << m_moMatrix(0, m_moIndices[i] + j);
      std::cout << std::endl;
      break;
    default:
      qDebug() << "Error: unhandled type...";
    }
    unsigned int cIndex = m_gtoIndices[i];
    for (uint j = m_gtoIndices[i]; j < m_gtoIndices[i+1]; ++j) {
      if (j >= m_gtoA.size()) {
        qDebug() << "Error, j is too large!" << j << m_gtoA.size();
        continue;
      }
      qDebug() << cIndex
               << "\tc:" << m_gtoC[cIndex]
               << "\ta:" << m_gtoA[cIndex];
      ++cIndex;
    }
  }
  qDebug() << "\nEnd of orbital data...\n";
}