Changeset f54930 for src/Fragmentation
- Timestamp:
- Feb 13, 2015, 8:20:24 AM (10 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:
- 0241c5
- Parents:
- 041b77
- git-author:
- Frederik Heber <heber@…> (05/30/14 13:31:15)
- git-committer:
- Frederik Heber <heber@…> (02/13/15 08:20:24)
- Location:
- src/Fragmentation
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Exporters/SphericalPointDistribution.hpp
r041b77 rf54930 57 57 } 58 58 59 59 60 /** Matches a given spherical distribution with another containing more 60 61 * points. … … 80 81 }; 81 82 82 SphericalPointDistribution::Polygon_t 83 SphericalPointDistribution::matchSphericalPointDistributions( 84 const SphericalPointDistribution::Polygon_t &_polygon, 85 const SphericalPointDistribution::Polygon_t &_newpolygon 86 ) 87 { 88 SphericalPointDistribution::Polygon_t remainingpolygon = _newpolygon; 83 // declare specializations 89 84 90 return remainingpolygon; 91 } 92 93 template <> 94 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<2>() 95 { 96 Polygon_t polygon; 97 polygon.push_back( Vector(Bondlength,0.,0.)); 98 polygon.push_back( Vector(-Bondlength,0.,0.)); 99 ASSERT( polygon.size() == 2, 100 "SphericalPointDistribution::get<2>() - polygon has wrong size."); 101 return polygon; 102 } 103 104 template <> 105 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<3>() 106 { 107 Polygon_t polygon; 108 polygon.push_back( Vector(Bondlength,0.,0.)); 109 polygon.push_back( Vector(-Bondlength*0.5, SQRT_3*0.5,0.)); 110 polygon.push_back( Vector(-Bondlength*0.5, -SQRT_3*0.5,0.)); 111 ASSERT( polygon.size() == 3, 112 "SphericalPointDistribution::get<3>() - polygon has wrong size."); 113 return polygon; 114 } 115 116 template <> 117 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<4>() 118 { 119 Polygon_t polygon; 120 polygon.push_back( Vector(Bondlength,0.,0.)); 121 polygon.push_back( Vector(-Bondlength/3.0, Bondlength*2.0*M_SQRT2/3.0,0.)); 122 polygon.push_back( Vector(-Bondlength/3.0, -Bondlength*M_SQRT2/3.0, Bondlength*M_SQRT2/SQRT_3)); 123 polygon.push_back( Vector(-Bondlength/3.0, -Bondlength*M_SQRT2/3.0, -Bondlength*M_SQRT2/SQRT_3)); 124 ASSERT( polygon.size() == 4, 125 "SphericalPointDistribution::get<4>() - polygon has wrong size."); 126 return polygon; 127 } 128 129 template <> 130 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<5>() 131 { 132 Polygon_t polygon; 133 polygon.push_back( Vector(Bondlength,0.,0.)); 134 polygon.push_back( Vector(-Bondlength, 0.0, 0.0)); 135 polygon.push_back( Vector(0.0, Bondlength, 0.0)); 136 polygon.push_back( Vector(0.0, -Bondlength*0.5, Bondlength*SQRT_3*0.5)); 137 polygon.push_back( Vector(0.0, -Bondlength*0.5, -Bondlength*SQRT_3*0.5)); 138 ASSERT( polygon.size() == 5, 139 "SphericalPointDistribution::get<5>() - polygon has wrong size."); 140 return polygon; 141 } 142 143 template <> 144 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<6>() 145 { 146 Polygon_t polygon; 147 polygon.push_back( Vector(Bondlength,0.,0.)); 148 polygon.push_back( Vector(-Bondlength, 0.0, 0.0)); 149 polygon.push_back( Vector(0.0, Bondlength, 0.0)); 150 polygon.push_back( Vector(0.0, -Bondlength, 0.0)); 151 polygon.push_back( Vector(0.0, 0.0, Bondlength)); 152 polygon.push_back( Vector(0.0, 0.0, -Bondlength)); 153 ASSERT( polygon.size() == 6, 154 "SphericalPointDistribution::get<6>() - polygon has wrong size."); 155 return polygon; 156 } 157 158 template <> 159 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<7>() 160 { 161 Polygon_t polygon; 162 polygon.push_back( Vector(Bondlength,0.,0.)); 163 polygon.push_back( Vector(-Bondlength, 0.0, 0.0)); 164 polygon.push_back( Vector(0.0, Bondlength, 0.0)); 165 polygon.push_back( Vector(0.0, Bondlength*cos(M_PI*0.4), Bondlength*sin(M_PI*0.4))); 166 polygon.push_back( Vector(0.0, Bondlength*cos(M_PI*0.8), Bondlength*sin(M_PI*0.8))); 167 polygon.push_back( Vector(0.0, Bondlength*cos(M_PI*1.2), Bondlength*sin(M_PI*1.2))); 168 polygon.push_back( Vector(0.0, Bondlength*cos(M_PI*1.6), Bondlength*sin(M_PI*1.6))); 169 ASSERT( polygon.size() == 7, 170 "SphericalPointDistribution::get<7>() - polygon has wrong size."); 171 return polygon; 172 } 173 174 template <> 175 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<8>() 176 { 177 Polygon_t polygon; 178 polygon.push_back( Vector(Bondlength,0.,0.)); 179 polygon.push_back( Vector(-Bondlength, 0.0, 0.0)); 180 polygon.push_back( Vector(-Bondlength/3.0, Bondlength*2.0*M_SQRT2/3.0, 0.0)); 181 polygon.push_back( Vector(-Bondlength/3.0, -Bondlength*M_SQRT2/3.0, Bondlength*M_SQRT2/SQRT_3)); 182 polygon.push_back( Vector(-Bondlength/3.0, -Bondlength*M_SQRT2/3.0, -Bondlength*M_SQRT2/SQRT_3)); 183 polygon.push_back( Vector(Bondlength/3.0, -Bondlength*2.0*M_SQRT2/3.0, 0.0)); 184 polygon.push_back( Vector(Bondlength/3.0, Bondlength*M_SQRT2/3.0, -Bondlength*M_SQRT2/SQRT_3)); 185 polygon.push_back( Vector(Bondlength/3.0, Bondlength*M_SQRT2/3.0, Bondlength*M_SQRT2/SQRT_3)); 186 ASSERT( polygon.size() == 8, 187 "SphericalPointDistribution::get<8>() - polygon has wrong size."); 188 return polygon; 189 } 190 191 template <> 192 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<9>() 193 { 194 Polygon_t polygon; 195 polygon.push_back( Vector(Bondlength,0.,0.)); 196 polygon.push_back( Vector(Bondlength*cos(0.4*M_PI), Bondlength*sin(0.4*M_PI), 0.0)); 197 polygon.push_back( Vector(Bondlength*cos(0.4*M_PI), -Bondlength*sin(0.4*M_PI), 0.0)); 198 polygon.push_back( Vector(Bondlength*cos(0.4*M_PI), 0.0, Bondlength*sin(0.4*M_PI))); 199 polygon.push_back( Vector(Bondlength*cos(0.4*M_PI), 0.0, -Bondlength*sin(0.4*M_PI))); 200 polygon.push_back( Vector(Bondlength*cos(0.8*M_PI), Bondlength*sin(0.8*M_PI)*sin(0.25*M_PI), Bondlength*sin(0.8*M_PI)*cos(0.25*M_PI))); 201 polygon.push_back( Vector(Bondlength*cos(0.8*M_PI), Bondlength*sin(0.8*M_PI)*sin(0.75*M_PI), Bondlength*sin(0.8*M_PI)*cos(0.75*M_PI))); 202 polygon.push_back( Vector(Bondlength*cos(0.8*M_PI), Bondlength*sin(0.8*M_PI)*sin(1.25*M_PI), Bondlength*sin(0.8*M_PI)*cos(1.25*M_PI))); 203 polygon.push_back( Vector(Bondlength*cos(0.8*M_PI), Bondlength*sin(0.8*M_PI)*sin(1.75*M_PI), Bondlength*sin(0.8*M_PI)*cos(1.75*M_PI))); 204 ASSERT( polygon.size() == 9, 205 "SphericalPointDistribution::get<9>() - polygon has wrong size."); 206 return polygon; 207 } 208 209 template <> 210 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<10>() 211 { 212 Polygon_t polygon; 213 polygon.push_back( Vector(Bondlength,0.,0.)); 214 polygon.push_back( Vector(-Bondlength, 0.0, 0.0)); 215 const double temp_Bondlength = Bondlength*0.5*SQRT_3; 216 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength, 0.0)); 217 polygon.push_back( Vector(temp_Bondlength/SQRT_3, -temp_Bondlength, 0.0)); 218 polygon.push_back( Vector(temp_Bondlength/SQRT_3, 0.0, temp_Bondlength)); 219 polygon.push_back( Vector(temp_Bondlength/SQRT_3, 0.0, -temp_Bondlength)); 220 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*sin(0.25*M_PI), temp_Bondlength*cos(0.25*M_PI))); 221 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*sin(0.75*M_PI), temp_Bondlength*cos(0.75*M_PI))); 222 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*sin(1.25*M_PI), temp_Bondlength*cos(1.25*M_PI))); 223 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*sin(1.75*M_PI), temp_Bondlength*cos(1.75*M_PI))); 224 ASSERT( polygon.size() == 10, 225 "SphericalPointDistribution::get<10>() - polygon has wrong size."); 226 return polygon; 227 } 228 229 template <> 230 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<11>() 231 { 232 Polygon_t polygon; 233 polygon.push_back( Vector(Bondlength,0.,0.)); 234 { 235 const double temp_Bondlength = Bondlength*sin(0.4*M_PI); 236 polygon.push_back( Vector(Bondlength*cos(0.4*M_PI), temp_Bondlength, 0.0)); 237 polygon.push_back( Vector(Bondlength*cos(0.4*M_PI), temp_Bondlength*cos(0.4*M_PI), temp_Bondlength*sin(0.4*M_PI))); 238 polygon.push_back( Vector(Bondlength*cos(0.4*M_PI), temp_Bondlength*cos(0.8*M_PI), temp_Bondlength*sin(0.8*M_PI))); 239 polygon.push_back( Vector(Bondlength*cos(0.4*M_PI), temp_Bondlength*cos(1.2*M_PI), temp_Bondlength*sin(1.2*M_PI))); 240 polygon.push_back( Vector(Bondlength*cos(0.4*M_PI), temp_Bondlength*cos(1.6*M_PI), temp_Bondlength*sin(1.6*M_PI))); 241 } 242 { 243 const double temp_Bondlength = Bondlength*sin(0.8*M_PI); 244 polygon.push_back( Vector(Bondlength*cos(0.8*M_PI), temp_Bondlength*cos(0.2*M_PI), temp_Bondlength*sin(0.2*M_PI))); 245 polygon.push_back( Vector(Bondlength*cos(0.8*M_PI), temp_Bondlength*cos(0.6*M_PI), temp_Bondlength*sin(0.6*M_PI))); 246 polygon.push_back( Vector(Bondlength*cos(0.8*M_PI), temp_Bondlength*cos(1.0*M_PI), temp_Bondlength*sin(1.0*M_PI))); 247 polygon.push_back( Vector(Bondlength*cos(0.8*M_PI), temp_Bondlength*cos(1.4*M_PI), temp_Bondlength*sin(1.4*M_PI))); 248 polygon.push_back( Vector(Bondlength*cos(0.8*M_PI), temp_Bondlength*cos(1.8*M_PI), temp_Bondlength*sin(1.8*M_PI))); 249 } 250 ASSERT( polygon.size() == 11, 251 "SphericalPointDistribution::get<11>() - polygon has wrong size."); 252 return polygon; 253 } 254 255 template <> 256 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<12>() 257 { 258 Polygon_t polygon; 259 polygon.push_back( Vector(Bondlength,0.,0.)); 260 polygon.push_back( Vector(-Bondlength, 0.0, 0.0)); 261 const double temp_Bondlength = Bondlength*0.5*SQRT_3; 262 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength, 0.0)); 263 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength*cos(0.4*M_PI), temp_Bondlength*sin(0.4*M_PI))); 264 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength*cos(0.8*M_PI), temp_Bondlength*sin(0.8*M_PI))); 265 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength*cos(1.2*M_PI), temp_Bondlength*sin(1.2*M_PI))); 266 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength*cos(1.6*M_PI), temp_Bondlength*sin(1.6*M_PI))); 267 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, -temp_Bondlength, 0.0)); 268 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, -temp_Bondlength*cos(0.4*M_PI), -temp_Bondlength*sin(0.4*M_PI))); 269 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, -temp_Bondlength*cos(0.8*M_PI), -temp_Bondlength*sin(0.8*M_PI))); 270 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, -temp_Bondlength*cos(1.2*M_PI), -temp_Bondlength*sin(1.2*M_PI))); 271 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, -temp_Bondlength*cos(1.6*M_PI), -temp_Bondlength*sin(1.6*M_PI))); 272 ASSERT( polygon.size() == 12, 273 "SphericalPointDistribution::get<12>() - polygon has wrong size."); 274 return polygon; 275 } 276 277 template <> 278 SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<14>() 279 { 280 Polygon_t polygon; 281 polygon.push_back( Vector(Bondlength,0.,0.)); 282 polygon.push_back( Vector(-Bondlength, 0.0, 0.0)); 283 const double temp_Bondlength = Bondlength*0.5*SQRT_3; 284 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength, 0.0)); 285 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength*cos(M_PI/3.0), temp_Bondlength*sin(M_PI/3.0))); 286 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength*cos(2.0*M_PI/3.0), temp_Bondlength*sin(2.0*M_PI/3.0))); 287 polygon.push_back( Vector(temp_Bondlength/SQRT_3, -temp_Bondlength, 0.0)); 288 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength*cos(4.0*M_PI/3.0), temp_Bondlength*sin(4.0*M_PI/3.0))); 289 polygon.push_back( Vector(temp_Bondlength/SQRT_3, temp_Bondlength*cos(5.0*M_PI/3.0), temp_Bondlength*sin(5.0*M_PI/3.0))); 290 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*cos(M_PI/6.0), temp_Bondlength*sin(M_PI/6.0))); 291 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*cos(M_PI/3.0 +M_PI/6.0), temp_Bondlength*sin(M_PI/3.0+M_PI/6.0))); 292 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*cos(2.0*M_PI/3.0 +M_PI/6.0), temp_Bondlength*sin(2.0*M_PI/3.0 +M_PI/6.0))); 293 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*cos(3.0*M_PI/3.0 +M_PI/6.0), temp_Bondlength*sin(3.0*M_PI/3.0 +M_PI/6.0))); 294 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*cos(4.0*M_PI/3.0 +M_PI/6.0), temp_Bondlength*sin(4.0*M_PI/3.0 +M_PI/6.0))); 295 polygon.push_back( Vector(-temp_Bondlength/SQRT_3, temp_Bondlength*cos(5.0*M_PI/3.0 +M_PI/6.0), temp_Bondlength*sin(5.0*M_PI/3.0 +M_PI/6.0))); 296 ASSERT( polygon.size() == 14, 297 "SphericalPointDistribution::get<14>() - polygon has wrong size."); 298 return polygon; 299 } 85 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<0>(); 86 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<1>(); 87 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<2>(); 88 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<3>(); 89 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<4>(); 90 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<5>(); 91 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<6>(); 92 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<7>(); 93 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<8>(); 94 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<9>(); 95 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<10>(); 96 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<11>(); 97 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<12>(); 98 template <> SphericalPointDistribution::Polygon_t SphericalPointDistribution::get<14>(); 300 99 301 100 #endif /* SPHERICALPOINTDISTRIBUTION_HPP_ */ -
src/Fragmentation/Makefile.am
r041b77 rf54930 10 10 Fragmentation/Exporters/SaturatedFragment.cpp \ 11 11 Fragmentation/Exporters/SaturationDistanceMaximizer.cpp \ 12 Fragmentation/Exporters/SphericalPointDistribution.cpp \ 13 Fragmentation/Exporters/SphericalPointDistribution_getPoints.cpp \ 12 14 Fragmentation/Homology/FragmentEdge.cpp \ 13 15 Fragmentation/Homology/FragmentNode.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.