Ignore:
Timestamp:
Jul 23, 2009, 1:45:24 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
47548d
Parents:
560995 (diff), 1b2aa1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Frederik Heber <heber@…> (07/23/09 12:34:47)
git-committer:
Frederik Heber <heber@…> (07/23/09 13:45:24)
Message:

Merge branch 'MultipleMolecules'

Conflicts:

molecuilder/src/analyzer.cpp
molecuilder/src/atom.cpp
molecuilder/src/boundary.cpp
molecuilder/src/boundary.hpp
molecuilder/src/builder.cpp
molecuilder/src/config.cpp
molecuilder/src/datacreator.hpp
molecuilder/src/helpers.cpp
molecuilder/src/joiner.cpp
molecuilder/src/moleculelist.cpp
molecuilder/src/molecules.cpp
molecuilder/src/molecules.hpp
molecuilder/src/parser.cpp
molecuilder/src/parser.hpp
molecuilder/src/vector.cpp
molecuilder/src/verbose.cpp

merges:

compilation fixes:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/analyzer.cpp

    r560995 rf39735  
    33 * Takes evaluated fragments (energy and forces) and does evaluation of how sensible the BOSSANOVA
    44 * approach was, e.g. in the decay of the many-body-contributions.
    5  *   
     5 *
    66 */
    77
     
    99
    1010#include "datacreator.hpp"
    11 #include "helpers.hpp" 
     11#include "helpers.hpp"
    1212#include "parser.hpp"
    13 #include "periodentafel.hpp" 
     13#include "periodentafel.hpp"
    1414
    1515// include config.h
     
    5555  stringstream yrange;
    5656  char *dir = NULL;
    57   bool NoHCorrection = false;
    5857  bool NoHessian = false;
    5958  bool NoTime = false;
     59  bool NoHCorrection = true;
    6060  int counter;
    61  
     61
    6262  cout << "ANOVA Analyzer" << endl;
    6363  cout << "==============" << endl;
    64  
     64
    6565  // Get the command line options
    6666  if (argc < 4) {
     
    7676    strcat(dir, argv[2]);
    7777  }
    78  
     78
    7979  if (argc > 4) {
    8080    cout << "Loading periodentafel." << endl;
     
    8282    periode->LoadPeriodentafel(argv[4]);
    8383  }
    84  
     84
    8585  // Test the given directory
    8686  if (!TestParams(argc, argv))
     
    8888
    8989  // +++++++++++++++++ PARSING +++++++++++++++++++++++++++++++
    90  
     90
    9191  // ------------- Parse through all Fragment subdirs --------
    9292  if (!Energy.ParseFragmentMatrix(argv[1], dir, EnergySuffix,0,0)) return 1;
     
    113113
    114114  // ---------- Parse the TE Factors into an array -----------------
    115   if (!Energy.InitialiseIndices()) return 1;
    116   if (!NoHCorrection)
    117     Hcorrection.InitialiseIndices();
    118  
     115  if (!Energy.ParseIndices()) return 1;
     116  if (!NoHCorrection) Hcorrection.ParseIndices();
     117
    119118  // ---------- Parse the Force indices into an array ---------------
    120119  if (!Force.ParseIndices(argv[1])) return 1;
     
    148147  if (!KeySet.ParseKeySets(argv[1], Force.RowCounter, Force.MatrixCounter)) return 1;
    149148  if (!KeySet.ParseManyBodyTerms()) return 1;
    150  
     149
    151150  // ---------- Parse fragment files created by 'joiner' into an array -------------
    152151  if (!EnergyFragments.ParseFragmentMatrix(argv[1], dir, EnergyFragmentSuffix,0,0)) return 1;
     
    164163
    165164  // +++++++++++++++ TESTING ++++++++++++++++++++++++++++++
    166  
     165
    167166  // print energy and forces to file
    168167  filename.str("");
     
    245244
    246245  // +++++++++++++++ ANALYZING ++++++++++++++++++++++++++++++
    247  
     246
    248247  cout << "Analyzing ..." << endl;
    249248
     
    330329  }
    331330
    332  
     331
    333332  // +++++++++++++++++++++++++++++++++++++++ Plotting deviation in energy to full QM
    334333  if (!CreateDataDeltaEnergyOrder(Energy, EnergyFragments, KeySet, argv[3], "DeltaEnergies-Order", "Plot of error between approximated and full energies energies versus the Bond Order", datum)) return 1;
    335  
     334
    336335  // +++++++++++++++++++++++++++++++++++Plotting Energies vs. Order
    337336  if (!CreateDataEnergyOrder(EnergyFragments, KeySet, argv[3], "Energies-Order", "Plot of approximated energies versus the Bond Order", datum)) return 1;
    338  
     337
    339338  // +++++++++++++++++++++++++++++++++++++++ Plotting deviation in forces to full QM
    340339  if (!CreateDataDeltaForcesOrderPerAtom(Force, ForceFragments, KeySet, argv[3], "DeltaForces-Order", "Plot of error between approximated forces and full forces versus the Bond Order", datum)) return 1;
     
    399398
    400399  // ======================================= Creating the plot files ==============================================================
    401  
     400
    402401  Orderxrange << "[1:" << KeySet.Order << "]";
    403402  Fragmentxrange << "[0:" << KeySet.FragmentCounter+1 << "]";
     
    411410  // +++++++++++++++++++++++++++++++++++++++ Plotting deviation in energy to full QM
    412411  if (!CreatePlotOrder(Energy, KeySet, argv[3], "DeltaEnergies-Order", 1, "outside", "y", "",  1, 1, "bond order k", "absolute error in energy [Ht]", Orderxrange.str().c_str(), yrange.str().c_str(), "1" , "with linespoints", AbsEnergyPlotLine)) return 1;
    413  
     412
    414413  // +++++++++++++++++++++++++++++++++++Plotting Energies vs. Order
    415414  if (!CreatePlotOrder(Energy, KeySet, argv[3], "Energies-Order", 1, "outside", "", "",  1, 1, "bond order k", "approximate energy [Ht]", Orderxrange.str().c_str(), "", "1" , "with linespoints", EnergyPlotLine)) return 1;
     
    429428  if(!OpenOutputFile(output, argv[3], "DeltaMinMeanMaxTotalForce-Order.pyx")) return 1;
    430429  CreatePlotHeader(output, "DeltaMinMeanMaxTotalForce-Order", 1, "bottom left", "y", NULL,  1, 1, "bond order k", "absolute error in total forces [Ht/a.u.]");
    431   output << "plot " << Orderxrange.str().c_str() << " [1e-8:1e+0] \\" << endl; 
     430  output << "plot " << Orderxrange.str().c_str() << " [1e-8:1e+0] \\" << endl;
    432431  output << "'DeltaMinForces-Order.dat' title 'minimum' using 1:(sqrt($" << 8 << "*$" << 8 << "+$" << 8+1 << "*$" << 8+1 << "+$" << 8+2 << "*$" << 8+2 << ")) with linespoints, \\" << endl;
    433432  output << "'DeltaMeanForces-Order.dat' title 'mean' using 1:(abs($" << 8 << ")) with linespoints, \\" << endl;
    434433  output << "'DeltaMaxForces-Order.dat' title 'maximum' using 1:(sqrt($" << 8 << "*$" << 8 << "+$" << 8+1 << "*$" << 8+1 << "+$" << 8+2 << "*$" << 8+2 << ")) with linespoints" << endl;
    435   output.close(); 
     434  output.close();
    436435
    437436  // ++++++++++++++++++++++++++++++++++++++Plotting Forces vs. Order
     
    448447  if(!OpenOutputFile(output, argv[3],"MinMeanMaxTotalForce-Order.pyx")) return 1;
    449448  CreatePlotHeader(output, "MinMeanMaxTotalForce-Order", 1, "bottom left", "y", NULL, 1, 1, "bond order k", "absolute total force [Ht/a.u.]");
    450   output << "plot "<< Orderxrange.str().c_str() << " [1e-8:1e+0] \\" << endl; 
     449  output << "plot "<< Orderxrange.str().c_str() << " [1e-8:1e+0] \\" << endl;
    451450  output << "'MinForces-Order.dat' title 'minimum' using 1:(sqrt($" << 8 << "*$" << 8 << "+$" << 8+1 << "*$" << 8+1 << "+$" << 8+2 << "*$" << 8+2 << ")) with linespoints, \\" << endl;
    452451  output << "'MeanForces-Order.dat' title 'mean' using 1:(abs($" << 8 << ")) with linespoints, \\" << endl;
    453452  output << "'MaxForces-Order.dat' title 'maximum' using 1:(sqrt($" << 8 << "*$" << 8 << "+$" << 8+1 << "*$" << 8+1 << "+$" << 8+2 << "*$" << 8+2 << ")) with linespoints" << endl;
    454   output.close(); 
     453  output.close();
    455454
    456455  // ++++++++++++++++++++++++++++++++++++++Plotting vector sum vs. Order
     
    471470  // min
    472471  if (!CreatePlotOrder(ForceFragments, KeySet, argv[3], "MinForces-Fragment", 5, "below", "y", "set boxwidth 0.2", 1, 5, "fragment number", "minimum of approximated forces [Ht/a.u.]", Fragmentxrange.str().c_str(), yrange.str().c_str(), "2" , "with boxes fillcolor", BoxesForcePlotLine)) return 1;
    473    
     472
    474473  // mean
    475474  if (!CreatePlotOrder(ForceFragments, KeySet, argv[3], "MeanForces-Fragment", 5, "below", "y", "set boxwidth 0.2", 1, 5, "fragment number", "mean of approximated forces [Ht/a.u.]", Fragmentxrange.str().c_str(), yrange.str().c_str(), "2" , "with boxes fillcolor", BoxesFirstForceValuePlotLine)) return 1;
    476    
     475
    477476  // max
    478477  if (!CreatePlotOrder(ForceFragments, KeySet, argv[3], "MaxForces-Fragment", 5, "below", "y", "set boxwidth 0.2", 1, 5, "fragment number", "maximum of approximated forces [Ht/a.u.]", Fragmentxrange.str().c_str(), yrange.str().c_str(), "2" , "with boxes fillcolor", BoxesForcePlotLine)) return 1;
     
    481480  // min
    482481  if (!CreatePlotOrder(ForceFragments, KeySet, argv[3], "MinForces-FragmentOrder", 5, "below", "y", "set boxwidth 0.2", 1, 1, "bond order", "minimum of approximated forces [Ht/a.u.]", Orderxrange.str().c_str(), yrange.str().c_str(), "1" , "with boxes fillcolor", BoxesForcePlotLine)) return 1;
    483    
     482
    484483  // mean
    485484  if (!CreatePlotOrder(ForceFragments, KeySet, argv[3], "MeanForces-FragmentOrder", 5, "below", "y", "set boxwidth 0.2", 1, 1, "bond order", "mean of approximated forces [Ht/a.u.]", Orderxrange.str().c_str(), yrange.str().c_str(), "1" , "with boxes fillcolor", BoxesFirstForceValuePlotLine)) return 1;
    486    
     485
    487486  // max
    488487  if (!CreatePlotOrder(ForceFragments, KeySet, argv[3], "MaxForces-FragmentOrder", 5, "below", "y", "set boxwidth 0.2", 1, 1, "bond order", "maximum of approximated forces [Ht/a.u.]", Orderxrange.str().c_str(), yrange.str().c_str(), "1" , "with boxes fillcolor", BoxesForcePlotLine)) return 1;
    489  
     488
    490489  // +++++++++++++++++++++++++++++++=Ploting approximated and true shielding for each atom
    491490  if (periode != NULL) { // also look for PAS values
     
    553552  output << "\trm -rf $(EPS)" << endl;
    554553  output.close();
    555  
     554
    556555  // ++++++++++++++++ exit ++++++++++++++++++++++++++++++++++
    557556  delete(periode);
Note: See TracChangeset for help on using the changeset viewer.