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

YANK analyze error #1265

Open
MehreenZaka opened this issue Jan 27, 2022 · 2 comments
Open

YANK analyze error #1265

MehreenZaka opened this issue Jan 27, 2022 · 2 comments

Comments

@MehreenZaka
Copy link

I am trying to run yank analyze after finishing my simulation successfully but i am facing errors.
with yank analyze --store={experiments} command it says:
(base) arma@UB:/media/arma/DATA/YANK_NEW_TRY/HIT1-explicit-output/experiments$ yank analyze --store=/media/arma/DATA/YANK_NEW_TRY/HIT1-explicit-output/experiments
Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead.
Traceback (most recent call last):
File "/home/arma/miniconda3/bin/yank", line 10, in
sys.exit(main())
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/cli.py", line 73, in main
dispatched = getattr(commands, command).dispatch(command_args)
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/commands/analyze.py", line 148, in dispatch
single_run()
File "/home/arma/miniconda3/lib/python3.8/site-packages/mpiplus/mpiplus.py", line 271, in _wrapper
return run_single_node(rank, task, *args, **kwargs)
File "/home/arma/miniconda3/lib/python3.8/site-packages/mpiplus/mpiplus.py", line 220, in run_single_node
result = task(*args, **kwargs)
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/commands/analyze.py", line 143, in single_run
output = analyze.analyze_directory(args['--store'], **analyzer_kwargs)
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/analyze.py", line 782, in analyze_directory
auto_experiment_analyzer = ExperimentAnalyzer(source_directory, **analyzer_kwargs)
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/analyze.py", line 299, in init
analysis = yaml.load(f)
TypeError: load() missing 1 required positional argument: 'Loader'
Exception ignored in: <function ExperimentAnalyzer.del at 0x7f7c2f6139d0>
Traceback (most recent call last):
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/analyze.py", line 336, in del
for phase, analyzer in self.analyzers.items():
AttributeError: 'ExperimentAnalyzer' object has no attribute 'analyzers'

And while running the command for notebook yank analyze report --store={experiments} --output={mynotebook.ipynb} it gives following error:
(base) arma@UB:~$ yank analyze report --store=/media/arma/DATA/YANK_NEW_TRY/HIT1-explicit-output/experiments --output=mynotebook.ipynb
Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead.
Rendering notebook as a .ipynb file...
Processing notebook now, this may take a while...
Traceback (most recent call last):
File "/home/arma/miniconda3/bin/yank", line 10, in
sys.exit(main())
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/cli.py", line 73, in main
dispatched = getattr(commands, command).dispatch(command_args)
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/commands/analyze.py", line 123, in dispatch
return dispatch_report(args)
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/commands/analyze.py", line 322, in dispatch_report
run_notebook(store, output, notebook_serial_file, **analyzer_kwargs)
File "/home/arma/miniconda3/lib/python3.8/site-packages/yank/commands/analyze.py", line 281, in run_notebook
processed_notebook, resources = ep.preprocess(loaded_notebook, resource_data)
File "/home/arma/miniconda3/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 84, in preprocess
self.preprocess_cell(cell, resources, index)
File "/home/arma/miniconda3/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 105, in preprocess_cell
cell = self.execute_cell(cell, index, store_history=True)
File "/home/arma/miniconda3/lib/python3.8/site-packages/nbclient/util.py", line 84, in wrapped
return just_run(coro(*args, **kwargs))
File "/home/arma/miniconda3/lib/python3.8/site-packages/nbclient/util.py", line 62, in just_run
return loop.run_until_complete(coro)
File "/home/arma/miniconda3/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/arma/miniconda3/lib/python3.8/site-packages/nbclient/client.py", line 846, in async_execute_cell
self._check_raise_for_error(cell, exec_reply)
File "/home/arma/miniconda3/lib/python3.8/site-packages/nbclient/client.py", line 748, in _check_raise_for_error
raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:

from matplotlib import pyplot as plt
from yank.reports import notebook
%matplotlib inline
report = notebook.HealthReportData(store_directory, **analyzer_kwargs)
report.report_version()


TypeError Traceback (most recent call last)
Input In [2], in
2 from yank.reports import notebook
3 get_ipython().run_line_magic('matplotlib', 'inline')
----> 4 report = notebook.HealthReportData(store_directory, **analyzer_kwargs)
5 report.report_version()

File ~/miniconda3/lib/python3.8/site-packages/yank/analyze.py:299, in ExperimentAnalyzer.init(self, store_directory, **analyzer_kwargs)
297 raise RuntimeError(err_msg)
298 with open(analysis_script_path, 'r') as f:
--> 299 analysis = yaml.load(f)
300 phases_names = []
301 signs = {}

TypeError: load() missing 1 required positional argument: 'Loader'
TypeError: load() missing 1 required positional argument: 'Loader'

@MehreenZaka
Copy link
Author

Update: this error was solved by changing yaml.load(f) into yaml.safe_load(f).

Now after running the script the error is with pymbar which is :
pymbar.utils.ParameterError: Warning: Should have \sum_n W_nk = 1. Actual column sum for state 0 was 1.247458. 27 other columns have similar problems

@mjw99
Copy link

mjw99 commented Feb 9, 2022

See also conda-forge/yank-feedstock#1

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

2 participants