Changeset e8dd4d for molecuilder/src


Ignore:
Timestamp:
Aug 6, 2008, 8:50:52 AM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
0a08df
Parents:
e6372f
Message:

pcp.speed is parsed and analyzed again (Time matrices).

This was commented out before.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/analyzer.cpp

    re6372f re8dd4d  
    8585  Hcorrected = Hcorrection.ParseMatrix(argv[1], "", HCORRECTIONSUFFIX,0,0);
    8686  if (!Force.ParseMatrix(argv[1], dir, ForcesSuffix,0,0)) return 1;
    87   //if (!Time.ParseMatrix(argv[1], dir, TimeSuffix, 10,1)) return 1;
     87  if (!Time.ParseMatrix(argv[1], dir, TimeSuffix, 10,1)) return 1;
    8888  if (periode != NULL) { // also look for PAS values
    8989    if (!Shielding.ParseMatrix(argv[1], dir, ShieldingSuffix, 1, 0)) return 1;
     
    159159  }
    160160 
    161 //  output << endl << "Total Times" << endl << "===============" << endl << Time.Header << endl;
    162 //  Time.SetLastMatrix(0., 0);
    163 //  for (int BondOrder=KeySet.Order;BondOrder--;)
    164 //    for(int i=KeySet.FragmentsPerOrder[BondOrder];i--;)
    165 //      for(int j=Time.RowCounter[Time.MatrixCounter];j--;)
    166 //        for(int k=Time.ColumnCounter;k--;) {
    167 //          Time.Matrix[ Time.MatrixCounter ][j][k] += Time.Matrix[ KeySet.OrderSet[BondOrder][i] ][j][k];
    168 //        }
    169 //  for(int j=0;j<Time.RowCounter[Time.MatrixCounter];j++) {
    170 //    for(int k=0;k<Time.ColumnCounter;k++)
    171 //      output << scientific << Time.Matrix[ Time.MatrixCounter ][j][k] << "\t";
    172 //    output << endl;
    173 //  }
    174 //  output << endl;
     161  output << endl << "Total Times" << endl << "===============" << endl << Time.Header << endl;
     162  Time.SetLastMatrix(0., 0);
     163  for (int BondOrder=KeySet.Order;BondOrder--;)
     164    for(int i=KeySet.FragmentsPerOrder[BondOrder];i--;)
     165      for(int j=Time.RowCounter[Time.MatrixCounter];j--;)
     166        for(int k=Time.ColumnCounter;k--;) {
     167          Time.Matrix[ Time.MatrixCounter ][j][k] += Time.Matrix[ KeySet.OrderSet[BondOrder][i] ][j][k];
     168        }
     169  for(int j=0;j<Time.RowCounter[Time.MatrixCounter];j++) {
     170    for(int k=0;k<Time.ColumnCounter;k++)
     171      output << scientific << Time.Matrix[ Time.MatrixCounter ][j][k] << "\t";
     172    output << endl;
     173  }
     174  output << endl;
    175175  output.close();
    176176
     
    181181  // ======================================= Creating the data files ==============================================================
    182182
    183 //  // +++++++++++++++++++++++++++++++++++++++ Plotting Simtime vs Bond Order
    184 //  if (!OpenOutputFile(output, argv[3], "SimTime-Order.dat" )) return false;
    185 //  Time.SetLastMatrix(0., 0);
    186 //  output << "#Order\tFrag.No.\t" << Time.Header << endl;
    187 //  for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) {
    188 //    for(int i=KeySet.FragmentsPerOrder[BondOrder];i--;)
    189 //      for(int j=Time.RowCounter[Time.MatrixCounter];j--;)
    190 //        for(int k=Time.ColumnCounter;k--;) {
    191 //          Time.Matrix[ Time.MatrixCounter ][j][k] += Time.Matrix[ KeySet.OrderSet[BondOrder][i] ][j][k];
    192 //        }
    193 //    output << BondOrder+1 << "\t" << KeySet.FragmentsPerOrder[BondOrder];
    194 //    for(int k=0;k<Time.ColumnCounter;k++)
    195 //      output << "\t" << scientific << Time.Matrix[ Time.MatrixCounter ][1][k];
    196 //    output << endl;
    197 //  }
    198 //  output.close();
     183  // +++++++++++++++++++++++++++++++++++++++ Plotting Simtime vs Bond Order
     184  if (!OpenOutputFile(output, argv[3], "SimTime-Order.dat" )) return false;
     185  Time.SetLastMatrix(0., 0);
     186  output << "#Order\tFrag.No.\t" << Time.Header << endl;
     187  for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) {
     188    for(int i=KeySet.FragmentsPerOrder[BondOrder];i--;)
     189      for(int j=Time.RowCounter[Time.MatrixCounter];j--;)
     190        for(int k=Time.ColumnCounter;k--;) {
     191          Time.Matrix[ Time.MatrixCounter ][j][k] += Time.Matrix[ KeySet.OrderSet[BondOrder][i] ][j][k];
     192        }
     193    output << BondOrder+1 << "\t" << KeySet.FragmentsPerOrder[BondOrder];
     194    for(int k=0;k<Time.ColumnCounter;k++)
     195      output << "\t" << scientific << Time.Matrix[ Time.MatrixCounter ][1][k];
     196    output << endl;
     197  }
     198  output.close();
    199199
    200200  // +++++++++++++++++++++++++++++++++++++++ Plotting deviation in energy to full QM
     
    264264 
    265265  // +++++++++++++++++++++++++++++++++++++++ Plotting Simtime vs Bond Order
    266   //if (!CreatePlotOrder(Time, KeySet, argv[3], "SimTime-Order", 1, "below", "y", "",  1, 1, "bond order k", "Evaluation time [s]", Orderxrange.str().c_str(), "", "1" , "with linespoints", EnergyPlotLine)) return 1;
     266  if (!CreatePlotOrder(Time, KeySet, argv[3], "SimTime-Order", 1, "below", "y", "",  1, 1, "bond order k", "Evaluation time [s]", Orderxrange.str().c_str(), "", "1" , "with linespoints", EnergyPlotLine)) return 1;
    267267 
    268268  // +++++++++++++++++++++++++++++++++++++++ Plotting deviation in energy to full QM
Note: See TracChangeset for help on using the changeset viewer.