Changeset 56fb09


Ignore:
Timestamp:
Jun 30, 2010, 8:35:38 AM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
5ec8e3
Parents:
51a5c8 (diff), 8e0c63 (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.
Message:

Merge branch 'stable' into StructureRefactoring

Files:
18 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MoleculeAction/VerletIntegrationAction.cpp

    r51a5c8 r56fb09  
    6262    char outputname[MAXSTRINGSIZE];
    6363    strcpy(outputname, filename.c_str());
    64     if (!mol->VerletForceIntegration(outputname, *(World::getInstance().getConfig())))
     64    if (!mol->VerletForceIntegration(outputname, *(World::getInstance().getConfig()), 0))
    6565      DoLog(2) && (Log() << Verbose(2) << "File not found." << endl);
    6666    else
  • src/CommandLineParser.hpp

    r51a5c8 r56fb09  
    1717#include <list>
    1818
     19/** This class is a wrapper for boost::program_options.
     20 *
     21 * <h1> CommandLine Howto </h1>
     22 * <h2> Introduction </h2>
     23 *
     24 * The UIFactory is a base class for the User Interaction. There are three UI specializations:
     25 * Text, GUI and CommandLine. Accessing functionality via the CommandLine UI is explained here.
     26 *
     27 * First, an Action has to be written for the specific functionality. This Action should
     28 * be added in Actions/...Action in the respective subdirectory of the following types:
     29 *  -# Analysis: Analysis actions like evaluating pair correlation, bonds, ...
     30 *  -# Atom: adding, removing, manipulating atoms
     31 *  -# Cmd: specifying data bases, verbosity, ...
     32 *  -# Fragmentation: fragmenting a system, performing graph analysis, ...
     33 *  -# Molecule: adding, removing, manipulating molecules
     34 *  -# Parser: Parsing files (loading, saving)
     35 *  -# Tesselation: obtaining (non)convex surface of a molecule, embedding, ...
     36 *  -# World: Setting Box dimensions, default name of new molecules, ...
     37 *
     38 *  The CommandLineUIFactory is a specialization of the UIFactory for parsing command
     39 *  line parameters, generating and executing actions there from.
     40 *
     41 *  The idea of the CommandLineFactory is explained elsewhere, here we would like to give a
     42 *  receipe for creating new actions.
     43 *
     44 * <h3>Introducing new actions</h3>
     45 *
     46 * Let us now introduce what to do if a new action is to be implemented. Here, we use the
     47 * CommandLineVersionAction as an example.
     48 * This consists if basically three parts:
     49 * 1. Create the files, write the classes and make them compilable
     50 *   - Create new source and header files in one of the above subfolders in the Actions folder,
     51 *     e.g. create VersionAction.cpp and VersionAction.hpp in Actions/Cmd/
     52 *   - Give it a sensible class name, the convention is <type><what it does>Action,
     53 *     where <type> is basically the naming (written out) of the subdirectory,
     54 *     e.g. class CommandLineVersionAction.
     55 *   - Add the source and header file to the respective variables in molecuilder/src/Makefile.am,
     56 *     e.g. if you add a Cmd action the variables are CMDACTIONSOURCE and CMDACTIONHEADER,
     57 *     such that they get compiled.
     58 * 2. Add an instance to the CommandLineUIFactory, such that they are known to the UI.
     59 *   - Add the header file as an include to UIElements/CommandLineWindow.cpp, e.g.
     60 *     #include "Actions/Cmd/VersionAction.hpp"
     61 *   - Add an instance of your class to the specific populater-function in
     62 *     UIElements/CommandLineWindow.cpp, e.g. for the above Cmd action, add to populateCmdActions()
     63 *     add new CommandLineVersionAction().
     64 *     This will automatically register in the ActionRegistry.
     65 * 3. Give them an option name, short hand an description, such that they can be referenced from
     66 *    the command line.
     67 *   - think of a new key name, e.g. "version", which is the long form of the command parameter,
     68 *     i.e. --version).
     69 *   - add this key to every map of MapofActions, i.e. to
     70 *     - MapofActions::DescriptionMap: the description which appears as help and tooltip
     71 *     - MapofActions::ShortFormMap: the short form of the command parameter (e.g. -v)
     72 *     - MapofActions::ValueMap: the value the command parameter has (do not create if it does not need one)
     73 *   - If your action requires additional parameters, these need to be added in the same manner as in
     74 *     the list item above.
     75 *
     76 *  Don't forget to write the actual code. :)
     77 *
     78 * <h3>Writing an action</h3>
     79 *
     80 *  As you write a new action you may think in terms of the command line, i.e. you want to use this
     81 *  new functionality you add by calling molecuilder as: ./molecuilder --super-action foobar.txt, where
     82 *  the key of your new action would be "super-action". While this is fine, keep in mind, that your action
     83 *  should be useable for the other UI specializations as well, i.e. from the menu and the GUI. Therefore,
     84 *  -# Don't use cin to ask the user for input: Use Query...()!
     85 *  -# Rather don't use cout/cerrs, but either give Log() or eLog() or use QueryEmpty() if you want to give
     86 *     the user specific information what you ask of him.
     87 *
     88 */
    1989class CommandLineParser : public Singleton<CommandLineParser> {
    2090  friend class Singleton<CommandLineParser>;
  • src/Parser/FormatParserStorage.cpp

    r51a5c8 r56fb09  
    3838{
    3939  ParserList.resize(ParserTypes_end, NULL);
     40  ParserStream.resize(ParserTypes_end, NULL);
    4041  ParserPresent.resize(ParserTypes_end, false);
    4142  ParserSuffix.resize(ParserTypes_end, "");
     
    5455{
    5556  for (ParserTypes iter = ParserTypes_begin; iter < ParserTypes_end; ++iter)
    56     if (ParserPresent[iter])
     57    if (ParserPresent[iter]) {
     58      if (ParserStream[iter]->is_open())
     59        ParserStream[iter]->close();
     60      delete ParserStream[iter];
    5761      delete ParserList[iter];
     62    }
    5863}
    5964
     
    7580      filename += ".";
    7681      filename += ParserSuffix[iter];
    77       std::ofstream *file = new std::ofstream(filename.c_str());
    78       ParserList[iter]->setOstream((std::ostream *)file);
     82      ParserStream[iter] = new std::ofstream(filename.c_str());
     83      ParserList[iter]->setOstream((std::ostream *)ParserStream[iter]);
    7984    }
    8085}
  • src/Parser/FormatParserStorage.hpp

    r51a5c8 r56fb09  
    5757  std::vector<FormatParser *> ParserList;
    5858
     59  // list of allocated strams
     60  std::vector<std::ofstream *> ParserStream;
     61
    5962  // which parser is already present
    6063  std::vector<bool> ParserPresent;
  • src/Parser/PcpParser.cpp

    r51a5c8 r56fb09  
    8888  IsAngstroem = 1;
    8989  RelativeCoord = 0;
     90  StructOpt = 0;
    9091  MaxTypes = 0;
    9192}
  • src/UIElements/CommandLineUI/CommandLineUIFactory.hpp

    r51a5c8 r56fb09  
    1111#include "UIFactory.hpp"
    1212
     13/** This class is a specialization of the UIFactory.
     14 *
     15 * <h2> Introduction </h2>
     16 *
     17 * The UIFactory is a base class for the User Interaction. There are three UI specializations:
     18 * Text, GUI and CommandLine.
     19 *
     20 * The idea of the command line part is as follows:
     21 *
     22 * All actions that can be called from the command line are instantiated via populater-functions.
     23 * In the constructor of an action it is automatically registered with the ActionRegistry and can
     24 * henceforth be looked up there.
     25 *
     26 * There is a CommandLineParser which parses the command line parameters and puts all found values
     27 * into a map. Then, MainWindow::Display of the CommandLineUIFactory is called, which goes through
     28 * every action (by the ActionRegistry) and looks through the parsed commands whether the action is
     29 * desired.
     30 *
     31 * In the action itself, Query's ask for user input. In the CommandLine case, we don't want direct
     32 * user interaction, but the user has to have those values already delivered along with the desired
     33 * action. Hence, the Query implementations just look up the desired values in the CommandLineParser
     34 * vaults. When they are not found, an exception is thrown. When all are found, the action is performed.
     35 *
     36 */
    1337class CommandLineUIFactory : public UIFactory
    1438{
  • src/UIElements/Dialog.hpp

    r51a5c8 r56fb09  
    1818class Vector;
    1919
     20
     21/** Dialog is one of the two main classes of the UIFactory base class.
     22 *
     23 * The Dialog is meant for asking the user for information needed to perform actions he
     24 * desires, such as asking for a position in space or a length.
     25 *
     26 * For this purpose there is the base class Query and numerous specializations for each
     27 * of the types to be asked. There are primitives integer, doubles and string, but also
     28 * advanced types such as element, molecule or Vector. There is also an empty query for
     29 * displaying text.
     30 */
    2031class Dialog
    2132{
  • src/UIElements/TextUI/TextWindow.cpp

    r51a5c8 r56fb09  
    77
    88#include "Helpers/MemDebug.hpp"
    9 
    10 #include "TextUI/TextWindow.hpp"
    119
    1210#include <boost/bind.hpp>
     
    1917#include "Menu/SubMenuItem.hpp"
    2018#include "TextUI/TextStatusIndicator.hpp"
     19#include "TextUI/TextWindow.hpp"
    2120#include "Actions/MapOfActions.hpp"
    2221#include "Actions/MethodAction.hpp"
     
    4039#include <iostream>
    4140#include <map>
    42 
    43 using namespace std;
    4441
    4542// TODO: see what code can be moved to a base class for Graphic and Text Windows
     
    110107}
    111108
    112 char TextWindow::getSuitableShortForm(set <char> &ShortcutList, const std::string name) const
     109char TextWindow::getSuitableShortForm(std::set <char> &ShortcutList, const std::string name) const
    113110{
    114111  for (std::string::const_iterator CharRunner = name.begin(); CharRunner != name.end(); ++CharRunner) {
  • src/UIElements/TextUI/TextWindow.hpp

    r51a5c8 r56fb09  
    2727
    2828  virtual void display();
     29
    2930private:
    3031  // populaters
  • src/UIElements/UIFactory.hpp

    r51a5c8 r56fb09  
    2525 * only create UIelements of that certain type, so that all UIElements match. This way different
    2626 * UIs can be handled in a concise abstract way.
     27 *
     28 * The main functionality is the MainWindow and the Dialog.
     29 *
     30 * MainWindow basically is the framework if the UI. The MainWindow has a run function which is
     31 * called MainWindow::Display(), which will listen for user input and react to it via actions for
     32 * as long as the user desires or tells the MainWindow to quit.
     33 *
     34 * Within the MainWindow Dialog classes may be instantiated which ask the user for input to
     35 * certain actions he wants to perform.
     36 *
    2737 */
    2838class UIFactory : public Singleton<UIFactory,false>
  • src/atom_trajectoryparticle.cpp

    r51a5c8 r56fb09  
    106106 * \param *Force matrix with forces
    107107 */
    108 void TrajectoryParticle::VelocityVerletUpdate(int NextStep, config *configuration, ForceMatrix *Force)
     108void TrajectoryParticle::VelocityVerletUpdate(int NextStep, config *configuration, ForceMatrix *Force, const size_t offset)
    109109{
    110110  //a = configuration.Deltat*0.5/walker->type->mass;        // (F+F_old)/2m = a and thus: v = (F+F_old)/2m * t = (F + F_old) * a
    111111  for (int d=0; d<NDIM; d++) {
    112     Trajectory.F.at(NextStep)[d] = -Force->Matrix[0][nr][d+5]*(configuration->GetIsAngstroem() ? AtomicLengthToAngstroem : 1.);
     112    Trajectory.F.at(NextStep)[d] = -Force->Matrix[0][nr][d+offset]*(configuration->GetIsAngstroem() ? AtomicLengthToAngstroem : 1.);
    113113    Trajectory.R.at(NextStep)[d] = Trajectory.R.at(NextStep-1)[d];
    114114    Trajectory.R.at(NextStep)[d] += configuration->Deltat*(Trajectory.U.at(NextStep-1)[d]);     // s(t) = s(0) + v * deltat + 1/2 a * deltat^2
  • src/atom_trajectoryparticle.hpp

    r51a5c8 r56fb09  
    5050  void ResizeTrajectory(int MaxSteps);
    5151  void CopyStepOnStep(int dest, int src);
    52   void VelocityVerletUpdate(int MDSteps, config *configuration, ForceMatrix *Force);
     52  void VelocityVerletUpdate(int MDSteps, config *configuration, ForceMatrix *Force, const size_t offset);
    5353  void SumUpKineticEnergy( int Step, double *TotalMass, Vector *TotalVelocity ) const;
    5454
  • src/molecule.hpp

    r51a5c8 r56fb09  
    279279  void SetBoxDimension(Vector *dim);
    280280  void ScanForPeriodicCorrection();
    281   bool VerletForceIntegration(char *file, config &configuration);
     281  bool VerletForceIntegration(char *file, config &configuration, const size_t offset);
    282282  void Thermostats(config &configuration, double ActualTemp, int Thermostat);
    283283  void PrincipalAxisSystem(bool DoRotate);
  • src/molecule_dynamics.cpp

    r51a5c8 r56fb09  
    540540 * have to transform them).
    541541 * This adds a new MD step to the config file.
    542  * \param *out output stream for debugging
    543542 * \param *file filename
    544543 * \param config structure with config::Deltat, config::IsAngstroem, config::DoConstrained
    545  * \param delta_t time step width in atomic units
    546  * \param IsAngstroem whether coordinates are in angstroem (true) or bohrradius (false)
    547  * \param DoConstrained whether we perform a constrained (>0, target step in molecule::trajectories) or unconstrained (0) molecular dynamics, \sa molecule::MinimiseConstrainedPotential()
     544 * \param offset offset in matrix file to the first force component
    548545 * \return true - file found and parsed, false - file not found or imparsable
    549546 * \todo This is not yet checked if it is correctly working with DoConstrained set to true.
    550547 */
    551 bool molecule::VerletForceIntegration(char *file, config &configuration)
     548bool molecule::VerletForceIntegration(char *file, config &configuration, const size_t offset)
    552549{
    553550  Info FunctionInfo(__func__);
     
    561558  CountElements();  // make sure ElementsInMolecule is up to date
    562559
     560  const int AtomCount = getAtomCount();
    563561  // check file
    564562  if (input == NULL) {
     
    571569      return false;
    572570    }
    573     if (Force.RowCounter[0] != getAtomCount()) {
     571    if (Force.RowCounter[0] != AtomCount) {
    574572      DoeLog(0) && (eLog()<< Verbose(0) << "Mismatch between number of atoms in file " << Force.RowCounter[0] << " and in molecule " << getAtomCount() << "." << endl);
    575573      performCriticalExit();
     
    578576    // correct Forces
    579577    Velocity.Zero();
    580     for(int i=0;i<getAtomCount();i++)
     578    for(int i=0;i<AtomCount;i++)
    581579      for(int d=0;d<NDIM;d++) {
    582         Velocity[d] += Force.Matrix[0][i][d+5];
     580        Velocity[d] += Force.Matrix[0][i][d+offset];
    583581      }
    584     for(int i=0;i<getAtomCount();i++)
     582    for(int i=0;i<AtomCount;i++)
    585583      for(int d=0;d<NDIM;d++) {
    586         Force.Matrix[0][i][d+5] -= Velocity[d]/static_cast<double>(getAtomCount());
     584        Force.Matrix[0][i][d+offset] -= Velocity[d]/static_cast<double>(AtomCount);
    587585      }
    588586    // solve a constrained potential if we are meant to
     
    599597    //ActOnAllAtoms( &atom::ResizeTrajectory, MDSteps+10 );
    600598
    601     ActOnAllAtoms( &atom::VelocityVerletUpdate, MDSteps+1, &configuration, &Force);
     599    ActOnAllAtoms( &atom::VelocityVerletUpdate, MDSteps+1, &configuration, &Force, (const size_t) 0);
    602600  }
    603601  // correct velocities (rather momenta) so that center of mass remains motionless
  • src/molecule_geometry.cpp

    r51a5c8 r56fb09  
    4545  delete[](Minv);
    4646  delete(Center);
     47  delete(CenterBox);
    4748  return status;
    4849};
  • src/parser.cpp

    r51a5c8 r56fb09  
    7676MatrixContainer::~MatrixContainer() {
    7777  if (Matrix != NULL) {
     78    // free Matrix[MatrixCounter]
     79    if ((ColumnCounter != NULL) && (RowCounter != NULL) && (Matrix[MatrixCounter] != NULL))
     80      for(int j=RowCounter[MatrixCounter]+1;j--;)
     81        delete[](Matrix[MatrixCounter][j]);
     82    //if (MatrixCounter != 0)
     83    delete[](Matrix[MatrixCounter]);
     84    // free all matrices but ultimate one
    7885    for(int i=MatrixCounter;i--;) {
    7986      if ((ColumnCounter != NULL) && (RowCounter != NULL)) {
     
    8390      }
    8491    }
    85     if ((ColumnCounter != NULL) && (RowCounter != NULL) && (Matrix[MatrixCounter] != NULL))
    86       for(int j=RowCounter[MatrixCounter]+1;j--;)
    87         delete[](Matrix[MatrixCounter][j]);
    88     if (MatrixCounter != 0)
    89       delete[](Matrix[MatrixCounter]);
    9092    delete[](Matrix);
    9193  }
     94  // free indices
    9295  if (Indices != NULL)
    9396    for(int i=MatrixCounter+1;i--;) {
     
    9699  delete[](Indices);
    97100 
     101  // free header and counters
    98102  if (Header != NULL)
    99103    for(int i=MatrixCounter+1;i--;)
     
    168172
    169173  // parse header
     174  if (Header[MatrixNr] != NULL)
     175    delete[] Header[MatrixNr];
    170176  Header[MatrixNr] = new char[1024];
    171177  for (int m=skiplines+1;m--;)
     
    207213  // allocate matrix if it's not zero dimension in one direction
    208214  if ((ColumnCounter[MatrixNr] > 0) && (RowCounter[MatrixNr] > -1)) {
     215    if (Matrix[MatrixNr] != NULL)
     216      delete[] Matrix[MatrixNr];
    209217    Matrix[MatrixNr] = new double*[RowCounter[MatrixNr] + 1];
    210  
     218    for(int j=0;j<RowCounter[MatrixNr]+1;j++)
     219      Matrix[MatrixNr][j] = 0;
     220
    211221    // parse in each entry for this matrix
    212222    input.clear();
     
    219229    strncpy(Header[MatrixNr], line.str().c_str(), 1023); 
    220230    for(int j=0;j<RowCounter[MatrixNr];j++) {
     231      if (Matrix[MatrixNr][j] != NULL)
     232        delete[] Matrix[MatrixNr][j];
    221233      Matrix[MatrixNr][j] = new double[ColumnCounter[MatrixNr]];
     234      for(int k=0;k<ColumnCounter[MatrixNr];k++)
     235        Matrix[MatrixNr][j][k] = 0;
     236
    222237      input.getline(filename, 1023);
    223238      stringstream lines(filename);
     
    229244        //Log() << Verbose(1) << " " << setprecision(2) << Matrix[MatrixNr][j][k] << endl;
    230245      }
     246      if (Matrix[MatrixNr][ RowCounter[MatrixNr] ] != NULL)
     247        delete[] Matrix[MatrixNr][ RowCounter[MatrixNr] ];
    231248      Matrix[MatrixNr][ RowCounter[MatrixNr] ] = new double[ColumnCounter[MatrixNr]];
    232249      for(int j=ColumnCounter[MatrixNr];j--;)
  • src/tesselationhelpers.cpp

    r51a5c8 r56fb09  
    179179        Info FunctionInfo(__func__);
    180180  Vector helper;
    181   double alpha, beta, gamma;
    182181  Vector SideA = b - c;
    183182  Vector SideB = c - a;
    184183  Vector SideC = a - b;
    185   alpha = M_PI - SideB.Angle(SideC);
    186   beta = M_PI - SideC.Angle(SideA);
    187   gamma = M_PI - SideA.Angle(SideB);
    188   Log() << Verbose(1) << "INFO: alpha = " << alpha/M_PI*180. << ", beta = " << beta/M_PI*180. << ", gamma = " << gamma/M_PI*180. << "." << endl;
    189   if (fabs(M_PI - alpha - beta - gamma) > HULLEPSILON) {
    190     DoeLog(2) && (eLog()<< Verbose(2) << "GetCenterofCircumcircle: Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - gamma)/M_PI*180. << "!" << endl);
    191   }
    192 
    193   Center->Zero();
    194   helper = sin(2.*alpha) * a;
    195   (*Center) += helper;
    196   helper = sin(2.*beta) * b;
    197   (*Center) += helper;
    198   helper = sin(2.*gamma) * c;
    199   (*Center) += helper;
    200   Center->Scale(1./(sin(2.*alpha) + sin(2.*beta) + sin(2.*gamma)));
    201   Log() << Verbose(1) << "INFO: Center (1st algo) is at " << *Center << "." << endl;
    202 
    203 //  LinearSystemOfEquations LSofEq(NDIM,NDIM);
    204 //  double *matrix = new double[NDIM*NDIM];
    205 //  matrix[0] = 0.;
    206 //  matrix[1] = a.DistanceSquared(b);
    207 //  matrix[2] = a.DistanceSquared(c);
    208 //  matrix[3] = a.DistanceSquared(b);
    209 //  matrix[4] = 0.;
    210 //  matrix[5] = b.DistanceSquared(c);
    211 //  matrix[6] = a.DistanceSquared(c);
    212 //  matrix[7] = b.DistanceSquared(c);
    213 //  matrix[8] = 0.;
    214 //  cout << "Matrix is: ";
    215 //  for (int i=0;i<NDIM*NDIM;i++)
    216 //    cout << matrix[i] << "\t";
    217 //  cout << endl;
    218 //  LSofEq.SetA(matrix);
    219 //  delete[](matrix);
    220 //  LSofEq.Setb(new Vector(1.,1.,1.));
    221 //  LSofEq.SetSymmetric(true);
    222 //  helper.Zero();
    223 //  if (!LSofEq.GetSolutionAsVector(helper)) {
    224 //    DoLog(0) && (eLog()<< Verbose(0) << "Could not solve the linear system in GetCenterofCircumCircle()!" << endl);
    225 //  }
    226 //  cout << "Solution is " << helper << endl;
    227   // is equivalent to the three lines below
     184
    228185  helper[0] = SideA.NormSquared()*(SideB.NormSquared()+SideC.NormSquared() - SideA.NormSquared());
    229186  helper[1] = SideB.NormSquared()*(SideC.NormSquared()+SideA.NormSquared() - SideB.NormSquared());
  • tests/regression/testsuite-molecules.at

    r51a5c8 r56fb09  
    3737AT_KEYWORDS([Molecules])
    3838AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/5/pre/test.* .], 0)
    39 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -P test.forces --molecule-by-id 0], 134, [stdout], [stderr])
     39AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -P test.forces --molecule-by-id 0], 0, [stdout], [stderr])
    4040#AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/5/post/$file], 0, [ignore], [ignore])
    4141AT_CLEANUP
Note: See TracChangeset for help on using the changeset viewer.