=================================================================================================================================================================
| 2431 | } |
| 2432 | //================================================================================================================================================================= |
| 2433 | void soapGTO( |
| 2434 | py::array_t<double> derivatives, |
| 2435 | py::array_t<double> descriptor, |
| 2436 | py::array_t<double> cdevX, |
| 2437 | py::array_t<double> cdevY, |
| 2438 | py::array_t<double> cdevZ, |
| 2439 | py::array_t<double> positions, |
| 2440 | py::array_t<double> centers, |
| 2441 | py::array_t<int> center_indices, |
| 2442 | py::array_t<double> alphasArr, |
| 2443 | py::array_t<double> betasArr, |
| 2444 | py::array_t<int> atomicNumbersArr, |
| 2445 | py::array_t<int> orderedSpeciesArr, |
| 2446 | py::array_t<double> speciesWeightsArr, |
| 2447 | const double rCut, |
| 2448 | const double cutoffPadding, |
| 2449 | const int nMax, |
| 2450 | const int lMax, |
| 2451 | const double eta, |
| 2452 | py::dict weighting, |
| 2453 | string average, |
| 2454 | string compression, |
| 2455 | py::array_t<int> indices, |
| 2456 | const bool attach, |
| 2457 | const bool return_descriptor, |
| 2458 | const bool return_derivatives, |
| 2459 | CellList cell_list_atoms |
| 2460 | ) { |
| 2461 | const int totalAN = atomicNumbersArr.shape(0); |
| 2462 | const int nCenters = centers.shape(0); |
| 2463 | auto derivatives_mu = derivatives.mutable_unchecked<4>(); |
| 2464 | auto atomicNumbers = atomicNumbersArr.unchecked<1>(); |
| 2465 | auto species = orderedSpeciesArr.unchecked<1>(); |
| 2466 | auto speciesWeights = speciesWeightsArr.unchecked<1>(); |
| 2467 | |
| 2468 | int nSpecies = orderedSpeciesArr.shape(0); |
| 2469 | auto indices_u = indices.unchecked<1>(); |
| 2470 | double *alphas = (double*)alphasArr.request().ptr; |
| 2471 | double *betas = (double*)betasArr.request().ptr; |
| 2472 | double oOeta = 1.0/eta; |
| 2473 | double oOeta3O2 = sqrt(oOeta*oOeta*oOeta); |
| 2474 | double nMax2 = nMax*nMax; |
| 2475 | auto centers_u = centers.unchecked<2>(); |
| 2476 | auto center_indices_u = center_indices.unchecked<1>(); |
| 2477 | auto positions_u = positions.unchecked<2>(); |
| 2478 | int nFeatures = 0; |
| 2479 | bool crossover = true; |
| 2480 | if ( compression == "mu1nu1" ){ |
| 2481 | nFeatures = nSpecies*(lMax+1)*(nMax*nMax); |
| 2482 | } else if ( compression == "mu2" ){ |
| 2483 | nSpecies = 1; |
| 2484 | nFeatures = nMax * (nMax+1) * (lMax+1) / 2; |
| 2485 | } else if ( compression == "crossover" ){ |
| 2486 | nFeatures = nSpecies*(lMax+1)*((nMax+1)*nMax)/2; |
| 2487 | crossover = false; |
| 2488 | } else{ |
| 2489 | nFeatures = (nSpecies*nMax)*(nSpecies*nMax+1)/2*(lMax+1); |
| 2490 | } |
no test coverage detected