smog-server / OpenSMOG

OpenSMOG is a Python library for performing molecular dynamics simulations using Structure-Based Models. OpenSMOG uses OpenMM.
MIT License
11 stars 6 forks source link

KeyError: 'Precision' error when running tutorial #41

Closed jknoel closed 2 years ago

jknoel commented 2 years ago

I am trying to run the tutorial SBM_AA.ipynb and I run into this error:


KeyError Traceback (most recent call last) /var/folders/_5/724d3sj56xjf2y7y4t10wksr000psx/T/ipykernel_64549/223998009.py in ----> 1 sbm_AA.run(nsteps=106, report=True, interval=103)

~/anaconda3/envs/smog2.4/lib/python3.9/site-packages/OpenSMOG/OpenSMOG.py in run(self, nsteps, report, interval) 416 self.simulation.reporters.append(StateDataReporter(sys.stdout, interval, step=True, remainingTime=True, 417 progress=True, totalSteps=nsteps, separator="\t")) --> 418 self._createLogfile() 419 self.simulation.step(nsteps) 420

~/anaconda3/envs/smog2.4/lib/python3.9/site-packages/OpenSMOG/OpenSMOG.py in _createLogfile(self) 436 f.write('Machine information: {:} : {:}, {:} : {:}\n'.format("System", platform.uname().system, "Version", platform.uname().version)) 437 f.write('Platform: {:}\n'.format(self.platform.getName())) --> 438 f.write('Precision: {:}\n'.format(self.properties['Precision'])) 439 f.write('Integrator: {:}\n'.format(self.integrator_type)) 440 f.write('Savefolder: {:}\n'.format(self.folder))

KeyError: 'Precision'

contessoto commented 2 years ago

It seems that the precision properties are only available for CUDA and OpenCL platforms in OpenMM: http://docs.openmm.org/latest/userguide/library.html#platform-specific-properties I was able to reproduce the same error when running on the CPU platform. I am moving it to Bugs and should be fixed in release 1.0.4 later today.

Whitford commented 2 years ago

Good catch!

junioreif commented 2 years ago

I'm working on that

Em sáb., 21 de ago. de 2021 às 10:01, Whitford @.***> escreveu:

Good catch!

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/smog-server/OpenSMOG/issues/41#issuecomment-903129450, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWH3B3IZ5XL43HO3PFZKI3T565TFANCNFSM5CRWEUAA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

-- __

Antonio B. Oliveira JuniorRobert A. Welch Postdoctoral FellowCenter for Theoretical Biological Physics (CTBP)Rice University

contessoto commented 2 years ago

We just released version 1.0.4 where this Bug is fixed.

Just update OpenSMOG to the newest version:

pip install OpenSMOG --upgrade