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

A little bug in unit toolkit (Tutorial 01) #414

Closed
Yu-Tang-Lin opened this issue Jan 22, 2022 · 4 comments
Closed

A little bug in unit toolkit (Tutorial 01) #414

Yu-Tang-Lin opened this issue Jan 22, 2022 · 4 comments

Comments

@Yu-Tang-Lin
Copy link

Original:
[12] from openff.units import unit

It should be:
[12] from openff.evaluator import unit

I guess there is an update in "unit".

@mattwthompson
Copy link
Member

Hey @Yu-Tang-Lin - how are you getting this? Are you running the notebooks from the Colab links or directly on your machine?

@Yu-Tang-Lin
Copy link
Author

@mattwthompson
I run this directly on my machine, which actually is a remote computer in the lab. I discussed this with Owen, and he taught me how to fix this.

@mattwthompson
Copy link
Member

Hi @Yu-Tang-Lin there have been some updates to how units are handled here, but they haven't made it into a release yet. If you're running the tutorials from a clone of this repo, the master branch reflects changes that are not ready for a release yet.

For a stable experience running the tutorials, I recommend checking out the latest release tag (v0.3.9) and running the tutorials from there, i.e.

$ git fetch --all
$ git checkout upstream/master
Previous HEAD position was 9f6e834 Fix importing full ThermoML archive (#402)
HEAD is now at 1896275 Use units registry provided by `openff.units` (#399)
$ grep -r "from openff.units import unit" docs/tutorials/tutorial03.ipynb
docs/tutorials/tutorial03.ipynb:    "from openff.units import unit\n",
$ git checkout v0.3.9
Previous HEAD position was 1896275 Use units registry provided by `openff.units` (#399)
HEAD is now at 9f6e834 Fix importing full ThermoML archive (#402)
$ grep -r "from openff.evaluator import unit" docs/tutorials/tutorial03.ipynb
docs/tutorials/tutorial03.ipynb:    "from openff.evaluator import unit\n",

In a couple of months, from openff.units import unit will be used but until then you should stick with code that uses from openff.evaluator import unit. Under the hood they are extremely similar and pretty much only differ in name.

@mattwthompson
Copy link
Member

This is probably now in sync with all of the refactors that went into version 0.4.0. If this is still an issue please add more information about how you installed Evaluator and are running the notebook (i.e. conda list).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants