Bio.PDB.PICIO module¶
PICIO: read and write Protein Internal Coordinate (.pic) data files.
-
Bio.PDB.PICIO.
read_PIC
(file: <class 'TextIO'>, verbose: bool = False) → Bio.PDB.Structure.Structure¶ Load Protein Internal Coordinate (.pic) data from file.
- PIC file format:
comment lines start with #
- (optional) PDB HEADER record
idcode and deposition date recommended but optional
deposition date in PDB format or as changed by Biopython
(optional) PDB TITLE record
- repeat:
Biopython Residue Full ID - sets residue IDs of returned structure
(optional) PDB N, CA, C ATOM records for chain start
(optional) PIC Hedra records for residue
(optional) PIC Dihedra records for residue
(optional) BFAC records listing AtomKeys and b-factors
An improvement would define relative positions for HOH (water) entries.
N.B. dihedron (i-1)C-N-CA-CB is ignored in assembly if O exists.
C-beta is by default placed using O-C-CA-CB, but O is missing in some PDB file residues, which means the sidechain cannot be placed. The alternate CB path (i-1)C-N-CA-CB is provided to circumvent this, but if this is needed then it must be adjusted in conjunction with PHI ((i-1)C-N-CA-C) as they overlap. (i-1)C-N-CA-CB is included by default in .pic files for consistency and informational (e.g. statistics gathering) purposes, as otherwise the dihedron would only appear in the few cases it is needed for.
- Parameters
file (Bio.File) – file name or handle
verbose (bool) – complain when lines not as expected
- Returns
Biopython Structure object, Residues with .internal_coord attributes but no coordinates except for chain start N, CA, C atoms if supplied, OR None on parse fail (silent unless verbose=True)
-
Bio.PDB.PICIO.
enumerate_atoms
(entity)¶ Ensure all atoms in entity have serial_number set.
-
Bio.PDB.PICIO.
pdb_date
(datestr: str) → str¶ Convert yyyy-mm-dd date to dd-month-yy.
-
Bio.PDB.PICIO.
write_PIC
(entity, file, pdbid=None, chainid=None)¶ Write Protein Internal Coordinates (PIC) to file.
See read_PIC() for file format. Recurses to lower entity levels (M, C, R).
- Parameters
entity (Entity) – Biopython PDB Entity object: S, M, C or R
file (Bio.File) – file name or handle
pdbid (str) – PDB idcode, read from entity if not supplied
chainid (char) – PDB Chain ID, set from C level entity.id if needed
- Raises
PDBException – if entity level not S, M, C, or R
Exception – if entity does not have .level attribute