gmol.base.data.mmcif.parse#

cif_parse() and related subroutines are based on the BioPython library. Here follows the full license text from BioPython:

Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)

Copyright (c) 1999-2024, The Biopython Contributors All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Classes

AtomSite(*, id, type_symbol, group_PDB, ...)

BioAssembly(*, id, details, ...)

BioAssemblyGen(*, asym_id_list, operations)

BranchLink(*, value_order, ptnr1, ptnr2)

BranchLinkPartner(*, entity_branch_list_num, ...)

ChemComp(*, id, name, type, formula, ...[, ...])

ChemCompAtom(*, atom_id, type_symbol[, ...])

ChemCompBond(*, atom_id_1, atom_id_2, ...[, ...])

Entity(*, id, type[, pdbx_description])

EntityPoly(*, entity_id, type, pdbx_strand_id)

EntityPolySeq(*, entity_id, num, mon_id[, ...])

Mmcif(*, entry_id, exptl_method, ...)

PdbMetadata(*, entry_id, exptl_method, ...)

Scheme(*, asym_id, entity_id, mon_id, ...[, ...])

StructConn(*, id, conn_type_id[, ...])

StructConnPartner(*, label_atom_id, ...)

StructConnType(*, criteria, reference)

SymOp(*, type, name, symmetry_operation, ...)

Functions

class Entity(*, id: int, type: str, pdbx_description: str | None = None)#

Bases: LooseModel

id: int#
type: str#
pdbx_description: str | None#
class EntityPoly(*, entity_id: int, type: str, pdbx_strand_id: list[str], nstd_linkage: bool | None = None, nstd_monomer: bool | None = None, pdbx_seq_one_letter_code: str | None = None, pdbx_seq_one_letter_code_can: str | None = None)#

Bases: LooseModel

entity_id: int#
type: str#
pdbx_strand_id: list[str]#
nstd_linkage: bool | None#
nstd_monomer: bool | None#
pdbx_seq_one_letter_code: str | None#
pdbx_seq_one_letter_code_can: str | None#
class EntityPolySeq(*, entity_id: int, num: int, mon_id: str, hetero: bool | None = None)#

Bases: LooseModel

entity_id: int#
num: int#
mon_id: str#
hetero: bool | None#
class ChemCompAtom(*, atom_id: str, type_symbol: str, charge: float = 0.0, pdbx_aromatic_flag: bool = False, pdbx_leaving_atom_flag: bool = False, pdbx_stereo_config: str | None = None)#

Bases: LooseModel

atom_id: str#
type_symbol: str#
charge: float#
pdbx_aromatic_flag: bool#
pdbx_leaving_atom_flag: bool#
pdbx_stereo_config: str | None#
class ChemCompBond(*, atom_id_1: str, atom_id_2: str, value_order: int, pdbx_aromatic_flag: bool = False, pdbx_stereo_config: str | None = None)#

Bases: LooseModel

atom_id_1: str#
atom_id_2: str#
value_order: int#
pdbx_aromatic_flag: bool#
pdbx_stereo_config: str | None#
class ChemComp(*, id: str, name: str, type: str, formula: str | None, formula_weight: float | None, mon_nstd_flag: bool | None = None, atoms: list[ChemCompAtom], bonds: list[ChemCompBond])#

Bases: LooseModel

id: str#
name: str#
type: str#
formula: str | None#
formula_weight: float | None#
mon_nstd_flag: bool | None#
atoms: list[ChemCompAtom]#
bonds: list[ChemCompBond]#
class Scheme(*, asym_id: str, entity_id: int, mon_id: str, seq_id: int, pdb_seq_num: int | None, pdb_ins_code: str | None = None)#

Bases: LooseModel

asym_id: str#
entity_id: int#
mon_id: str#
seq_id: int#

This should only be used for _pdbx_poly_seq_scheme and _pdbx_branch_scheme, as the _pdbx_nonpoly_scheme.ndb_seq_num is not a mandatory field, and some mmCIF files only set _pdbx_nonpoly_scheme.pdb_seq_num.

pdb_seq_num: int | None#
pdb_ins_code: str | None#
class AtomSite(*, id: int, type_symbol: str, group_PDB: str, label_atom_id: str, label_alt_id: str | None, label_comp_id: str, label_asym_id: str, label_seq_id: int | None, auth_seq_id: int, auth_comp_id: str, auth_asym_id: str, pdbx_PDB_ins_code: str | None, pdbx_PDB_model_num: int, cartn: ndarray[tuple[Any, ...], dtype[float64]], occupancy: float, B_iso_or_equiv: float = nan)#

Bases: LooseModel

id: int#
type_symbol: str#
group_PDB: str#
label_atom_id: str#
label_alt_id: str | None#
label_comp_id: str#
label_asym_id: str#
label_seq_id: int | None#
auth_seq_id: int#
auth_comp_id: str#
auth_asym_id: str#
pdbx_PDB_ins_code: str | None#
pdbx_PDB_model_num: int#
cartn: ndarray[tuple[Any, ...], dtype[float64]]#
occupancy: float#
b_iso_or_equiv: float#
property is_hydrogen#
class BioAssemblyGen(*, asym_id_list: list[str], operations: list[list[str]])#

