From 4aeb0ab6789267e43c1114f476003008467a3d29 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:48:16 -0800 Subject: [PATCH] chore: id 1,2 -> id 0,1 --- express/parsers/apps/espresso/formats/txt.py | 16 ++++++++-------- .../apps/espresso/formats/xml/xml_base.py | 4 ++-- .../apps/espresso/formats/xml/xml_pre64.py | 4 ++-- express/parsers/apps/vasp/formats/txt.py | 8 ++++---- express/parsers/apps/vasp/formats/xml.py | 4 ++-- express/parsers/mixins/ionic.py | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/express/parsers/apps/espresso/formats/txt.py b/express/parsers/apps/espresso/formats/txt.py index f58f6fac..60186bda 100644 --- a/express/parsers/apps/espresso/formats/txt.py +++ b/express/parsers/apps/espresso/formats/txt.py @@ -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) @@ -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]}] } ] """ @@ -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": []} diff --git a/express/parsers/apps/espresso/formats/xml/xml_base.py b/express/parsers/apps/espresso/formats/xml/xml_base.py index ccd45747..297a8f2b 100644 --- a/express/parsers/apps/espresso/formats/xml/xml_base.py +++ b/express/parsers/apps/espresso/formats/xml/xml_base.py @@ -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 diff --git a/express/parsers/apps/espresso/formats/xml/xml_pre64.py b/express/parsers/apps/espresso/formats/xml/xml_pre64.py index 84e8dc98..aa598128 100644 --- a/express/parsers/apps/espresso/formats/xml/xml_pre64.py +++ b/express/parsers/apps/espresso/formats/xml/xml_pre64.py @@ -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 = [], [] diff --git a/express/parsers/apps/vasp/formats/txt.py b/express/parsers/apps/vasp/formats/txt.py index 7801b386..f70ec876 100644 --- a/express/parsers/apps/vasp/formats/txt.py +++ b/express/parsers/apps/vasp/formats/txt.py @@ -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]}] } ] """ diff --git a/express/parsers/apps/vasp/formats/xml.py b/express/parsers/apps/vasp/formats/xml.py index 797a803c..db12dd7b 100644 --- a/express/parsers/apps/vasp/formats/xml.py +++ b/express/parsers/apps/vasp/formats/xml.py @@ -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() diff --git a/express/parsers/mixins/ionic.py b/express/parsers/mixins/ionic.py index 272e80ae..8b4adc8e 100644 --- a/express/parsers/mixins/ionic.py +++ b/express/parsers/mixins/ionic.py @@ -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 @@ -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