Skip to content

Commit

Permalink
chore: id 1,2 -> id 0,1
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Feb 21, 2024
1 parent 07dc368 commit 4aeb0ab
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
16 changes: 8 additions & 8 deletions express/parsers/apps/espresso/formats/txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ def initial_basis(self, text):
Example:
{
'units': 'angstrom',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [2.1095228, 1.49165, 3.6538]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [2.1095228, 1.49165, 3.6538]}]
}
"""
alat = self._get_alat(text)
Expand Down Expand Up @@ -436,14 +436,14 @@ def _basis_convergence(self, text):
[
{
'units': 'crystal',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [0.0, 0.0, 0.0]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [0.0, 0.0, 0.0]}]
},
...
{
'units': 'crystal',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [0.0, 0.0, 0.0]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [0.0, 0.0, 0.0]}]
}
]
"""
Expand All @@ -462,8 +462,8 @@ def _extract_basis_from_bfgs_blocks(self, text):
Example:
{
'units': 'crystal',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [0.0, 0.0, 0.0]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [0.0, 0.0, 0.0]}]
}
"""
basis = {"units": "crystal", "elements": [], "coordinates": []}
Expand Down
4 changes: 2 additions & 2 deletions express/parsers/apps/espresso/formats/xml/xml_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ def final_basis(self):
Example:
{
'units': 'angstrom',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [0.0, 0.0, 0.0]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [0.0, 0.0, 0.0]}]
}
"""
pass
4 changes: 2 additions & 2 deletions express/parsers/apps/espresso/formats/xml/xml_pre64.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def final_basis(self):
Example:
{
'units': 'angstrom',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [0.0, 0.0, 0.0]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [0.0, 0.0, 0.0]}]
}
"""
elements, coordinates = [], []
Expand Down
8 changes: 4 additions & 4 deletions express/parsers/apps/vasp/formats/txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ def _basis_convergence(self, text, atom_names):
[
{
'units': 'crystal',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [0.0, 0.0, 0.0]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [0.0, 0.0, 0.0]}]
},
...
{
'units': 'crystal',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [0.0, 0.0, 0.0]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [0.0, 0.0, 0.0]}]
}
]
"""
Expand Down
4 changes: 2 additions & 2 deletions express/parsers/apps/vasp/formats/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ def final_basis(self):
Example:
{
'units': 'angstrom',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [1.11, 0.78, 1.93]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [1.11, 0.78, 1.93]}]
}
"""
lattice = self.final_lattice_vectors()
Expand Down
8 changes: 4 additions & 4 deletions express/parsers/mixins/ionic.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def initial_basis(self):
Example:
{
'units': 'crystal',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [0.25, 0.25, 0.25]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [0.25, 0.25, 0.25]}]
}
"""
pass
Expand Down Expand Up @@ -81,8 +81,8 @@ def final_basis(self):
Example:
{
'units': 'crystal',
'elements': [{'id': 1, 'value': 'Si'}, {'id': 2, 'value': 'Si'}],
'coordinates': [{'id': 1, 'value': [0.0, 0.0, 0.0]}, {'id': 2, 'value': [0.25, 0.25, 0.25]}]
'elements': [{'id': 0, 'value': 'Si'}, {'id': 1, 'value': 'Si'}],
'coordinates': [{'id': 0, 'value': [0.0, 0.0, 0.0]}, {'id': 1, 'value': [0.25, 0.25, 0.25]}]
}
"""
pass
Expand Down

0 comments on commit 4aeb0ab

Please sign in to comment.