@@ 971-983 (lines=13) @@ | ||
968 | remove_sites.extend((i for i, n in enumerate(asym_types) if n == 1)) |
|
969 | ||
970 | # Remove atoms with fractional occupancy or raise ParseError |
|
971 | if disorder != 'all_sites': |
|
972 | for i, dis in enumerate(has_disorder): |
|
973 | if i in remove_sites: |
|
974 | continue |
|
975 | if dis: |
|
976 | if disorder == 'skip': |
|
977 | raise ParseError( |
|
978 | f'{block.header} has disorder, pass ' |
|
979 | "disorder='ordered_sites' or 'all_sites' to " |
|
980 | 'remove/ignore disorder' |
|
981 | ) |
|
982 | elif disorder == 'ordered_sites': |
|
983 | remove_sites.append(i) |
|
984 | ||
985 | # Asymmetric unit |
|
986 | asym_unit = [c for i, c in enumerate(asym_unit) if i not in remove_sites] |
|
@@ 785-797 (lines=13) @@ | ||
782 | remove_sites.extend(i for i, num in enumerate(asym_types) if num == 1) |
|
783 | ||
784 | # Remove atoms with fractional occupancy or raise ParseError |
|
785 | if disorder != 'all_sites': |
|
786 | for i, dis in enumerate(has_disorder): |
|
787 | if i in remove_sites: |
|
788 | continue |
|
789 | if dis: |
|
790 | if disorder == 'skip': |
|
791 | raise ParseError( |
|
792 | f'{block.name} has disorder, pass ' |
|
793 | "disorder='ordered_sites' or 'all_sites' to " |
|
794 | 'remove/ignore disorder' |
|
795 | ) |
|
796 | elif disorder == 'ordered_sites': |
|
797 | remove_sites.append(i) |
|
798 | ||
799 | # Asymmetric unit |
|
800 | asym_unit = [c for i, c in enumerate(asym_unit) if i not in remove_sites] |