Parameter Database#
Use tmol.database.ParameterDatabase to load the chemical and scoring
parameters used to construct poses and score functions.
Chemical and scoring parameter databases used by TMol.
- class tmol.database.AtomType(name: str, element: str, is_acceptor: bool = False, is_donor: bool = False, is_hydroxyl: bool = False, is_polarh: bool = False, acceptor_hybridization: AcceptorHybridization | None = None)[source]#
Bases:
objectChemical atom-type properties used by scoring terms.
- class tmol.database.ChemicalDatabase(element_types: Tuple[Element, ...], atom_types: Tuple[AtomType, ...], residues: Tuple[RawResidueType, ...], variants: Tuple[VariantType, ...])[source]#
Bases:
objectImmutable collection of chemical types, residues, and patches.
- classmethod from_file(path: str | PathLike[str]) ChemicalDatabase[source]#
Load a chemical database from a directory containing YAML data.
- classmethod get_default() ChemicalDatabase[source]#
Load and return default parameter database.
- class tmol.database.ParameterDatabase(scoring: ScoringDatabase, chemical: PatchedChemicalDatabase)[source]#
Bases:
objectImmutable chemical and scoring parameter container used by tmol.
The process-global accessor
get_default()returns a shared read-only instance. To add ligand or custom residue data, useinject_residue_params()which returns a new database.- classmethod get_default() ParameterDatabase[source]#
Return the process-global cached parameter database (read-only).
- classmethod from_file(path: str) ParameterDatabase[source]#
Load chemical and scoring parameters rooted at
path.
- create_stable_subset(desired_names: list[str], desired_variants: list[str]) ParameterDatabase[source]#
Create a ParameterDatabase representing a subset of the RefinedResidueTypes in this PD’s PatchedChemicalDatabase from a list of RRT names and patched with the given variants (identified by their display names) where the order in which RRTs will appear in the subset will be stable over time (as long as this source PCD is only accumulating new RRTs over time and not losing the RRTs that it starts with).
- class tmol.database.PatchedChemicalDatabase(element_types: Tuple[Element, ...], atom_types: Tuple[AtomType, ...], residues: Tuple[RawResidueType, ...], variants: Tuple[VariantType, ...])[source]#
Bases:
objectChemical database containing residue types after variant application.
- class tmol.database.RawResidueType(name: str, base_name: str, name3: str, io_equiv_class: str, atoms: Tuple[Atom, ...], atom_aliases: Tuple[AtomAlias, ...], bonds: Tuple[tuple, ...], connections: Tuple[Connection, ...], torsions: Tuple[Torsion, ...], icoors: Tuple[Icoor, ...], properties: ChemicalProperties, chi_samples: Tuple[ChiSamples, ...], default_jump_connection_atom: str, hydrogens_regenerated: bool = False, is_ligand_fragment: bool = False, one_letter_code: str | None = None)[source]#
Bases:
objectUnpatched residue definition loaded from the chemical database.
- class tmol.database.ScoringDatabase(cartbonded: CartBondedDatabase, genbonded: GenBondedDatabase, disulfide: DisulfideDatabase, na_torsion: NaTorsionDatabase, dun: DunbrackRotamerLibrary, elec: ElecDatabase, hbond: HBondDatabase, ljlk: LJLKDatabase, omega_bbdep: OmegaBBDepDatabase, rama: RamaDatabase, ref: RefDatabase)[source]#
Bases:
objectImmutable parameters for all standard TMol energy terms.
- tmol.database.inject_residue_params(param_db: ParameterDatabase, residue_types: list[RawResidueType], atom_types: list[AtomType] | None = None, partial_charges: Mapping[str, dict[str, float]] | None = None, cartbonded_params: Mapping[str, CartRes] | None = None) ParameterDatabase[source]#
Return a new ParameterDatabase with additional residue type data.
This is the primary API for extending a database with ligand or custom residue types. The input
param_dbis not modified.- Parameters:
param_db – Base database to extend.
residue_types – New RawResidueType entries to add.
atom_types – Optional new AtomType entries (deduplicated by name).
partial_charges – Per-residue charge dicts
{res_name: {atom: charge}}.cartbonded_params – Per-residue CartRes
{res_name: CartRes}.
- Returns:
A new frozen ParameterDatabase with the additional data.