Skip to content

Add notebook to run quantum calculation container#193

Open
bnmajor wants to merge 3 commits intoOpenChemistry:masterfrom
bnmajor:quantum-notebook
Open

Add notebook to run quantum calculation container#193
bnmajor wants to merge 3 commits intoOpenChemistry:masterfrom
bnmajor:quantum-notebook

Conversation

@bnmajor
Copy link
Copy Markdown
Contributor

@bnmajor bnmajor commented Jan 18, 2021

No description provided.

Signed-off-by: Brianna Major <brianna.major@kitware.com>
@cjh1
Copy link
Copy Markdown
Member

cjh1 commented Feb 23, 2021

@bnmajor I am seeing the follow error when I try to run the second cell:

--------------------------------------------------------------------------
HttpError                                 Traceback (most recent call last)
<ipython-input-3-dac8a8c38b02> in <module>
----> 1 mol = oc.find_structure('InChI=1S/2Li')
      2 mol.structure.show()

~/openchemistrypy/openchemistry/api.py in find_structure(identifier, image_name, input_parameters, input_geometry, inchi, smiles)
    130 
    131 def find_structure(identifier=None, image_name=None, input_parameters=None, input_geometry=None, inchi=None, smiles=None):
--> 132     molecule = find_molecule(identifier, inchi, smiles)
    133 
    134     # If we have been provided basis, theory or functional it means the user is

~/openchemistrypy/openchemistry/api.py in find_molecule(identifier, inchi, smiles)
    118 
    119 def find_molecule(identifier=None, inchi=None, smiles=None):
--> 120     molecule = _find_molecule(identifier, inchi, smiles)
    121     if molecule is None:
    122         raise Exception('Unable to find a molecule with the provided identifiers.')

~/openchemistrypy/openchemistry/api.py in _find_molecule(identifier, inchi, smiles)
     32     # Finally, if identifier is something else (a name), try cactus
     33     if identifier:
---> 34         return _find_molecule_using_cactus(identifier)
     35 
     36     return None

~/openchemistrypy/openchemistry/api.py in _find_molecule_using_cactus(identifier)
     61         'cactus': identifier
     62     }
---> 63     res = GirderClient().get('molecules/search', parameters=params)
     64     # Just pick the first
     65     if 'results' in res and len(res['results']) > 0:

/opt/conda/lib/python3.8/site-packages/girder_client/__init__.py in get(self, path, parameters, jsonResp)
    469         Convenience method to call :py:func:`sendRestRequest` with the 'GET' HTTP method.
    470         """
--> 471         return self.sendRestRequest('GET', path, parameters, jsonResp=jsonResp)
    472 
    473     def post(self, path, parameters=None, files=None, data=None, json=None, headers=None,

/opt/conda/lib/python3.8/site-packages/girder_client/__init__.py in sendRestRequest(self, method, path, parameters, data, files, json, headers, jsonResp, **kwargs)
    461                 return result
    462         else:
--> 463             raise HttpError(
    464                 status=result.status_code, url=result.url, method=method, text=result.text,
    465                 response=result)

HttpError: HTTP error 500: GET http://girder:8080/api/v1/molecules/search?cactus=InChI%3D1S%2F2Li
Response text: {"message": "KeyError: KeyError('bonds')", "trace": ["<FrameSummary file /girder/girder/api/rest.py, line 629 in endpointDecorator>", "<FrameSummary file /girder/girder/api/rest.py, line 1190 in GET>", "<FrameSummary file /girder/girder/api/rest.py, line 946 in handleRoute>", "<FrameSummary file /mongochemserver/girder/molecules/molecules/molecule.py, line 490 in search>", "<FrameSummary file /mongochemserver/girder/molecules/molecules/utilities/molecules.py, line 47 in create_molecule>"], "type": "internal", "uid": "a77fe3ed-490c-4af8-92eb-8953a432eae7"}

It is possible that the catus seach is failing? Or something else has changed?

Signed-off-by: Brianna Major <brianna.major@kitware.com>
@bnmajor
Copy link
Copy Markdown
Contributor Author

bnmajor commented Feb 23, 2021

@cjh1 I've update find_molecule to use the InChiKey instead, the search should work now.

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

Successfully merging this pull request may close these issues.

2 participants