- Timestamp:
- Oct 10, 2011, 4:58:24 PM (13 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:
- d7d022
- Parents:
- f08ae7
- git-author:
- Frederik Heber <heber@…> (09/09/11 12:00:41)
- git-committer:
- Frederik Heber <heber@…> (10/10/11 16:58:24)
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/element.cpp
rf08ae7 rbae8b0 35 35 mass(0), 36 36 CovalentRadius(0), 37 Electronegativity(0.), 37 38 VanDerWaalsRadius(0), 38 Z(-1), 39 Z(0), 40 period(""), 41 group(""), 42 block(""), 39 43 Valence(0), 40 NoValenceOrbitals(0) 41 { 44 NoValenceOrbitals(0), 45 name(""), 46 symbol("") 47 { 48 for (size_t i =0; i<3;++i) 49 color[i] = (unsigned char)0; 50 for (size_t i =0; i<3;++i) 51 HBondDistance[i] = 0.; 52 for (size_t i =0; i<3;++i) 53 HBondAngle[i] = 0.; 42 54 }; 43 55 … … 45 57 mass(src.mass), 46 58 CovalentRadius(src.CovalentRadius), 59 Electronegativity(src.Electronegativity), 47 60 VanDerWaalsRadius(src.VanDerWaalsRadius), 48 61 Z(src.Z), 62 period(src.period), 63 group(src.group), 64 block(src.block), 49 65 Valence(src.Valence), 50 66 NoValenceOrbitals(src.NoValenceOrbitals), … … 52 68 symbol(src.symbol) 53 69 { 54 period = src.period;55 group = src.group;56 block = src.block;57 70 for (size_t i =0; i<3;++i) 58 71 color[i] = src.color[i]; 72 for (size_t i =0; i<3;++i) 73 HBondDistance[i] = src.HBondDistance[i]; 74 for (size_t i =0; i<3;++i) 75 HBondAngle[i] = src.HBondAngle[i]; 59 76 } 60 77 … … 67 84 mass=src.mass; 68 85 CovalentRadius=src.CovalentRadius; 86 Electronegativity=src.Electronegativity; 69 87 VanDerWaalsRadius=src.VanDerWaalsRadius; 70 88 Z=src.Z; 71 Valence=src.Valence;72 NoValenceOrbitals=src.NoValenceOrbitals;73 name=src.name;74 symbol=src.symbol;75 for (size_t i =0; i<3;++i)76 color[i] = src.color[i];77 89 period = src.period; 78 90 group = src.group; 79 91 block = src.block; 92 Valence=src.Valence; 93 NoValenceOrbitals=src.NoValenceOrbitals; 94 for (size_t i =0; i<3;++i) 95 color[i] = src.color[i]; 96 for (size_t i =0; i<3;++i) 97 HBondDistance[i] = src.HBondDistance[i]; 98 for (size_t i =0; i<3;++i) 99 HBondAngle[i] = src.HBondAngle[i]; 100 name=src.name; 101 symbol=src.symbol; 80 102 } 81 103 return *this; … … 153 175 } 154 176 155 double element::getHBondDistance(const int i) const156 { 157 ASSERT((i >=0) && (i<3), "Access to element::HBondDistance out of bounds.");177 double element::getHBondDistance(const size_t i) const 178 { 179 ASSERT((i<3), "Access to element::HBondDistance out of bounds."); 158 180 return HBondDistance[i]; 159 181 } 160 182 161 double element::getHBondAngle(const int i) const162 { 163 ASSERT((i >=0) && (i<3), "Access to element::HBondAngle out of bounds.");183 double element::getHBondAngle(const size_t i) const 184 { 185 ASSERT((i<3), "Access to element::HBondAngle out of bounds."); 164 186 return HBondAngle[i]; 165 }166 167 string &element::getSymbol(){168 return symbol;169 187 } 170 188 … … 176 194 { 177 195 symbol = temp; 178 }179 180 std::string &element::getName(){181 return name;182 196 } 183 197 -
src/element.hpp
rf08ae7 rbae8b0 19 19 #include <string> 20 20 21 #include "LinearAlgebra/defs.hpp"22 21 #include "types.hpp" 22 23 #include "boost/serialization/array.hpp" 24 #include "boost/serialization/string.hpp" 23 25 24 26 class periodentafel; … … 48 50 double getValence() const; 49 51 int getNoValenceOrbitals() const; 50 double getHBondDistance(const int i) const;51 double getHBondAngle(const int i) const;52 double getHBondDistance(const size_t i) const; 53 double getHBondAngle(const size_t i) const; 52 54 53 std::string &getSymbol();54 55 const std::string &getSymbol() const; 55 56 void setSymbol(const std::string &temp); 56 57 57 std::string &getName();58 58 const std::string &getName() const; 59 59 void setName(const std::string &temp); … … 74 74 double Valence; //!< number of valence electrons for this element 75 75 int NoValenceOrbitals; //!< number of valence orbitals, used for determining bond degree in molecule::CreateConnectmatrix() 76 double HBondDistance[ NDIM]; //!< distance in Angstrom of this element to hydrogen (for single, double and triple bonds)77 double HBondAngle[ NDIM]; //!< typical angle for one, two, three bonded hydrogen (in degrees)76 double HBondDistance[3]; //!< distance in Angstrom of this element to hydrogen (for single, double and triple bonds) 77 double HBondAngle[3]; //!< typical angle for one, two, three bonded hydrogen (in degrees) 78 78 unsigned char color[3]; //!< typical color for this element (from Jmol) 79 79 -
src/periodentafel.cpp
rf08ae7 rbae8b0 207 207 cin >> tmp->mass; 208 208 DoLog(0) && (Log() << Verbose(0) << "Name [max 64 chars]: " << endl); 209 cin >> tmp-> getName();209 cin >> tmp->name; 210 210 DoLog(0) && (Log() << Verbose(0) << "Short form [max 3 chars]: " << endl); 211 cin >> tmp-> getSymbol();211 cin >> tmp->symbol; 212 212 AddElement(tmp); 213 213 return tmp;
Note:
See TracChangeset
for help on using the changeset viewer.