Skip to content

Commit

Permalink
Remove overly strict validation of disordered structures (#2222)
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs authored Feb 4, 2025
1 parent 1aa540e commit 19ab866
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 181 deletions.
7 changes: 0 additions & 7 deletions optimade/models/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,13 +1104,6 @@ def validate_structure_features(self) -> "StructureResourceAttributes":
"greater than one element"
)
break
else:
if StructureFeatures.DISORDER in self.structure_features:
raise ValueError(
f"{StructureFeatures.DISORDER.value} MUST NOT be present, "
"since all species' chemical_symbols lists are equal to or "
"less than one element"
)

# site_attachments
for species in self.species:
Expand Down
174 changes: 0 additions & 174 deletions tests/models/test_data/test_bad_structures.json
Original file line number Diff line number Diff line change
Expand Up @@ -832,180 +832,6 @@
"structure_features": [],
"task_id": "mpf_220"
},
{
"_id": {
"$oid": "5cfb441f053b174410700e04"
},
"chemsys": "Ag-C-Cl-N-O-S",
"cartesian_site_positions": [
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
],
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
],
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
],
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
],
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
],
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
],
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
],
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
],
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
],
[
0.48493191553525494,
0.48493191553525494,
0.48493191553525494
]
],
"dimension_types": [
1,
1,
1
],
"nperiodic_dimensions": 3,
"elements": [
"Ag",
"C",
"Cl",
"N",
"O",
"S"
],
"elements_ratios": [
0.2,
0.1,
0.1,
0.1,
0.4,
0.1
],
"formula_anonymous": "A4B2CDEF",
"last_modified": {
"$date": "2019-06-08T05:13:37.377Z"
},
"lattice_vectors": [
[
7.7673999365129625,
0,
0
],
[
0,
9.869311574261594,
0
],
[
0,
0,
4.715180447893034
]
],
"nelements": 6,
"nsites": 10,
"pretty_formula": "Ag2CClNO4S",
"species": [
{
"chemical_symbols": [
"Ag"
],
"concentration": [
1.0
],
"name": "Ag"
},
{
"chemical_symbols": [
"C"
],
"concentration": [
1.0
],
"name": "C"
},
{
"chemical_symbols": [
"Cl"
],
"concentration": [
1.0
],
"name": "Cl"
},
{
"chemical_symbols": [
"N"
],
"concentration": [
1.0
],
"name": "N"
},
{
"chemical_symbols": [
"O"
],
"concentration": [
1.0
],
"name": "O"
},
{
"chemical_symbols": [
"S"
],
"concentration": [
1.0
],
"name": "S"
}
],
"species_at_sites": [
"Ag",
"Ag",
"C",
"Cl",
"N",
"O",
"O",
"O",
"O",
"S"
],
"structure_features": ["disorder"],
"task_id": "mpf_259"
},
{
"_id": {
"$oid": "5cfb441f053b174410700e11"
Expand Down

0 comments on commit 19ab866

Please sign in to comment.