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
420fac9c
"docs/OpenMMUsersGuide.doc" did not exist on "d0aba41fbb68df58ab498fcc9aeabce3609bd4d7"
Commit
420fac9c
authored
Mar 16, 2012
by
Peter Eastman
Browse files
Made constrained energy minimization hopefully more robust
parent
73b4405a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
openmmapi/src/LocalEnergyMinimizer.cpp
openmmapi/src/LocalEnergyMinimizer.cpp
+10
-0
No files found.
openmmapi/src/LocalEnergyMinimizer.cpp
View file @
420fac9c
...
@@ -169,6 +169,16 @@ void LocalEnergyMinimizer::minimize(Context& context, double tolerance, int maxI
...
@@ -169,6 +169,16 @@ void LocalEnergyMinimizer::minimize(Context& context, double tolerance, int maxI
break
;
// Further tightening the springs doesn't seem to be helping, so just give up.
break
;
// Further tightening the springs doesn't seem to be helping, so just give up.
prevMaxError
=
maxError
;
prevMaxError
=
maxError
;
k
*=
10
;
k
*=
10
;
if
(
maxError
>
100
*
constraintTol
)
{
// We've gotten far enough from a valid state that we might have trouble getting
// back, so reset to the original positions.
for
(
int
i
=
0
;
i
<
numParticles
;
i
++
)
{
x
[
3
*
i
]
=
initialPos
[
i
][
0
];
x
[
3
*
i
+
1
]
=
initialPos
[
i
][
1
];
x
[
3
*
i
+
2
]
=
initialPos
[
i
][
2
];
}
}
}
}
lbfgs_free
(
x
);
lbfgs_free
(
x
);
}
}
...
...
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