Bases: LooseModel

asym_id_list: list[str]#
operations: list[list[str]]#
class BioAssembly(*, id: int, details: str, oligomeric_details: str, oligomeric_count: int, assembly_gens: list[BioAssemblyGen])#

Bases: LooseModel

id: int#
details: str#
oligomeric_details: str#
oligomeric_count: int#
assembly_gens: list[BioAssemblyGen]#
class SymOp(*, type: str, name: str | None, symmetry_operation: str | None, matrix: ndarray[tuple[Any, ...], dtype[float64]], vector: ndarray[tuple[Any, ...], dtype[float64]])#

Bases: LooseModel

type: str#
name: str | None#
symmetry_operation: str | None#
matrix: ndarray[tuple[Any, ...], dtype[float64]]#
vector: ndarray[tuple[Any, ...], dtype[float64]]#
class StructConnPartner(*, label_atom_id: str, label_comp_id: str, label_asym_id: str, label_seq_id: int | None, auth_seq_id: int, auth_comp_id: str, auth_asym_id: str, pdbx_PDB_ins_code: str | None, symmetry: str)#

Bases: LooseModel

label_atom_id: str#
label_comp_id: str#
label_asym_id: str#
label_seq_id: int | None#
auth_seq_id: int#
auth_comp_id: str#
auth_asym_id: str#
pdbx_PDB_ins_code: str | None#
symmetry: str#
class StructConn(*, id: str, conn_type_id: str, pdbx_leaving_atom_flag: Annotated[int, Ge(ge=0), Le(le=2)] = 0, pdbx_dist_value: float | None = None, ptnr1: StructConnPartner, ptnr2: StructConnPartner)#

Bases: LooseModel

id: str#
conn_type_id: str#
pdbx_leaving_atom_flag: int#
pdbx_dist_value: float | None#
ptnr1: StructConnPartner#
ptnr2: StructConnPartner#
class StructConnType(*, criteria: str | None, reference: str | None)#

Bases: LooseModel

criteria: str | None#
reference: str | None#
class BranchLinkPartner(*, entity_branch_list_num: int, comp_id: str, atom_id: str, leaving_atom_id: str)#

Bases: LooseModel

entity_branch_list_num: int#
comp_id: str#
atom_id: str#
leaving_atom_id: str#

Bases: LooseModel

value_order: int#
ptnr1: BranchLinkPartner#
ptnr2: BranchLinkPartner#
class PdbMetadata(*, entry_id: str, exptl_method: str, pdbx_keywords: str, revision_date: date, resolution: float)#

Bases: BaseModel

entry_id: str#
exptl_method: str#
pdbx_keywords: str#
revision_date: date#
resolution: float#
class Mmcif(*, entry_id: str, exptl_method: str = '', pdbx_keywords: str = '', revision_date: ~datetime.date, resolution: float = 999.9, entity: dict[int, ~gmol.base.data.mmcif.parse.Entity] = <factory>, entity_poly: dict[int, ~gmol.base.data.mmcif.parse.EntityPoly] = <factory>, entity_poly_seq: dict[int, dict[int, ~gmol.base.data.mmcif.parse.EntityPolySeq]] = <factory>, pdbx_poly_seq_scheme: dict[str, list[~gmol.base.data.mmcif.parse.Scheme]] = <factory>, pdbx_branch_scheme: dict[str, list[~gmol.base.data.mmcif.parse.Scheme]] = <factory>, pdbx_nonpoly_scheme: dict[str, list[~gmol.base.data.mmcif.parse.Scheme]] = <factory>, atom_site: list[~gmol.base.data.mmcif.parse.AtomSite], pdbx_struct_assembly: list[~gmol.base.data.mmcif.parse.BioAssembly] = <factory>, pdbx_struct_oper_list: dict[str, ~gmol.base.data.mmcif.parse.SymOp] = <factory>, struct_asym: dict[str, int], struct_conn: list[~gmol.base.data.mmcif.parse.StructConn] = <factory>, struct_conn_type: dict[str, ~gmol.base.data.mmcif.parse.StructConnType] = <factory>, pdbx_entity_branch_link: dict[int, list[~gmol.base.data.mmcif.parse.BranchLink]] = <factory>)#

Bases: LooseModel

entry_id: str#
exptl_method: str#
pdbx_keywords: str#
revision_date: date#
resolution: float#
entity: dict[int, Entity]#
entity_poly: dict[int, EntityPoly]#
entity_poly_seq: dict[int, dict[int, EntityPolySeq]]#
pdbx_poly_seq_scheme: dict[str, list[Scheme]]#
pdbx_branch_scheme: dict[str, list[Scheme]]#
pdbx_nonpoly_scheme: dict[str, list[Scheme]]#
atom_site: list[AtomSite]#
pdbx_struct_assembly: list[BioAssembly]#
pdbx_struct_oper_list: dict[str, SymOp]#
struct_asym: dict[str, int]#
struct_conn: list[StructConn]#
struct_conn_type: dict[str, StructConnType]#
metadata() PdbMetadata#
load_mmcif_single(file: Path)#
load_mmcif_single_with_chem_comp(file: Path)#
load_components(file: Path, max_count: int = 0)#