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
41e9a095
"vscode:/vscode.git/clone" did not exist on "0b35240df6e0f4e4178fe628bfe7c42a56587864"
Commit
41e9a095
authored
Jul 15, 2013
by
leeping
Browse files
Personal commit to make modeller easier to use
parent
ca489698
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
wrappers/python/simtk/openmm/app/modeller.py
wrappers/python/simtk/openmm/app/modeller.py
+6
-5
No files found.
wrappers/python/simtk/openmm/app/modeller.py
View file @
41e9a095
...
...
@@ -734,9 +734,8 @@ class Modeller(object):
else
:
delta
=
Vec3
(
random
.
random
(),
random
.
random
(),
random
.
random
())
*
nanometer
delta
*=
0.1
*
nanometer
/
norm
(
delta
)
if
len
(
expected
)
>
1
:
delta
+=
0.05
*
Vec3
(
random
.
random
(),
random
.
random
(),
random
.
random
())
*
nanometer
delta
*=
0.1
*
nanometer
/
norm
(
delta
)
delta
+=
0.05
*
Vec3
(
random
.
random
(),
random
.
random
(),
random
.
random
())
*
nanometer
delta
*=
0.1
*
nanometer
/
norm
(
delta
)
newPositions
.
append
(
self
.
positions
[
parent
.
index
]
+
delta
)
newTopology
.
addBond
(
newAtom
,
newH
)
else
:
...
...
@@ -758,7 +757,9 @@ class Modeller(object):
if
atoms
[
i
].
element
!=
elem
.
hydrogen
:
# This is a heavy atom, so make it immobile.
system
.
setParticleMass
(
i
,
0
)
context
=
Context
(
system
,
VerletIntegrator
(
0.0
))
from
simtk.openmm
import
Platform
plt
=
Platform
.
getPlatformByName
(
'Reference'
)
context
=
Context
(
system
,
VerletIntegrator
(
0.0
),
plt
)
context
.
setPositions
(
newPositions
)
LocalEnergyMinimizer
.
minimize
(
context
)
self
.
topology
=
newTopology
...
...
@@ -922,4 +923,4 @@ class Modeller(object):
if
bond
[
0
]
in
newAtoms
and
bond
[
1
]
in
newAtoms
:
newTopology
.
addBond
(
newAtoms
[
bond
[
0
]],
newAtoms
[
bond
[
1
]])
self
.
topology
=
newTopology
self
.
positions
=
newPositions
\ No newline at end of file
self
.
positions
=
newPositions
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