Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
bbe0ce70
Commit
bbe0ce70
authored
May 08, 2014
by
peastman
Browse files
Fixed incorrect specification of torsion-torsion terms in AMOEBA 2013 force field
parent
25e3852a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1903 additions
and
15 deletions
+1903
-15
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForce.cpp
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForce.cpp
+25
-12
wrappers/python/simtk/openmm/app/data/amoeba2013.xml
wrappers/python/simtk/openmm/app/data/amoeba2013.xml
+1876
-1
wrappers/python/simtk/openmm/app/data/amoeba2013_gk.xml
wrappers/python/simtk/openmm/app/data/amoeba2013_gk.xml
+1
-1
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+1
-1
No files found.
plugins/amoeba/openmmapi/src/AmoebaTorsionTorsionForce.cpp
View file @
bbe0ce70
...
...
@@ -86,42 +86,55 @@ ForceImpl* AmoebaTorsionTorsionForce::createImpl() const {
}
AmoebaTorsionTorsionForce
::
TorsionTorsionGridInfo
::
TorsionTorsionGridInfo
(
const
TorsionTorsionGrid
&
grid
)
{
_grid
=
grid
;
if
(
grid
[
0
][
0
][
0
]
!=
grid
[
1
][
0
][
0
])
_grid
=
grid
;
else
{
// We need to transpose the grid.
int
xsize
=
grid
[
0
].
size
();
int
ysize
=
grid
.
size
();
_grid
.
resize
(
xsize
);
for
(
int
i
=
0
;
i
<
xsize
;
i
++
)
{
_grid
[
i
].
resize
(
ysize
);
for
(
int
j
=
0
;
j
<
ysize
;
j
++
)
_grid
[
i
][
j
]
=
grid
[
j
][
i
];
}
}
_startValues
[
0
]
=
_grid
[
0
][
0
][
0
];
_startValues
[
1
]
=
_grid
[
0
][
0
][
1
];
_spacing
[
0
]
=
static_cast
<
double
>
(
_grid
.
size
()
-
1
)
/
360.0
;
_spacing
[
1
]
=
static_cast
<
double
>
(
grid
.
size
()
-
1
)
/
360.0
;
_spacing
[
1
]
=
static_cast
<
double
>
(
_
grid
.
size
()
-
1
)
/
360.0
;
_size
[
0
]
=
static_cast
<
int
>
(
grid
.
size
());
_size
[
1
]
=
static_cast
<
int
>
(
grid
[
0
].
size
());
_size
[
0
]
=
static_cast
<
int
>
(
_
grid
.
size
());
_size
[
1
]
=
static_cast
<
int
>
(
_
grid
[
0
].
size
());
if
(
grid
[
0
][
0
].
size
()
==
3
)
{
if
(
_
grid
[
0
][
0
].
size
()
==
3
)
{
// We need to compute the derivatives ourselves. First determine if the grid is periodic.
int
xsize
=
_size
[
0
];
int
ysize
=
_size
[
1
];
bool
periodic
=
true
;
for
(
int
i
=
0
;
i
<
xsize
;
i
++
)
if
(
grid
[
i
][
0
][
2
]
!=
grid
[
i
][
ysize
-
1
][
2
])
if
(
_
grid
[
i
][
0
][
2
]
!=
_
grid
[
i
][
ysize
-
1
][
2
])
periodic
=
false
;
for
(
int
i
=
0
;
i
<
ysize
;
i
++
)
if
(
grid
[
0
][
i
][
2
]
!=
grid
[
xsize
-
1
][
i
][
2
])
if
(
_
grid
[
0
][
i
][
2
]
!=
_
grid
[
xsize
-
1
][
i
][
2
])
periodic
=
false
;
// Compute derivatives with respect to the first angle.
vector
<
double
>
x
(
xsize
),
y
(
ysize
);
for
(
int
i
=
0
;
i
<
xsize
;
i
++
)
x
[
i
]
=
grid
[
i
][
0
][
0
];
for
(
int
i
=
0
;
i
<
x
size
;
i
++
)
y
[
i
]
=
grid
[
0
][
i
][
1
];
x
[
i
]
=
_
grid
[
i
][
0
][
0
];
for
(
int
i
=
0
;
i
<
y
size
;
i
++
)
y
[
i
]
=
_
grid
[
0
][
i
][
1
];
vector
<
double
>
d1
(
xsize
*
ysize
),
d2
(
xsize
*
ysize
),
d12
(
xsize
*
ysize
);
vector
<
double
>
t
(
xsize
),
deriv
(
xsize
);
for
(
int
i
=
0
;
i
<
ysize
;
i
++
)
{
for
(
int
j
=
0
;
j
<
xsize
;
j
++
)
t
[
j
]
=
grid
[
j
][
i
][
2
];
t
[
j
]
=
_
grid
[
j
][
i
][
2
];
if
(
periodic
)
SplineFitter
::
createPeriodicSpline
(
x
,
t
,
deriv
);
else
...
...
@@ -136,7 +149,7 @@ AmoebaTorsionTorsionForce::TorsionTorsionGridInfo::TorsionTorsionGridInfo(const
deriv
.
resize
(
ysize
);
for
(
int
i
=
0
;
i
<
xsize
;
i
++
)
{
for
(
int
j
=
0
;
j
<
ysize
;
j
++
)
t
[
j
]
=
grid
[
i
][
j
][
2
];
t
[
j
]
=
_
grid
[
i
][
j
][
2
];
if
(
periodic
)
SplineFitter
::
createPeriodicSpline
(
y
,
t
,
deriv
);
else
...
...
wrappers/python/simtk/openmm/app/data/amoeba2013.xml
View file @
bbe0ce70
This diff is collapsed.
Click to expand it.
wrappers/python/simtk/openmm/app/data/amoeba2013_gk.xml
View file @
bbe0ce70
<ForceField>
<Info>
<Source>
amoebapro13.prm
</Source>
<DateGenerated>
2014-0
3-11
</DateGenerated>
<DateGenerated>
2014-0
5-08
</DateGenerated>
<Reference>
Yue Shi, Zhen Xia, Jiajing Zhang, Robert Best, Chuanjie Wu, Jay W. Ponder, and Pengyu Ren. Polarizable Atomic Multipole-Based AMOEBA Force Field for Proteins. Journal of Chemical Theory and Computation, 9(9):4046–4063, 2013.
</Reference>
</Info>
<AmoebaGeneralizedKirkwoodForce
solventDielectric=
"78.3"
soluteDielectric=
"1.0"
includeCavityTerm=
"1"
probeRadius=
"0.14"
surfaceAreaFactor=
"-170.351730663"
>
...
...
wrappers/python/simtk/openmm/app/forcefield.py
View file @
bbe0ce70
...
...
@@ -2505,7 +2505,7 @@ class AmoebaTorsionTorsionGenerator:
gridRow
.
append
(
float
(
gridEntry
.
attrib
[
'angle1'
]))
gridRow
.
append
(
float
(
gridEntry
.
attrib
[
'angle2'
]))
gridRow
.
append
(
float
(
gridEntry
.
attrib
[
'f'
]))
if
'fx'
in
gridEn
erg
y
.
attrib
:
if
'fx'
in
gridEn
tr
y
.
attrib
:
gridRow
.
append
(
float
(
gridEntry
.
attrib
[
'fx'
]))
gridRow
.
append
(
float
(
gridEntry
.
attrib
[
'fy'
]))
gridRow
.
append
(
float
(
gridEntry
.
attrib
[
'fxy'
]))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment