Skip to content

ZeroDivisionError: float division by zero error + no atom named "X" warnings. #2

@MarioAsti8

Description

@MarioAsti8

I'm getting the following error when running binana from a Python script with a set of proteins and ligands in .pdb format (extracted directly from the PDB). It starts fine but fails when getting to a certain complex:

Traceback (most recent call last):
File "interactions_.py", line 60, in
ligand, receptor = binana.load_ligand_receptor.from_files(lig_path, prot_path)
File "binana-2.1/python\binana\load_ligand_receptor_init_.py", line 103, in from_files
receptor.load_pdb_file(receptor_filename)
File "binana-2.1/python\binana_structure\mol.py", line 243, in load_pdb_file
self.load_pdb_from_text(
File "binana-2.1/python\binana_structure\mol.py", line 204, in load_pdb_from_text
self.assign_charges()
File "binana-2.1/python\binana_structure\mol.py", line 953, in assign_charges
self.charges_amines(atom_index, atom)
File "binana-2.1/python\binana_structure\mol.py", line 842, in charges_amines
elif num_neighors == 1 or atom.has_sp3_geometry(self):
File "binana-2.1/python\binana_structure\atom.py", line 327, in has_sp3_geometry
angles.append(angle_between_three_points(ncrs[0], ccr, ncrs[2]) * to_deg)
File "binana-2.1/python\binana_utils_math_functions.py", line 146, in angle_between_three_points
return angle_between_points(vector1, vector2)
File "binana-2.1/python\binana_utils_math_functions.py", line 151, in angle_between_points
new_point2 = return_normalized_vector(point2)
File "C:\Users/Mario Astigarraga/binana-2.1/python\binana_utils_math_functions.py", line 160, in return_normalized_vector
return Point(vector.x / dist, vector.y / dist, vector.z / dist)
ZeroDivisionError: float division by zero

I am also getting mutliple warning messages like the following one:

WARNING: There is no atom named "NZ" in the protein residue LYS_89_A. Please use
standard naming conventions for all protein residues to improve BINANA accuracy.

The residues mentioned indeed do not have the atom names stated when looking at the pdb file, but they appear in other residues. What issues may this cause? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions