Changeset 4ae823 for src/Element
- Timestamp:
- Oct 17, 2011, 4:18:55 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:
- 3613a2
- Parents:
- 9d4ff35
- git-author:
- Frederik Heber <heber@…> (09/19/11 14:43:55)
- git-committer:
- Frederik Heber <heber@…> (10/17/11 16:18:55)
- Location:
- src/Element
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Element/periodentafel.cpp
r9d4ff35 r4ae823 38 38 * Initialises start and end of list and resets periodentafel::checkliste to false. 39 39 */ 40 periodentafel::periodentafel() 41 { 42 { 43 stringstream input(elementsDB,ios_base::in); 44 #ifndef NDEBUG 45 bool status = 46 #endif 47 LoadElementsDatabase(input); 48 ASSERT(status, "General element initialization failed"); 49 } 50 { 51 stringstream input(ElectronegativitiesDB,ios_base::in); 52 #ifndef NDEBUG 53 bool status = 54 #endif 55 LoadElectronegativityDatabase(input); 56 ASSERT(status, "Electronegativities entry of element initialization failed"); 57 } 58 { 59 stringstream input(valenceDB,ios_base::in); 60 #ifndef NDEBUG 61 bool status = 62 #endif 63 LoadValenceDatabase(input); 64 ASSERT(status, "Valence entry of element initialization failed"); 65 } 66 { 67 stringstream input(orbitalsDB,ios_base::in); 68 #ifndef NDEBUG 69 bool status = 70 #endif 71 LoadOrbitalsDatabase(input); 72 ASSERT(status, "Orbitals entry of element initialization failed"); 73 } 74 { 75 stringstream input(HbondangleDB,ios_base::in); 76 #ifndef NDEBUG 77 bool status = 78 #endif 79 LoadHBondAngleDatabase(input); 80 ASSERT(status, "HBond angle entry of element initialization failed"); 81 } 82 { 83 stringstream input(HbonddistanceDB,ios_base::in); 84 #ifndef NDEBUG 85 bool status = 86 #endif 87 LoadHBondLengthsDatabase(input); 88 ASSERT(status, "HBond distance entry of element initialization failed"); 89 } 90 { 91 stringstream input(ColorDB,ios_base::in); 92 #ifndef NDEBUG 93 bool status = 94 #endif 95 LoadColorDatabase(input); 96 ASSERT(status, "color entry of element initialization failed"); 40 periodentafel::periodentafel(const bool DoLoad) 41 { 42 if (DoLoad) { 43 ScanPeriodentafel(); 97 44 } 98 45 }; … … 249 196 }; 250 197 198 /** Scan periodentafel contents from internal databases. 199 * 200 */ 201 void periodentafel::ScanPeriodentafel() 202 { 203 { 204 stringstream input(elementsDB,ios_base::in); 205 #ifndef NDEBUG 206 bool status = 207 #endif 208 LoadElementsDatabase(input); 209 ASSERT(status, "General element initialization failed"); 210 } 211 { 212 stringstream input(ElectronegativitiesDB,ios_base::in); 213 #ifndef NDEBUG 214 bool status = 215 #endif 216 LoadElectronegativityDatabase(input); 217 ASSERT(status, "Electronegativities entry of element initialization failed"); 218 } 219 { 220 stringstream input(valenceDB,ios_base::in); 221 #ifndef NDEBUG 222 bool status = 223 #endif 224 LoadValenceDatabase(input); 225 ASSERT(status, "Valence entry of element initialization failed"); 226 } 227 { 228 stringstream input(orbitalsDB,ios_base::in); 229 #ifndef NDEBUG 230 bool status = 231 #endif 232 LoadOrbitalsDatabase(input); 233 ASSERT(status, "Orbitals entry of element initialization failed"); 234 } 235 { 236 stringstream input(HbondangleDB,ios_base::in); 237 #ifndef NDEBUG 238 bool status = 239 #endif 240 LoadHBondAngleDatabase(input); 241 ASSERT(status, "HBond angle entry of element initialization failed"); 242 } 243 { 244 stringstream input(HbonddistanceDB,ios_base::in); 245 #ifndef NDEBUG 246 bool status = 247 #endif 248 LoadHBondLengthsDatabase(input); 249 ASSERT(status, "HBond distance entry of element initialization failed"); 250 } 251 { 252 stringstream input(ColorDB,ios_base::in); 253 #ifndef NDEBUG 254 bool status = 255 #endif 256 LoadColorDatabase(input); 257 ASSERT(status, "color entry of element initialization failed"); 258 } 259 } 260 251 261 /** Loads element list from file. 252 262 * \param *path to to standard file names -
src/Element/periodentafel.hpp
r9d4ff35 r4ae823 40 40 /******* Functions *********/ 41 41 public: 42 periodentafel( );42 periodentafel(const bool DoLoad = false); 43 43 ~periodentafel(); 44 44 … … 77 77 } 78 78 79 void ScanPeriodentafel(); 79 80 bool LoadColorDatabase(std::istream &input); 80 81 bool LoadElementsDatabase(std::istream &input); -
src/Element/unittests/PeriodentafelUnitTest.cpp
r9d4ff35 r4ae823 52 52 { 53 53 // make sure world is present 54 tafel = new periodentafel( );54 tafel = new periodentafel(true); 55 55 CPPUNIT_ASSERT(tafel != NULL && "could not obtain periodentafel"); 56 56 }; … … 111 111 void periodentafelTest::ComparisonTest() 112 112 { 113 periodentafel *newtafel = new periodentafel( );113 periodentafel *newtafel = new periodentafel(true); 114 114 115 115 CPPUNIT_ASSERT (*newtafel == *tafel );
Note:
See TracChangeset
for help on using the changeset viewer.