Structure
structure.Atom
¶
A class containing atomic information.
read_pdb_line(Line, default_chain_id='A')
¶
Reads atomic information from a string formatted according to the PDB standard.
PARAMETER | DESCRIPTION |
---|---|
Line
|
A string formatted according to the PDB standard.
TYPE:
|
default_chain_id
|
If the chain ID is missing, replace it with this.
TYPE:
|
structure.Molecule
¶
Loads, saves, and manipulates molecular models.
get_center_of_mass_from_selection_by_atom_indices(indices_selection)
¶
Gets the center of mass of a set of atoms
PARAMETER | DESCRIPTION |
---|---|
indices_selection
|
a numpy array containing the indices of the atoms to consider
|
Returns a numpy array containing the 3D coordinates of the center of mass of those atoms
get_indices_of_atoms_in_a_residue_by_atom_name(residue_identifier, atom_names_list, not_selection=False)
¶
Gets the indices of atoms in a specified residue
PARAMETER | DESCRIPTION |
---|---|
residue_identifier
|
a string (chain_resname_resid) specifying the residue
|
atom_names_list
|
a list of strings containing the names of the atoms to keep
|
not_selection
|
a optional boolean. if False, match the atom_names_list items. if True, match the items not in atom_names_list
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
a numpy array containing the indices of the atoms to keep |
get_mass(element_name)
¶
A library to provide the mass of a given element
PARAMETER | DESCRIPTION |
---|---|
element_name
|
a string that specifies the element
|
RETURNS | DESCRIPTION |
---|---|
a float, the mass of the specified element. If the element is not in the |
|
library, returns None. |
load_pdb_from_list(alist)
¶
Loads a list of PDB ATOM/HETATM lines into the current Molecule object.
PARAMETER | DESCRIPTION |
---|---|
alist
|
the list of PDB lines
|
map_atoms_to_residues()
¶
Sets up self.residue_identifier_to_atom_indices, which matches chain_resname_resid to associated atom indices
map_nodes_to_residues(node_definition)
¶
For each residue in the molecule, define the node
PARAMETER | DESCRIPTION |
---|---|
node_definition
|
a string describing the definition of the node:
|
save_pdb(filename)
¶
Saves a pdb file
PARAMETER | DESCRIPTION |
---|---|
filename
|
a string specifying the file name
|