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

Molecule Visualization Error #151

Open
obrien951 opened this issue May 31, 2017 · 1 comment
Open

Molecule Visualization Error #151

obrien951 opened this issue May 31, 2017 · 1 comment

Comments

@obrien951
Copy link

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)
<ipython-input-2-0385c2af8f06> in <module>()
      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                     <pip>
backports-abc             0.5                       <pip>
backports.shutil-get-terminal-size 1.0.0                     <pip>
backports.ssl-match-hostname 3.5.0.1                   <pip>
biopython                 1.68                np112py27_0  
bleach                    2.0.0                     <pip>
certifi                   2017.4.17                 <pip>
chardet                   3.0.3                     <pip>
configparser              3.5.0                     <pip>
cycler                    0.10.0                    <pip>
decorator                 4.0.11                    <pip>
docker                    2.3.0                     <pip>
docker-py                 1.10.6                    <pip>
docker-pycreds            0.2.1                     <pip>
entrypoints               0.2.2                     <pip>
enum34                    1.1.6                     <pip>
fortranformat             0.2.5                     <pip>
funcsigs                  1.0.2                     <pip>
functools32               3.2.3.post2               <pip>
future                    0.16.0                    <pip>
html5lib                  0.999999999               <pip>
idna                      2.5                       <pip>
ipaddress                 1.0.18                    <pip>
ipykernel                 4.6.1                     <pip>
ipython                   5.3.0                     <pip>
ipython-genutils          0.2.0                     <pip>
ipywidgets                6.0.0                     <pip>
Jinja2                    2.9.6                     <pip>
jsonschema                2.6.0                     <pip>
jupyter-client            5.0.1                     <pip>
jupyter-core              4.3.0                     <pip>
markdown2                 2.3.4                     <pip>
MarkupSafe                1.0                       <pip>
matplotlib                2.0.2                     <pip>
mistune                   0.7.4                     <pip>
mkl                       2017.0.1                      0  
moldesign                 0.7.3                     <pip>
nbconvert                 5.2.1                     <pip>
nbformat                  4.3.0                     <pip>
nbmolviz                  0.6.6                     <pip>
notebook                  5.0.0                     <pip>
numpy                     1.12.1                   py27_0  
numpy                     1.12.1                    <pip>
openssl                   1.0.2l                        0  
pandocfilters             1.4.1                     <pip>
pathlib2                  2.2.1                     <pip>
pexpect                   4.2.1                     <pip>
pickleshare               0.7.4                     <pip>
Pint                      0.8                       <pip>
pip                       9.0.1                    py27_1  
prompt-toolkit            1.0.14                    <pip>
ptyprocess                0.5.1                     <pip>
py                        1.4.33                    <pip>
pyccc                     0.7.4                     <pip>
Pygments                  2.2.0                     <pip>
pyparsing                 2.2.0                     <pip>
pytest                    3.1.1                     <pip>
python                    2.7.13                        0  
python-dateutil           2.6.0                     <pip>
pytz                      2017.2                    <pip>
PyYAML                    3.12                      <pip>
pyzmq                     16.0.2                    <pip>
readline                  6.2                           2  
requests                  2.17.3                    <pip>
scandir                   1.5                       <pip>
scipy                     0.19.0                    <pip>
setuptools                27.2.0                   py27_0  
simplegeneric             0.8.1                     <pip>
singledispatch            3.4.0.3                   <pip>
six                       1.10.0                    <pip>
sqlite                    3.13.0                        0  
subprocess32              3.2.7                     <pip>
tblib                     1.3.2                     <pip>
terminado                 0.6                       <pip>
testpath                  0.3.1                     <pip>
tk                        8.5.18                        0  
tornado                   4.5.1                     <pip>
traitlets                 4.3.2                     <pip>
urllib3                   1.21.1                    <pip>
uuid                      1.30                      <pip>
wcwidth                   0.1.7                     <pip>
webcolors                 1.7                       <pip>
webencodings              0.5.1                     <pip>
websocket-client          0.40.0                    <pip>
wheel                     0.29.0                   py27_0  
widgetsnbextension        2.0.0                     <pip>
zlib                      1.2.8                         3  
@avirshup
Copy link
Contributor

avirshup commented Jun 9, 2017

@obrien951 - hey Joseph; do you have the docker engine installed on your machine? I suspect that's what the problem is.

If true, then MDT needs to emit a better error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants