SOF-7915: refactor espresso structure parser, support for non-zero ibrav#157
SOF-7915: refactor espresso structure parser, support for non-zero ibrav#157pranabdas wants to merge 20 commits into
Conversation
ASE parser is limited to ibrav==0, requires intermediate POSCAR generation.
|
pymatgen (at least |
| # To avoid module 'numpy.linalg._umath_linalg' has no attribute '_ilp64' in Colab | ||
| "numpy>=1.24.4,<2", | ||
| "pymatgen>=2025.10.7", | ||
| "qe-tools==2.3.0", |
There was a problem hiding this comment.
| from mat3ra.esse.models.properties_directory.structural.lattice import LatticeSchema | ||
| from mat3ra.made.cell.primitive_cell import get_primitive_lattice_vectors_from_config | ||
|
|
||
| BOHR_TO_ANGSTROM = 0.529177210903 |
There was a problem hiding this comment.
This might be in mat3ra-code or mat3ra-utils
| # celldm(N) with explicit index | ||
| for n, v in re.findall(r"celldm\s*\(\s*(\d+)\s*\)\s*=\s*([^,\n/]+)", block, re.IGNORECASE): | ||
| result[f"celldm{n}"] = v.strip() | ||
| return result |
There was a problem hiding this comment.
The functions above can be in mat3ra-utils (strip comments might be there already) https://github.com/Exabyte-io/utils/blob/520308cb8a550634abb17501f9fa1aed5c3e9d02/src/py/mat3ra/utils/string.py#L62
|
|
||
| lattice_config = LatticeSchema(type=lattice_type, a=a, b=b, c=c, alpha=alpha, beta=beta, gamma=gamma) | ||
|
|
||
| return get_primitive_lattice_vectors_from_config(lattice_config) |
There was a problem hiding this comment.
I think we should consider the rounding precision for this. Such as RoundNumericValuesMixin in https://github.com/Exabyte-io/made/blob/bfa20b8e723baa55a3b1738e0c4dd100ebec8f50/src/py/mat3ra/made/lattice.py#L12
There was a problem hiding this comment.
See if https://github.com/Exabyte-io/parsers/pull/1/changes is useful
ASE parser is limited to ibrav==0, requires intermediate POSCAR generation.