- Timestamp:
- Dec 23, 2010, 5:40:04 PM (14 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:
- ad011c
- Parents:
- f28a26
- git-author:
- Frederik Heber <heber@…> (12/22/10 09:18:48)
- git-committer:
- Frederik Heber <heber@…> (12/23/10 17:40:04)
- Location:
- src
- Files:
-
- 41 deleted
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src 5 5 6 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl 7 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 9 8 10 9 ACTIONSSOURCE = \ -
src/Actions/unittests/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src 5 5 6 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl 7 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 9 8 10 9 TESTS = \ … … 21 20 ../../LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 22 21 ../../Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 23 ../../Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\22 ${CodePatterns_LIBS} \ 24 23 $(BOOST_LIB) 25 24 ALLLIBS = \ -
src/Descriptors/AtomOfMoleculeSelectionDescriptor.cpp
rf28a26 ra0064e 26 26 27 27 #include "Helpers/helpers.hpp" 28 28 29 29 30 AtomOfMoleculeSelectionDescriptor_impl::AtomOfMoleculeSelectionDescriptor_impl(){} -
src/Descriptors/unittests/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src 5 5 6 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl 7 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 9 8 10 9 TESTS = \ … … 19 18 ../../LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 20 19 ../../Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 21 ../../Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\20 ${CodePatterns_LIBS} \ 22 21 $(BOOST_LIB) 23 22 ALLLIBS = \ -
src/Exceptions/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src 5 5 6 AM_LDFLAGS = $ (CPPUNIT_LIBS) -ldl6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 7 7 # Position-Independent Code necessary for shared library 8 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 9 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 10 9 11 10 EXCEPTIONSOURCE = \ -
src/Formula.hpp
rf28a26 ra0064e 18 18 #include "Helpers/helpers.hpp" 19 19 20 #include "Helpers/enumeration.hpp" 21 20 22 class element; 23 21 24 22 25 class Formula -
src/Helpers/fast_functions.hpp
rf28a26 ra0064e 51 51 }; 52 52 53 /** Returns the power of \a n with respect to \a base.54 * \param base basis55 * \param n power56 * \return \f$base^n\f$57 */58 inline int pot(int base, int n)59 {60 int res = 1;61 int j;62 for (j=n;j--;)63 res *= base;64 return res;65 };66 67 /*************************** Templatized functions ************************************/68 69 /** Flips two values.70 * \param x first value71 * \param y second value72 */73 template <typename T>74 inline void flip(T &x, T &y)75 {76 T tmp;77 tmp = x;78 x = y;79 y = tmp;80 };81 53 82 54 #endif /* FAST_FUNCTIONS_HPP_ */ -
src/Helpers/helpers.cpp
-
Property mode
changed from
100755
to100644
rf28a26 ra0064e 28 28 29 29 30 /** Asks for a double value and checks input31 * \param *text question32 */33 double ask_value(const char *text)34 {35 double test = 0.1439851348959832147598734598273456723948652983045928346598365;36 do {37 DoLog(0) && (Log() << Verbose(0) << text);38 cin >> test;39 } while (test == 0.1439851348959832147598734598273456723948652983045928346598365);40 return test;41 };42 43 30 /** Output of a debug message to stderr. 44 31 * \param *P Problem at hand, points to ParallelSimulationData#me … … 53 40 #endif 54 41 55 /** modulo operator for doubles.56 * \param *b pointer to double57 * \param lower_bound lower bound58 * \param upper_bound upper bound59 */60 void bound(double *b, double lower_bound, double upper_bound)61 {62 double step = (upper_bound - lower_bound);63 while (*b >= upper_bound)64 *b -= step;65 while (*b < lower_bound)66 *b += step;67 };68 69 /** Counts lines in file.70 * Note we are scanning lines from current position, not from beginning.71 * \param InputFile file to be scanned.72 */73 int CountLinesinFile(ifstream &InputFile)74 {75 char *buffer = new char[MAXSTRINGSIZE];76 int lines=0;77 78 int PositionMarker = InputFile.tellg(); // not needed as Inputfile is copied, given by value, not by ref79 // count the number of lines, i.e. the number of fragments80 InputFile.getline(buffer, MAXSTRINGSIZE); // skip comment lines81 InputFile.getline(buffer, MAXSTRINGSIZE);82 while(!InputFile.eof()) {83 InputFile.getline(buffer, MAXSTRINGSIZE);84 lines++;85 }86 InputFile.seekg(PositionMarker, ios::beg);87 delete[](buffer);88 return lines;89 };90 42 91 43 /** Returns a string with \a i prefixed with 0s to match order of total number of molecules in digits. … … 117 69 }; 118 70 119 /** Tests whether a given string contains a valid number or not.120 * \param *string121 * \return true - is a number, false - is not a valid number122 */123 bool IsValidNumber( const char *string)124 {125 int ptr = 0;126 if ((string[ptr] == '.') || (string[ptr] == '-')) // number may be negative or start with dot127 ptr++;128 if ((string[ptr] >= '0') && (string[ptr] <= '9'))129 return true;130 return false;131 };132 133 /** Comparison function for GSL heapsort on distances in two molecules.134 * \param *a135 * \param *b136 * \return <0, \a *a less than \a *b, ==0 if equal, >0 \a *a greater than \a *b137 */138 int CompareDoubles (const void * a, const void * b)139 {140 if (*(double *)a > *(double *)b)141 return -1;142 else if (*(double *)a < *(double *)b)143 return 1;144 else145 return 0;146 };147 148 149 71 /** 150 72 * Calls exit(255). -
Property mode
changed from
-
src/Helpers/helpers.hpp
rf28a26 ra0064e 50 50 } sign_t; 51 51 52 double ask_value(const char *text);53 bool check_bounds(double *x, double *cell_size);54 void bound(double *b, double lower_bound, double upper_bound);55 int CountLinesinFile(ifstream &InputFile);56 52 char *FixedDigitNumber(const int FragmentNumber, const int digits); 57 bool IsValidNumber( const char *string);58 int CompareDoubles (const void * a, const void * b);59 53 void performCriticalExit(); 60 54 sign_t sign(double value); … … 62 56 /********************************************** helpful template functions *********************************/ 63 57 64 65 /** returns greater of the two values.66 * \param x first value67 * \param y second value68 * \return greater of the two (by operator>())69 */70 template <typename T> T Max(T x, T y)71 {72 if (x > y)73 return x;74 else return y;75 };76 77 /** returns smaller of the two values.78 * \param x first value79 * \param y second value80 * \return smaller of the two (by operator<())81 */82 template <typename T> T Min(T x, T y)83 {84 if (x < y)85 return x;86 else return y;87 };88 58 89 59 /** Creates a lookup table for true father's Atom::Nr -> atom ptr. … … 144 114 145 115 146 /** Frees a two-dimensional array.147 * \param *ptr pointer to array148 * \param dim first dim of array149 */150 template <typename X> void Free2DArray(X **ptr, int dim)151 {152 int i;153 if (ptr != NULL) {154 for(i=dim;i--;)155 if (ptr[i] != NULL)156 free(ptr[i]);157 free(ptr);158 }159 };160 161 template <typename T> void Increment(T *value, T *inc)162 {163 *value += *inc;164 };165 166 template <typename T> void AbsoluteValue(T *value, T *abs)167 {168 *value = *abs;169 };170 171 template <typename T> void IncrementalAbsoluteValue(T *value, T *abs)172 {173 *value = *abs;174 (*abs) += 1;175 };176 177 116 #define PLURAL_S(v) (((v)==1)?"":"s") 178 117 … … 201 140 }; 202 141 203 /************ struct to contain simple enumerations ***************/204 template <class C>205 struct enumeration{206 enumeration() : max(0) {}207 enumeration(unsigned int i) : max(i) {}208 enumeration(const enumeration &src) :209 there(src.there),210 back(src.back),211 max(src.max)212 {}213 enumeration &operator=(const enumeration &src){214 /* no self-assignment check needed */215 there = src.there;216 back = src.back;217 max = src.max;218 return *this;219 }220 void add(const C &value){221 if(!there.count(value)){222 there[value]=max;223 back[max++]=value;224 }225 }226 unsigned int getMax() const{227 return max;228 }229 230 map<C,unsigned int> there;231 map<unsigned int,C> back;232 private:233 unsigned int max;234 };235 236 /***** A counter to generate sequential numbers *******************/237 struct counter{238 inline counter() : count(0){};239 inline counter(int i) : count(i){};240 inline unsigned int operator()(){241 return count++;242 }243 private:244 unsigned int count;245 };246 247 template <class C,class ForwardIterator>248 enumeration<C> enumerate(ForwardIterator first,ForwardIterator last){249 enumeration<C> res;250 for_each(first,last,bind1st(mem_fun(&enumeration<C>::add),&res));251 return res;252 }253 254 142 #endif /*HELPERS_HPP_*/ -
src/LinearAlgebra/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src 5 5 6 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl7 6 # Position-Independent Code necessary for shared library 8 AM_ CXXFLAGS = $(CPPUNIT_CFLAGS)9 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 7 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 10 9 11 10 LINALGSOURCE = \ 12 ${HELPERSOURCE} \ 11 ../Helpers/defs.cpp \ 12 ../Helpers/helpers.cpp \ 13 13 BoxVector.cpp \ 14 14 Eigenspace.cpp \ … … 30 30 31 31 LINALGHEADER = \ 32 ../Helpers/defs.hpp \ 33 ../Helpers/helpers.hpp \ 32 34 BoxVector.hpp \ 33 35 Eigenspace.hpp \ -
src/LinearAlgebra/unittests/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src 5 5 6 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl 7 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 9 8 10 9 TESTS = \ … … 26 25 ../../LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 27 26 ../../Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 28 ../../Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\27 ${CodePatterns_LIBS} \ 29 28 $(BOOST_LIB) 30 29 -
src/Makefile.am
rf28a26 ra0064e 2 2 # Also indentation by a single tab 3 3 4 SUBDIRS = Actions Exceptions HelpersLinearAlgebra Parser UIElements5 6 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 4 SUBDIRS = Actions Exceptions LinearAlgebra Parser UIElements 5 6 AM_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} 7 7 8 8 ATOMSOURCE = \ … … 67 67 68 68 69 PATTERNSOURCE = \70 Patterns/Observer.cpp71 PATTERNHEADER = \72 Patterns/Cacheable.hpp \73 Patterns/Observer.hpp \74 Patterns/Singleton.hpp75 76 69 SHAPESOURCE = \ 77 70 Shapes/BaseShapes.cpp \ … … 182 175 ${THERMOSTATSOURCE} \ 183 176 ${TESSELATIONSOURCE} \ 177 Helpers/defs.cpp \ 178 Helpers/helpers.cpp \ 184 179 bond.cpp \ 185 180 bondgraph.cpp \ … … 218 213 ${THERMOSTATHEADER} \ 219 214 ${TESSELATIONHEADER} \ 215 Helpers/defs.hpp \ 216 Helpers/fast_functions.hpp \ 217 Helpers/helpers.hpp \ 220 218 bond.hpp \ 221 219 bondgraph.hpp \ … … 243 241 libMolecuilder_LIBS = \ 244 242 LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 243 ${CodePatterns_LIBS} \ 245 244 ${BOOST_PROGRAM_OPTIONS_LIB} 246 245 … … 306 305 307 306 SubspaceFactorizer_CXXFLAGS = $(BOOST_CPPFLAGS) 308 SubspaceFactorizer_SOURCES = SubspaceFactorizer.cpp 307 SubspaceFactorizer_SOURCES = SubspaceFactorizer.cpp Helpers/defs.cpp Helpers/defs.hpp Helpers/helpers.cpp Helpers/helpers.hpp 309 308 SubspaceFactorizer_LDADD = \ 310 309 LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 311 310 Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 312 Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\311 ${CodePatterns_LIBS} \ 313 312 $(GSLLIB) \ 314 313 $(BOOST_LIB) … … 325 324 LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 326 325 Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 327 Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\326 ${CodePatterns_LIBS} \ 328 327 $(BOOST_LIB) 329 328 … … 344 343 LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 345 344 Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 346 Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\345 ${CodePatterns_LIBS} \ 347 346 $(BOOST_LIB) \ 348 347 ${GUI_LIBS} … … 356 355 LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 357 356 Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 358 Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\357 ${CodePatterns_LIBS} \ 359 358 $(BOOST_LIB) 360 359 … … 367 366 LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 368 367 Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 369 Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\368 ${CodePatterns_LIBS} \ 370 369 $(BOOST_LIB) 371 370 -
src/Parser/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src 5 5 6 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl 7 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 9 8 10 9 PARSERSOURCE = \ -
src/Parser/unittests/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src 5 5 6 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl 7 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 9 8 10 9 TESTS = \ … … 20 19 ../../LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 21 20 ../../Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 22 ../../Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\21 ${CodePatterns_LIBS} \ 23 22 $(BOOST_LIB) 24 23 -
src/Shapes/unittests/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src 5 5 6 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl 7 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 9 8 10 9 TESTS = \ … … 19 18 ../../LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 20 19 ../../Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 21 ../../Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la\20 ${CodePatterns_LIBS} \ 22 21 $(BOOST_LIB) 23 22 -
src/SubspaceFactorizer.cpp
rf28a26 ra0064e 23 23 24 24 #include "Helpers/Assert.hpp" 25 #include "Helpers/defs.hpp" 25 26 #include "Helpers/Log.hpp" 26 27 #include "Helpers/toString.hpp" -
src/UIElements/Makefile.am
rf28a26 ra0064e 3 3 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/UIElements 4 4 5 AM_LDFLAGS = -ldl 6 AM_CXXFLAGS = ${QT_CXXFLAGS} ${GLU_CXXFLAGS} 7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 5 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 6 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} ${QT_CXXFLAGS} 8 7 9 8 VIEWSOURCE = \ -
src/UIElements/Menu/unittests/Makefile.am
rf28a26 ra0064e 4 4 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/UIElements 5 5 6 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl 7 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 8 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 9 8 10 9 TESTS = \ … … 17 16 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB) 18 17 MENULIBS = \ 19 ../../../Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \20 18 $(BOOST_LIB) 21 19 -
src/atom.hpp
rf28a26 ra0064e 30 30 #include "TesselPoint.hpp" 31 31 #include "types.hpp" 32 33 #include "Helpers/enumeration.hpp" 32 34 33 35 /****************************************** forward declarations *****************************/ -
src/molecule.cpp
rf28a26 ra0064e 48 48 #include "Exceptions/LinearDependenceException.hpp" 49 49 50 #include "Helpers/enumeration.hpp" 50 51 51 52 /************************************* Functions for class molecule *********************************/ -
src/molecule_dynamics.cpp
rf28a26 ra0064e 32 32 #include "ThermoStatContainer.hpp" 33 33 #include "Thermostats/Berendsen.hpp" 34 35 #include "Helpers/enumeration.hpp" 34 36 35 37 #include <gsl/gsl_matrix.h> -
src/molecule_fragmentation.cpp
rf28a26 ra0064e 308 308 }; 309 309 310 /** Counts lines in file. 311 * Note we are scanning lines from current position, not from beginning. 312 * \param InputFile file to be scanned. 313 */ 314 int CountLinesinFile(ifstream &InputFile) 315 { 316 char *buffer = new char[MAXSTRINGSIZE]; 317 int lines=0; 318 319 int PositionMarker = InputFile.tellg(); // not needed as Inputfile is copied, given by value, not by ref 320 // count the number of lines, i.e. the number of fragments 321 InputFile.getline(buffer, MAXSTRINGSIZE); // skip comment lines 322 InputFile.getline(buffer, MAXSTRINGSIZE); 323 while(!InputFile.eof()) { 324 InputFile.getline(buffer, MAXSTRINGSIZE); 325 lines++; 326 } 327 InputFile.seekg(PositionMarker, ios::beg); 328 delete[](buffer); 329 return lines; 330 }; 331 332 310 333 /** Scans the adaptive order file and insert (index, value) into map. 311 334 * \param &path path to ENERGYPERFRAGMENT file (may be NULL if Order is non-negative) … … 526 549 SortIndex[(*iter)->nr] = AtomNo++; 527 550 } 528 //SetIndexedArrayForEachAtomTo( SortIndex, &atom::nr, &IncrementalAbsoluteValue, AtomNo );529 551 530 552 return true; -
src/molecule_graph.cpp
rf28a26 ra0064e 99 99 DoLog(2) && (Log() << Verbose(2) << "Looking for atoms " << atom1 << " and " << atom2 << "." << endl); 100 100 if (atom2 < atom1) //Sort indices of atoms in order 101 flip(atom1, atom2);101 std::swap(atom1, atom2); 102 102 Walker = FindAtom(atom1); 103 103 ASSERT(Walker,"Could not find an atom with the ID given in dbond file"); -
src/moleculelist.cpp
rf28a26 ra0064e 43 43 #include "Box.hpp" 44 44 45 #include "Helpers/fast_functions.hpp" 46 45 47 #include "Helpers/Assert.hpp" 46 48 … … 85 87 ListOfMolecules.remove(mol); 86 88 }; 89 90 /** Comparison function for two values. 91 * \param *a 92 * \param *b 93 * \return <0, \a *a less than \a *b, ==0 if equal, >0 \a *a greater than \a *b 94 */ 95 int CompareDoubles (const void * a, const void * b) 96 { 97 if (*(double *)a > *(double *)b) 98 return -1; 99 else if (*(double *)a < *(double *)b) 100 return 1; 101 else 102 return 0; 103 }; 104 87 105 88 106 /** Compare whether two molecules are equal. -
src/tesselation.cpp
rf28a26 ra0064e 44 44 #include "Exceptions/LinearDependenceException.hpp" 45 45 #include "Helpers/Assert.hpp" 46 47 #include "Helpers/fast_functions.hpp" 46 48 47 49 class molecule; … … 2416 2418 2417 2419 if ((lengthEndA > lengthBase) || (lengthEndB > lengthBase) || ((lengthEndA < MYEPSILON) || (lengthEndB < MYEPSILON))) { // intersection would be outside, take closer endpoint 2418 const double lengthEnd = Min(lengthEndA, lengthEndB);2420 const double lengthEnd = std::min(lengthEndA, lengthEndB); 2419 2421 if (lengthEnd - MinDistance < -MYEPSILON) { // new best line 2420 2422 ClosestLines.clear(); -
src/unittests/Makefile.am
rf28a26 ra0064e 5 5 ../Actions/unittests \ 6 6 ../Descriptors/unittests \ 7 ../Helpers/unittests \8 7 ../LinearAlgebra/unittests \ 9 8 ../Parser/unittests \ 10 ../Patterns/unittests \11 9 ../UIElements/Menu/unittests 12 10 13 11 INCLUDES = -I$(top_srcdir)/src 14 12 15 AM_LDFLAGS = $(CPPUNIT_LIBS) -ldl 16 AM_CXXFLAGS = $(CPPUNIT_CFLAGS) 17 AM_CPPFLAGS = ${BOOST_CPPFLAGS} 13 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 14 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS} 18 15 19 16 TESTS = \ … … 42 39 ../LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 43 40 ../Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 44 ../Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \45 41 $(BOOST_LIB) 46 42 ALLLIBS = \ … … 65 61 BondGraphUnitTest.cpp \ 66 62 BoxUnitTest.cpp \ 67 ../Patterns/unittests/CacheableUnitTest.cpp \68 63 CountBondsUnitTest.cpp \ 69 64 FormulaUnitTest.cpp \ 70 ../Helpers/unittests/InfoUnitTest.cpp \71 65 ../LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.cpp \ 72 66 ../LinearAlgebra/unittests/LineUnitTest.cpp \ 73 67 LinkedCellUnitTest.cpp \ 74 68 ListOfBondsUnitTest.cpp \ 75 ../Helpers/unittests/LogUnitTest.cpp \76 69 ../Actions/unittests/ManipulateAtomsUnitTest.cpp \ 77 70 ../LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.cpp \ … … 80 73 ../UIElements/Menu/unittests/MenuDescriptionUnitTest.cpp \ 81 74 ../Descriptors/unittests/MoleculeDescriptorUnitTest.cpp \ 82 ../Patterns/unittests/ObserverUnitTest.cpp \83 75 ../Parser/unittests/ParserCommonUnitTest.cpp \ 84 76 ../Parser/unittests/ParserTremoloUnitTest.cpp \ 85 77 PeriodentafelUnitTest.cpp \ 86 78 ../LinearAlgebra/unittests/PlaneUnitTest.cpp \ 87 ../Patterns/unittests/RegistryUnitTest.cpp \88 79 ../Shapes/unittests/ShapeUnitTest.cpp \ 89 ../Patterns/unittests/SingletonUnitTest.cpp \90 80 TesselationUnitTest.cpp \ 91 81 Tesselation_BoundaryTriangleUnitTest.cpp \ … … 105 95 BondGraphUnitTest.hpp \ 106 96 BoxUnitTest.hpp \ 107 ../Patterns/unittests/CacheableUnitTest.hpp \108 97 CountBondsUnitTest.hpp \ 109 98 FormulaUnitTest.hpp \ 110 ../Helpers/unittests/InfoUnitTest.hpp \111 99 ../LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.hpp \ 112 100 ../LinearAlgebra/unittests/LineUnitTest.hpp \ 113 101 LinkedCellUnitTest.hpp \ 114 102 ListOfBondsUnitTest.hpp \ 115 ../Helpers/unittests/LogUnitTest.hpp \116 103 ../Actions/unittests/ManipulateAtomsUnitTest.hpp \ 117 104 ../LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.hpp \ … … 120 107 ../UIElements/Menu/unittests/MenuDescriptionUnitTest.hpp \ 121 108 ../Descriptors/unittests/MoleculeDescriptorUnitTest.hpp \ 122 ../Patterns/unittests/ObserverUnitTest.hpp \123 109 ../Parser/unittests/ParserCommonUnitTest.hpp \ 124 110 ../Parser/unittests/ParserTremoloUnitTest.hpp \ 125 111 PeriodentafelUnitTest.hpp \ 126 112 ../LinearAlgebra/unittests/PlaneUnitTest.hpp \ 127 ../Patterns/unittests/RegistryUnitTest.hpp \128 113 ../Shapes/unittests/ShapeUnitTest.hpp \ 129 ../Patterns/unittests/SingletonUnitTest.hpp \130 114 TesselationUnitTest.hpp \ 131 115 Tesselation_BoundaryTriangleUnitTest.hpp \ -
src/unittests/SubspaceFactorizerUnitTest.cpp
rf28a26 ra0064e 30 30 31 31 #include "Helpers/Assert.hpp" 32 #include "Helpers/defs.hpp" 32 33 #include "Helpers/Log.hpp" 33 34 #include "Helpers/toString.hpp"
Note:
See TracChangeset
for help on using the changeset viewer.