Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
wiederm committed May 10, 2024
1 parent ef503e2 commit 8a0ba42
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions guardowl/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ def create_simulation(
MonteCarloBarostat(unit.Quantity(1, unit.atmosphere), temperature)
)

simulation = Simulation(topology, system, integrator, platform)

if platform.getName() == "CUDA":
simulation.context.setPlatformProperty("CudaDeviceIndex", str(device_index))
simulation.context.setPlatformProperty("CudaPrecision", "mixed")
prop = {"CudaDeviceIndex", str(device_index), "CudaPrecision", "mixed"}
simulation = Simulation(topology, system, integrator, platform, prop)
else:
simulation = Simulation(topology, system, integrator, platform)

return simulation


Expand Down

0 comments on commit 8a0ba42

Please sign in to comment.