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

TorchForce object has no attribute addGlobalParameter #28

Closed
dominicrufa opened this issue Apr 7, 2021 · 11 comments · Fixed by #29
Closed

TorchForce object has no attribute addGlobalParameter #28

dominicrufa opened this issue Apr 7, 2021 · 11 comments · Fixed by #29

Comments

@dominicrufa
Copy link

I'm trying to make a mixed system and tether a scale to the TorchForce as described here but I'm seeing
image. specifically, there is no addGlobalParameter when i dir(openmmtorch.TorchForce). the openmmtorch is coming from the latest conda install

@peastman
Copy link
Member

peastman commented Apr 7, 2021

It looks like that feature just missed getting into the 0.1 release. We should do a new release.

@dominicrufa
Copy link
Author

dominicrufa commented Apr 7, 2021

is this already cut on the source repo? i think @jaimergp can build the packages for conda.

@dominicrufa
Copy link
Author

@peastman , @jaimergp built a new openmm-torch (attached) from the current master. it is conda-installable via

conda create -n openmm-torch-0.2rc1 file.tar.gz
conda activate openmm-torch-0.2rc1
conda update --all -c conda-forge/label/openmm_rc -c conda-forge

,but it still doesnt have addGlobalParameter attr with the TorchForce. could you take a look?

openmm-torch-0.2rc1-py39h64e9529_0.tar.gz

@peastman
Copy link
Member

peastman commented Apr 9, 2021

Looks like we need to update the Python binding to include those methods. Let me add that!

@peastman
Copy link
Member

peastman commented Apr 9, 2021

I just submitted a PR with the fix. Can you test it and verify it fixes the problem for you?

@dominicrufa
Copy link
Author

ive been having trouble installing this from source. I'll only be able to test opencl if i can get manage to do that, though

@peastman
Copy link
Member

That's fine. It only has changes to the Python wrapper, so it doesn't matter what platform you use.

@dominicrufa
Copy link
Author

>>> dir(openmmtorch.TorchForce)
['__class__', '__copy__', '__deepcopy__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__swig_destroy__', '__weakref__', 'addGlobalParameter', 'cast', 'getFile', 'getForceGroup', 'getGlobalParameterDefaultValue', 'getGlobalParameterName', 'getNumGlobalParameters', 'isinstance', 'setForceGroup', 'setGlobalParameterDefaultValue', 'setGlobalParameterName', 'setUsesPeriodicBoundaryConditions', 'thisown', 'usesPeriodicBoundaryConditions']

alright i was able to get opencl necessaries to install the PR from source after some troubles, and it seems that the appropriate python wrappers are in and define addGlobalParameter and the other necessary methods. @peastman, could you merge when you can? @jaimergp , could you build the conda package at your earliest convenience?

@peastman
Copy link
Member

Merged!

@mikemhenry
Copy link
Collaborator

Thanks! Would you mind cutting a release os it gets picked up by conda-forge?

@jaimergp
Copy link
Contributor

We'll need a tag + GitHub release for that.

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

Successfully merging a pull request may close this issue.

4 participants