File tree 3 files changed +14
-9
lines changed
3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1
- __version__ = '1.4.2 '
1
+ __version__ = '1.4.3 '
Original file line number Diff line number Diff line change @@ -1153,7 +1153,8 @@ class ComponentType(IntEnum):
1153
1153
N = 5 # Non-polymer
1154
1154
O = 6 # Other categories
1155
1155
B = 7 # Bound Molecule
1156
- W = 8 # Water
1156
+ W = 8 # Water
1157
+ M = 9 # Missing label_comp_type
1157
1158
1158
1159
@staticmethod
1159
1160
def from_chem_comp_type (type : str ):
Original file line number Diff line number Diff line change @@ -422,14 +422,18 @@ def get_component_types(path):
422
422
chem_comp = cif_block .get_mmcif_category ('_chem_comp.' )
423
423
component_types = {}
424
424
for i in range (len (chem_comp ['id' ])):
425
- cmp_type = config .ComponentType .from_chem_comp_type (chem_comp ['type' ][i ])
426
- if not cmp_type == config .ComponentType (5 ).name :
427
- component_types [chem_comp ['id' ][i ]] = cmp_type
428
- else :
429
- if chem_comp ['name' ][i ].upper () == 'WATER' :
430
- component_types [chem_comp ['id' ][i ]] = config .ComponentType (8 ).name
425
+ chem_comp_type = chem_comp ['type' ][i ]
426
+ if chem_comp_type :
427
+ comp_type = config .ComponentType .from_chem_comp_type (chem_comp_type .upper ())
428
+ if not comp_type == config .ComponentType (5 ).name :
429
+ component_types [chem_comp ['id' ][i ]] = comp_type
431
430
else :
432
- component_types [chem_comp ['id' ][i ]] = config .ComponentType (7 ).name
431
+ if chem_comp ['name' ][i ].upper () == 'WATER' :
432
+ component_types [chem_comp ['id' ][i ]] = config .ComponentType (8 ).name
433
+ else :
434
+ component_types [chem_comp ['id' ][i ]] = config .ComponentType (7 ).name
435
+ else :
436
+ component_types [chem_comp ['id' ][i ]] = config .ComponentType (9 ).name
433
437
434
438
return component_types
435
439
You can’t perform that action at this time.
0 commit comments