Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

w_multi_west ibstates fix #387

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Changes from all commits
Commits
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
10 changes: 9 additions & 1 deletion src/westpa/cli/tools/w_multi_west.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,20 @@ def go(self):
if addition.dtype != istate_dtype:
addition = create_idtype_array(addition)
final_istate_index = np.append(final_istate_index, addition)
final_istate_pcoord = np.append(final_istate_pcoord, west['ibstates/0/istate_pcoord'][:])
final_istate_pcoord = np.append(final_istate_pcoord, west['ibstates/0/istate_pcoord'][:], axis=0)

# Saving them into self.output_file
self.output_file['ibstates/0'].create_dataset('istate_index', data=final_istate_index, dtype=istate_dtype)
self.output_file['ibstates/0'].create_dataset('istate_pcoord', data=final_istate_pcoord)

# Remaking the ibstates index link
master_index_row = self.output_file['ibstates/index'][0]
master_index_row['iter_valid'] = 0
master_index_row['n_bstates'] = len(self.output_file['ibstates/0/bstate_index'])
master_index_row['group_ref'] = self.output_file['ibstates/0'].ref

self.output_file['ibstates/index'][0] = master_index_row

for iter in range(self.niters):
# We have the following datasets in each iteration:
# ibstates, which can now be combined with --ibstates
Expand Down
Loading