Bio.PDB.StructureBuilder 模組
建立 Structure 物件的消費者類別。
這被 PDBParser 和 MMCIFparser 類別使用。
- class Bio.PDB.StructureBuilder.StructureBuilder
基底:
object
處理建構 Structure 物件。
StructureBuilder 類別被 PDBParser 類別使用,以將檔案轉換為 Structure 物件。
- __init__()
初始化此實例。
- set_header(header)
設定標頭。
- set_line_counter(line_counter: int)
追蹤正在解析的 PDB 檔案中的行。
- 參數
line_counter - int
- init_structure(structure_id: str)
使用給定的 id 初始化新的 Structure 物件。
- 參數
structure_id - 字串
- init_model(model_id: int, serial_num: int | None = None)
使用給定的 id 建立新的 Model 物件。
- 參數
id - int
serial_num - int
- init_chain(chain_id: str)
使用給定的 id 建立新的 Chain 物件。
- 參數
chain_id - 字串
- init_seg(segid: str)
標示 segid 中的變更。
- 參數
segid - 字串
- init_residue(resname: str, field: str, resseq: int, icode: str)
建立新的 Residue 物件。
- 參數
resname - 字串,例如 "ASN"
field - 雜原子標記,“W” 代表水分子,“H” 代表雜原子殘基,否則為空白。
resseq - int,序列識別符
icode - 字串,插入碼
- init_atom(name: str, coord: ndarray, b_factor: float, occupancy: float, altloc: str, fullname: str, serial_number=None, element: str | None = None, pqr_charge: float | None = None, radius: float | None = None, is_pqr: bool = False)
建立新的 Atom 物件。
- 參數
name - 字串,原子名稱,例如 CA,空格應被移除
coord - NumPy 陣列(Float0,長度為 3),原子坐標
b_factor - float,B 因子
occupancy - float
altloc - 字串,替代位置指定符
fullname - 字串,包含空格的原子名稱,例如 " CA "
element - 字串,大寫,例如汞的 "HG"
pqr_charge - float,原子電荷 (PQR 格式)
radius - float,原子半徑 (PQR 格式)
is_pqr - 布林值,用於指定是否正在解析 .pqr 檔案的標記
- set_anisou(anisou_array)
設定目前 Atom 的各向異性 B 因子。
- set_siguij(siguij_array)
設定目前 Atom 的各向異性 B 因子的標準差。
- set_sigatm(sigatm_array)
設定目前 Atom 的原子位置的標準差。
- get_structure()
返回結構。
- set_symmetry(spacegroup, cell)
設定對稱性。