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
abc801dd
"wrappers/python/vscode:/vscode.git/clone" did not exist on "f18fa49cfce1a651f55753504b80db3d2ba163bf"
Commit
abc801dd
authored
Aug 18, 2016
by
Rafal P. Wiewiora
Browse files
fixes
parent
406105ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+22
-22
No files found.
wrappers/python/simtk/openmm/app/forcefield.py
View file @
abc801dd
...
@@ -1888,48 +1888,48 @@ class PeriodicTorsionGenerator(object):
...
@@ -1888,48 +1888,48 @@ class PeriodicTorsionGenerator(object):
for
(
t2
,
t3
,
t4
)
in
itertools
.
permutations
(((
type2
,
1
),
(
type3
,
2
),
(
type4
,
3
))):
for
(
t2
,
t3
,
t4
)
in
itertools
.
permutations
(((
type2
,
1
),
(
type3
,
2
),
(
type4
,
3
))):
if
t2
[
0
]
in
types2
and
t3
[
0
]
in
types3
and
t4
[
0
]
in
types4
:
if
t2
[
0
]
in
types2
and
t3
[
0
]
in
types3
and
t4
[
0
]
in
types4
:
# topology atom indexes
# topology atom indexes
a
1
=
torsion
[
t2
[
1
]]
a
2
=
torsion
[
t2
[
1
]]
a
2
=
torsion
[
t3
[
1
]]
a
3
=
torsion
[
t3
[
1
]]
a4
=
torsion
[
t4
[
1
]]
a4
=
torsion
[
t4
[
1
]]
# residue indexes
# residue indexes
r1
=
data
.
atoms
[
a1
].
residue
.
index
r2
=
data
.
atoms
[
a2
].
residue
.
index
r2
=
data
.
atoms
[
a2
].
residue
.
index
r3
=
data
.
atoms
[
a3
].
residue
.
index
r4
=
data
.
atoms
[
a4
].
residue
.
index
r4
=
data
.
atoms
[
a4
].
residue
.
index
# template atom indexes
# template atom indexes
ta1
=
data
.
atomTemplateIndexes
[
data
.
atoms
[
a1
]]
ta2
=
data
.
atomTemplateIndexes
[
data
.
atoms
[
a2
]]
ta2
=
data
.
atomTemplateIndexes
[
data
.
atoms
[
a2
]]
ta3
=
data
.
atomTemplateIndexes
[
data
.
atoms
[
a3
]]
ta4
=
data
.
atomTemplateIndexes
[
data
.
atoms
[
a4
]]
ta4
=
data
.
atomTemplateIndexes
[
data
.
atoms
[
a4
]]
# elements
# elements
e1
=
data
.
atoms
[
a1
].
element
e2
=
data
.
atoms
[
a2
].
element
e2
=
data
.
atoms
[
a2
].
element
e3
=
data
.
atoms
[
a3
].
element
e4
=
data
.
atoms
[
a4
].
element
e4
=
data
.
atoms
[
a4
].
element
# the following for AMBER only - TODO: decide how to pass this in ffxml's
# the following for AMBER only - TODO: decide how to pass this in ffxml's
if
isAmber
:
if
isAmber
:
if
not
hasWildcard
:
if
not
hasWildcard
:
if
t2
[
0
]
==
t4
[
0
]
and
(
r1
>
r4
or
(
r1
==
r4
and
ta1
>
ta4
)):
if
t2
[
0
]
==
t4
[
0
]
and
(
r2
>
r4
or
(
r2
==
r4
and
ta2
>
ta4
)):
(
a1
,
a4
)
=
(
a4
,
a1
)
if
t3
[
0
]
==
t4
[
0
]
and
(
r2
>
r4
or
(
r2
==
r4
and
ta2
>
ta4
)):
(
a2
,
a4
)
=
(
a4
,
a2
)
(
a2
,
a4
)
=
(
a4
,
a2
)
if
t2
[
0
]
==
t3
[
0
]
and
(
r1
>
r2
or
(
r1
==
r2
and
ta1
>
ta2
)):
if
t3
[
0
]
==
t4
[
0
]
and
(
r3
>
r4
or
(
r3
==
r4
and
ta3
>
ta4
)):
(
a1
,
a2
)
=
(
a2
,
a1
)
(
a3
,
a4
)
=
(
a4
,
a3
)
if
t2
[
0
]
==
t3
[
0
]
and
(
r2
>
r3
or
(
r2
==
r3
and
ta2
>
ta3
)):
(
a2
,
a3
)
=
(
a3
,
a2
)
else
:
else
:
if
e1
==
e4
and
(
r1
>
r4
or
(
r1
==
r4
and
ta1
>
ta4
)):
(
a1
,
a4
)
=
(
a4
,
a1
)
if
e2
==
e4
and
(
r2
>
r4
or
(
r2
==
r4
and
ta2
>
ta4
)):
if
e2
==
e4
and
(
r2
>
r4
or
(
r2
==
r4
and
ta2
>
ta4
)):
(
a2
,
a4
)
=
(
a4
,
a2
)
(
a2
,
a4
)
=
(
a4
,
a2
)
if
(
r1
>
r2
or
(
r1
==
r2
and
ta1
>
ta2
)):
if
e3
==
e4
and
(
r3
>
r4
or
(
r3
==
r4
and
ta3
>
ta4
)):
(
a1
,
a2
)
=
(
a2
,
a1
)
(
a3
,
a4
)
=
(
a4
,
a3
)
if
r2
>
r3
or
(
r2
==
r3
and
ta2
>
ta3
):
(
a2
,
a3
)
=
(
a3
,
a2
)
# the following is OpenMM default
# the following is OpenMM default
else
:
else
:
if
t2
[
0
]
==
t4
[
0
]
and
(
r1
>
r4
or
(
r1
==
r4
and
ta1
>
ta4
)):
if
t2
[
0
]
==
t4
[
0
]
and
(
r2
>
r4
or
(
r2
==
r4
and
ta2
>
ta4
)):
(
a1
,
a4
)
=
(
a4
,
a1
)
if
t3
[
0
]
==
t4
[
0
]
and
(
r2
>
r4
or
(
r2
==
r4
and
ta2
>
ta4
)):
(
a2
,
a4
)
=
(
a4
,
a2
)
(
a2
,
a4
)
=
(
a4
,
a2
)
if
t2
[
0
]
==
t3
[
0
]
and
(
r1
>
r2
or
(
r1
==
r2
and
ta1
>
ta2
)):
if
t3
[
0
]
==
t4
[
0
]
and
(
r3
>
r4
or
(
r3
==
r4
and
ta3
>
ta4
)):
(
a1
,
a2
)
=
(
a2
,
a1
)
(
a3
,
a4
)
=
(
a4
,
a3
)
if
hasTwoWildcards
and
(
r1
>
r2
or
(
r1
==
r2
and
ta1
>
ta2
)):
if
t2
[
0
]
==
t3
[
0
]
and
(
r2
>
r3
or
(
r2
==
r3
and
ta2
>
ta3
)):
(
a1
,
a2
)
=
(
a2
,
a1
)
(
a2
,
a3
)
=
(
a3
,
a2
)
match
=
(
a1
,
a2
,
torsion
[
0
],
a4
,
tordef
)
elif
hasTwoWildcards
and
(
r2
>
r3
or
(
r2
==
r3
and
ta2
>
ta3
)):
(
a2
,
a3
)
=
(
a3
,
a2
)
match
=
(
a2
,
a3
,
torsion
[
0
],
a4
,
tordef
)
break
break
if
match
is
not
None
:
if
match
is
not
None
:
(
a1
,
a2
,
a3
,
a4
,
tordef
)
=
match
(
a1
,
a2
,
a3
,
a4
,
tordef
)
=
match
...
...
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