예제 #1
0
void FGaussShell::Print( std::ostream &out ) const
{
   using fmt::ff;
   using fmt::fi;
   using fmt::fe;
   out << "vCenter: (" << ff(vCenter[0],6,4) << " " << ff(vCenter[1],7,4) << " " << ff(vCenter[2],6,4) << ")   "
       << "iCenter: " << fi(iCenter,3) << "\n"
       << *pFn;
}
예제 #2
0
void FGaussShell::PrintAligned( std::ostream &xout, uint Indent ) const
{
   using namespace fmt;
   std::streampos
      p0 = xout.tellp(),
      p1;
//    xout << fi(iCenter, 3) << " "
   xout << fi(pFn->Contractions.size(), 3) << ":"
        << "spdfghiklm"[AngularMomentum()]
        << "   "
        << ff(vCenter[0],8,4) << " " << ff(vCenter[1],8,4) << " " << ff(vCenter[2],8,4)
        << "    ";
   p1 = xout.tellp();

   for ( uint iExp = 0; iExp < pFn->Exponents.size(); ++ iExp ){
      if ( iExp != 0 ){
         xout << "\n";
         for ( uint i = 0; i < Indent + p1 - p0; ++ i )
            xout << " ";
      }
      xout << fmt::ff(pFn->Exponents[iExp],16,7) << "  ";

      double
         fRenorm = 1.0/GaussNormalizationSpher( pFn->Exponents[iExp], pFn->AngularMomentum );
//       fRenorm = 1.;
      std::stringstream
         str;
      for ( uint iCo = 0; iCo < pFn->Contractions.size(); ++ iCo ){
         aic::FGaussBfn::FContraction const
            &Co = pFn->Contractions[iCo];
         uint
            w = 9, p = 5;
         if ( Co.nBegin <= iExp && iExp < Co.nEnd ) {
            str << " " << fmt::ff(Co.Coeffs[iExp - Co.nBegin]*fRenorm, w, p);
         } else {
            str << " " << fmt::fc("  - - - -", w);
         }
      }
      std::string
         s = str.str();
      while( !s.empty() && (s[s.size()-1] == ' ' || s[s.size()-1] == '-' ) )
         s.resize(s.size() - 1);
      xout << s;
   }
}
예제 #3
0
void FGaussBfn::Print( std::ostream &out ) const
{
   using fmt::ff;
   using fmt::fi;
   using fmt::fe;
   out << "AngMom: " << AngularMomentum << "   "
/*       << "vCenter: (" << ff(vCenter[0],6,4) << " " << ff(vCenter[1],7,4) << " " << ff(vCenter[2],6,4) << ")   "
       << "iCenter: " << fi(iCenter,3) << ""*/
       << "\nExponents:\n       ";
   int wd = 10;
   for ( uint i = 0; i < Exponents.size(); ++ i )
      out << " " << fe(Exponents[i],wd,4);
   out << "\n";

   out << "Contractions:\n";
   for ( uint iCo = 0; iCo < Contractions.size(); ++ iCo ) {
      out << "   " << fi(iCo,2) << ": ";
      FContraction const &co = Contractions[iCo];
      for ( uint iExp = 0; iExp < Exponents.size(); ++ iExp ) {
         double r = 0.0;
         if ( iExp >= co.nBegin && iExp < co.nEnd )
            r = co.Coeffs[iExp - co.nBegin];
         out << " " << ff(r,wd,6);
      }
      out << "    [" << co.nBegin << "--" << co.nEnd - 1 << "]";
      out << "\n";
   }
   out << "\n";
#ifdef _DEBUG
   out << "Primitive contributions:\n";
   for ( uint iExp = 0; iExp < PrimContribs.size(); ++ iExp ) {
      out << "   " << fi(iExp,2) << ": ";
      FContraction const &pc = PrimContribs[iExp];
      for ( uint iCo = 0; iCo < Contractions.size(); ++ iCo ) {
         double r = 0.0;
         if ( iCo >= pc.nBegin && iCo < pc.nEnd )
            r = pc.Coeffs[iCo - pc.nBegin];
         out << " " << ff(r,wd,6);
      }
      out << "    [" << pc.nBegin << "--" << pc.nEnd - 1 << "]";
      out << "\n";
   }
//    out << "\n";
#endif
}