Autodesk / Autodesk/molecular-design-toolkit
Molecule Visualization Error
- Dominant language
- Python
- Stars
- 174
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I was given an error when trying to visualize the molecule. My error and conda list message are below.
Does anyone recognize this error? Are there any changes I might need to make to my environment or to some of the requirements?
Thank you in advance for any help.
Error Message
===========
```
Connecting to docker host at unix://var/run/docker.sock... done
{}
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
in ()
5
6 h2 = mdt.Molecule([atom1,atom2], name='H2', charge=0)
----> 7 h2.draw(height=300)
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/moldesign/molecules/atomcollections.pyc in draw(self, width, height, show_2dhydrogens, display)
246 show_hydrogens=show_2dhydrogens)
247 viz3d = self.draw3d(width=width, height=height,
--> 248 display=False)
249 views = ipy.HBox([viz2d, viz3d])
250 else:
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/moldesign/molecules/atomcollections.pyc in draw3d(self, highlight_atoms, **kwargs)
267 """
268 from moldesign import viewer
--> 269 self.viz3d = viewer.GeometryViewer(self, **kwargs)
270 if highlight_atoms is not None:
271 self.viz3d.highlight_atoms(highlight_atoms)
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/moldesign/viewer/viewer3d.pyc in __init__(self, mol, style, display, render, **kwargs)
69 self._colored_as = {}
70 if mol:
---> 71 self.add_molecule(mol, render=False)
72 self._frame_positions.append(self.get_positions())
73 if style is None:
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/nbmolviz/drivers3d.pyc in add_molecule(self, mol, render)
54 # javascript: glviewer.addModel(moldata, format, {'keepH': true});
55 self.mol = mol
---> 56 moldata, format = self.get_input_file()
57 self.viewer('addModel', args=[moldata, format, {'keepH': True}])
58 self.set_style('sphere', render=False)
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/moldesign/viewer/viewer3d.pyc in get_input_file(self)
184 else:
185 writemol = self.mol
--> 186 instring = writemol.write(format=fmt)
187 return instring, fmt
188
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/moldesign/molecules/molecule.pyc in write(self, filename, **kwargs)
1118 """
1119 # TODO: make it easier to do the right thing, which is write to .pkl.bz2
-> 1120 return mdt.write(self, filename=filename, **kwargs)
1121
1122 @property
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/moldesign/fileio.pyc in write(obj, filename, format, mode)
127 WRITERS[format](obj, fileobj)
128 else:
--> 129 fileobj.write(openbabel_interface.write_string(obj, format))
130
131 # Return a string if necessary
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/moldesign/compute/runsremotely.pyc in wrapper(*args, **kwargs)
97 python_call,
98 name=self.jobname,
---> 99 sendsource=self.sendsource)
100
101 if self.display:
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/pyccc/python.pyc in __init__(self, engine, image, command, interpreter, sendsource, **kwargs)
97
98 super(PythonJob, self).__init__(engine, image, command,
---> 99 **kwargs)
100
101 @staticmethod
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/pyccc/job.pyc in __init__(self, engine, image, command, name, submit, inputs, requirements, numcpus, runtime, on_status_update, when_finished)
104
105 if submit and self.engine and self.image:
--> 106 self.submit()
107
108 def _reset(self):
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/pyccc/job.pyc in submit(self, wait, resubmit)
159 raise ValueError('This job has already been submitted')
160
--> 161 self.engine.submit(self)
162 self._submitted = True
163 if wait: self.wait()
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/pyccc/engines/dockerengine.pyc in submit(self, job)
73 job.workingdir = self.default_wdir
74 job.imageid = du.create_provisioned_image(self.client, job.image,
---> 75 job.workingdir, job.inputs)
76 cmdstring = "sh -c '%s'" % job.command
77
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/pyccc/docker_utils.pyc in create_provisioned_image(client, image, wdir, inputs, pull)
32 build_context = create_build_context(image, inputs, wdir)
33 tarobj = make_tar_stream(build_context)
---> 34 imageid = build_dfile_stream(client, tarobj, is_tar=True, pull=pull)
35 return imageid
36
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/pyccc/docker_utils.pyc in build_dfile_stream(client, dfilestream, is_tar, **kwargs)
60 rm=True,
61 custom_context=is_tar,
---> 62 **kwargs)
63
64 # this blocks until the image is done building
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/docker/api/build.pyc in build(self, path, tag, quiet, fileobj, nocache, rm, stream, timeout, custom_context, encoding, pull, forcerm, dockerfile, container_limits, decode, buildargs, gzip, shmsize, labels, cache_from)
213 headers=headers,
214 stream=stream,
--> 215 timeout=timeout,
216 )
217
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/docker/utils/decorators.pyc in inner(self, *args, **kwargs)
45 else:
46 kwargs['headers'].update(self._auth_configs['HttpHeaders'])
---> 47 return f(self, *args, **kwargs)
48 return inner
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/docker/api/client.pyc in _post(self, url, **kwargs)
177 @update_headers
178 def _post(self, url, **kwargs):
--> 179 return self.post(url, **self._set_request_timeout(kwargs))
180
181 @update_headers
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/requests/sessions.pyc in post(self, url, data, json, **kwargs)
558 """
559
--> 560 return self.request('POST', url, data=data, json=json, **kwargs)
561
562 def put(self, url, data=None, **kwargs):
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
511 }
512 send_kwargs.update(settings)
--> 513 resp = self.send(prep, **send_kwargs)
514
515 return resp
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
621
622 # Send the request
--> 623 r = adapter.send(request, **kwargs)
624
625 # Total elapsed time of the request (approximately)
/Users/JosephOBrien/anaconda3/envs/mdtk27/lib/python2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
488
489 except (ProtocolError, socket.error) as err:
--> 490 raise ConnectionError(err, request=request)
491
492 except MaxRetryError as e:
ConnectionError: ('Connection aborted.', error(61, 'Connection refused'))
```
Conda List
========
```
appnope 0.1.0
backports-abc 0.5
backports.shutil-get-terminal-size 1.0.0
backports.ssl-match-hostname 3.5.0.1
biopython 1.68 np112py27_0
bleach 2.0.0
certifi 2017.4.17
chardet 3.0.3
configparser 3.5.0
cycler 0.10.0
decorator 4.0.11
docker 2.3.0
docker-py 1.10.6
docker-pycreds 0.2.1
entrypoints 0.2.2
enum34 1.1.6
fortranformat 0.2.5
funcsigs 1.0.2
functools32 3.2.3.post2
future 0.16.0
html5lib 0.999999999
idna 2.5
ipaddress 1.0.18
ipykernel 4.6.1
ipython 5.3.0
ipython-genutils 0.2.0
ipywidgets 6.0.0
Jinja2 2.9.6
jsonschema 2.6.0
jupyter-client 5.0.1
jupyter-core 4.3.0
markdown2 2.3.4
MarkupSafe 1.0
matplotlib 2.0.2
mistune 0.7.4
mkl 2017.0.1 0
moldesign 0.7.3
nbconvert 5.2.1
nbformat 4.3.0
nbmolviz 0.6.6
notebook 5.0.0
numpy 1.12.1 py27_0
numpy 1.12.1
openssl 1.0.2l 0
pandocfilters 1.4.1
pathlib2 2.2.1
pexpect 4.2.1
pickleshare 0.7.4
Pint 0.8
pip 9.0.1 py27_1
prompt-toolkit 1.0.14
ptyprocess 0.5.1
py 1.4.33
pyccc 0.7.4
Pygments 2.2.0
pyparsing 2.2.0
pytest 3.1.1
python 2.7.13 0
python-dateutil 2.6.0
pytz 2017.2
PyYAML 3.12
pyzmq 16.0.2
readline 6.2 2
requests 2.17.3
scandir 1.5
scipy 0.19.0
setuptools 27.2.0 py27_0
simplegeneric 0.8.1
singledispatch 3.4.0.3
six 1.10.0
sqlite 3.13.0 0
subprocess32 3.2.7
tblib 1.3.2
terminado 0.6
testpath 0.3.1
tk 8.5.18 0
tornado 4.5.1
traitlets 4.3.2
urllib3 1.21.1
uuid 1.30
wcwidth 0.1.7
webcolors 1.7
webencodings 0.5.1
websocket-client 0.40.0
wheel 0.29.0 py27_0
widgetsnbextension 2.0.0
zlib 1.2.8 3
```
Contributor guide
Research direction
Start with the traceback at h2.draw(height=300), especially the connection-refused failure while pyccc builds a Docker image. Check the Docker host and the listed Python 2.7 environment; done means molecule visualization succeeds without the connection error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- anaconda, docker, jupyter, python
- Domain
- computer-graphics, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100