| 160 | } |
| 161 | |
| 162 | void checkAbsoluteValue(Structure& s, |
| 163 | ElementMap& em, |
| 164 | size_t const type, |
| 165 | string const setupLine, |
| 166 | double const value) |
| 167 | { |
| 168 | SymFnc* sf = setupSymmetryFunction(em, type, setupLine); |
| 169 | |
| 170 | // Allocate symmetry function arrays. |
| 171 | s.atoms.at(0).numSymmetryFunctions = 1; |
| 172 | s.atoms.at(0).numSymmetryFunctionDerivatives = vector<size_t>(em.size(), 1); |
| 173 | #ifndef NOSFCACHE |
| 174 | s.atoms.at(0).cacheSizePerElement = vector<size_t>(maxElements, |
| 175 | maxCacheSize); |
| 176 | #endif |
| 177 | s.atoms.at(0).allocate(true); |
| 178 | |
| 179 | // Calculate symmetry function for atom 0. |
| 180 | recalculateSymmetryFunction(s, s.atoms.at(0), *sf); |
| 181 | |
| 182 | BOOST_TEST_INFO(string("Symmetry function values, type ") |
| 183 | << type << "\n"); |
| 184 | // cerr << strpr("%24.16E\n", s.atoms.at(0).G.at(0)); |
| 185 | BOOST_REQUIRE_SMALL(s.atoms.at(0).G.at(0) - value, accuracy); |
| 186 | |
| 187 | delete sf; |
| 188 | |
| 189 | return; |
| 190 | } |
| 191 | |
| 192 | BOOST_AUTO_TEST_SUITE(IntegrationTests) |
| 193 |
no test coverage detected