# propka.atom

## Atom

The `Atom` class contains all atom information found in the PDB file.

Classes

`Atom`([line]) | Atom class - contains all atom information found in the PDB file

class propka.atom.Atom(line: str | None = None)

  Atom class - contains all atom information found in the PDB file

  Changed in version 3.4.0: `make_input_line()` and `get_input_parameters()` have been removed as reading/writing PROPKA input is no longer supported.

  count_bonded_elements(element)

    Count number of bonded atoms with same element.

    Parameters:

      element – element type for test.

    Returns:

      number of bonded atoms.

  get_bonded_elements(element)

    Get bonded atoms with same element.

    Parameters:

      element – element type for test.

    Returns:

      array of bonded atoms.

  get_bonded_heavy_atoms()

    Get the atoms bonded to this one that aren’t hydrogen.

    Returns:

      list of atoms.

  get_tidy_label()

    Returns a ‘tidier’ atom label for printing the new pdbfile

    TODO - this could/should be a @property method/attribute

    Returns:

      String with label

  is_atom_within_bond_distance(other_atom, max_bonds, cur_bond)

    Check if <other_atom> is found within <max_bonds> bonds of self.

    Parameters:

      - other_atom – atom to check

      - max_bonds – number of bonds to check for other atom bonding to self

    Returns:

      Boolean for atom bond distance

  make_conect_line()

    PDB line for bonding within this molecule.

    Returns:

      String with PDB line.

  make_copy()

    Make a copy of this atom.

    Returns:

      Another atom object copy of this one.

  make_mol2_line(id_)

    Create MOL2 line.

    Format: 1 S1 3.6147 2.0531 1.4795 S.3 1 noname -0.1785

    TODO - this could/should be a @property method/attribute

    Returns:

      String with MOL2 line.

  make_pdb_line()

    Create PDB line.

    TODO - this could/should be a @property method/attribute TODO - figure out difference between make_pdb_line, and make_pdb_line2

    Returns:

      String with PDB line.

  make_pdb_line2(numb=None, name=None, res_name=None, chain_id=None, res_num=None, x=None, y=None, z=None, occ=None, beta=None)

    Create a PDB line.

    TODO - this could/should be a @property method/attribute TODO - figure out difference between make_pdb_line, and make_pdb_line2

    Returns:

      String with PDB line.

  set_group_type(type_: str)

    Set group type of atom.

    Parameters:

      type – group type of atom

  set_properties(line: str | None)

    Line from PDB file to set properties of atom.

    Parameters:

      line – PDB file line

  set_property(numb: int | None = None, name: str | None = None, res_name: str | None = None, chain_id: str | None = None, res_num: int | None = None, x: float | None = None, y: float | None = None, z: float | None = None, occ: str | None = None, beta: str | None = None)

    Set properties of the atom object.

    Parameters:

      - numb – Atom number

      - name – Atom name

      - res_name – residue name

      - chain_id – chain ID

      - res_num – residue number

      - x – atom x-coordinate

      - y – atom y-coordinate

      - z – atom z-coordinate

      - occ – atom occupancy

      - beta – atom temperature factor

  set_residue(residue: NoReturn)

    Makes a reference to the parent residue

    Parameters:

      residue – the parent residue