Git Product home page Git Product logo

Comments (8)

ChayaSt avatar ChayaSt commented on June 12, 2024

Do you get this error after normal installation with setup.py?

from torsionfit.

jchodera avatar jchodera commented on June 12, 2024

The issue seems to be with this line:

  File "/Users/choderaj/miniconda/envs/_test/lib/python2.7/site-packages/torsionfit/TorsionScanSet.py", line 252, in compute_energy
    self.mm_energy -= self.mm_energy.min() + Quantity(value=float(offset.value), unit=kilojoules_per_mole)

It could be that there is a weird numpy/simtk.unit.Quantity issue with the .min() operation. Is self.mm_energy a Quantity wrapping numpy array?

from torsionfit.

jchodera avatar jchodera commented on June 12, 2024

I did conda build devtools/conda-recipe to replicate what is done on travis.

from torsionfit.

ChayaSt avatar ChayaSt commented on June 12, 2024

It could be that there is a weird numpy/simtk.unit.Quantity issue with the .min() operation. Is self.mm_energy a Quantity wrapping numpy array?

That can be. Maybe we can change this too self.mm_energy._value for the numpy array without the Quantity wrapper?

from torsionfit.

jchodera avatar jchodera commented on June 12, 2024

That can be. Maybe we can change this too self.mm_energy._value for the numpy array without the Quantity wrapper?

It's best to never access the value without converting to units first. It's much better to pick a standard unit and explicitly convert to that:

energy_unit = unit.kilocalories_per_mole
self.mm_energy -= unit.Quantity((self.mm_energy / energy_unit).min() + (offset/energy_unit), energy_unit)

but we really shouldn't need to be doing all of those weird conversions. It should "just work" unless there is a bug in simtk.unit.

from torsionfit.

ChayaSt avatar ChayaSt commented on June 12, 2024

but we really shouldn't need to be doing all of those weird conversions. It should "just work" unless there is a bug in simtk.unit.

Yeah. The version of OpenMM that I'm using is 6.3 and I don't get this failure. What's the version of OpenMM you got with conda build devtools/conda-recipe

from torsionfit.

jchodera avatar jchodera commented on June 12, 2024

You can see my changes to the conda dev recipe here: #28

from torsionfit.

ChayaSt avatar ChayaSt commented on June 12, 2024

Closing. Resolved with #29

from torsionfit.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.