diff --git a/src/DockQ/parsers.py b/src/DockQ/parsers.py index 67fbebd..874cb6d 100644 --- a/src/DockQ/parsers.py +++ b/src/DockQ/parsers.py @@ -196,7 +196,7 @@ def _build_structure(self, structure_id, chains, parse_hetatms): current_residue_id = resseq current_resname = resname if hetatm_flag == " ": - resname1 = seq1(current_resname, custom_map=custom_map) if len(current_resname) == 3 else r[:-1] if (len(current_resname) == 2) else r + resname1 = seq1(current_resname, custom_map=custom_map) if len(current_resname) == 3 else current_resname[:-1] if (len(current_resname) == 2) else current_resname sequences[current_chain_id] += resname1 else: sequences[current_chain_id] = resname @@ -409,7 +409,7 @@ def _parse_coordinates(self, coords_trailer, chains=[], parse_hetatms=False): resname, hetatm_flag, resseq, icode ) if hetatm_flag == " ": - resname1 = seq1(current_resname, custom_map=custom_map) if len(current_resname) == 3 else r[:-1] if (len(current_resname) == 2) else r + resname1 = seq1(current_resname, custom_map=custom_map) if len(current_resname) == 3 else current_resname[:-1] if (len(current_resname) == 2) else current_resname sequences[current_chain_id] = resname1 except PDBConstructionException as message: self._handle_PDB_exception(message, global_line_counter)