Fix executable propogator
+import logging
+import os
+import random
+import signal
+import subprocess
+import tempfile
+import time
+
+import numpy as np
+
+import westpa
+from westpa.core.extloader import get_object
+from westpa.core.propagators import WESTPropagator
+from westpa.core.states import BasisState, InitialState
+from westpa.core.segment import Segment
+from westpa.core.yamlcfg import check_bool
-import os, sys, signal, random, subprocess, time, tempfile
-import numpy
-import logging
-from west.states import BasisState, InitialState
log = logging.getLogger(__name__)
# Get a list of user-friendly signal names
SIGNAL_NAMES = {getattr(signal, name): name for name in dir(signal)
if name.startswith('SIG') and not name.startswith('SIG_')}
-import westpa
-from westpa.extloader import get_object
-from westpa.yamlcfg import check_bool, ConfigItemMissing
-import west
-from west import Segment
-from west.propagators import WESTPropagator
def pcoord_loader(fieldname, pcoord_return_filename, destobj, single_point):
"""Read progress coordinate data into the ``pcoord`` field on ``destobj``.
@@ -28,7 +34,7 @@ def pcoord_loader(fieldname, pcoord_return_filename, destobj, single_point):
assert fieldname == 'pcoord'
- pcoord = numpy.loadtxt(pcoord_return_filename, dtype=system.pcoord_dtype)
+ pcoord = np.loadtxt(pcoord_return_filename, dtype=system.pcoord_dtype)
if single_point:
expected_shape = (system.pcoord_ndim,)
@@ -43,8 +49,9 @@ def pcoord_loader(fieldname, pcoord_return_filename, destobj, single_point):
expected_shape))
destobj.pcoord = pcoord
+
def aux_data_loader(fieldname, data_filename, segment, single_point):
- data = numpy.loadtxt(data_filename)
+ data = np.loadtxt(data_filename)
segment.data[fieldname] = data
if data.nbytes == 0:
raise ValueError('could not read any data for {}'.format(fieldname))
