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

addMissingHydrogens() fails under Windows #142

Open
jepdavidson opened this issue Nov 1, 2016 · 3 comments
Open

addMissingHydrogens() fails under Windows #142

jepdavidson opened this issue Nov 1, 2016 · 3 comments

Comments

@jepdavidson
Copy link

Hi, I have been exploring the use of PDBFixer on my Windows laptop (HD4400, OpenCL 1.2), and have found some problems when OpenMM is called for minimisation, etc... I think it is an OpenCL issue, as the error I am seeing is the same as if I try to run OpenMM simulations with OpenCL platform instead of CPU:

Exception: Error downloading array energyBuffer: clEnqueueReadBuffer (-5)

Anyway, the full error is pasted below - but I wonder if it would be possible to enable explicit platform support for PDBFixer so that CPU could be selected? I don't have any intention of running production MD on the laptop using CPU, but it would be useful if the "PDB fixing" aspects of system setup could be run (albeit slowly in places!).

Any help/advice greatly appreciated!

Kind regards

James

Exception                                 Traceback (most recent call last)
<ipython-input-51-90ce594f6007> in <module>()
----> 1 fixer.addMissingHydrogens()

C:\Program Files\Anaconda2\envs\py3\lib\site-packages\pdbfixer\pdbfixer.py in addMissingHydrogens(self, pH)
   1011         """
   1012         modeller = app.Modeller(self.topology, self.positions)
-> 1013         modeller.addHydrogens(pH=pH)
   1014         self.topology = modeller.topology
   1015         self.positions = modeller.positions

C:\Program Files\Anaconda2\envs\py3\lib\site-packages\simtk\openmm\app\modeller.py in addHydrogens(self, forcefield, pH, variants, platform)
    910             context = Context(system, VerletIntegrator(0.0), platform)
    911         context.setPositions(newPositions)
--> 912         LocalEnergyMinimizer.minimize(context, 1.0, 50)
    913         self.topology = newTopology
    914         self.positions = context.getState(getPositions=True).getPositions()

C:\Program Files\Anaconda2\envs\py3\lib\site-packages\simtk\openmm\openmm.py in minimize(context, tolerance, maxIterations)
  13763             the maximum number of iterations to perform. If this is 0, minimation is continued until the results converge without regard to how many iterations it takes. The default value is 0.
  13764         """
> 13765         return _openmm.LocalEnergyMinimizer_minimize(context, tolerance, maxIterations)
  13766 
  13767     if _newclass:

Exception: Error downloading array energyBuffer: clEnqueueReadBuffer (-5)```
@peastman
Copy link
Member

peastman commented Nov 4, 2016

It would be easy enough to add an option for specifying the platform. Modeller.addHydrogens() already has an option platform argument, so we'd just pass it on.

Error -5 is CL_OUT_OF_RESOURCES. That can mean lots of different things: just that it ran out of some resource. Not surprising since you're running on an embedded GPU, and a slightly old one at that.

@jchodera
Copy link
Member

jchodera commented Nov 4, 2016

Could we just have it catch the exception and fall back to another platform?

@peastman
Copy link
Member

peastman commented Nov 7, 2016

The challenge there is that if we catch an exception, we don't know what caused it. Was it something platform specific that would be fixed by switching to a different platform? Or will it just fail again after repeating the same calculations on a much slower platform?

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

3 participants