diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 494e8b6fcf78b24bc03524ad860c8f1a3b573f43..de1f39d44cbb99890e37c1291b41825542fd0e0e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,4 +40,4 @@ build_release_static: script: - cd ${RELEASE_STATIC_DIR} - cmake ../.. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} - - make -j ${CPU_BUILD} \ No newline at end of file + - make -j ${CPU_BUILD} diff --git a/ML-TADAH/pair_tadah.cpp b/ML-TADAH/pair_tadah.cpp index 84854e1d94aff4dfa87e5973d644b9f54ed260fa..365cb544a4ea60dc2c65ad146f5b538e710cb97e 100644 --- a/ML-TADAH/pair_tadah.cpp +++ b/ML-TADAH/pair_tadah.cpp @@ -919,6 +919,7 @@ void PairTadah::coeff(int narg, char **arg) lt=TADAH::LammpsTadah(narg,arg); manybody_flag = lt.initmb || !lt.linear ? 1 : 0; + single_enable = lt.linear && !lt.initmb ? 1 : 0; if (lt.dimer) { manybody_flag=0; @@ -1023,3 +1024,20 @@ void PairTadah::unpack_forward_comm(int n, int first, double *buf) else lt.unpack_forward_nonlinear(n,first,buf); } +double PairTadah::single(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double /*factor_lj*/, double &fforce) +{ + aed_type2 aed(lt.dsize); + fd_type fd(lt.dsize); + aed.set_zero(); + // if (lt.bias) + // aed(0) = 1.0; + double wj = lt.watom[jtype-1]; + double rij = sqrt(rsq); + double fc_ij = wj*lt.S.c2b->calc(rij); + double fcp_ij = wj*lt.S.c2b->calc_prime(rij); + lt.S.d2b->calc_all(rij,rsq,fc_ij,fcp_ij,aed, fd); + fforce = lt.model->fpredict(fd,aed,0)/rij; + double ei = lt.model->epredict(aed); + return ei; +} diff --git a/ML-TADAH/pair_tadah.h b/ML-TADAH/pair_tadah.h index 35c1682371ac138904cac8746d539df720609005..dc937026a73a139305eb34fee9148e3116adee77 100644 --- a/ML-TADAH/pair_tadah.h +++ b/ML-TADAH/pair_tadah.h @@ -42,6 +42,9 @@ namespace LAMMPS_NS { int nmax=0; void allocate(); + double single(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double /*factor_lj*/, double &fforce); + public: PairTadah(class LAMMPS *); ~PairTadah() override;