Skip to content

Commit d8b38a1

Browse files
committed
created parameter arrays
1 parent 58961da commit d8b38a1

File tree

5 files changed

+58
-0
lines changed

5 files changed

+58
-0
lines changed

include/ff/hippo/expol.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#pragma once
2+
#include "ff/energybuffer.h"
3+
#include "tool/rcman.h"
4+
5+
namespace tinker {
6+
void expolData(RcOp);
7+
8+
void alterpol();
9+
}

include/ff/hippomod.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,19 @@ TINKER_EXTERN virial_prec virial_ect[9];
6565

6666
TINKER_EXTERN Chgtrn ctrntyp;
6767
}
68+
69+
// kexpl and expol
70+
namespace tinker {
71+
TINKER_EXTERN real* pepk;
72+
TINKER_EXTERN real* peppre;
73+
TINKER_EXTERN real* pepdmp;
74+
TINKER_EXTERN int* pepl;
75+
76+
TINKER_EXTERN CountBuffer nexpol;
77+
TINKER_EXTERN real* kpep;
78+
TINKER_EXTERN real* prepep;
79+
TINKER_EXTERN real* dmppep;
80+
TINKER_EXTERN real* polscale;
81+
TINKER_EXTERN real* invpolscale;
82+
TINKER_EXTERN int* lpep;
83+
}

src/cmakesrc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ hippo/edisp.cpp
4444
hippo/empole.cpp
4545
hippo/epolar.cpp
4646
hippo/erepel.cpp
47+
hippo/expol.cpp
4748
hippo/field.cpp
4849
hippo/induce.cpp
4950
initial.cpp

src/energy.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ void energy_core(int vers, unsigned tsflag, const TimeScaleConfig& tsconfig)
275275

276276
#include "ff/elec.h"
277277
#include "ff/hippo/cflux.h"
278+
#include "ff/hippo/expol.h"
278279
#include "ff/pme.h"
279280
#include "math/zero.h"
280281

@@ -457,6 +458,7 @@ void energyData(RcOp op)
457458
RcMan cflux43{cfluxData, op};
458459
RcMan empole43{empoleChgpenData, op};
459460
RcMan epolar43{epolarChgpenData, op};
461+
RcMan expol42{expolData, op};
460462
RcMan echgtrn42{echgtrnData, op};
461463
RcMan erepel42{erepelData, op};
462464
RcMan edisp42{edispData, op};

src/hippo/expol.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include "ff/hippo/expol.h"
2+
#include "ff/atom.h"
3+
#include "ff/hippomod.h"
4+
#include "tool/darray.h"
5+
#include <tinker/detail/kexpl.hh>
6+
#include <tinker/detail/polpot.hh>
7+
8+
namespace tinker {
9+
void expolData(RcOp op)
10+
{
11+
// TODO Return if expol not used
12+
if (not polpot::use_expol)
13+
return;
14+
15+
if (op & RcOp::DEALLOC) {
16+
darray::deallocate(pepk, peppre, pepdmp, pepl);
17+
}
18+
19+
if (op & RcOp::ALLOC) {
20+
darray::allocate(n, &pepk, &peppre, &pepdmp, &pepl);
21+
}
22+
23+
if (op & RcOp::INIT) {
24+
darray::copyin(g::q0, n, pepk, kexpl::pepk);
25+
darray::copyin(g::q0, n, peppre, kexpl::peppre);
26+
darray::copyin(g::q0, n, pepdmp, kexpl::pepdmp);
27+
darray::copyin(g::q0, n, pepl, kexpl::pepl);
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)