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

[Question] How to specify platform info for ReplicaExchangeSampler #667

Open
lucl13 opened this issue Mar 20, 2023 · 1 comment
Open

[Question] How to specify platform info for ReplicaExchangeSampler #667

lucl13 opened this issue Mar 20, 2023 · 1 comment

Comments

@lucl13
Copy link

lucl13 commented Mar 20, 2023

Hi,

Is there any way to specify platform info for ReplicaExchangeSampler as in normal simulations?:

platform = openmm.Platform.getPlatformByName('CUDA')
properties = {'CudaDeviceIndex': '0'}

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

There is no such option for ReplicaExchangeSampler.

@lucl13
Copy link
Author

lucl13 commented Mar 21, 2023

It can be done by set a global ContextCache:

cache.global_context_cache.set_platform(platform, properties)

Reference: https://github.com/choderalab/openmmtools/blob/b233203bc8192eed30c3232d560e97047657fc9f/docs/mcmc.rst

@lucl13 lucl13 changed the title How to specify platform info for ReplicaExchangeSampler [Question] How to specify platform info for ReplicaExchangeSampler Mar 21, 2023
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

1 participant