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

Fix no inversion symmetry linear molecule or atom #96

Merged

Conversation

kohei-noda-qcrg
Copy link
Member

Summary

Implementation

  • スペース区切りのList[str]を渡してもらうのではなくもとのstrを渡してもらったうえで、"in"と":"のインデックスを取得し、"in"と":”の間の文字をスペースを取り除いて取得するようにした
    def get_symmetry_type_supersym(line: str) -> str:
    # https://gitlab.com/dirac/dirac/-/blob/364663fd2bcc419e41ad01703fd782889435b576/src/dirac/dirout.F#L1097-1105
    # FORMAT '(/A,I4,4A,I2,...)'
    # DATA "* Block",ISUB,' in ',FREP(IFSYM),": ",...
    # ISUB might be **** if ISUB > 9999 or ISUB < -999 because of the format
    # Therefore, find 'in' and ':' in line and get FREP(IFSYM) from the line
    # FREP(IFSYM) is a symmetry type
    in_idx = line.index("in")
    colon_idx = line.index(":")
    current_symmetry_type = line[in_idx + 2:colon_idx].strip()
    return current_symmetry_type

@kohei-noda-qcrg kohei-noda-qcrg added the bug Something isn't working label Mar 7, 2024
@kohei-noda-qcrg kohei-noda-qcrg merged commit f322d57 into main Mar 7, 2024
6 checks passed
@kohei-noda-qcrg kohei-noda-qcrg deleted the fix-no-inversion-symmetry-linear-molecule-or-atom branch March 7, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant