Skip to content
Snippets Groups Projects
Commit 089e56a5 authored by Marcin Kirsz's avatar Marcin Kirsz
Browse files

make public

parent cb8aa24c
No related branches found
No related tags found
No related merge requests found
Pipeline #37411 passed
Pipeline: Tadah.MLIP

#37412

    ......@@ -148,6 +148,8 @@ class DesignMatrix : public DesignMatrixBase {
    fill_T(stdb);
    // for opm we need to find first rows for each structure
    std::cout << "Build PHI" << std::endl;
    std::vector<size_t> rows(stdb.size());
    size_t row=0;
    for (size_t s=0; s<stdb.size(); ++s) {
    ......@@ -173,6 +175,25 @@ class DesignMatrix : public DesignMatrixBase {
    }
    }
    void build(size_t &row, const Structure &st, const StDescriptors &st_d) {
    double escale = 1;
    if (scale) escale = st.eweight*eweightglob/st.natoms();
    f.calc_phi_energy_row(Phi,row,escale,st,st_d);
    if (force) {
    double fscale = 1;
    if (scale) fscale = st.fweight*fweightglob/st.natoms()/3.0;///f_std_dev;
    f.calc_phi_force_rows(Phi,row,fscale,st,st_d);
    }
    if (stress) {
    double sscale_arr[6] {1,1,1,1,1,1};
    if (scale)
    for(size_t xy=0;xy<6;++xy)
    sscale_arr[xy] = st.sweight*sweightglob/6.0;///s_std_dev[xy];
    f.calc_phi_stress_rows(Phi,row,sscale_arr,st,st_d);
    }
    }
    private:
    Config &config;
    ......@@ -300,24 +321,5 @@ class DesignMatrix : public DesignMatrixBase {
    }
    }
    }
    void build(size_t &row, const Structure &st, const StDescriptors &st_d) {
    double escale = 1;
    if (scale) escale = st.eweight*eweightglob/st.natoms();
    f.calc_phi_energy_row(Phi,row,escale,st,st_d);
    if (force) {
    double fscale = 1;
    if (scale) fscale = st.fweight*fweightglob/st.natoms()/3.0;///f_std_dev;
    f.calc_phi_force_rows(Phi,row,fscale,st,st_d);
    }
    if (stress) {
    double sscale_arr[6] {1,1,1,1,1,1};
    if (scale)
    for(size_t xy=0;xy<6;++xy)
    sscale_arr[xy] = st.sweight*sweightglob/6.0;///s_std_dev[xy];
    f.calc_phi_stress_rows(Phi,row,sscale_arr,st,st_d);
    }
    }
    };
    #endif
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment