openff-interchange icon indicating copy to clipboard operation
openff-interchange copied to clipboard

`experimental/openmmforcefields/gaff.ipynb` is failing on openff-docs

Open Yoshanuikabundi opened this issue 9 months ago • 3 comments

The experimental/openmmforcefields/gaff.ipynb notebook has been failing on openff-docs since the release of 0.3.26.

Here's the error:

 nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
imported.visualize()
------------------


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[4], line 1
----> 1 imported.visualize()

File ~/micromamba/envs/openff-docs-examples/lib/python3.10/site-packages/openff/interchange/components/interchange.py:318, in Interchange.visualize(self, backend, include_virtual_sites)
    315 original_positions = self.topology.get_positions()
    317 try:
--> 318     self.topology.set_positions(self.positions)
    319     widget = self.topology.visualize()
    320 except (
    321     MissingConformersError,
    322     IncompatibleUnitError,
    323     ValueError,
    324 ) as error:

File ~/micromamba/envs/openff-docs-examples/lib/python3.10/site-packages/openff/toolkit/topology/topology.py:2175, in Topology.set_positions(self, array)
   2173         molecule._conformers = [array[start:stop]]
   2174     else:
-> 2175         molecule.conformers = [array[start:stop]]  # type: ignore[misc]
   2176 else:
   2177     molecule.conformers[0:1] = [array[start:stop]]

AttributeError: can't set attribute 'conformers'

First failed build: https://github.com/openforcefield/openff-docs/actions/runs/8730323982/job/23976462898

Last successful build: https://github.com/openforcefield/openff-docs/actions/runs/8714190660/job/23903993121

See more builds here: https://github.com/openforcefield/openff-docs/actions/workflows/cookbook_preproc.yaml

Environment file: https://github.com/openforcefield/openff-docs/blob/main/devtools/conda-envs/examples_env.yml

The notebook is currently being skipped: https://github.com/openforcefield/openff-docs/blob/288ae36533136e8e92ac9741238860166b7bcb63/source/ext/cookbook/globals.py#L85

Yoshanuikabundi avatar Apr 26 '24 05:04 Yoshanuikabundi

Thanks, this is super helpful context; it took a few minutes but the cause is https://github.com/openforcefield/openff-toolkit/pull/1798/files#diff-7d24b44bfbe7c449b9ecc60a9129b430131efe1dadf2629e97015267f4a0e9edR37-R67

mattwthompson avatar Apr 26 '24 13:04 mattwthompson

This makes me realize there is potential value in bleeding-edge notebook execution, though I don't have the time to set that up right now

mattwthompson avatar Apr 26 '24 13:04 mattwthompson

I'll also keep this skipped until openmmforcefields supports newer AmberTools than 22, which is too old for our stack to be constrained to

https://github.com/openmm/openmmforcefields/issues/280

mattwthompson avatar Apr 26 '24 20:04 mattwthompson