Commit ccee2e1a authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Fixed formatting of Wyckoff set results.

parent 66e49012
Pipeline #76829 passed with stages
in 24 minutes and 20 seconds
...@@ -379,8 +379,9 @@ class EncMaterialsResource(Resource): ...@@ -379,8 +379,9 @@ class EncMaterialsResource(Resource):
if after is not None: if after is not None:
composite_kwargs["after"] = after composite_kwargs["after"] = after
else: else:
cardinality_agg = A("cardinality", field="encyclopedia.material.material_id") cardinality_agg = A("cardinality", field="encyclopedia.material.material_id", precision_threshold=1000)
s.aggs.metric("n_materials", cardinality_agg) s.aggs.metric("n_materials", cardinality_agg)
composite_agg = A("composite", **composite_kwargs) composite_agg = A("composite", **composite_kwargs)
composite_agg.metric("representative", A( composite_agg.metric("representative", A(
"top_hits", "top_hits",
...@@ -914,7 +915,7 @@ wyckoff_set_result = api.model("wyckoff_set_result", { ...@@ -914,7 +915,7 @@ wyckoff_set_result = api.model("wyckoff_set_result", {
"wyckoff_letter": fields.String, "wyckoff_letter": fields.String,
"indices": fields.List(fields.Integer), "indices": fields.List(fields.Integer),
"element": fields.String, "element": fields.String,
"variables": fields.List(fields.Nested(wyckoff_variables_result, skip_none=True)), "variables": fields.Nested(wyckoff_variables_result, skip_none=True),
}) })
lattice_parameters = api.model("lattice_parameters", { lattice_parameters = api.model("lattice_parameters", {
"a": fields.Float, "a": fields.Float,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment