-
Notifications
You must be signed in to change notification settings - Fork 77
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
Import error on Google Colab #532
Comments
It appears that my environment set-up was the issue. Alternatively setting up the Conda environment (in Google Colab) in the following way appears to fix all issues (with each separate "code block" representing a separate cell): !pip install -q condacolab
import condacolab
condacolab.install() import condacolab
condacolab.check()
However, this does lead to a new issue in the "Analyzing the Data with MBAR" Section... Running the following code: from pymbar import MBAR, timeseries
N_k = np.zeros([nstates], np.int32) # number of uncorrelated samples
for k in range(nstates):
[nequil, g, Neff_max] = timeseries.detectEquilibration(u_kln[k,k,:])
indices = timeseries.subsampleCorrelatedData(u_kln[k,k,:], g=g)
N_k[k] = len(indices)
u_kln[k,:,0:N_k[k]] = u_kln[k,:,indices].T
mbar = MBAR(u_kln, N_k)
[DeltaF_ij, dDeltaF_ij, Theta_ij] = mbar.getFreeEnergyDifferences() Results in this traceback: ParameterError Traceback (most recent call last) 2 frames ParameterError: Warning: Should have \sum_k N_k W_nk = 1. Actual row sum for sample 6 was 0.999696. 7 other rows have similar problems |
@bcallen95 Sorry I just saw this, that error you are getting now is from |
Hi there! I've been trying to run the "Alchemical Free Energy Calculations" Tutorial on the OpenMM Page. When I try to import openmmtools I get the following traceback:
AttributeError Traceback (most recent call last)
in ()
----> 1 import openmmtools
2 frames
/usr/local/envs/openmm/lib/python3.7/site-packages/openmmtools/init.py in ()
6 """
7
----> 8 from openmmtools import testsystems, integrators, alchemy, mcmc, states, cache, utils, constants, forces, forcefactories, storage, multistate
9
10 # Handle versioneer
/usr/local/envs/openmm/lib/python3.7/site-packages/openmmtools/multistate/init.py in ()
63
64 from openmmtools.multistate.multistatesampler import MultiStateSampler
---> 65 from openmmtools.multistate.multistatereporter import MultiStateReporter
66 from openmmtools.multistate.replicaexchange import ReplicaExchangeSampler, ReplicaExchangeAnalyzer
67 from openmmtools.multistate.paralleltempering import ParallelTemperingSampler, ParallelTemperingAnalyzer
/usr/local/envs/openmm/lib/python3.7/site-packages/openmmtools/multistate/multistatereporter.py in ()
1752 # ==============================================================================
1753
-> 1754 class _DictYamlLoader(yaml.CLoader):
1755 """PyYAML Loader that reads !Quantity tags."""
1756 def init(self, *args, **kwargs):
AttributeError: module 'yaml' has no attribute 'CLoader'
Do you have any thoughts/advice on how to go about fixing this issue? Thanks!
The text was updated successfully, but these errors were encountered: