westpa 2022.10__cp311-cp311-macosx_10_9_x86_64.whl → 2022.12__cp311-cp311-macosx_10_9_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of westpa might be problematic. Click here for more details.
- westpa/_version.py +3 -3
- westpa/cli/core/w_truncate.py +15 -6
- westpa/cli/tools/w_assign.py +4 -4
- westpa/cli/tools/w_fluxanl.py +1 -3
- westpa/cli/tools/w_ntop.py +2 -2
- westpa/cli/tools/w_red.py +7 -2
- westpa/core/binning/_assign.cpython-311-darwin.so +0 -0
- westpa/core/binning/assign.py +11 -5
- westpa/core/binning/mab.py +352 -273
- westpa/core/data_manager.py +3 -3
- westpa/core/h5io.py +2 -2
- westpa/core/kinetics/_kinetics.cpython-311-darwin.so +0 -0
- westpa/core/kinetics/matrates.py +1 -1
- westpa/core/propagators/executable.py +11 -7
- westpa/core/reweight/_reweight.cpython-311-darwin.so +0 -0
- westpa/core/sim_manager.py +9 -4
- westpa/core/states.py +7 -7
- westpa/core/we_driver.py +4 -2
- westpa/fasthist/_fasthist.cpython-311-darwin.so +0 -0
- westpa/mclib/__init__.py +10 -3
- westpa/mclib/_mclib.cpython-311-darwin.so +0 -0
- westpa/oldtools/aframe/mcbs.py +9 -2
- westpa/oldtools/aframe/plotting.py +4 -4
- westpa/oldtools/cmds/w_ttimes.py +4 -1
- westpa/oldtools/stats/edfs.py +1 -1
- westpa/oldtools/stats/mcbs.py +9 -2
- westpa/trajtree/_trajtree.cpython-311-darwin.so +0 -0
- westpa/westext/stringmethod/string_method.py +1 -1
- westpa/westext/weed/ProbAdjustEquil.py +2 -2
- westpa/westext/weed/weed_driver.py +10 -0
- westpa/westext/wess/wess_driver.py +10 -0
- {westpa-2022.10.dist-info → westpa-2022.12.dist-info}/AUTHORS +8 -8
- {westpa-2022.10.dist-info → westpa-2022.12.dist-info}/METADATA +31 -21
- {westpa-2022.10.dist-info → westpa-2022.12.dist-info}/RECORD +38 -39
- {westpa-2022.10.dist-info → westpa-2022.12.dist-info}/WHEEL +2 -1
- westpa/fasthist/__main__.py +0 -110
- {westpa-2022.10.dist-info → westpa-2022.12.dist-info}/LICENSE +0 -0
- {westpa-2022.10.dist-info → westpa-2022.12.dist-info}/entry_points.txt +0 -0
- {westpa-2022.10.dist-info → westpa-2022.12.dist-info}/top_level.txt +0 -0
westpa/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "
|
|
11
|
+
"date": "2025-03-03T16:14:34-0500",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2022.
|
|
14
|
+
"full-revisionid": "b3afe209fcffc6238c1d2ec700059c7e30f2adca",
|
|
15
|
+
"version": "2022.12"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
westpa/cli/core/w_truncate.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import argparse
|
|
2
1
|
import logging
|
|
2
|
+
from argparse import ArgumentParser
|
|
3
3
|
|
|
4
4
|
import westpa
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ traj_segs directory) is deleted or moved for the corresponding iterations.
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def entry_point():
|
|
17
|
-
parser =
|
|
17
|
+
parser = ArgumentParser(
|
|
18
18
|
'w_truncate',
|
|
19
19
|
description='''\
|
|
20
20
|
Remove all iterations after a certain point in a WESTPA simulation.
|
|
@@ -30,7 +30,7 @@ def entry_point():
|
|
|
30
30
|
metavar='WEST_H5FILE',
|
|
31
31
|
help='''Take WEST data from WEST_H5FILE (default: read from the HDF5 file specified in west.cfg).''',
|
|
32
32
|
)
|
|
33
|
-
parser.add_argument('-n', '--iter', dest='n_iter', type=int, help='Truncate this iteration and those following.')
|
|
33
|
+
parser.add_argument('-n', '--iter', dest='n_iter', type=int, default=0, help='Truncate this iteration and those following.')
|
|
34
34
|
|
|
35
35
|
args = parser.parse_args()
|
|
36
36
|
westpa.rc.process_args(args, config_required=False)
|
|
@@ -40,7 +40,15 @@ def entry_point():
|
|
|
40
40
|
|
|
41
41
|
dm.open_backing()
|
|
42
42
|
# max_iter = dm.current_iteration
|
|
43
|
-
|
|
43
|
+
|
|
44
|
+
if args.n_iter > dm.current_iteration:
|
|
45
|
+
parser.error(
|
|
46
|
+
'Provided iteration {} > current iteration {} of the {} HDF5 file. Exiting without doing anything.'.format(
|
|
47
|
+
args.n_iter, dm.current_iteration, dm.we_h5filename.split('/')[-1]
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
else:
|
|
51
|
+
n_iter = args.n_iter if args.n_iter > 0 else dm.current_iteration
|
|
44
52
|
|
|
45
53
|
for i in range(n_iter, dm.current_iteration + 1):
|
|
46
54
|
dm.del_iter_group(i)
|
|
@@ -48,8 +56,9 @@ def entry_point():
|
|
|
48
56
|
dm.del_iter_summary(n_iter)
|
|
49
57
|
dm.current_iteration = n_iter - 1
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
westpa.rc.pstatus('simulation data truncated after iteration {}'.format(dm.current_iteration))
|
|
60
|
+
westpa.rc.pstatus('\n' + warning_string)
|
|
61
|
+
westpa.rc.pflush()
|
|
53
62
|
|
|
54
63
|
dm.flush_backing()
|
|
55
64
|
dm.close_backing()
|
westpa/cli/tools/w_assign.py
CHANGED
|
@@ -474,17 +474,17 @@ Command-line options
|
|
|
474
474
|
|
|
475
475
|
# Recursive mappers produce a generator rather than a list of labels
|
|
476
476
|
# so consume the entire generator into a list
|
|
477
|
-
labels = [np.
|
|
477
|
+
labels = [np.bytes_(label) for label in self.binning.mapper.labels]
|
|
478
478
|
|
|
479
479
|
self.output_file.create_dataset('bin_labels', data=labels, compression=9)
|
|
480
480
|
|
|
481
481
|
if self.states:
|
|
482
482
|
nstates = len(self.states)
|
|
483
483
|
state_map[:] = nstates # state_id == nstates => unknown state
|
|
484
|
-
state_labels = [np.
|
|
484
|
+
state_labels = [np.bytes_(state['label']) for state in self.states]
|
|
485
485
|
|
|
486
486
|
for istate, sdict in enumerate(self.states):
|
|
487
|
-
assert state_labels[istate] == np.
|
|
487
|
+
assert state_labels[istate] == np.bytes_(sdict['label']) # sanity check
|
|
488
488
|
state_assignments = assign(sdict['coords'])
|
|
489
489
|
for assignment in state_assignments:
|
|
490
490
|
state_map[assignment] = istate
|
|
@@ -558,7 +558,7 @@ Command-line options
|
|
|
558
558
|
shuffle=True,
|
|
559
559
|
chunks=h5io.calc_chunksize(pops_shape, weight_dtype),
|
|
560
560
|
)
|
|
561
|
-
h5io.label_axes(pops_ds, [np.
|
|
561
|
+
h5io.label_axes(pops_ds, [np.bytes_(i) for i in ['iteration', 'state', 'bin']])
|
|
562
562
|
|
|
563
563
|
pi.new_operation('Assigning to bins', iter_stop - iter_start)
|
|
564
564
|
last_labels = None # mapping of seg_id to last macrostate inhabited
|
westpa/cli/tools/w_fluxanl.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import h5py
|
|
2
2
|
import numpy as np
|
|
3
3
|
from scipy.signal import fftconvolve
|
|
4
|
-
from warnings import warn
|
|
5
4
|
|
|
6
5
|
import westpa
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ from westpa.tools import WESTTool, WESTDataReader, IterRangeSelection
|
|
|
12
11
|
from westpa.tools.dtypes import iter_block_ci_dtype as ci_dtype
|
|
13
12
|
import westpa.mclib as mclib
|
|
14
13
|
|
|
15
|
-
fluxentry_dtype = np.dtype([('n_iter', n_iter_dtype), ('flux', weight_dtype), ('count', np.
|
|
14
|
+
fluxentry_dtype = np.dtype([('n_iter', n_iter_dtype), ('flux', weight_dtype), ('count', np.int32)])
|
|
16
15
|
|
|
17
16
|
target_index_dtype = np.dtype(
|
|
18
17
|
[
|
|
@@ -370,7 +369,6 @@ the true value of ``tau``.
|
|
|
370
369
|
|
|
371
370
|
|
|
372
371
|
def entry_point():
|
|
373
|
-
warn('w_fluxanl is being deprecated. Please use w_assign and w_direct instead.')
|
|
374
372
|
WFluxanlTool().main()
|
|
375
373
|
|
|
376
374
|
|
westpa/cli/tools/w_ntop.py
CHANGED
|
@@ -190,9 +190,9 @@ Command-line arguments
|
|
|
190
190
|
weights = all_weights.take(segs)
|
|
191
191
|
|
|
192
192
|
if what == 'lowweight':
|
|
193
|
-
indices = np.argsort(weights)[:count]
|
|
193
|
+
indices = np.argsort(weights, kind='stable')[:count]
|
|
194
194
|
elif what == 'highweight':
|
|
195
|
-
indices = np.argsort(weights)[::-1][:count]
|
|
195
|
+
indices = np.argsort(weights, kind='stable')[::-1][:count]
|
|
196
196
|
else:
|
|
197
197
|
assert what == 'random'
|
|
198
198
|
indices = np.random.permutation(len(weights))
|
westpa/cli/tools/w_red.py
CHANGED
|
@@ -3,6 +3,11 @@ import numpy as np
|
|
|
3
3
|
from westpa import rc
|
|
4
4
|
from westpa.tools import WESTParallelTool
|
|
5
5
|
|
|
6
|
+
try:
|
|
7
|
+
from numpy import trapezoid
|
|
8
|
+
except ImportError:
|
|
9
|
+
from numpy import trapz as trapezoid
|
|
10
|
+
|
|
6
11
|
|
|
7
12
|
class DurationCorrector(object):
|
|
8
13
|
@staticmethod
|
|
@@ -128,9 +133,9 @@ class DurationCorrector(object):
|
|
|
128
133
|
|
|
129
134
|
for i, tau in enumerate(taugrid):
|
|
130
135
|
if i > 0 and tau < maxduration:
|
|
131
|
-
integral1[i] =
|
|
136
|
+
integral1[i] = trapezoid(f_tilde[: i + 1], taugrid[: i + 1])
|
|
132
137
|
|
|
133
|
-
integral2 =
|
|
138
|
+
integral2 = trapezoid(integral1, taugrid)
|
|
134
139
|
|
|
135
140
|
if integral2 == 0:
|
|
136
141
|
return 0.0
|
|
Binary file
|
westpa/core/binning/assign.py
CHANGED
|
@@ -132,9 +132,9 @@ class RectilinearBinMapper(BinMapper):
|
|
|
132
132
|
def boundaries(self, boundaries):
|
|
133
133
|
del self._boundaries, self.labels
|
|
134
134
|
self._boundaries = []
|
|
135
|
-
self.labels =
|
|
135
|
+
self.labels = []
|
|
136
136
|
for boundset in boundaries:
|
|
137
|
-
boundarray = np.
|
|
137
|
+
boundarray = np.ascontiguousarray(boundset, dtype=coord_dtype)
|
|
138
138
|
db = np.diff(boundarray)
|
|
139
139
|
if (db <= 0).any():
|
|
140
140
|
raise ValueError('boundary set must be strictly monotonically increasing')
|
|
@@ -146,8 +146,14 @@ class RectilinearBinMapper(BinMapper):
|
|
|
146
146
|
_boundaries = self._boundaries
|
|
147
147
|
binspace_shape = tuple(self._boundlens[:] - 1)
|
|
148
148
|
for index in np.ndindex(binspace_shape):
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
label = (
|
|
150
|
+
'['
|
|
151
|
+
+ ', '.join(
|
|
152
|
+
f'({boundarray[index[idim]]!s}, {boundarray[index[idim] + 1]!s})' for idim, boundarray in enumerate(_boundaries)
|
|
153
|
+
)
|
|
154
|
+
+ ']'
|
|
155
|
+
)
|
|
156
|
+
self.labels.append(label)
|
|
151
157
|
|
|
152
158
|
def assign(self, coords, mask=None, output=None):
|
|
153
159
|
try:
|
|
@@ -184,7 +190,7 @@ class PiecewiseBinMapper(BinMapper):
|
|
|
184
190
|
self.functions = functions
|
|
185
191
|
self.nbins = len(functions)
|
|
186
192
|
self.index_dtype = np.min_scalar_type(self.nbins)
|
|
187
|
-
self.labels = [
|
|
193
|
+
self.labels = [str(func) for func in functions]
|
|
188
194
|
|
|
189
195
|
def assign(self, coords, mask=None, output=None):
|
|
190
196
|
if output is None:
|