Skip to content

Commit 3a24887

Browse files
committed
Added screen type for expol
1 parent c2e3862 commit 3a24887

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

include/ff/hippo/expolscrtyp.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#pragma once
2+
3+
namespace tinker {
4+
enum class ExpolScr
5+
{
6+
NONE,
7+
S2U,
8+
S2,
9+
G
10+
};
11+
}

include/ff/hippomod.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "ff/energybuffer.h"
33
#include "ff/hippo/chgpen.h"
44
#include "ff/hippo/echgtrn.h"
5+
#include "ff/hippo/expolscrtyp.h"
56

67
// mplpot
78
namespace tinker {
@@ -68,11 +69,10 @@ TINKER_EXTERN Chgtrn ctrntyp;
6869

6970
// expol
7071
namespace tinker {
71-
TINKER_EXTERN CountBuffer nexpol;
7272
TINKER_EXTERN real* kpep;
7373
TINKER_EXTERN real* prepep;
7474
TINKER_EXTERN real* dmppep;
75-
TINKER_EXTERN real* polscale;
76-
TINKER_EXTERN real* invpolscale;
7775
TINKER_EXTERN int* lpep;
76+
TINKER_EXTERN real (*polscale)[3][3];
77+
TINKER_EXTERN ExpolScr scrtyp;
7878
}

src/hippo/expol.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,43 @@
22
#include "ff/atom.h"
33
#include "ff/hippomod.h"
44
#include "tool/darray.h"
5+
#include "tool/iofortstr.h"
56
#include <tinker/detail/expol.hh>
67
#include <tinker/detail/polpot.hh>
78

89
namespace tinker {
910
void expolData(RcOp op)
1011
{
11-
// TODO Use format like "Potent::EXPOL"
1212
if (not polpot::use_expol)
1313
return;
1414

1515
if (op & RcOp::DEALLOC) {
1616
darray::deallocate(kpep, prepep, dmppep, lpep);
17+
darray::deallocate(polscale);
18+
19+
scrtyp = ExpolScr::NONE;
1720
}
1821

1922
if (op & RcOp::ALLOC) {
2023
darray::allocate(n, &kpep, &prepep, &dmppep, &lpep);
24+
darray::allocate(n, &polscale);
2125
}
2226

2327
if (op & RcOp::INIT) {
2428
darray::copyin(g::q0, n, kpep, expol::kpep);
2529
darray::copyin(g::q0, n, prepep, expol::prepep);
2630
darray::copyin(g::q0, n, dmppep, expol::dmppep);
2731
darray::copyin(g::q0, n, lpep, expol::lpep);
32+
33+
FstrView scrview = polpot::scrtyp;
34+
if (scrview == "S2U")
35+
scrtyp = ExpolScr::S2U;
36+
else if (scrview == "S2 ")
37+
scrtyp = ExpolScr::S2;
38+
else if (scrview == "G ")
39+
scrtyp = ExpolScr::G;
40+
else
41+
scrtyp = ExpolScr::NONE;
2842
}
2943
}
3044
}

0 commit comments

Comments
 (0)