Changeset 56fb09
- Timestamp:
- Jun 30, 2010, 8:35:38 AM (15 years ago)
- 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. - Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/MoleculeAction/VerletIntegrationAction.cpp
r51a5c8 r56fb09 62 62 char outputname[MAXSTRINGSIZE]; 63 63 strcpy(outputname, filename.c_str()); 64 if (!mol->VerletForceIntegration(outputname, *(World::getInstance().getConfig()) ))64 if (!mol->VerletForceIntegration(outputname, *(World::getInstance().getConfig()), 0)) 65 65 DoLog(2) && (Log() << Verbose(2) << "File not found." << endl); 66 66 else -
src/CommandLineParser.hpp
r51a5c8 r56fb09 17 17 #include <list> 18 18 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 */ 19 89 class CommandLineParser : public Singleton<CommandLineParser> { 20 90 friend class Singleton<CommandLineParser>; -
src/Parser/FormatParserStorage.cpp
r51a5c8 r56fb09 38 38 { 39 39 ParserList.resize(ParserTypes_end, NULL); 40 ParserStream.resize(ParserTypes_end, NULL); 40 41 ParserPresent.resize(ParserTypes_end, false); 41 42 ParserSuffix.resize(ParserTypes_end, ""); … … 54 55 { 55 56 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]; 57 61 delete ParserList[iter]; 62 } 58 63 } 59 64 … … 75 80 filename += "."; 76 81 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]); 79 84 } 80 85 } -
src/Parser/FormatParserStorage.hpp
r51a5c8 r56fb09 57 57 std::vector<FormatParser *> ParserList; 58 58 59 // list of allocated strams 60 std::vector<std::ofstream *> ParserStream; 61 59 62 // which parser is already present 60 63 std::vector<bool> ParserPresent; -
src/Parser/PcpParser.cpp
r51a5c8 r56fb09 88 88 IsAngstroem = 1; 89 89 RelativeCoord = 0; 90 StructOpt = 0; 90 91 MaxTypes = 0; 91 92 } -
src/UIElements/CommandLineUI/CommandLineUIFactory.hpp
r51a5c8 r56fb09 11 11 #include "UIFactory.hpp" 12 12 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 */ 13 37 class CommandLineUIFactory : public UIFactory 14 38 { -
src/UIElements/Dialog.hpp
r51a5c8 r56fb09 18 18 class Vector; 19 19 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 */ 20 31 class Dialog 21 32 { -
src/UIElements/TextUI/TextWindow.cpp
r51a5c8 r56fb09 7 7 8 8 #include "Helpers/MemDebug.hpp" 9 10 #include "TextUI/TextWindow.hpp"11 9 12 10 #include <boost/bind.hpp> … … 19 17 #include "Menu/SubMenuItem.hpp" 20 18 #include "TextUI/TextStatusIndicator.hpp" 19 #include "TextUI/TextWindow.hpp" 21 20 #include "Actions/MapOfActions.hpp" 22 21 #include "Actions/MethodAction.hpp" … … 40 39 #include <iostream> 41 40 #include <map> 42 43 using namespace std;44 41 45 42 // TODO: see what code can be moved to a base class for Graphic and Text Windows … … 110 107 } 111 108 112 char TextWindow::getSuitableShortForm(s et <char> &ShortcutList, const std::string name) const109 char TextWindow::getSuitableShortForm(std::set <char> &ShortcutList, const std::string name) const 113 110 { 114 111 for (std::string::const_iterator CharRunner = name.begin(); CharRunner != name.end(); ++CharRunner) { -
src/UIElements/TextUI/TextWindow.hpp
r51a5c8 r56fb09 27 27 28 28 virtual void display(); 29 29 30 private: 30 31 // populaters -
src/UIElements/UIFactory.hpp
r51a5c8 r56fb09 25 25 * only create UIelements of that certain type, so that all UIElements match. This way different 26 26 * 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 * 27 37 */ 28 38 class UIFactory : public Singleton<UIFactory,false> -
src/atom_trajectoryparticle.cpp
r51a5c8 r56fb09 106 106 * \param *Force matrix with forces 107 107 */ 108 void TrajectoryParticle::VelocityVerletUpdate(int NextStep, config *configuration, ForceMatrix *Force )108 void TrajectoryParticle::VelocityVerletUpdate(int NextStep, config *configuration, ForceMatrix *Force, const size_t offset) 109 109 { 110 110 //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 111 111 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.); 113 113 Trajectory.R.at(NextStep)[d] = Trajectory.R.at(NextStep-1)[d]; 114 114 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 50 50 void ResizeTrajectory(int MaxSteps); 51 51 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); 53 53 void SumUpKineticEnergy( int Step, double *TotalMass, Vector *TotalVelocity ) const; 54 54 -
src/molecule.hpp
r51a5c8 r56fb09 279 279 void SetBoxDimension(Vector *dim); 280 280 void ScanForPeriodicCorrection(); 281 bool VerletForceIntegration(char *file, config &configuration );281 bool VerletForceIntegration(char *file, config &configuration, const size_t offset); 282 282 void Thermostats(config &configuration, double ActualTemp, int Thermostat); 283 283 void PrincipalAxisSystem(bool DoRotate); -
src/molecule_dynamics.cpp
r51a5c8 r56fb09 540 540 * have to transform them). 541 541 * This adds a new MD step to the config file. 542 * \param *out output stream for debugging543 542 * \param *file filename 544 543 * \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 548 545 * \return true - file found and parsed, false - file not found or imparsable 549 546 * \todo This is not yet checked if it is correctly working with DoConstrained set to true. 550 547 */ 551 bool molecule::VerletForceIntegration(char *file, config &configuration )548 bool molecule::VerletForceIntegration(char *file, config &configuration, const size_t offset) 552 549 { 553 550 Info FunctionInfo(__func__); … … 561 558 CountElements(); // make sure ElementsInMolecule is up to date 562 559 560 const int AtomCount = getAtomCount(); 563 561 // check file 564 562 if (input == NULL) { … … 571 569 return false; 572 570 } 573 if (Force.RowCounter[0] != getAtomCount()) {571 if (Force.RowCounter[0] != AtomCount) { 574 572 DoeLog(0) && (eLog()<< Verbose(0) << "Mismatch between number of atoms in file " << Force.RowCounter[0] << " and in molecule " << getAtomCount() << "." << endl); 575 573 performCriticalExit(); … … 578 576 // correct Forces 579 577 Velocity.Zero(); 580 for(int i=0;i< getAtomCount();i++)578 for(int i=0;i<AtomCount;i++) 581 579 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]; 583 581 } 584 for(int i=0;i< getAtomCount();i++)582 for(int i=0;i<AtomCount;i++) 585 583 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); 587 585 } 588 586 // solve a constrained potential if we are meant to … … 599 597 //ActOnAllAtoms( &atom::ResizeTrajectory, MDSteps+10 ); 600 598 601 ActOnAllAtoms( &atom::VelocityVerletUpdate, MDSteps+1, &configuration, &Force );599 ActOnAllAtoms( &atom::VelocityVerletUpdate, MDSteps+1, &configuration, &Force, (const size_t) 0); 602 600 } 603 601 // correct velocities (rather momenta) so that center of mass remains motionless -
src/molecule_geometry.cpp
r51a5c8 r56fb09 45 45 delete[](Minv); 46 46 delete(Center); 47 delete(CenterBox); 47 48 return status; 48 49 }; -
src/parser.cpp
r51a5c8 r56fb09 76 76 MatrixContainer::~MatrixContainer() { 77 77 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 78 85 for(int i=MatrixCounter;i--;) { 79 86 if ((ColumnCounter != NULL) && (RowCounter != NULL)) { … … 83 90 } 84 91 } 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]);90 92 delete[](Matrix); 91 93 } 94 // free indices 92 95 if (Indices != NULL) 93 96 for(int i=MatrixCounter+1;i--;) { … … 96 99 delete[](Indices); 97 100 101 // free header and counters 98 102 if (Header != NULL) 99 103 for(int i=MatrixCounter+1;i--;) … … 168 172 169 173 // parse header 174 if (Header[MatrixNr] != NULL) 175 delete[] Header[MatrixNr]; 170 176 Header[MatrixNr] = new char[1024]; 171 177 for (int m=skiplines+1;m--;) … … 207 213 // allocate matrix if it's not zero dimension in one direction 208 214 if ((ColumnCounter[MatrixNr] > 0) && (RowCounter[MatrixNr] > -1)) { 215 if (Matrix[MatrixNr] != NULL) 216 delete[] Matrix[MatrixNr]; 209 217 Matrix[MatrixNr] = new double*[RowCounter[MatrixNr] + 1]; 210 218 for(int j=0;j<RowCounter[MatrixNr]+1;j++) 219 Matrix[MatrixNr][j] = 0; 220 211 221 // parse in each entry for this matrix 212 222 input.clear(); … … 219 229 strncpy(Header[MatrixNr], line.str().c_str(), 1023); 220 230 for(int j=0;j<RowCounter[MatrixNr];j++) { 231 if (Matrix[MatrixNr][j] != NULL) 232 delete[] Matrix[MatrixNr][j]; 221 233 Matrix[MatrixNr][j] = new double[ColumnCounter[MatrixNr]]; 234 for(int k=0;k<ColumnCounter[MatrixNr];k++) 235 Matrix[MatrixNr][j][k] = 0; 236 222 237 input.getline(filename, 1023); 223 238 stringstream lines(filename); … … 229 244 //Log() << Verbose(1) << " " << setprecision(2) << Matrix[MatrixNr][j][k] << endl; 230 245 } 246 if (Matrix[MatrixNr][ RowCounter[MatrixNr] ] != NULL) 247 delete[] Matrix[MatrixNr][ RowCounter[MatrixNr] ]; 231 248 Matrix[MatrixNr][ RowCounter[MatrixNr] ] = new double[ColumnCounter[MatrixNr]]; 232 249 for(int j=ColumnCounter[MatrixNr];j--;) -
src/tesselationhelpers.cpp
r51a5c8 r56fb09 179 179 Info FunctionInfo(__func__); 180 180 Vector helper; 181 double alpha, beta, gamma;182 181 Vector SideA = b - c; 183 182 Vector SideB = c - a; 184 183 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 228 185 helper[0] = SideA.NormSquared()*(SideB.NormSquared()+SideC.NormSquared() - SideA.NormSquared()); 229 186 helper[1] = SideB.NormSquared()*(SideC.NormSquared()+SideA.NormSquared() - SideB.NormSquared()); -
tests/regression/testsuite-molecules.at
r51a5c8 r56fb09 37 37 AT_KEYWORDS([Molecules]) 38 38 AT_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])39 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -P test.forces --molecule-by-id 0], 0, [stdout], [stderr]) 40 40 #AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/5/post/$file], 0, [ignore], [ignore]) 41 41 AT_CLEANUP
Note:
See TracChangeset
for help on using the changeset viewer.