propka.atom
Atom
The Atom
class contains all atom information found in the PDB file.
Classes
|
Atom class - contains all atom information found in the PDB file |
- class propka.atom.Atom(line: str | None = None)[source]
Atom class - contains all atom information found in the PDB file
Changed in version 3.4.0:
make_input_line()
andget_input_parameters()
have been removed as reading/writing PROPKA input is no longer supported.- 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_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_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, and make_pdb_line2
- Returns:
String with PDB line.
- set_properties(line: str | None)[source]
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)[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