Changeset 1966ba


Ignore:
Timestamp:
Feb 25, 2014, 8:56:18 PM (12 years ago)
Author:
Frederik Heber <heber@…>
Children:
961fac
Parents:
0aa88e
git-author:
Frederik Heber <heber@…> (12/20/13 18:57:17)
git-committer:
Frederik Heber <heber@…> (02/25/14 20:56:18)
Message:

Added code to write SO and OSO eigenvector matrix to file.

  • this was to check whether they are actually sparse or not.
  • we need to check whether scf is directly accessible or whether we need to go via mbpt2 info.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/bin/mpqc/mpqc.cc

    r0aa88e r1966ba  
    15181518//       ExEnv::out0() << endl;
    15191519//     }
     1520     {
     1521       SCF *scf = dynamic_cast<SCF*>(wfn.pointer());
     1522       if (scf == NULL) {
     1523         MBPT2 *mbpt2 = dynamic_cast<MBPT2*>(wfn.pointer());
     1524         if (mbpt2 != NULL) {
     1525           scf = mbpt2->ref().pointer();
     1526         } else
     1527           scf = NULL;
     1528       }
     1529       if (scf != NULL) {
     1530         RefSCMatrix oso_vector = scf->oso_eigenvectors();
     1531         RefSCMatrix vector = scf->so_to_orthog_so().t() * oso_vector;
     1532         {
     1533         //  ExEnv::out0() << "The SO eigenvector matrix is ";
     1534           std::ofstream output("SOeigenvector.dat");
     1535           for (int i=0; i < wfn->ao_dimension(); ++i) {
     1536             std::vector<double> sorted_values;
     1537             for (int j=0;j<wfn->ao_dimension();++j)
     1538               sorted_values.push_back(fabs(oso_vector(i,j)));
     1539  //           std::sort(sorted_values.begin(), sorted_values.end());
     1540             for (int j=0;j<wfn->ao_dimension();++j) {
     1541               output << sorted_values[j] << "\t";
     1542             }
     1543             output << "\n";
     1544           }
     1545           output.close();
     1546         }
     1547         {
     1548         //  ExEnv::out0() << "The OSO eigenvector matrix is ";
     1549           std::ofstream output("OSOeigenvector.dat");
     1550           for (int i=0; i < wfn->ao_dimension(); ++i) {
     1551             std::vector<double> sorted_values;
     1552             for (int j=0;j<wfn->ao_dimension();++j)
     1553               sorted_values.push_back(fabs(vector(i,j)));
     1554  //           std::sort(sorted_values.begin(), sorted_values.end());
     1555             for (int j=0;j<wfn->ao_dimension();++j) {
     1556               output << sorted_values[j] << "\t";
     1557             }
     1558             output << "\n";
     1559           }
     1560           output.close();
     1561         }
     1562       } else {
     1563         ExEnv::out0() << "INFO: There is no reference SCF information available either." << endl;
     1564       }
     1565     }
    15201566     // print the energy
    15211567     data.energies.total = wfn->energy();
Note: See TracChangeset for help on using the changeset viewer.