Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

initialization error with haMSM simulations

39 views
Skip to first unread message

Jonathan Borowsky

unread,
Dec 5, 2023, 8:13:25 PM12/5/23
to westpa-users
Hello,

I get the error below when I try to run ./init.sh with the attached west.cfg file, which is derived from the tutorial west.cfg file at https://github.com/westpa/westpa2_tutorials/tree/main/tutorial7.7-hamsm. I think I must have some error in the .cfg file but I can't figure out what.

(westpa-2.0) [jborowsky@dev1 westpa-16o-hamsm-1]$ ./init.sh
The environment variable WEST_ROOT is not set.
Try running 'source westpa.sh' from the WESTPA installation directory
We'll ignore this for now
simulation westpa-16o-hamsm-1 root is /wynton/home/grabe/jborowsky/aac1/westpa-16o-hamsm-1
System is being built only off of the system driver
Creating HDF5 file '/wynton/home/grabe/jborowsky/aac1/westpa-16o-hamsm-1/west.h5'
0 target state(s) present
Calculating progress coordinate values for basis states.
1 basis state(s) present
Calculating progress coordinate values for start states.
0 start state(s) present
Preparing initial states
Traceback (most recent call last):
  File "/wynton/home/grabe/jborowsky/.conda/envs/westpa-2.0/bin/w_init", line 10, in <module>
    sys.exit(entry_point())
  File "/wynton/home/grabe/jborowsky/.conda/envs/westpa-2.0/lib/python3.9/site-packages/westpa/cli/core/w_init.py", line 112, in entry_point
    initialize(
  File "/wynton/home/grabe/jborowsky/.conda/envs/westpa-2.0/lib/python3.9/site-packages/westpa/cli/core/w_init.py", line 219, in initialize
    sim_manager.initialize_simulation(
  File "/wynton/home/grabe/jborowsky/.conda/envs/westpa-2.0/lib/python3.9/site-packages/westpa/core/sim_manager.py", line 363, in initialize_simulation
    self.we_driver.populate_initial(initial_states, weights, system)
  File "/wynton/home/grabe/jborowsky/.conda/envs/westpa-2.0/lib/python3.9/site-packages/westpa/core/we_driver.py", line 775, in populate_initial
    self.assign(segments, initializing=True)
  File "/wynton/home/grabe/jborowsky/.conda/envs/westpa-2.0/lib/python3.9/site-packages/westpa/core/we_driver.py", line 365, in assign
    for (segment, iidx, fidx) in zip(segments, initial_assignments, final_assignments):
TypeError: 'NoneType' object is not iterable

Thanks,
Jonathan
west.cfg

Jeremy Leung

unread,
Dec 5, 2023, 8:29:59 PM12/5/23
to westpa-users
Hi Jonathan,

It would be helpful if you could also include your init.sh so we can see the full command you executed.

A couple things:
1) These lines suggest that you're using a WESTPA 1 (v2020.XX) init.sh file? `westpa.sh` and `$WEST_ROOT` are environmental variables that are no longer used.
    ```
    The environment variable WEST_ROOT is not set.
    Try running 'source westpa.sh' from the WESTPA installation directory
    We'll ignore this for now
    ```

2) Your initial state path in west.cfg is misconfigured.
    ```
    initial_state: $WEST_SIM_ROOT/s
    ```
    You probably just need to modify this to a directory that actually exists, assuming `$WEST_SIM_ROOT/s` is not a valid directory/folder you have.
    ```
    initial_state: $WEST_SIM_ROOT
    ```

This is as far as I can debug your error without your init.sh.

Best,

Jeremy L.

Jonathan

unread,
Dec 5, 2023, 9:16:50 PM12/5/23
to westpa...@googlegroups.com
Hi Jeremy,

My init.sh is attached. Thanks for catching the typo in west.cfg. Fixing it and setting $WEST_SIM_ROOT to an extant directory does not alter the error. I've been using the same init.sh and not explicitly setting $WEST_SIM_ROOT without issue for other non-haMSM config files.

Thank you,
Jonathan

--
You received this message because you are subscribed to the Google Groups "westpa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to westpa-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/westpa-users/45b8edb5-d48a-47d2-a1ad-b6d57b838f0bn%40googlegroups.com.
init.sh

Jonathan

unread,
Dec 5, 2023, 9:16:50 PM12/5/23
to westpa...@googlegroups.com
The env.sh script called by init.sh (attached) sets $WEST_SIM_ROOT.

Jonathan
env.sh

Leung, Jeremy

unread,
Dec 5, 2023, 9:29:10 PM12/5/23
to westpa...@googlegroups.com
Hi Jonathan,

I just realized... you don't have any bins set up! There are no bins to assign the segments into so it errors out.  Note that the haMSM bins can be completely different from the bins used during simulation so they are set separately.

Completely unrelated:
In your env.sh, you can safely delete the `export $WEST_PYTHON` line and the `if [ -z "$WEST_ROOT" ]` block. You can leave the "$WEST_SIM_ROOT" block alone.

-- JL

---
Jeremy M. G. Leung
PhD Candidate, Chemistry
Graduate Student Researcher, Chemistry (Chong Lab)
University of Pittsburgh | 219 Parkman Avenue, Pittsburgh, PA 15260
jml...@pitt.edu | [He, Him, His]

You received this message because you are subscribed to a topic in the Google Groups "westpa-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/westpa-users/w1I3YGGfU3g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to westpa-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/westpa-users/CAKftO4Hn1o%2BzD5i%2BP46HpvS7dbSOGbAr_sHRn6FzbDUmYAe1nw%40mail.gmail.com.
<env.sh>

Jonathan

unread,
Dec 5, 2023, 9:40:19 PM12/5/23
to westpa...@googlegroups.com
Hi Jeremy,

I tried using the attached west.cfg, which defines a MAB bin mapper. It runs westpa with MAB bins just fine but doesn't produce any of the haMSM specific output files described in table 3 of https://livecomsjournal.org/index.php/livecoms/article/view/v5i1e1655/1577  I suspect I've somehow structured it wrong though.

Jonathan

west-withbins.cfg

Jeremy Leung

unread,
Dec 5, 2023, 9:59:33 PM12/5/23
to westpa-users
Hi Jonathan,

Lines 22-28 needs to be indented so it's under the "mapper:" section, similar to what's here. Without that, you have just the base rectilinear bin.

Your pcoord length also needs to be at least 2 if you need the WESTPA analysis tools to work. That would correspond to the last frame of the parent trajectory and the last frame of the current segment.

------
Because your max_total_iterations: 2000, the haMSM restarting portions (i.e. run 2 and run 3) will not kick off until you get to iter 2000.  Judging from your 150 bins * 6 segs/bin = 900 segments per iteration, that'll probably take a long while.

The haMSM restarting plugin should be used with steady-state simulations (i.e., with a target state). You don't have a target state set (judging from the init.sh), so I'm not sure how the haMSM restarting plugin will actually react when determining whether extension runs are needed are not. My guess (from a quick look at the code), it'll just run indefinitely because it will never find segments that are recycled.

This will probably be the last email from me for the night.

-- JL

Jonathan

unread,
Dec 5, 2023, 10:03:50 PM12/5/23
to westpa...@googlegroups.com
Hi Jeremy,

Thank you so much for all the help! I'll read up on steady state simulations and figure out how to structure my bins.

Jonathan

Reply all
Reply to author
Forward
0 new messages