MCPcopy Create free account
hub / github.com/SINGROUP/dscribe / soapGeneral

Function soapGeneral

dscribe/ext/soapGeneral.cpp:1865–2148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1863
1864
1865void soapGeneral(
1866 py::array_t<double> PsArr,
1867 py::array_t<double> positions,
1868 py::array_t<double> HposArr,
1869 py::array_t<int> atomicNumbersArr,
1870 py::array_t<int> orderedSpeciesArr,
1871 py::array_t<double> speciesWeightsArr,
1872 double rCut,
1873 double cutoffPadding,
1874 int nMax,
1875 int lMax,
1876 double eta,
1877 py::dict weighting,
1878 py::array_t<double> rwArr,
1879 py::array_t<double> gssArr,
1880 string average,
1881 string compression,
1882 CellList cellList)
1883{
1884 int nAtoms = atomicNumbersArr.shape(0);
1885 int Nt = orderedSpeciesArr.shape(0);
1886 int Hs = HposArr.shape(0);
1887 int nFeatures = 0;
1888 bool crossover = true;
1889 if ( compression == "mu1nu1" ){
1890 nFeatures = Nt*(lMax+1)*(nMax*nMax);
1891 } else if( compression == "mu2" ){
1892 Nt = 1;
1893 nFeatures = nMax*(nMax+1)*(lMax+1)/2;
1894 } else if ( compression == "crossover" ){
1895 crossover = false;
1896 nFeatures = Nt*(lMax+1)*((nMax+1)*nMax)/2;
1897 } else{
1898 nFeatures = (Nt*nMax)*(Nt*nMax+1)*(lMax+1)/2;
1899 }
1900 auto atomicNumbers = atomicNumbersArr.unchecked<1>();
1901 auto species = orderedSpeciesArr.unchecked<1>();
1902 auto Ps = PsArr.mutable_unchecked<2>();
1903 auto speciesWeights = speciesWeightsArr.unchecked<1>();
1904 double *Hpos = (double*)HposArr.request().ptr;
1905 double *rw = (double*)rwArr.request().ptr;
1906 double *gss = (double*)gssArr.request().ptr;
1907 double* cf = factorListSet();
1908 const int rsize = 100; // The number of points in the radial integration grid
1909 double rCut2 = rCut*rCut;
1910 double* dx = tot;
1911 double* dy = tot;
1912 double* dz = tot;
1913 double* ris = tot;
1914 double* weights = tot;
1915 double* oOri = tot;
1916 double* ws = getws();
1917 double* oOr = getoOr(rw, rsize);
1918 double* rw2 = getrw2(rw, rsize);
1919 double* oO4arri = totrs;
1920 double* minExp = totrs;
1921 double* pluExp = totrs;
1922 double* C = (double*) malloc(2*sd*(lMax+1)*(lMax+1)*nMax);

Callers 1

createMethod · 0.85

Calls 15

factorListSetFunction · 0.85
getwsFunction · 0.85
getoOrFunction · 0.85
getrw2Function · 0.85
getDeltasFunction · 0.85
getWeightsFunction · 0.85
getFlirFunction · 0.85
getYlmiFunction · 0.85
getIntegrandFunction · 0.85
getCFunction · 0.85
accumCFunction · 0.85
getPWithCompressionFunction · 0.85

Tested by

no test coverage detected