Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional string formats for configurations/terms? #36

Open
1 of 2 tasks
jagot opened this issue Mar 25, 2019 · 2 comments
Open
1 of 2 tasks

Additional string formats for configurations/terms? #36

jagot opened this issue Mar 25, 2019 · 2 comments

Comments

@jagot
Copy link
Member

jagot commented Mar 25, 2019

Do we want to support variations of the string formats used to specify configurations and terms?

E.g., in addition to c"1s2" and T"1S" we could also support

  • c"1s²" and T"¹S", which improve readability of the source code (this is how the configurations and terms are printed, anyway), and
  • c"1s( 2)", which is a commonly used format in other codes and would simplify copying-and-pasting.

The first option would require some unicode-regex magic, which might be non-trivial, the second option should be easy. To keep things simple, we should not allow mixing of formats within the same string.

@mortenpi
Copy link
Member

👍 to everything. For the unicode stuff -- a character class [¹²³⁴⁵⁶⁷⁸⁹] + a replace(s, '¹' => '1', ...) call should be sufficient? The superscripts are all single characters in Unicode as far as I can tell.

@jagot
Copy link
Member Author

jagot commented Mar 24, 2021

After 6e8c33d, what remains to implement in this issue is the format c"1s( 2)", which can be done later is we want it.

jagot added a commit that referenced this issue Mar 24, 2021
jagot added a commit that referenced this issue Mar 24, 2021
jagot added a commit that referenced this issue Mar 24, 2021
jagot added a commit that referenced this issue Mar 24, 2021
jagot added a commit that referenced this issue Mar 24, 2021
* Implemented write/read of {,Relativistic}Orbital to file (#73)

* Implemented reading/writing SpinOrbitals to/from file (#73)

* Use Base.parse to generate various AbstractOrbitals (closes #56)

* String macro for spin-configurations (closes #41)

* Support Unicode subscripts when parsing spin-{orbitals,configurations} (#41)

* Support Unicode occupations/states when parsing configurations (#36, #73)

* Support Unicode in term symbols (#36)

* Implemented serialization of Configurations (closes #73)

* Unicode docstrings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants