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

Merge branch 'develop' into 'main'

Develop

See merge request !10
parents b6351fa4 50306b38
No related branches found
No related tags found
2 merge requests!12Main,!10Develop
Pipeline #50279 passed
...@@ -40,4 +40,4 @@ build_release_static: ...@@ -40,4 +40,4 @@ build_release_static:
script: script:
- cd ${RELEASE_STATIC_DIR} - cd ${RELEASE_STATIC_DIR}
- cmake ../.. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} - cmake ../.. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}
- make -j ${CPU_BUILD} - make -j ${CPU_BUILD}
\ No newline at end of file
...@@ -919,6 +919,7 @@ void PairTadah::coeff(int narg, char **arg) ...@@ -919,6 +919,7 @@ void PairTadah::coeff(int narg, char **arg)
lt=TADAH::LammpsTadah(narg,arg); lt=TADAH::LammpsTadah(narg,arg);
manybody_flag = lt.initmb || !lt.linear ? 1 : 0; manybody_flag = lt.initmb || !lt.linear ? 1 : 0;
single_enable = lt.linear && !lt.initmb ? 1 : 0;
if (lt.dimer) { if (lt.dimer) {
manybody_flag=0; manybody_flag=0;
...@@ -1023,3 +1024,20 @@ void PairTadah::unpack_forward_comm(int n, int first, double *buf) ...@@ -1023,3 +1024,20 @@ void PairTadah::unpack_forward_comm(int n, int first, double *buf)
else else
lt.unpack_forward_nonlinear(n,first,buf); 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;
}
...@@ -42,6 +42,9 @@ namespace LAMMPS_NS { ...@@ -42,6 +42,9 @@ namespace LAMMPS_NS {
int nmax=0; int nmax=0;
void allocate(); void allocate();
double single(int /*i*/, int /*j*/, int itype, int jtype, double rsq,
double /*factor_coul*/, double /*factor_lj*/, double &fforce);
public: public:
PairTadah(class LAMMPS *); PairTadah(class LAMMPS *);
~PairTadah() override; ~PairTadah() override;
......
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