Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
ccee2e1a
Commit
ccee2e1a
authored
Jun 18, 2020
by
Lauri Himanen
Browse files
Fixed formatting of Wyckoff set results.
parent
66e49012
Pipeline
#76829
passed with stages
in 24 minutes and 20 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
nomad/app/api/encyclopedia.py
View file @
ccee2e1a
...
...
@@ -379,8 +379,9 @@ class EncMaterialsResource(Resource):
if
after
is
not
None
:
composite_kwargs
[
"after"
]
=
after
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
)
composite_agg
=
A
(
"composite"
,
**
composite_kwargs
)
composite_agg
.
metric
(
"representative"
,
A
(
"top_hits"
,
...
...
@@ -914,7 +915,7 @@ wyckoff_set_result = api.model("wyckoff_set_result", {
"wyckoff_letter"
:
fields
.
String
,
"indices"
:
fields
.
List
(
fields
.
Integer
),
"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"
,
{
"a"
:
fields
.
Float
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment