questions for WE setup

92 views
Skip to first unread message

Yunhui Ge

unread,
Aug 4, 2022, 3:20:14 PM8/4/22
to westpa-users
Hi,

I'm a new user of WE and I'm trying to follow the tutorial of NaCl (https://github.com/westpa/westpa_tutorials/blob/0a8888598263047b49c2e859a38f568b8862bee8/basic_nacl/init.sh) to familiar myself with WE. I have some questions about the simulation setup:

(1) In init.sh file, what is "--segs-per-state" for and how to determine an optimal value for this? Does this relate to "bin_target_counts"? I cannot find descriptions of this in the tutorial paper. 

(2) Let's say I have 10 bins (1D) and set "bin_target_counts" as 5. So in theory I will have 5*10 = 50 simulations run at the same time? Then should I always request 50 CPU processors (assuming 1 processor for 1 simulation) at the beginning of my job?

(3) In the tutorial directory, there is a slurm job script. Inside this script, there are steps to unload python and export "WEST_PYTHON". Is this required for general use or just for the cluster used for this tutorial?

Is this minimal adaptive binning (MAB) scheme exclusively working for membrane permeation simulation or it can be used in general simulations for binding process?

(5) Does the latest westpa support for Desmond MD simulation engine? If not, is it on the to-do list?

Thanks!

Yunhui

Anthony Bogetti

unread,
Aug 4, 2022, 4:52:04 PM8/4/22
to westpa...@googlegroups.com
Hello Yunhui,

Thank you for the email; we are happy to help answer your questions.

1. The “--segs-per-state” setting is different from the bin_target_counts setting.  The segs-per-state parameter determines how many copies of each basis state are made at the start of your simulation.  For example, if you have only a single basis state and set segs-per-state to equal 5, five copies of that basis state will be made at the start of the simulation.  Now, even though five copies are made, that is not necessary how many will be used for the first iteration, since those five copies will be split/merged to make sure your bin_target_counts is followed.  If you are beginning the simulation with multiple bases states, then you may want to more carefully consider the segs-per-state parameter, but if you only have a single basis state it will not matter as much.

2. That is correct, but only if you have all bins occupied.  Towards the beginning of the weighted ensemble simulation, you may only have 1 or 2 out of the 5 bins occupied, so your total simulation count would be 5 or 10 for those particular iterations.  As your simulations progress towards empty bins (and fill them), then you will see higher total simulation counts and may eventually achieve your max simulation count of 50.

3. You may need to load or unload certain modules depending on your specific computing resource, but generally this is not necessary.  In addition, WEST_PYTHON does not need to be exported anymore after the release of WESTPA 2.0, so you do not need to export that for your specific simulation.

4. The minimal adaptive binning (MAB) scheme can be used generally for any type of system, not just for membrane permeation.  The MAB code only handles adaptive bin placement, which does not consider what type of system you are simulating.

5. WESTPA 2.0 is highly-interoperable and though our tutorials use OpenMM and Amber for dynamics, you can use any engine for propagating the dynamics.  To use the dynamics engine of your choice, you would replace the relevant lines in the runseg.sh file with your dynamics engine-specific commands.

Let us know if you have any further questions!

Anthony

--
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/640956b3-a747-422e-8dc9-ea93b103824an%40googlegroups.com.

Yunhui Ge

unread,
Aug 4, 2022, 5:04:29 PM8/4/22
to westpa-users
Hi Anthony,

Thanks for your explanation! 

(1) So if I only have one basis state and I set segs-per-state as 5 but I set bin_target_counts as 4 then two copies will be merged to make sure I still have 4 counts as maximum for a bin? Similarly, if I set bin_target_counts as 6 then one copy will be split into two to fulfill the target count for one bin?

(2) My understanding is that it is out of my control in terms of when all bins are occupied. So the best way when I set up my simulation is to request N processors where N is the maximum number of simulations in theory based on my defined bin_target_counts and number of bins. Is this the recommanded way to set up WE simulations in general?

(3) If I'm interested in simulating binding events, will that be helpful if I set up different basis states with unbound ligand at different positions?

Thanks!

Yunhui

Anthony Bogetti

unread,
Aug 4, 2022, 5:21:05 PM8/4/22
to westpa...@googlegroups.com
Hi Yunhui,

1. Yes, that is correct.  I just tested this with the basic NaCl tutorial by setting segs-per-state to 5 and bin_target_counts to 4.  During the initialization process, two of the generated segments were merged and that is reflected in the initial segment probabilities ([0.4, 0.2, 0.2, 0.2]).  It should also be the case that you said involving splitting to achieve a bin_target_count of 6.

2. That is correct; try to request enough resources to cover the case where all bins are occupied, and then also try to achieve 100% bin occupancy to make sure you aren’t reserving unused resources.

3. Yes, that would be a good way of encouraging a diverse ensemble of pathways will be generated.  Please see the WESTPA 2.0 tutorial 3.1 on Github if you haven’t already for how to use multiple basis states in your simulation.

Anthony

Yunhui Ge

unread,
Aug 11, 2022, 12:37:42 PM8/11/22
to westpa...@googlegroups.com
Hi Anthony,

I set up a test run using the NaCl tutorial files available here: https://github.com/westpa/westpa_tutorials/tree/0a8888598263047b49c2e859a38f568b8862bee8/basic_nacl

I modified the *cfg file to fit my computational cluster: set “bin_target_counts” as 3 and “max_total_iterations” as 50. I also modified init.sh file: set “—segs-per-state” as 3 to make sure it is the same as “bin_target_counts”. I did not modify bins or anything else. 

I requested 64 processors since there are 21 bins and 3 counts per bin (21*3 = 63 counts). The first 4 iterations were finished very quickly and I can see from the log file that 10 of 21 active bins are populated. 30 segments remian in iteration 5. However, it’s been over 20 hours and I still can see my simulations move on to the 6th iteration. In the log file I can only see iteration 5 is beginning and waiting for segments to complete. Is this expected or did I do something wrong?

Thanks!

Yunhui

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/XspPxFnDHbk/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/4162661F-C910-4C48-AFB1-5289A0C452CD%40gmail.com.

Anthony Bogetti

unread,
Aug 12, 2022, 9:27:57 AM8/12/22
to westpa...@googlegroups.com
Hi Yunhui,

What computational resources are you running your simulation on?  Are you using a single node or multiple nodes?  Since your simulation made it to iteration 5 before stopping, I suspect that there may be something going on with either the work manager you are using or how the work manager is interacting with your computational resources. If you could attach your cluster submission script (or the run script you are using, such as run.sh or runwe.slurm) I can take a look.

Best,
Anthony

Yunhui Ge

unread,
Aug 15, 2022, 7:44:24 PM8/15/22
to westpa...@googlegroups.com
Hi Anthony,

I’m using our local clusters. Right now, I’m using two cpu nodes with 64 processors in total for this test. I’m thinking maybe it is the node communication issue and I’m trying to confirm that. So I did another test with only 1 node requested (32 processors). I also modified the number of bins and bin_target_counts because of that. Now I got a new error message:

Mon Aug 15 12:58:40 2022
Iteration 42 (100 requested)
Beginning iteration 42
8 segments remain in iteration 42 (8 total)
4 of 15 (26.666667%) active bins are populated
per-bin minimum non-zero probability:       0.00296617
per-bin maximum probability:                0.356194
per-bin probability dynamic range (kT):     4.78821
per-segment minimum non-zero probability:   0.00148308
per-segment maximum non-zero probability:   0.310059
per-segment probability dynamic range (kT): 5.34264
norm = 1, error in norm = 0 (0*epsilon)
Waiting for segments to complete...
-- ERROR    [westpa.core.propagators.executable] -- could not read pcoord from '/tmp/tmpmay36ihx': ValueError('cannot reshape array of size 3 into shape (11,1)')
-- ERROR    [westpa.core.sim_manager] -- propagation failed for 1 segment(s):
0
exception caught; shutting down
-- ERROR    [w_run] -- error message: propagation failed for 1 segments
-- ERROR    [w_run] -- Traceback (most recent call last):
  File "/data/yge3/.conda/envs/westpa2/lib/python3.9/site-packages/westpa/cli/core/w_run.py", line 62, in run_simulation
    sim_manager.run()
  File "/data/yge3/.conda/envs/westpa2/lib/python3.9/site-packages/westpa/core/sim_manager.py", line 752, in run
    self.check_propagation()
  File "/data/yge3/.conda/envs/westpa2/lib/python3.9/site-packages/westpa/core/sim_manager.py", line 650, in check_propagation
    raise PropagationError('propagation failed for {:d} segments'.format(len(failed_segments)))
westpa.core.sim_manager.PropagationError: propagation failed for 1 segments 

I think the error message is bout the number of frames in the finished simulation. I set pcoord_len as 11 to make it consistent with the simulation length and saving frequency I set in the openmm simulation script. So I should have 11 frames for each finished simulation. Now for some reason I got only 3 out and that caused this error. This is my guess. Maybe you can provide your professional suggestions on the reason of this error and how to fix it?

Thanks!

Yunhui

Anthony Bogetti

unread,
Aug 22, 2022, 12:32:35 PM8/22/22
to westpa...@googlegroups.com
Hello Yunhui,

For multi-node setups, please see our tutorial which uses the ZMQ work manager, which is the work manager you would want to use in that case.  If working just on a single node, the “processes” work manager should work fine.  There may also be additional setup steps to use ZMQ on a multi-node setup depending on your particular cluster, but for getting your simulation running I think it is a good idea to stick to a singe node for now.

Regarding your current error, I’ve found that the "westpa.core.sim_manager.PropagationError: propagation failed for 1 segments” error usually points to trouble running the dynamics.  In this case, I would check the seg.log file of that particular segment and see if the dynamics were able to complete or not.  This seg.log file is the dynamics output file from the dynamics engine you are using (Amber, OpenMM, etc.) and should be saved in your $WEST_SIM_ROOT/traj_segs/000042/00000X where X is the segment that failed.  I would open that file and see if anything there is wrong and fix accordingly.  It looks like segment 0 failed so start there and let me know what you find.

Best,
Anthony

Reply all
Reply to author
Forward
0 new messages