wedap usage

53 views
Skip to first unread message

Mac Kevin Braza

unread,
Sep 26, 2023, 8:49:57 PM9/26/23
to westpa-users
Hello WESTPA team,

This is Kevin. I would like to ask for help in using wedap for the plots of my west.h5 files. I have two progress coordinate that I am looking at

X: Y315 Chi1 dihedral angle (values from -180 to 180)
Y: R211-Y315 distance (values from 0-20)

I tried to implement this command to trace the value for X=5 and Y=10.

(base) [mbraza@jaws2 rep001]$ wedap -W west_iter300.h5 -dt evolution -X pcoord -Xi 0 -Y pcoord -Yi 1 --trace-val 5 10

However, I encountered this error

/home/mbraza/anaconda3/lib/python3.8/site-packages/wedap/h5_pdist.py:217: UserWarning:
Defaulting to evolution plot for --data-type, since you put a --Yname arg.
Did you mean to use --data-type of `average` or `instant`?
  warn("\nDefaulting to evolution plot for --data-type, since you put a --Yname arg.\n"
Evolution: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 300/300 [00:24<00:00, 12.37it/s]
Traceback (most recent call last):
  File "/home/mbraza/anaconda3/bin/wedap", line 8, in <module>
    sys.exit(main())
  File "/home/mbraza/anaconda3/lib/python3.8/site-packages/wedap/__main__.py", line 73, in main
    iter, seg = plot.search_aux_xy_nn(args.trace_val[0], args.trace_val[1])
  File "/home/mbraza/anaconda3/lib/python3.8/site-packages/wedap/h5_pdist.py", line 548, in search_aux_xy_nn
    r1 = self._get_data_array(self.Xname, self.Xindex, iter_num)[:,-1]
  File "/home/mbraza/anaconda3/lib/python3.8/site-packages/wedap/h5_pdist.py", line 309, in _get_data_array
    data = np.array(self.h5[f"iterations/iter_{iteration:08d}/{name}"])
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/home/mbraza/anaconda3/lib/python3.8/site-packages/h5py/_hl/group.py", line 288, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5o.pyx", line 190, in h5py.h5o.open
ValueError: Not a location (invalid object ID)

Can you help me understand what this means?

I also played around with the values especially with X-values having negative sign, but it also did not work. I am hoping to create a plot similar to the one in Darian's github page for wedap's demo https://github.com/darianyang/wedap/blob/main/docs/notebook/wedap_demo.ipynb.

Thank you!

Sincerely,
Kevin

Jeremy Leung

unread,
Sep 27, 2023, 12:51:20 PM9/27/23
to westpa-users
Hi Kevin,

Like w_pdist/plothist, evolution plots can only show 1 pcoord dimension at a time. To get something like Example 3, what you need is the ``--dt average`` mode. You can then adjust the x/y bounds with ``--xlim/--ylim`` and labels with ``--xlabel/ylabel``,  Colorbar min/max with ``--pmin/--pmax``.

```
wedap -W west_iter300.h5 -dt average -X pcoord -Xi 0 -Y pcoord -yi 1 --trace-val 5 10 --xlim 0 20 --ylim  -180 180
```

Best,

Jeremy L.

Mac Kevin Braza

unread,
Sep 27, 2023, 1:12:51 PM9/27/23
to westpa...@googlegroups.com
Hi Jeremy,

Thanks for your reply! I tried your suggestions. I think I am still experiencing ValueError [1]. I attached here the message. Also, here's the west_iter300.h5 in case you wanna try plotting them.

There's another thing that I also tried. The command I used was in the screenshot. I attached a screenshot of the wedap plot it generated.

Thanks for your help, Jeremy!

Sincerely,
Kevin


[1] (base) [mbraza@jaws2 rep001]$ wedap -W west_iter300.h5 -dt average -X pcoord -Xi 0 -Y pcoord -yi 1 --trace-val 5 10 --xlim 0 20 --ylim -180 180 --pmin 0 --pmax 100
/home/mbraza/anaconda3/lib/python3.8/site-packages/wedap/h5_pdist.py:222: UserWarning:
Setting --Yindex to 1 (2nd dimension) since Xname/Yname and Xindex/Yindex were the same.
  warn("\nSetting --Yindex to 1 (2nd dimension) since Xname/Yname and Xindex/Yindex were the same.")
Average 2D: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 300/300 [01:17<00:00,  3.86it/s]

Traceback (most recent call last):
  File "/home/mbraza/anaconda3/bin/wedap", line 8, in <module>
    sys.exit(main())
  File "/home/mbraza/anaconda3/lib/python3.8/site-packages/wedap/__main__.py", line 73, in main
    iter, seg = plot.search_aux_xy_nn(args.trace_val[0], args.trace_val[1])
  File "/home/mbraza/anaconda3/lib/python3.8/site-packages/wedap/h5_pdist.py", line 573, in search_aux_xy_nn
    r1 = self._get_data_array(self.Xname, self.Xindex, i)[:,-1]

  File "/home/mbraza/anaconda3/lib/python3.8/site-packages/wedap/h5_pdist.py", line 309, in _get_data_array
    data = np.array(self.h5[f"iterations/iter_{iteration:08d}/{name}"])
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/home/mbraza/anaconda3/lib/python3.8/site-packages/h5py/_hl/group.py", line 288, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5o.pyx", line 190, in h5py.h5o.open
ValueError: Not a location (invalid object ID)

--
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/mNcHaeCB3gE/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/7a050374-e179-4b83-8b8d-9aaf53dac8e8n%40googlegroups.com.

Jeremy Leung

unread,
Sep 27, 2023, 1:35:52 PM9/27/23
to westpa-users
Hi Kevin,

Seems like wedap 0.0.9 broke something. I downgraded to 0.0.8 and it worked. I already reported the bug to Darian (He's out this week), so he'll get around to it eventually.

```
python -m pip install wedap==0.0.8
```

Running the following (I previously mixed up the xlim and ylim):
```
wedap -W west_iter300.h5 -dt average -X pcoord -Xi 0 -Y pcoord -Yi 1 --trace-val 5 10 --ylim 0 20 --xlim  -180 180
```

Gave me this, which I hope is what you want!
Screenshot 2023-09-27 at 1.32.49 PM.png


-- JL

Mac Kevin Braza

unread,
Sep 27, 2023, 6:31:30 PM9/27/23
to westpa...@googlegroups.com
Hi Jeremy,

SUPER COOL! It worked with wedap version 0.0.8. I followed your installation and the command that you used, see the screenshot below. I am very happy!

Thank you for helping me here Jeremy! This is a super awesome tool, Darian.

Sincerely,
Kevin

Screenshot from 2023-09-27 15-29-36.png

Yang, Darian T

unread,
Oct 3, 2023, 5:41:17 PM10/3/23
to westpa...@googlegroups.com

Hey Kevin,

 

Thanks a lot for giving wedap a try and for letting us know about this issue! And thanks Jeremy for the temporary solution.

 

I’ve updated wedap on pypi to version 0.0.10 so now if you pip install or upgrade to the latest wedap version the bug you experienced should be taken care of, and I’ve added new tests to check for and prevent this issue in the future.

 

Best,

Darian

 

From: 'Mac Kevin Braza' via westpa-users <westpa...@googlegroups.com>
Reply-To: "westpa...@googlegroups.com" <westpa...@googlegroups.com>
Date: Wednesday, September 27, 2023 at 6:31 PM
To: "westpa...@googlegroups.com" <westpa...@googlegroups.com>
Subject: Re: [westpa-users] Re: wedap usage

 

Hi Jeremy,

 

SUPER COOL! It worked with wedap version 0.0.8. I followed your installation and the command that you used, see the screenshot below. I am very happy!

 

Thank you for helping me here Jeremy! This is a super awesome tool, Darian.

 

Sincerely,

Kevin

 

On Wed, Sep 27, 2023 at 10:35 AM Jeremy Leung <jml...@pitt.edu> wrote:

Hi Kevin,

 

Seems like wedap 0.0.9 broke something. I downgraded to 0.0.8 and it worked. I already reported the bug to Darian (He's out this week), so he'll get around to it eventually.

 

```

python -m pip install wedap==0.0.8

```

 

Running the following (I previously mixed up the xlim and ylim):

```

wedap -W west_iter300.h5 -dt average -X pcoord -Xi 0 -Y pcoord -Yi 1 --trace-val 5 10 --ylim 0 20 --xlim  -180 180

```

 

Gave me this, which I hope is what you want!

 

 

-- JL

 west_iter300.h5Error! Filename not specified.

 

 

Error! Filename not specified.

--
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/CAP-6Gt34Vv1Q87%3D6QRWCCeVvYAX%2BLkeyn8PEnUOkyh%2B2-k5fYQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages