| 201 | } |
| 202 | |
| 203 | void checkAbsoluteValueGroup(Structure& s, |
| 204 | ElementMap& em, |
| 205 | size_t const type, |
| 206 | string const setupLine, |
| 207 | double const value) |
| 208 | { |
| 209 | SymFnc* sf = setupSymmetryFunction(em, type, setupLine); |
| 210 | |
| 211 | SymGrp* sfg = setupSymmetryFunctionGroup(em, *sf); |
| 212 | |
| 213 | // Allocate symmetry function arrays. |
| 214 | s.atoms.at(0).numSymmetryFunctions = 1; |
| 215 | s.atoms.at(0).numSymmetryFunctionDerivatives = vector<size_t>(em.size(), 1); |
| 216 | #ifndef NOSFCACHE |
| 217 | s.atoms.at(0).cacheSizePerElement = vector<size_t>(maxElements, |
| 218 | maxCacheSize); |
| 219 | #endif |
| 220 | s.atoms.at(0).allocate(true); |
| 221 | |
| 222 | // Calculate symmetry function for atom 0. |
| 223 | recalculateSymmetryFunctionGroup(s, s.atoms.at(0), *sfg); |
| 224 | |
| 225 | BOOST_TEST_INFO(string("Symmetry function values, type ") |
| 226 | << type << "\n"); |
| 227 | BOOST_REQUIRE_SMALL(s.atoms.at(0).G.at(0) - value, accuracy); |
| 228 | |
| 229 | delete sf; |
| 230 | |
| 231 | return; |
| 232 | } |
| 233 | |
| 234 | BOOST_AUTO_TEST_SUITE(IntegrationTests) |
| 235 |
no test coverage detected