Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
71044ec
update
jhprinz Aug 13, 2016
c85fc53
fix
jhprinz Aug 13, 2016
c4c8724
fix
jhprinz Aug 13, 2016
67534f1
add tests
jhprinz Aug 14, 2016
044aa82
Merge branch 'ala' into enginefail
jhprinz Aug 19, 2016
88cd009
Merge branch 'ala' into enginefail
jhprinz Aug 19, 2016
ee8590f
update
jhprinz Aug 19, 2016
5e0f6e6
add tests
jhprinz Aug 19, 2016
6051a80
udpate
jhprinz Aug 19, 2016
c499aa5
more tests
jhprinz Aug 19, 2016
a0bf940
added correct errors
jhprinz Aug 19, 2016
f81394d
fix
jhprinz Aug 19, 2016
3895254
updates
jhprinz Aug 19, 2016
6e830cf
Merge branch 'ala' into enginefail
jhprinz Aug 19, 2016
d2cdd58
little updates
jhprinz Aug 20, 2016
50aed24
Merge branch 'ala' into enginefail
jhprinz Aug 21, 2016
61411d8
fix a special case in a test
jhprinz Aug 21, 2016
d8d696f
Merge branch 'master' of github.com:choderalab/openpathsampling into …
jhprinz Aug 22, 2016
3daf330
add tests
jhprinz Aug 23, 2016
207546d
fix test using nan template
jhprinz Aug 23, 2016
150f464
update test
jhprinz Aug 23, 2016
3acb843
fix default options
jhprinz Aug 23, 2016
0f81a6e
fix test
jhprinz Aug 23, 2016
f8061b5
fixes
jhprinz Aug 23, 2016
8bf1568
cleanup
jhprinz Aug 23, 2016
f7113aa
add example notebook
jhprinz Aug 23, 2016
5643ecf
little cleanup
jhprinz Aug 23, 2016
9810676
little cleanup
jhprinz Aug 23, 2016
c2eff38
little fix in generate
jhprinz Aug 23, 2016
25cfb40
docstring
jhprinz Aug 23, 2016
454749e
from default `stop` to `fail`
jhprinz Aug 23, 2016
f275912
revert notebook
jhprinz Aug 23, 2016
873a892
revert
jhprinz Aug 23, 2016
76009a1
revert
jhprinz Aug 23, 2016
003758a
revert
jhprinz Aug 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
jhprinz committed Aug 19, 2016
commit f81394d4860486e17f74e6746eda49f9f6d598d6
17 changes: 12 additions & 5 deletions openpathsampling/engines/dynamics_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,13 @@ def iter_generate(self, initial, running=None, direction=+1,

except:
# any other error we start a retry
errors.append(sys.exc_info())
if self.on_error != 'ignore':
e = sys.exc_info()
errors.append(e)
if 'Particle coordinate is nan' in str(e):
if self.on_nan != 'ignore':
has_nan = True
break
elif self.on_error != 'ignore':
has_error = True
break

Expand Down Expand Up @@ -567,7 +572,8 @@ def iter_generate(self, initial, running=None, direction=+1,
if has_nan:
on = self.on_nan
if on == 'fail':
final_error = EngineNaNError('`nan` in snapshot')
final_error = EngineNaNError(
'`nan` in snapshot', trajectory)
elif on == 'retry':
attempt_nan += 1
if attempt_nan > self.retries_when_nan:
Expand All @@ -581,7 +587,7 @@ def iter_generate(self, initial, running=None, direction=+1,
if has_error:
on = self.on_nan
if on == 'fail':
final_error = errors[-1]
final_error = errors[-1][1]
del errors[-1]
elif on == 'retry':
attempt_error += 1
Expand All @@ -603,7 +609,8 @@ def iter_generate(self, initial, running=None, direction=+1,
for no, e in enumerate(errors):
logger.info('[#%d] %s' % (no, repr(e[1])))

if final_error:
if final_error is not None:
print final_error
yield trajectory
logger.info("Through frame: %d", len(trajectory))
raise final_error
Expand Down
1 change: 0 additions & 1 deletion openpathsampling/pathmover.py
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,6 @@ def move(self, sample_set):
details=details
)


@abc.abstractmethod
def __call__(self, *args):
"""Generate trial samples directly
Expand Down