qp.manager.charge_embedding.remove_atoms_from_pdb

qp.manager.charge_embedding.remove_atoms_from_pdb(pdb_lines, xyz_coords, threshold)[source]

Filter PDB lines to remove atoms close to XYZ coordinates.

Uses a KD-tree for efficient spatial queries to identify and remove atoms within the threshold distance of any atom in the XYZ file.

Parameters:
  • pdb_lines (list of str) – ATOM record lines from a PDB file.

  • xyz_coords (numpy.ndarray of shape (M, 3)) – Reference coordinates (typically QM cluster atoms).

  • threshold (float) – Distance threshold in angstroms.

Returns:

PDB lines with nearby atoms removed.

Return type:

list of str