<WESTPA 2.0: Trajectories help>

36 views
Skip to first unread message

Praveen Ranganath Prabhakar

unread,
Oct 24, 2022, 3:52:54 PM10/24/22
to westpa...@googlegroups.com
Dear WESTPA community, 

Hope you are doing well. I am attempting to extract the trajectory of a walker (say 4th) from a particular iteration (say 10th iteration) from a WESTPA 2.0 simulation. I am following the same protocol provided in the WESTPA 2.0 document. While I am able to get the trajectories I am not able to completely understand it. I used the below code from the document.

from westpa.analysis import Run
from westpa.analysis import BasicMDTrajectory
trajectory = BasicMDTrajectory()
run = Run.open('west.h5')
iteration = run.iteration(10)
walker = iteration.walker(4)
traj = trajectory(walker)
traj_file = 'sample.dcd'
traj.save(traj_file)
run.close()

While I am able to save the trajectory without any errors, but when I open the trajectory in VMD with a pdb file, it says it has 3 frames. Can anyone please let me know what these 3 frames mean? And subsequently, let's say the weight of the walker after the iteration is complete is 0.3, does it mean each frame will carry 0.1 weight or all three frames will have the same weight of 0.3 ?

Thank you for your time.

Best,
Praveen

Anthony Bogetti

unread,
Oct 25, 2022, 9:47:24 AM10/25/22
to westpa...@googlegroups.com
Hi Praveen,

These three frames are the frames saved during dynamics of a WE iteration. When you choose a tau (how long to run dynamics for during a WE iteration) you can also specify how frequently to save coordinates during that tau. For instance, if your tau was 30 ps and you saved coordinate every 10 ps, you would expect three frames for each trajectory segment and therefore three values for each tau segment’s pcoord.

Weights are assigned on a per-tau basis, not on a sub-tau basis, so the weight of a WE segment only applies to the final frame of that segment (only the final frame is used for splitting and merging). I think the analysis tools will consider intermediate frames at a sub-tau resolution and will treat those with the same weight as the final frame. So you can think of that weight being applied to all three frames at once, not divided among them.

Best,
Anthony 

On Oct 24, 2022, at 3:52 PM, Praveen Ranganath Prabhakar <prpr...@uci.edu> wrote:


--
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/CAAfoB4BWN4ZTEAWrtSOBVt8OPSNPn8fQL5Fu6tn1RfQ80v_BJg%40mail.gmail.com.

Daniel Zuckerman

unread,
Oct 25, 2022, 10:55:36 AM10/25/22
to westpa...@googlegroups.com

I wanted to expand on Anthony's explanation of weights because this topic is confusing.


To get the big picture, first forget about weights.  Imagine you have infinite computing power: you can start a large number of trajectories from any distribution of initial points (or all from the same point) and you can check on them at any later time (see Fig. 1 from our Annual Reviews article).  At any given time, some regions of configuration have more trajectories and some have fewer - there is a distribution that results from diffusion-like behavior in the systems energy landscape.




Weighted ensemble mimics this trajectory spreading without bias, but because it only uses a finite number of trajectories, it uses weights to indicate the relative importance of any given region at any time.  (The total probability of a finite region would be the sum of weights in that region, analogous to the fraction of unweighted trajectories in the infinite computing example.)

So in the most basic sense, the weights at any point in time give you information about the configurational distribution at that time.

But WE also tells you about the trajectory ensemble, again in an unbiased way.  If you take the set of weighted trajectories at any time (using the weights at this time exclusively), you can trace them backwards in time to some earlier time point, and that will be a true representative ensemble of trajectories connecting that earlier distribution (of configurations/phase-space points) to the later distribution. Note that this procedure likely will not include all WE trajectories because some will have been pruned/or merged at an intermediate time point.  Nevertheless, the back-tracing procedure yields an unbiased ensemble of trajectories consistent with the weights at the final time point.  Hence, in this *trajectory* ensemble, the weight of every trajectory stays constant in time - same at the beginning as at the end (regardless of what weights might have been attached to those segments earlier in the WE run).  Note that the back-tracing procedure may include 'splitting' events but the two daughter trajectories each get traced back separately and count as separate trajectories, each with its own weight from the final time.  (Such partially duplicated trajectories - i.e., same until 'split' - do not create statistical bias, bu they do reflect correlations in the ensemble ... which can lead to variance ... which is a separate subject.)

Sorry I don't have a handy figure for this latter discussion.  Try making your own.  It will be a good exercise.

Hope that is helpful.  --Dan


From: westpa...@googlegroups.com <westpa...@googlegroups.com> on behalf of Anthony Bogetti <anthony...@gmail.com>
Sent: Tuesday, October 25, 2022 6:47 AM
To: westpa...@googlegroups.com
Subject: [EXTERNAL] Re: [westpa-users] <WESTPA 2.0: Trajectories help>
 

Praveen Ranganath Prabhakar

unread,
Oct 28, 2022, 7:45:53 PM10/28/22
to westpa...@googlegroups.com
Hi Anthony,

Many thanks for your response. Now I am able to understand much more clearly the concept of how weights are allocated during the simulation.

Best, 
Praveen 

Praveen Ranganath Prabhakar

unread,
Oct 28, 2022, 7:46:55 PM10/28/22
to westpa...@googlegroups.com
Hi Prof. Daniel Zuckerman,

Many thanks for the wonderful explanation. I am able to understand that weights at any point in time will give us information about the configurational distribution. I will refer to the paper from the annual reviews article. Noted on how we can back-trace the trajectories and what information it will give. Really appreciate it!

Best, 
Praveen
Reply all
Reply to author
Forward
0 new messages