- Timestamp:
- Mar 19, 2010, 1:29:01 PM (16 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, Candidate_v1.7.0, 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:
- e0b6fd
- Parents:
- 80c63d
- Location:
- src
- Files:
-
- 18 edited
-
Legacy/oldmenu.cpp (modified) (4 diffs)
-
Patterns/Cacheable.hpp (modified) (9 diffs)
-
boundary.cpp (modified) (1 diff)
-
builder.cpp (modified) (5 diffs)
-
molecule.cpp (modified) (15 diffs)
-
molecule.hpp (modified) (4 diffs)
-
molecule_dynamics.cpp (modified) (12 diffs)
-
molecule_fragmentation.cpp (modified) (15 diffs)
-
molecule_geometry.cpp (modified) (1 diff)
-
molecule_graph.cpp (modified) (9 diffs)
-
moleculelist.cpp (modified) (11 diffs)
-
tesselation.cpp (modified) (1 diff)
-
unittests/AnalysisCorrelationToPointUnitTest.cpp (modified) (1 diff)
-
unittests/AnalysisCorrelationToSurfaceUnitTest.cpp (modified) (2 diffs)
-
unittests/AnalysisPairCorrelationUnitTest.cpp (modified) (1 diff)
-
unittests/analysisbondsunittest.cpp (modified) (1 diff)
-
unittests/bondgraphunittest.cpp (modified) (1 diff)
-
unittests/listofbondsunittest.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Legacy/oldmenu.cpp
r80c63d rea7176 757 757 cin >> faktor; 758 758 759 mol->CountAtoms(); // recount atoms 760 if (mol->AtomCount != 0) { // if there is more than none 761 count = mol->AtomCount; // is changed becausing of adding, thus has to be stored away beforehand 759 if (mol->getAtomCount() != 0) { // if there is more than none 760 count = mol->getAtomCount(); // is changed becausing of adding, thus has to be stored away beforehand 762 761 Elements = new element *[count]; 763 762 vectors = new Vector *[count]; … … 1026 1025 // generate some KeySets 1027 1026 Log() << Verbose(0) << "Generating KeySets." << endl; 1028 KeySet TestSets[mol-> AtomCount+1];1027 KeySet TestSets[mol->getAtomCount()+1]; 1029 1028 i=1; 1030 1029 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { … … 1038 1037 molecule::const_iterator iter = mol->begin(); 1039 1038 if (iter != mol->end()) { 1040 test = TestSets[mol-> AtomCount-1].insert((*iter)->nr);1039 test = TestSets[mol->getAtomCount()-1].insert((*iter)->nr); 1041 1040 if (test.second) { 1042 1041 Log() << Verbose(1) << "Insertion worked?!" << endl; … … 1054 1053 // insert KeySets into Subgraphs 1055 1054 Log() << Verbose(0) << "Inserting KeySets into Subgraph class." << endl; 1056 for (int j=0;j<mol-> AtomCount;j++) {1055 for (int j=0;j<mol->getAtomCount();j++) { 1057 1056 Subgraphs.insert(GraphPair (TestSets[j],pair<int, double>(counter++, 1.))); 1058 1057 } 1059 1058 Log() << Verbose(0) << "Testing insertion of already present item in Subgraph." << endl; 1060 1059 GraphTestPair test2; 1061 test2 = Subgraphs.insert(GraphPair (TestSets[mol-> AtomCount],pair<int, double>(counter++, 1.)));1060 test2 = Subgraphs.insert(GraphPair (TestSets[mol->getAtomCount()],pair<int, double>(counter++, 1.))); 1062 1061 if (test2.second) { 1063 1062 Log() << Verbose(1) << "Insertion worked?!" << endl; -
src/Patterns/Cacheable.hpp
r80c63d rea7176 21 21 virtual ~Cacheable(); 22 22 23 const bool isValid(); 24 const T& operator*(); 25 const bool operator==(const T&); 26 const bool operator!=(const T&); 23 const bool isValid() const; 24 const T& operator*() const; 27 25 28 26 // methods implemented for base-class Observer … … 30 28 void subjectKilled(Observable *subject); 31 29 private: 32 void checkValid() ;30 void checkValid() const; 33 31 34 T content;32 mutable T content; 35 33 Observable *owner; 36 bool valid;37 bool canBeUsed;34 mutable bool valid; 35 mutable bool canBeUsed; 38 36 boost::function<T()> recalcMethod; 39 37 }; … … 53 51 54 52 template<typename T> 55 const T& Cacheable<T>::operator*() {53 const T& Cacheable<T>::operator*() const{ 56 54 checkValid(); 57 55 return content; 58 }59 60 template<typename T>61 const bool Cacheable<T>::operator==(const T& rval){62 checkValid();63 return (content == rval);64 }65 66 template<typename T>67 const bool Cacheable<T>::operator!=(const T& rval){68 checkValid();69 return (content != rval);70 56 } 71 57 … … 77 63 78 64 template<typename T> 79 const bool Cacheable<T>::isValid() {65 const bool Cacheable<T>::isValid() const{ 80 66 return valid; 81 67 } … … 93 79 94 80 template<typename T> 95 void Cacheable<T>::checkValid() {81 void Cacheable<T>::checkValid() const{ 96 82 assert(canBeUsed && "Cacheable used after owner was deleted"); 97 83 if(!isValid()){ … … 107 93 virtual ~Cacheable(); 108 94 109 const bool isValid(); 110 const T& operator*(); 111 const bool operator==(const T&); 112 const bool operator!=(const T&); 95 const bool isValid() const; 96 const T& operator*() const; 113 97 114 98 // methods implemented for base-class Observer … … 126 110 127 111 template<typename T> 128 const T& Cacheable<T>::operator*() {112 const T& Cacheable<T>::operator*() const{ 129 113 return recalcMethod(); 130 }131 132 template<typename T>133 const bool Cacheable<T>::operator==(const T& rval){134 return (recalcMethod() == rval);135 }136 137 template<typename T>138 const bool Cacheable<T>::operator!=(const T& rval){139 return (recalcMethod() != rval);140 114 } 141 115 … … 145 119 146 120 template<typename T> 147 const bool Cacheable<T>::isValid() {121 const bool Cacheable<T>::isValid() const{ 148 122 return true; 149 123 } … … 155 129 156 130 template<typename T> 157 void Cacheable<T>::subjectKilled(Observable *subject) {131 void Cacheable<T>::subjectKilled(Observable *subject){ 158 132 assert(0 && "Cacheable::subjectKilled should never be called when caching is disabled"); 159 133 } -
src/boundary.cpp
r80c63d rea7176 825 825 filler->Center.Zero(); 826 826 827 filler->CountAtoms(); 828 atom * CopyAtoms[filler->AtomCount]; 827 atom * CopyAtoms[filler->getAtomCount()]; 829 828 830 829 // calculate filler grid in [0,1]^3 -
src/builder.cpp
r80c63d rea7176 1482 1482 if (first->type != NULL) { 1483 1483 mol->AddAtom(first); // add to molecule 1484 if ((configPresent == empty) && (mol-> AtomCount!= 0))1484 if ((configPresent == empty) && (mol->getAtomCount() != 0)) 1485 1485 configPresent = present; 1486 1486 } else … … 1511 1511 Log() << Verbose(1) << "Depth-First-Search Analysis." << endl; 1512 1512 MoleculeLeafClass *Subgraphs = NULL; // list of subgraphs from DFS analysis 1513 int *MinimumRingSize = new int[mol-> AtomCount];1513 int *MinimumRingSize = new int[mol->getAtomCount()]; 1514 1514 atom ***ListOfLocalAtoms = NULL; 1515 1515 class StackClass<bond *> *BackEdgeStack = NULL; … … 1574 1574 int counter = 0; 1575 1575 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) { 1576 if ((Boundary == NULL) || (Boundary-> AtomCount < (*BigFinder)->AtomCount)) {1576 if ((Boundary == NULL) || (Boundary->getAtomCount() < (*BigFinder)->getAtomCount())) { 1577 1577 Boundary = *BigFinder; 1578 1578 } … … 1721 1721 int counter = 0; 1722 1722 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) { 1723 (*BigFinder)->CountAtoms(); 1724 if ((Boundary == NULL) || (Boundary->AtomCount < (*BigFinder)->AtomCount)) { 1723 if ((Boundary == NULL) || (Boundary->getAtomCount() < (*BigFinder)->getAtomCount())) { 1725 1724 Boundary = *BigFinder; 1726 1725 } 1727 1726 counter++; 1728 1727 } 1729 Log() << Verbose(1) << "Biggest molecule has " << Boundary-> AtomCount<< " atoms." << endl;1728 Log() << Verbose(1) << "Biggest molecule has " << Boundary->getAtomCount() << " atoms." << endl; 1730 1729 start = clock(); 1731 1730 LCList = new LinkedCell(Boundary, atof(argv[argptr])*2.); … … 2067 2066 faktor = 1; 2068 2067 } 2069 mol->CountAtoms(); // recount atoms 2070 if (mol->AtomCount != 0) { // if there is more than none 2071 count = mol->AtomCount; // is changed becausing of adding, thus has to be stored away beforehand 2068 if (mol->getAtomCount() != 0) { // if there is more than none 2069 count = mol->getAtomCount(); // is changed becausing of adding, thus has to be stored away beforehand 2072 2070 Elements = new element *[count]; 2073 2071 vectors = new Vector *[count]; -
src/molecule.cpp
r80c63d rea7176 32 32 */ 33 33 molecule::molecule(const periodentafel * const teil) : elemente(teil), 34 first(new bond(0, 0, 1, -1)), last(new bond(0, 0, 1, -1)), MDSteps(0), AtomCount(0),34 first(new bond(0, 0, 1, -1)), last(new bond(0, 0, 1, -1)), MDSteps(0), 35 35 BondCount(0), ElementCount(0), NoNonHydrogen(0), NoNonBonds(0), NoCyclicBonds(0), BondDistance(0.), 36 36 ActiveFlag(false), IndexNr(-1), 37 37 formula(this,boost::bind(&molecule::calcFormula,this)), 38 last_atom(0), 39 InternalPointer(begin()) 38 AtomCount(this,boost::bind(&molecule::doCountAtoms,this)), last_atom(0), InternalPointer(begin()) 40 39 { 41 40 // init bond chain list … … 72 71 const std::string molecule::getName(){ 73 72 return std::string(name); 73 } 74 75 int molecule::getAtomCount() const{ 76 return *AtomCount; 74 77 } 75 78 … … 180 183 if (pointer != NULL) { 181 184 pointer->sort = &pointer->nr; 182 AtomCount++;183 185 if (pointer->type != NULL) { 184 186 if (ElementsInMolecule[pointer->type->Z] == 0) … … 214 216 if ((pointer->type != NULL) && (pointer->type->Z != 1)) 215 217 NoNonHydrogen++; 216 AtomCount++;217 218 retval=walker; 218 219 } … … 611 612 612 613 // copy values 613 copy->CountAtoms();614 614 copy->CountElements(); 615 615 if (first->next != last) { // if adjaceny list is present … … 728 728 bool molecule::RemoveAtom(atom *pointer) 729 729 { 730 OBSERVE; 730 731 if (ElementsInMolecule[pointer->type->Z] != 0) { // this would indicate an error 731 732 ElementsInMolecule[pointer->type->Z]--; // decrease number of atom of this element 732 AtomCount--;733 733 } else 734 734 eLog() << Verbose(1) << "Atom " << pointer->Name << " is of element " << pointer->type->Z << " but the entry in the table of the molecule is 0!" << endl; … … 909 909 now = time((time_t *)NULL); // Get the system time and put it into 'now' as 'calender time' 910 910 for (int step=0;step<MDSteps;step++) { 911 *output << AtomCount<< "\n\tCreated by molecuilder, step " << step << ", on " << ctime(&now);911 *output << getAtomCount() << "\n\tCreated by molecuilder, step " << step << ", on " << ctime(&now); 912 912 ActOnAllAtoms( &atom::OutputTrajectoryXYZ, output, step ); 913 913 } … … 926 926 if (output != NULL) { 927 927 now = time((time_t *)NULL); // Get the system time and put it into 'now' as 'calender time' 928 *output << AtomCount<< "\n\tCreated by molecuilder on " << ctime(&now);928 *output << getAtomCount() << "\n\tCreated by molecuilder on " << ctime(&now); 929 929 ActOnAllAtoms( &atom::OutputXYZLine, output ); 930 930 return true; … … 936 936 * \param *out output stream for debugging 937 937 */ 938 void molecule::CountAtoms() 939 { 940 int i = size(); 941 if ((AtomCount == 0) || (i != AtomCount)) { 942 cout << "!!!!!!!!! Counting needed" << endl; 943 Log() << Verbose(3) << "Mismatch in AtomCount " << AtomCount << " and recounted number " << i << ", renaming all." << endl; 944 AtomCount = i; 945 946 // count NonHydrogen atoms and give each atom a unique name 947 if (AtomCount != 0) { 948 i=0; 949 NoNonHydrogen = 0; 950 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 951 (*iter)->nr = i; // update number in molecule (for easier referencing in FragmentMolecule lateron) 952 if ((*iter)->type->Z != 1) // count non-hydrogen atoms whilst at it 953 NoNonHydrogen++; 954 Free(&(*iter)->Name); 955 (*iter)->Name = Malloc<char>(6, "molecule::CountAtoms: *walker->Name"); 956 sprintf((*iter)->Name, "%2s%02d", (*iter)->type->symbol, (*iter)->nr+1); 957 Log() << Verbose(3) << "Naming atom nr. " << (*iter)->nr << " " << (*iter)->Name << "." << endl; 958 i++; 959 } 960 } else 961 Log() << Verbose(3) << "AtomCount is still " << AtomCount << ", thus counting nothing." << endl; 962 } 938 int molecule::doCountAtoms() 939 { 940 int res = size(); 941 int i = 0; 942 NoNonHydrogen = 0; 943 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 944 (*iter)->nr = i; // update number in molecule (for easier referencing in FragmentMolecule lateron) 945 if ((*iter)->type->Z != 1) // count non-hydrogen atoms whilst at it 946 NoNonHydrogen++; 947 Free(&(*iter)->Name); 948 (*iter)->Name = Malloc<char>(6, "molecule::CountAtoms: *walker->Name"); 949 sprintf((*iter)->Name, "%2s%02d", (*iter)->type->symbol, (*iter)->nr+1); 950 Log() << Verbose(3) << "Naming atom nr. " << (*iter)->nr << " " << (*iter)->Name << "." << endl; 951 i++; 952 } 953 return res; 963 954 }; 964 955 … … 1022 1013 /// first count both their atoms and elements and update lists thereby ... 1023 1014 //Log() << Verbose(0) << "Counting atoms, updating list" << endl; 1024 CountAtoms();1025 OtherMolecule->CountAtoms();1026 1015 CountElements(); 1027 1016 OtherMolecule->CountElements(); … … 1030 1019 /// -# AtomCount 1031 1020 if (result) { 1032 if ( AtomCount != OtherMolecule->AtomCount) {1033 Log() << Verbose(4) << "AtomCounts don't match: " << AtomCount << " == " << OtherMolecule->AtomCount<< endl;1021 if (getAtomCount() != OtherMolecule->getAtomCount()) { 1022 Log() << Verbose(4) << "AtomCounts don't match: " << getAtomCount() << " == " << OtherMolecule->getAtomCount() << endl; 1034 1023 result = false; 1035 } else Log() << Verbose(4) << "AtomCounts match: " << AtomCount << " == " << OtherMolecule->AtomCount<< endl;1024 } else Log() << Verbose(4) << "AtomCounts match: " << getAtomCount() << " == " << OtherMolecule->getAtomCount() << endl; 1036 1025 } 1037 1026 /// -# ElementCount … … 1073 1062 if (result) { 1074 1063 Log() << Verbose(5) << "Calculating distances" << endl; 1075 Distances = Calloc<double>( AtomCount, "molecule::IsEqualToWithinThreshold: Distances");1076 OtherDistances = Calloc<double>( AtomCount, "molecule::IsEqualToWithinThreshold: OtherDistances");1064 Distances = Calloc<double>(getAtomCount(), "molecule::IsEqualToWithinThreshold: Distances"); 1065 OtherDistances = Calloc<double>(getAtomCount(), "molecule::IsEqualToWithinThreshold: OtherDistances"); 1077 1066 SetIndexedArrayForEachAtomTo ( Distances, &atom::nr, &atom::DistanceSquaredToVector, (const Vector &)CenterOfGravity); 1078 1067 SetIndexedArrayForEachAtomTo ( OtherDistances, &atom::nr, &atom::DistanceSquaredToVector, (const Vector &)CenterOfGravity); … … 1080 1069 /// ... sort each list (using heapsort (o(N log N)) from GSL) 1081 1070 Log() << Verbose(5) << "Sorting distances" << endl; 1082 PermMap = Calloc<size_t>( AtomCount, "molecule::IsEqualToWithinThreshold: *PermMap");1083 OtherPermMap = Calloc<size_t>( AtomCount, "molecule::IsEqualToWithinThreshold: *OtherPermMap");1084 gsl_heapsort_index (PermMap, Distances, AtomCount, sizeof(double), CompareDoubles);1085 gsl_heapsort_index (OtherPermMap, OtherDistances, AtomCount, sizeof(double), CompareDoubles);1086 PermutationMap = Calloc<int>( AtomCount, "molecule::IsEqualToWithinThreshold: *PermutationMap");1071 PermMap = Calloc<size_t>(getAtomCount(), "molecule::IsEqualToWithinThreshold: *PermMap"); 1072 OtherPermMap = Calloc<size_t>(getAtomCount(), "molecule::IsEqualToWithinThreshold: *OtherPermMap"); 1073 gsl_heapsort_index (PermMap, Distances, getAtomCount(), sizeof(double), CompareDoubles); 1074 gsl_heapsort_index (OtherPermMap, OtherDistances, getAtomCount(), sizeof(double), CompareDoubles); 1075 PermutationMap = Calloc<int>(getAtomCount(), "molecule::IsEqualToWithinThreshold: *PermutationMap"); 1087 1076 Log() << Verbose(5) << "Combining Permutation Maps" << endl; 1088 for(int i= AtomCount;i--;)1077 for(int i=getAtomCount();i--;) 1089 1078 PermutationMap[PermMap[i]] = (int) OtherPermMap[i]; 1090 1079 … … 1092 1081 Log() << Verbose(4) << "Comparing distances" << endl; 1093 1082 flag = 0; 1094 for (int i=0;i< AtomCount;i++) {1083 for (int i=0;i<getAtomCount();i++) { 1095 1084 Log() << Verbose(5) << "Distances squared: |" << Distances[PermMap[i]] << " - " << OtherDistances[OtherPermMap[i]] << "| = " << fabs(Distances[PermMap[i]] - OtherDistances[OtherPermMap[i]]) << " ?<? " << threshold << endl; 1096 1085 if (fabs(Distances[PermMap[i]] - OtherDistances[OtherPermMap[i]]) > threshold*threshold) … … 1129 1118 { 1130 1119 Log() << Verbose(3) << "Begin of GetFatherAtomicMap." << endl; 1131 int *AtomicMap = Malloc<int>( AtomCount, "molecule::GetAtomicMap: *AtomicMap");1132 for (int i= AtomCount;i--;)1120 int *AtomicMap = Malloc<int>(getAtomCount(), "molecule::GetAtomicMap: *AtomicMap"); 1121 for (int i=getAtomCount();i--;) 1133 1122 AtomicMap[i] = -1; 1134 1123 if (OtherMolecule == this) { // same molecule 1135 for (int i= AtomCount;i--;) // no need as -1 means already that there is trivial correspondence1124 for (int i=getAtomCount();i--;) // no need as -1 means already that there is trivial correspondence 1136 1125 AtomicMap[i] = i; 1137 1126 Log() << Verbose(4) << "Map is trivial." << endl; -
src/molecule.hpp
r80c63d rea7176 103 103 bond *last; //!< end of bond list 104 104 int MDSteps; //!< The number of MD steps in Trajectories 105 int AtomCount; //!< number of atoms, brought up-to-date by CountAtoms()105 //int AtomCount; //!< number of atoms, brought up-to-date by CountAtoms() 106 106 int BondCount; //!< number of atoms, brought up-to-date by CountBonds() 107 107 int ElementCount; //!< how many unique elements are therein … … 118 118 private: 119 119 Cacheable<string> formula; 120 Cacheable<int> AtomCount; 120 121 moleculeId_t id; 121 122 atomSet atoms; //<!set of atoms 122 123 protected: 124 //void CountAtoms(); 123 125 /** 124 126 * this iterator type should be used for internal variables, \ … … 135 137 //getter and setter 136 138 const std::string getName(); 139 int getAtomCount() const; 140 int doCountAtoms(); 137 141 moleculeId_t getId(); 138 142 void setId(moleculeId_t); … … 252 256 253 257 /// Count and change present atoms' coordination. 254 void CountAtoms();255 258 void CountElements(); 256 259 void CalculateOrbitals(class config &configuration); -
src/molecule_dynamics.cpp
r80c63d rea7176 213 213 void FillDistanceList(molecule *mol, struct EvaluatePotential &Params) 214 214 { 215 for (int i=mol-> AtomCount; i--;) {215 for (int i=mol->getAtomCount(); i--;) { 216 216 Params.DistanceList[i] = new DistanceMap; // is the distance sorted target list per atom 217 217 Params.DistanceList[i]->clear(); … … 287 287 } 288 288 while ((Potential) > Params.PenaltyConstants[2]) { 289 PrintPermutationMap(mol-> AtomCount, Params);289 PrintPermutationMap(mol->getAtomCount(), Params); 290 290 iter++; 291 291 if (iter == mol->end()) // round-robin at the end … … 296 296 Potential = TryNextNearestNeighbourForInjectivePermutation(mol, (*iter), Potential, Params); 297 297 } 298 for (int i=mol-> AtomCount; i--;) // now each single entry in the DoubleList should be <=1298 for (int i=mol->getAtomCount(); i--;) // now each single entry in the DoubleList should be <=1 299 299 if (Params.DoubleList[i] > 1) { 300 300 eLog() << Verbose(0) << "Failed to create an injective PermutationMap!" << endl; … … 335 335 double Potential, OldPotential, OlderPotential; 336 336 struct EvaluatePotential Params; 337 Params.PermutationMap = Calloc<atom*>( AtomCount, "molecule::MinimiseConstrainedPotential: Params.**PermutationMap");338 Params.DistanceList = Malloc<DistanceMap*>( AtomCount, "molecule::MinimiseConstrainedPotential: Params.**DistanceList");339 Params.DistanceIterators = Malloc<DistanceMap::iterator>( AtomCount, "molecule::MinimiseConstrainedPotential: Params.*DistanceIterators");340 Params.DoubleList = Calloc<int>( AtomCount, "molecule::MinimiseConstrainedPotential: Params.*DoubleList");341 Params.StepList = Malloc<DistanceMap::iterator>( AtomCount, "molecule::MinimiseConstrainedPotential: Params.*StepList");337 Params.PermutationMap = Calloc<atom*>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.**PermutationMap"); 338 Params.DistanceList = Malloc<DistanceMap*>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.**DistanceList"); 339 Params.DistanceIterators = Malloc<DistanceMap::iterator>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.*DistanceIterators"); 340 Params.DoubleList = Calloc<int>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.*DoubleList"); 341 Params.StepList = Malloc<DistanceMap::iterator>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.*StepList"); 342 342 int round; 343 343 atom *Sprinter = NULL; … … 372 372 iter = begin(); 373 373 for (; iter != end(); ++iter) { 374 PrintPermutationMap( AtomCount, Params);374 PrintPermutationMap(getAtomCount(), Params); 375 375 Sprinter = Params.DistanceIterators[(*iter)->nr]->second; // store initial partner 376 376 Strider = Params.DistanceIterators[(*iter)->nr]; //remember old iterator … … 400 400 Params.PermutationMap[(*iter)->nr] = Params.DistanceIterators[(*iter)->nr]->second; // put next farther distance into PermutationMap 401 401 Params.PermutationMap[(*runner)->nr] = Sprinter; // and hand the old target to its respective owner 402 PrintPermutationMap( AtomCount, Params);402 PrintPermutationMap(getAtomCount(), Params); 403 403 // calculate the new potential 404 404 //Log() << Verbose(2) << "Checking new potential ..." << endl; … … 438 438 439 439 /// free memory and return with evaluated potential 440 for (int i= AtomCount; i--;)440 for (int i=getAtomCount(); i--;) 441 441 Params.DistanceList[i]->clear(); 442 442 Free(&Params.DistanceList); … … 483 483 MinimiseConstrainedPotential(PermutationMap, startstep, endstep, configuration.GetIsAngstroem()); 484 484 else { 485 PermutationMap = Malloc<atom *>( AtomCount, "molecule::LinearInterpolationBetweenConfiguration: **PermutationMap");485 PermutationMap = Malloc<atom *>(getAtomCount(), "molecule::LinearInterpolationBetweenConfiguration: **PermutationMap"); 486 486 SetIndexedArrayForEachAtomTo( PermutationMap, &atom::nr ); 487 487 } … … 516 516 517 517 // store the list to single step files 518 int *SortIndex = Malloc<int>( AtomCount, "molecule::LinearInterpolationBetweenConfiguration: *SortIndex");519 for (int i= AtomCount; i--; )518 int *SortIndex = Malloc<int>(getAtomCount(), "molecule::LinearInterpolationBetweenConfiguration: *SortIndex"); 519 for (int i=getAtomCount(); i--; ) 520 520 SortIndex[i] = i; 521 521 status = MoleculePerStep->OutputConfigForListOfFragments(&configuration, SortIndex); … … 561 561 return false; 562 562 } 563 if (Force.RowCounter[0] != AtomCount) {564 eLog() << Verbose(0) << "Mismatch between number of atoms in file " << Force.RowCounter[0] << " and in molecule " << AtomCount<< "." << endl;563 if (Force.RowCounter[0] != getAtomCount()) { 564 eLog() << Verbose(0) << "Mismatch between number of atoms in file " << Force.RowCounter[0] << " and in molecule " << getAtomCount() << "." << endl; 565 565 performCriticalExit(); 566 566 return false; … … 568 568 // correct Forces 569 569 Velocity.Zero(); 570 for(int i=0;i< AtomCount;i++)570 for(int i=0;i<getAtomCount();i++) 571 571 for(int d=0;d<NDIM;d++) { 572 572 Velocity.x[d] += Force.Matrix[0][i][d+5]; 573 573 } 574 for(int i=0;i< AtomCount;i++)574 for(int i=0;i<getAtomCount();i++) 575 575 for(int d=0;d<NDIM;d++) { 576 Force.Matrix[0][i][d+5] -= Velocity.x[d]/ (double)AtomCount;576 Force.Matrix[0][i][d+5] -= Velocity.x[d]/static_cast<double>(getAtomCount()); 577 577 } 578 578 // solve a constrained potential if we are meant to … … 677 677 delta_alpha = 0.; 678 678 ActOnAllAtoms( &atom::Thermostat_NoseHoover_init, MDSteps, &delta_alpha ); 679 delta_alpha = (delta_alpha - (3.* AtomCount+1.) * configuration.TargetTemp)/(configuration.HooverMass*Units2Electronmass);679 delta_alpha = (delta_alpha - (3.*getAtomCount()+1.) * configuration.TargetTemp)/(configuration.HooverMass*Units2Electronmass); 680 680 configuration.alpha += delta_alpha*configuration.Deltat; 681 681 Log() << Verbose(3) << "alpha = " << delta_alpha << " * " << configuration.Deltat << " = " << configuration.alpha << "." << endl; -
src/molecule_fragmentation.cpp
r80c63d rea7176 435 435 436 436 // initialize mask list 437 for(int i= AtomCount;i--;)437 for(int i=getAtomCount();i--;) 438 438 AtomMask[i] = false; 439 439 440 440 if (Order < 0) { // adaptive increase of BondOrder per site 441 if (AtomMask[ AtomCount] == true) // break after one step441 if (AtomMask[getAtomCount()] == true) // break after one step 442 442 return false; 443 443 … … 483 483 } 484 484 } 485 if (( Order == 0) && (AtomMask[AtomCount] == false)) // single stepping, just check485 if ((!Order) && (!AtomMask[getAtomCount()])) // single stepping, just check 486 486 status = true; 487 487 … … 494 494 } 495 495 496 PrintAtomMask(AtomMask, AtomCount); // for debugging496 PrintAtomMask(AtomMask, getAtomCount()); // for debugging 497 497 498 498 return status; … … 510 510 return false; 511 511 } 512 SortIndex = Malloc<int>( AtomCount, "molecule::CreateMappingLabelsToConfigSequence: *SortIndex");513 for(int i= AtomCount;i--;)512 SortIndex = Malloc<int>(getAtomCount(), "molecule::CreateMappingLabelsToConfigSequence: *SortIndex"); 513 for(int i=getAtomCount();i--;) 514 514 SortIndex[i] = -1; 515 515 … … 595 595 MoleculeListClass *BondFragments = NULL; 596 596 int *SortIndex = NULL; 597 int *MinimumRingSize = new int[ AtomCount];597 int *MinimumRingSize = new int[getAtomCount()]; 598 598 int FragmentCounter; 599 599 MoleculeLeafClass *MolecularWalker = NULL; … … 623 623 624 624 // create lookup table for Atom::nr 625 FragmentationToDo = FragmentationToDo && CreateFatherLookupTable(ListOfAtoms, AtomCount);625 FragmentationToDo = FragmentationToDo && CreateFatherLookupTable(ListOfAtoms, getAtomCount()); 626 626 627 627 // === compare it with adjacency file === … … 633 633 634 634 // analysis of the cycles (print rings, get minimum cycle length) for each subgraph 635 for(int i= AtomCount;i--;)636 MinimumRingSize[i] = AtomCount;635 for(int i=getAtomCount();i--;) 636 MinimumRingSize[i] = getAtomCount(); 637 637 MolecularWalker = Subgraphs; 638 638 FragmentCounter = 0; … … 671 671 // ===== 6b. prepare and go into the adaptive (Order<0), single-step (Order==0) or incremental (Order>0) cycle 672 672 KeyStack *RootStack = new KeyStack[Subgraphs->next->Count()]; 673 AtomMask = new bool[ AtomCount+1];674 AtomMask[ AtomCount] = false;673 AtomMask = new bool[getAtomCount()+1]; 674 AtomMask[getAtomCount()] = false; 675 675 FragmentationToDo = false; // if CheckOrderAtSite just ones recommends fragmentation, we will save fragments afterwards 676 676 while ((CheckOrder = CheckOrderAtSite(AtomMask, ParsedFragmentList, Order, MinimumRingSize, configuration->configpath))) { 677 677 FragmentationToDo = FragmentationToDo || CheckOrder; 678 AtomMask[ AtomCount] = true; // last plus one entry is used as marker that we have been through this loop once already in CheckOrderAtSite()678 AtomMask[getAtomCount()] = true; // last plus one entry is used as marker that we have been through this loop once already in CheckOrderAtSite() 679 679 // ===== 6b. fill RootStack for each subgraph (second adaptivity check) ===== 680 680 Subgraphs->next->FillRootStackForSubgraphs(RootStack, AtomMask, (FragmentCounter = 0)); … … 811 811 bool molecule::ParseOrderAtSiteFromFile(char *path) 812 812 { 813 unsigned char *OrderArray = Calloc<unsigned char>( AtomCount, "molecule::ParseOrderAtSiteFromFile - *OrderArray");814 bool *MaxArray = Calloc<bool>( AtomCount, "molecule::ParseOrderAtSiteFromFile - *MaxArray");813 unsigned char *OrderArray = Calloc<unsigned char>(getAtomCount(), "molecule::ParseOrderAtSiteFromFile - *OrderArray"); 814 bool *MaxArray = Calloc<bool>(getAtomCount(), "molecule::ParseOrderAtSiteFromFile - *MaxArray"); 815 815 bool status; 816 816 int AtomNr, value; … … 917 917 atom *OtherFather = NULL; 918 918 atom *FatherOfRunner = NULL; 919 Leaf->CountAtoms();920 919 921 920 #ifdef ADDHYDROGEN … … 955 954 eLog() << Verbose(1) << "Son " << (*iter)->Name << " has father " << FatherOfRunner->Name << " but its entry in SonList is " << SonList[FatherOfRunner->nr] << "!" << endl; 956 955 } 957 if ((LonelyFlag) && (Leaf-> AtomCount> 1)) {956 if ((LonelyFlag) && (Leaf->getAtomCount() > 1)) { 958 957 Log() << Verbose(0) << *(*iter) << "has got bonds only to hydrogens!" << endl; 959 958 } … … 975 974 molecule * molecule::StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem) 976 975 { 977 atom **SonList = Calloc<atom*>( AtomCount, "molecule::StoreFragmentFromStack: **SonList");976 atom **SonList = Calloc<atom*>(getAtomCount(), "molecule::StoreFragmentFromStack: **SonList"); 978 977 molecule *Leaf = World::get()->createMolecule(); 979 978 … … 1602 1601 FragmentSearch.FragmentSet = new KeySet; 1603 1602 FragmentSearch.Root = FindAtom(RootKeyNr); 1604 FragmentSearch.ShortestPathList = Malloc<int>( AtomCount, "molecule::PowerSetGenerator: *ShortestPathList");1605 for (int i= AtomCount;i--;) {1603 FragmentSearch.ShortestPathList = Malloc<int>(getAtomCount(), "molecule::PowerSetGenerator: *ShortestPathList"); 1604 for (int i=getAtomCount();i--;) { 1606 1605 FragmentSearch.ShortestPathList[i] = -1; 1607 1606 } … … 1707 1706 Vector Translationvector; 1708 1707 //class StackClass<atom *> *CompStack = NULL; 1709 class StackClass<atom *> *AtomStack = new StackClass<atom *>( AtomCount);1708 class StackClass<atom *> *AtomStack = new StackClass<atom *>(getAtomCount()); 1710 1709 bool flag = true; 1711 1710 1712 1711 Log() << Verbose(2) << "Begin of ScanForPeriodicCorrection." << endl; 1713 1712 1714 ColorList = Calloc<enum Shading>( AtomCount, "molecule::ScanForPeriodicCorrection: *ColorList");1713 ColorList = Calloc<enum Shading>(getAtomCount(), "molecule::ScanForPeriodicCorrection: *ColorList"); 1715 1714 while (flag) { 1716 1715 // remove bonds that are beyond bonddistance … … 1746 1745 Log() << Verbose(0) << endl; 1747 1746 // apply to all atoms of first component via BFS 1748 for (int i= AtomCount;i--;)1747 for (int i=getAtomCount();i--;) 1749 1748 ColorList[i] = white; 1750 1749 AtomStack->Push(Binder->leftatom); -
src/molecule_geometry.cpp
r80c63d rea7176 298 298 Free(&inversematrix); 299 299 300 Center.Scale(1./ (double)AtomCount);300 Center.Scale(1./static_cast<double>(getAtomCount())); 301 301 }; 302 302 -
src/molecule_graph.cpp
r80c63d rea7176 125 125 126 126 // count atoms in molecule = dimension of matrix (also give each unique name and continuous numbering) 127 CountAtoms(); 128 Log() << Verbose(1) << "AtomCount " << AtomCount << " and bonddistance is " << bonddistance << "." << endl; 129 130 if ((AtomCount > 1) && (bonddistance > 1.)) { 127 Log() << Verbose(1) << "AtomCount " << getAtomCount() << " and bonddistance is " << bonddistance << "." << endl; 128 129 if ((getAtomCount() > 1) && (bonddistance > 1.)) { 131 130 Log() << Verbose(2) << "Creating Linked Cell structure ... " << endl; 132 131 LC = new LinkedCell(this, bonddistance); … … 191 190 ActOnAllAtoms( &atom::OutputBondOfAtom ); 192 191 } else 193 Log() << Verbose(1) << "AtomCount is " << AtomCount<< ", thus no bonds, no connections!." << endl;192 Log() << Verbose(1) << "AtomCount is " << getAtomCount() << ", thus no bonds, no connections!." << endl; 194 193 Log() << Verbose(0) << "End of CreateAdjacencyList." << endl; 195 194 if (free_BG) … … 233 232 Log() << Verbose(0) << " done." << endl; 234 233 } else { 235 Log() << Verbose(1) << "BondCount is " << BondCount << ", no bonds between any of the " << AtomCount<< " atoms." << endl;234 Log() << Verbose(1) << "BondCount is " << BondCount << ", no bonds between any of the " << getAtomCount() << " atoms." << endl; 236 235 } 237 236 Log() << Verbose(0) << No << " bonds could not be corrected." << endl; … … 453 452 void DepthFirstSearchAnalysis_Init(struct DFSAccounting &DFS, const molecule * const mol) 454 453 { 455 DFS.AtomStack = new StackClass<atom *> (mol-> AtomCount);454 DFS.AtomStack = new StackClass<atom *> (mol->getAtomCount()); 456 455 DFS.CurrentGraphNr = 0; 457 456 DFS.ComponentNumber = 0; … … 847 846 Root = *iter; 848 847 849 if (MinimumRingSize[Root->GetTrueFather()->nr] == mol-> AtomCount) { // check whether MinimumRingSize is set, if not BFS to next where it is848 if (MinimumRingSize[Root->GetTrueFather()->nr] == mol->getAtomCount()) { // check whether MinimumRingSize is set, if not BFS to next where it is 850 849 Walker = Root; 851 850 852 851 //Log() << Verbose(1) << "---------------------------------------------------------------------------------------------------------" << endl; 853 CyclicStructureAnalysis_BFSToNextCycle(Root, Walker, MinimumRingSize, mol-> AtomCount);852 CyclicStructureAnalysis_BFSToNextCycle(Root, Walker, MinimumRingSize, mol->getAtomCount()); 854 853 855 854 } … … 881 880 int MinRingSize = -1; 882 881 883 InitializeBFSAccounting(BFS, AtomCount);882 InitializeBFSAccounting(BFS, getAtomCount()); 884 883 885 884 //Log() << Verbose(1) << "Back edge list - "; … … 1117 1116 CurrentBondsOfAtom = -1; // we count one too far due to line end 1118 1117 // parse into structure 1119 if ((AtomNr >= 0) && (AtomNr < AtomCount)) {1118 if ((AtomNr >= 0) && (AtomNr < getAtomCount())) { 1120 1119 Walker = ListOfAtoms[AtomNr]; 1121 1120 while (!line.eof()) … … 1296 1295 AddedAtomList[Root->nr] = Mol->AddCopyAtom(Root); 1297 1296 1298 BreadthFirstSearchAdd_Init(BFS, Root, BondOrder, AtomCount, AddedAtomList);1297 BreadthFirstSearchAdd_Init(BFS, Root, BondOrder, getAtomCount(), AddedAtomList); 1299 1298 1300 1299 // and go on ... Queue always contains all lightgray vertices … … 1407 1406 1408 1407 Log() << Verbose(2) << "Begin of BuildInducedSubgraph." << endl; 1409 BuildInducedSubgraph_Init(ParentList, Father-> AtomCount);1408 BuildInducedSubgraph_Init(ParentList, Father->getAtomCount()); 1410 1409 BuildInducedSubgraph_FillParentList(this, Father, ParentList); 1411 1410 status = BuildInducedSubgraph_CreateBondsFromParent(this, Father, ParentList); -
src/moleculelist.cpp
r80c63d rea7176 20 20 #include "memoryallocator.hpp" 21 21 #include "periodentafel.hpp" 22 #include "Helpers/Assert.hpp" 22 23 23 24 /*********************************** Functions for class MoleculeListClass *************************/ … … 71 72 // sort each atom list and put the numbers into a list, then go through 72 73 //Log() << Verbose(0) << "Comparing fragment no. " << *(molecule **)a << " to " << *(molecule **)b << "." << endl; 73 if ((**(molecule **) a).AtomCount < (**(molecule **) b).AtomCount) { 74 // Yes those types are awkward... but check it for yourself it checks out this way 75 molecule *const *mol1_ptr= static_cast<molecule *const *>(a); 76 molecule *mol1 = *mol1_ptr; 77 molecule *const *mol2_ptr= static_cast<molecule *const *>(b); 78 molecule *mol2 = *mol2_ptr; 79 if (mol1->getAtomCount() < mol2->getAtomCount()) { 74 80 return -1; 75 81 } else { 76 if ( (**(molecule **) a).AtomCount > (**(molecule **) b).AtomCount)82 if (mol1->getAtomCount() > mol2->getAtomCount()) 77 83 return +1; 78 84 else { 79 Count = (**(molecule **) a).AtomCount;85 Count = mol1->getAtomCount(); 80 86 aList = new int[Count]; 81 87 bList = new int[Count]; … … 85 91 aCounter = 0; 86 92 bCounter = 0; 87 molecule::const_iterator aiter = (**(molecule **) a).begin();88 molecule::const_iterator biter = (**(molecule **) b).begin();89 for (;(aiter != (**(molecule **) a).end()) && (biter != (**(molecule **) b).end());93 molecule::const_iterator aiter = mol1->begin(); 94 molecule::const_iterator biter = mol2->begin(); 95 for (;(aiter != mol1->end()) && (biter != mol2->end()); 90 96 ++aiter, ++biter) { 91 97 if ((*aiter)->GetTrueFather() == NULL) … … 101 107 // check if AtomCount was for real 102 108 flag = 0; 103 if ((aiter == (**(molecule **) a).end()) && (biter != (**(molecule **) b).end())) {109 if ((aiter == mol1->end()) && (biter != mol2->end())) { 104 110 flag = -1; 105 111 } else { 106 if ((aiter != (**(molecule **) a).end()) && (biter == (**(molecule **) b).end()))112 if ((aiter != mol1->end()) && (biter == mol2->end())) 107 113 flag = 1; 108 114 } … … 162 168 } 163 169 // output Index, Name, number of atoms, chemical formula 164 (*out) << ((*ListRunner)->ActiveFlag ? "*" : " ") << (*ListRunner)->IndexNr << "\t" << (*ListRunner)->name << "\t\t" << (*ListRunner)-> AtomCount<< "\t";170 (*out) << ((*ListRunner)->ActiveFlag ? "*" : " ") << (*ListRunner)->IndexNr << "\t" << (*ListRunner)->name << "\t\t" << (*ListRunner)->getAtomCount() << "\t"; 165 171 Elemental = (*ListRunner)->elemente->end; 166 172 while(Elemental->previous != (*ListRunner)->elemente->start) { … … 321 327 322 328 // prepare index list for bonds 323 srcmol->CountAtoms(); 324 atom ** CopyAtoms = new atom*[srcmol->AtomCount]; 325 for(int i=0;i<srcmol->AtomCount;i++) 329 atom ** CopyAtoms = new atom*[srcmol->getAtomCount()]; 330 for(int i=0;i<srcmol->getAtomCount();i++) 326 331 CopyAtoms[i] = NULL; 327 332 … … 338 343 } 339 344 } 340 Log() << Verbose(1) << nr << " of " << srcmol-> AtomCount<< " atoms have been merged.";345 Log() << Verbose(1) << nr << " of " << srcmol->getAtomCount() << " atoms have been merged."; 341 346 342 347 // go through all bonds and add as well … … 780 785 // 4b. create and fill map of which atom is associated to which connected molecule (note, counting starts at 1) 781 786 int FragmentCounter = 0; 782 int *MolMap = Calloc<int>(mol-> AtomCount, "config::Load() - *MolMap");787 int *MolMap = Calloc<int>(mol->getAtomCount(), "config::Load() - *MolMap"); 783 788 MoleculeLeafClass *MolecularWalker = Subgraphs; 784 789 while (MolecularWalker->next != NULL) { … … 792 797 // 4c. relocate atoms to new molecules and remove from Leafs 793 798 for (molecule::iterator iter = mol->begin(); !mol->empty(); iter = mol->begin()) { 794 if (((*iter)->nr <0) || ((*iter)->nr >= mol-> AtomCount)) {799 if (((*iter)->nr <0) || ((*iter)->nr >= mol->getAtomCount())) { 795 800 eLog() << Verbose(0) << "Index of atom " << *(*iter) << " is invalid!" << endl; 796 801 performCriticalExit(); … … 1016 1021 Log() << Verbose(1) << "Begin of FillBondStructureFromReference." << endl; 1017 1022 // fill ListOfLocalAtoms if NULL was given 1018 if (!FillListOfLocalAtoms(ListOfLocalAtoms, FragmentCounter, reference-> AtomCount, FreeList)) {1023 if (!FillListOfLocalAtoms(ListOfLocalAtoms, FragmentCounter, reference->getAtomCount(), FreeList)) { 1019 1024 Log() << Verbose(1) << "Filling of ListOfLocalAtoms failed." << endl; 1020 1025 return false; … … 1143 1148 Log() << Verbose(1) << "Begin of AssignKeySetsToFragment." << endl; 1144 1149 // fill ListOfLocalAtoms if NULL was given 1145 if (!FillListOfLocalAtoms(ListOfLocalAtoms, FragmentCounter, reference-> AtomCount, FreeList)) {1150 if (!FillListOfLocalAtoms(ListOfLocalAtoms, FragmentCounter, reference->getAtomCount(), FreeList)) { 1146 1151 Log() << Verbose(1) << "Filling of ListOfLocalAtoms failed." << endl; 1147 1152 return false; -
src/tesselation.cpp
r80c63d rea7176 368 368 Counter++; 369 369 } 370 cout << "Counter is now: " << Counter << endl; 370 371 ASSERT(Counter >= 3,"We have a triangle with only two distinct endpoints!"); 371 372 }; -
src/unittests/AnalysisCorrelationToPointUnitTest.cpp
r80c63d rea7176 79 79 80 80 // check that TestMolecule was correctly constructed 81 CPPUNIT_ASSERT_EQUAL( TestMolecule-> AtomCount, 4 );81 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 ); 82 82 83 83 TestList = World::get()->getMolecules(); -
src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
r80c63d rea7176 39 39 void AnalysisCorrelationToSurfaceUnitTest::setUp() 40 40 { 41 ASSERT_DO(Assert:: Throw);41 ASSERT_DO(Assert::Abort); 42 42 atom *Walker = NULL; 43 43 … … 87 87 88 88 // check that TestMolecule was correctly constructed 89 CPPUNIT_ASSERT_EQUAL( TestMolecule-> AtomCount, 4 );89 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 ); 90 90 91 91 TestList = World::get()->getMolecules(); -
src/unittests/AnalysisPairCorrelationUnitTest.cpp
r80c63d rea7176 79 79 80 80 // check that TestMolecule was correctly constructed 81 CPPUNIT_ASSERT_EQUAL( TestMolecule-> AtomCount, 4 );81 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 ); 82 82 83 83 TestList = World::get()->getMolecules(); -
src/unittests/analysisbondsunittest.cpp
r80c63d rea7176 90 90 91 91 // check that TestMolecule was correctly constructed 92 CPPUNIT_ASSERT_EQUAL( TestMolecule-> AtomCount, 5 );92 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 5 ); 93 93 94 94 // create a small file with table -
src/unittests/bondgraphunittest.cpp
r80c63d rea7176 81 81 82 82 // check that TestMolecule was correctly constructed 83 CPPUNIT_ASSERT_EQUAL( TestMolecule-> AtomCount, 4 );83 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 ); 84 84 85 85 // create a small file with table -
src/unittests/listofbondsunittest.cpp
r80c63d rea7176 74 74 75 75 // check that TestMolecule was correctly constructed 76 CPPUNIT_ASSERT_EQUAL( TestMolecule-> AtomCount, 4 );76 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 ); 77 77 78 78 };
Note:
See TracChangeset
for help on using the changeset viewer.
