Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed May 11, 2021
1 parent ab47dee commit d2750cd
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/mp_api/routes/similarity/client.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
from mp_api.core.client import BaseRester, MPRestError
from mp_api.core.client import BaseRester


class SimilarityRester(BaseRester):

suffix = "similarity"

def get_similar_structures(self, material_id: str):
"""
Get similar structures for a given Materials Project ID.
Arguments:
material_id (str): Materials project ID
Returns:
results (Dict): Dictionary containing structure similarity data.
"""

result = self._make_request("{}/?all_fields=true".format(material_id))

if len(result.get("data", [])) > 0:
return result
else:
raise MPRestError("No document found")

0 comments on commit d2750cd

Please sign in to comment.