luna.mol.atom module¶
- class AtomData(atomic_num, coord, bond_type, serial_number=None)[source]¶
Bases:
object
Store atomic data (atomic number, coordinates, bond type, and serial number).
- Parameters
atomic_num (int) – Atomic number.
coord (array_like of float (size 3)) – Atomic coordinates (x, y, z).
bond_type (int) – Bond type.
serial_number (int, optional) – Atom serial number.
- Variables
- property coord¶
The atomic coordinates (x, y, z).
- Type
array_like of float (size 3)
- class ExtendedAtom(atom, nb_info=None, atm_grps=None, invariants=None)[source]¶
Bases:
object
Extend
Atom
with additional properties and methods.- Parameters
- as_json()[source]¶
Represent the atom as a dict containing the structure id, model id, chain id, residue name, residue id, and atom name.
The dict is defined as follows:
pdb_id
(str): structure id;model
(str): model id;chain
(str): chain id;res_name
(str): residue name;res_id
(tuple): residue id (hetflag, sequence identifier, insertion code);name
(tuple): atom name (atom name, alternate location).
- property atm_grps¶
The list of atom groups that contain
atom
.To add or remove atom groups from
atm_grps
useadd_atm_grps()
orremove_atm_grps()
, respectively.- Type
list of
AtomGroup
, read-only
- property atom¶
Atom
, read-only.
- property electronegativity¶
The Pauling electronegativity for this atom. This information is obtained from Open Babel.
- Type
float, read-only
- property full_atom_name¶
The full name of an atom is composed by the structure id, model id, chain id, residue name, residue id, atom name, and alternate location if available. Fields are slash-separated.
- Type
str, read-only
- property full_id¶
The full id of an atom is the tuple (structure id, model id, chain id, residue id, atom name, alternate location).
- Type
tuple, read-only
- property neighbors_info¶
The list of
AtomData
containing information about atoms covalently bound toatom
.To add or remove neighbors information from
neighbors_info
useadd_nb_info()
orremove_nb_info()
, respectively.- Type
list of
AtomData
, read-only