Lib PDB¶
Contain handlers of PDB information.
- class idpconfgen.libs.libpdb.PDBID(name, chain=None, segment=None)[source]¶
PDB object identifier.
Identifies unique downloadable/stored units.
In the current implmentation each unit is one PDB chain, which is identified by the PDBID and its chain identifier.
- Parameters:
name (obj:str) – The PDBID, for example: 1ABC
chain (obj:str) – The chain identifier. Defaults to None.
- Variables:
name – The four character PDB identifier.
chain – The chain identifier.
- class idpconfgen.libs.libpdb.PDBIDFactory(name)[source]¶
Parse input for PDBID instatiation.
- Parameters:
name (str or Path) – The code name or ID that identified the PDB. Possible formats:
XXXX
XXXXC*
XXXX_C*
*.pdb
where XXXX is the PDBID code, C is the chain ID and * means any number of characters. PDB and chaind ID codes are any digits, lower and upper case letters.
- Returns:
PDBID
object.
- class idpconfgen.libs.libpdb.PDBList(pdb_names)[source]¶
List of PDBID objects.
- Parameters:
pdb_names (obj:iterator) – An iterator containing the PDB names. PDB names can be in the form accepted by PDBIDFactory or PDBID objects.
- property name_chains_dict¶
Chains dictionary map.
- Type:
Export PDBIDs
- property pdbids¶
Generate the PDBID names.
- idpconfgen.libs.libpdb.delete_insertions(lines)[source]¶
Delete insertions.
Adapted from pdbtools and optimized for this context.
Visit pdb-tools at: https://github.com/haddocking/pdb-tools/blob/master/pdbtools/pdb_delinsertion.py
- idpconfgen.libs.libpdb.format_atom_name(atom, element, AFD={1: {1: ' {:<3s}', 2: ' {:<3s}', 3: ' {:<3s}', 4: '{:<4s}'}, 2: {1: '{:<4s}', 2: '{:<4s}', 3: '{:<4s}', 4: '{:<4s}'}})[source]¶
Format PDB Record line Atom name.
Further Reading:
- Parameters:
atom (str) – The atom name.
element (str) – The atom element code.
- Returns:
str – Formatted atom name.