Skip to content

Commit

Permalink
simpler approach
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesKarwou authored May 16, 2024
1 parent 113a5d4 commit b1ff84f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions transformato/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,21 @@ def _generate_openMM_system(self, env: str, lambda_state: int) -> Simulation:
psf_file_path = f"{self.base_path}/intst{lambda_state}/{conf_sub['intermediate-filename']}.parm7"
psf = AmberPrmtopFile(psf_file_path)
# generate simulations object and set states
if not isinstance(self.configuration["simulation"]["GPU"], bool):
if self.configuration["simulation"]["GPU"].upper() == "OPENCL":
logger.info(
"We are using the OpenCL platform for the analysis as specified in the yaml file"
)
platform = Platform.getPlatformByName("OpenCL")
platformProperties = {"UseCpuPme": "true"}
simulation = Simulation(
psf.topology,
system,
integrator,
platform,
platformProperties,
)
elif self.configuration["simulation"]["GPU"] == True:
# if not isinstance(self.configuration["simulation"]["GPU"], bool):
# if self.configuration["simulation"]["GPU"].upper() == "OPENCL":
# logger.info(
# "We are using the OpenCL platform for the analysis as specified in the yaml file"
# )
# platform = Platform.getPlatformByName("OpenCL")
# platformProperties = {"UseCpuPme": "true"}
# simulation = Simulation(
# psf.topology,
# system,
# integrator,
# platform,
# platformProperties,
# )
if self.configuration["simulation"]["GPU"] == True:
logger.info("We are using CUDA")
platform = Platform.getPlatformByName("CUDA")
simulation = Simulation(psf.topology, system, integrator, platform)
Expand Down

0 comments on commit b1ff84f

Please sign in to comment.