4.1.1. propka.atom

4.1.1.1. 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=None)[source]

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

count_bonded_elements(element)[source]

Count number of bonded atoms with same element.

Parameters

element – element type for test.

Returns

number of bonded atoms.

get_bonded_elements(element)[source]

Get bonded atoms with same element.

Parameters

element – element type for test.

Returns

array of bonded atoms.

get_bonded_heavy_atoms()[source]

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

Returns

list of atoms.

get_input_parameters()[source]

Extract the input parameters stored in the occupancy and b-factor fields in input files

get_tidy_label()[source]

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)[source]

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()[source]

PDB line for bonding within this molecule.

Returns

String with PDB line.

make_copy()[source]

Make a copy of this atom.

Returns

Another atom object copy of this one.

make_input_line()[source]

PDB line for this atom.

TODO - Could be @property method/attribute TODO - figure out difference between make_pdb_line, make_input_line,

and make_pdb_line2

Returns

String with PDB-format line.

make_mol2_line(id_)[source]

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()[source]

Create PDB line.

TODO - this could/should be a @property method/attribute TODO - figure out difference between make_pdb_line, make_input_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)[source]

Create a PDB line.

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

and make_pdb_line2

Returns

String with PDB line.

set_group_type(type_)[source]

Set group type of atom.

Parameters

type – group type of atom

set_properties(line)[source]

Line from PDB file to set properties of atom.

Parameters

line – PDB file line

set_property(numb=None, name=None, res_name=None, chain_id=None, res_num=None, x=None, y=None, z=None, occ=None, beta=None)[source]

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)[source]

Makes a reference to the parent residue

Parameters

residue – the parent residue