Request: Cartesian_angstrom ATOMIC_POSITIONS should be the default setting for STRU in ABACUS
Background
In most of other software (like ASE, ATOMKIT, dpdata, pymatgen, etc), the basic atomic length unit is Angstrom but not Bohr. So while writing STRU files and related interfaces, the most common usage is ATOMIC_POSITIONS Cartesian with LATTICE_VECTOR 1.889726[with more numerical number].
However, this process may cause inconsistency, as the 1/Bohr number in ABACUS and other software may be different, for example:
- in docs of ABACUS, 1/Bohr = 1.889726125457828
- in ASE, 1/Bohr = 1.8897261258369282
- The newest bohr radius cutoff in https://physics.nist.gov/cgi-bin/cuu/Value?bohrrada0 is 1.8897261259077822, which is closed to the one in ASE
- in ATOMKIT, 1/Bohr = 1.889726 (for now)
It is hard to unify each 1/Bohr in each interface, so the best solution is to do the unit transformtion inside ABACUS itself.
ABACUS do support lots of ATOMIC_POSITIONS setting
This section specifies the positions and other information of individual atoms.
The first line signifies method that atom positions are given, the following options are supported:
- Direct : coordinates of atom positions below would in fraction coordinates.
- Cartesian : Cartesian coordinates in unit of ‘LATTICE_CONSTANT’.
- Cartesian_au : Cartesian coordinates in unit of Bohr, same as setting of Cartesian with LATTICE_CONSTANT = 1.0 .
- Cartesian_angstrom : Cartesian coordinates in unit of Angstrom, same as setting of Cartesian with LATTICE_CONSTANT = 1.889726125457828.
- Cartesian_angstrom_center_xy : Cartesian coordinates in unit of Angstrom, with Direct coordinate (0.5, 0.5, 0.0) as reference.
- Cartesian_angstrom_center_xz : Cartesian coordinates in unit of Angstrom, with Direct coordinate (0.5, 0.0, 0.5) as reference…
- Cartesian_angstrom_center_yz : Cartesian coordinates in unit of Angstrom, with Direct coordinate (0.0, 0.5, 0.5) as reference…
- Cartesian_angstrom_center_xyz : Cartesian coordinates in unit of Angstrom, with Direct coordinate (0.5, 0.5, 0.5) as reference…
The Cartesian_angstrom setting is what we needed. However, after ABACUS calculation, the ATOMIC_POSITIONS setting will be back to Cartesian. And the default ATOMIC_POSITIONS setting in other interfaces are also Cartesian for the lack of knowledge about Cartesian_angstrom
Describe the solution you'd like
We should set Cartesian_angstrom as the default ATOMIC_POSITIONS setting in the input and output of ABACUS, which will be much better for interface development.
Task list only for developers
- [ ] Notice possible changes of behavior
- [ ] Explain the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi
Notice Possible Changes of Behavior (Reminder only for developers)
No response
Notice any changes of core modules (Reminder only for developers)
No response
Notice Possible Changes of Core Modules (Reminder only for developers)
No response
Additional Context
No response
Task list for Issue attackers (only for developers)
- [ ] Review and understand the proposed feature and its importance.
- [ ] Research on the existing solutions and relevant research articles/resources.
- [ ] Discuss with the team to evaluate the feasibility of implementing the feature.
- [ ] Create a design document outlining the proposed solution and implementation details.
- [ ] Get feedback from the team on the design document.
- [ ] Develop the feature following the agreed design.
- [ ] Write unit tests and integration tests for the feature.
- [ ] Update the documentation to include the new feature.
- [ ] Perform code review and address any issues.
- [ ] Merge the feature into the main branch.
- [ ] Monitor for any issues or bugs reported by users after the feature is released.
- [ ] Address any issues or bugs reported by users and continuously improve the feature.
Thanks for the advice, we will consider that possibility.