Score Terms#
TMol score functions combine weighted tmol.score.ScoreType
values. A tmol.score.ScoreFunction activates the energy
term implementation associated with each non-zero weight, then renders a
whole-pose, block-pair, or rotamer scoring module for a particular
tmol.pose.PoseStack.
Score-type map#
Score types |
Energy-term class |
Quantity represented |
|---|---|---|
|
Attractive and repulsive Lennard-Jones interactions and isotropic Lazaridis-Karplus solvation. |
|
|
Distance-dependent full-atom electrostatics. |
|
|
Orientation-dependent hydrogen-bond interactions. |
|
|
Bonded geometry used by Cartesian scoring and minimization. |
|
|
Harmonic distance, bounded distance, harmonic coordinate, and
circular-harmonic torsion constraints attached through
|
|
|
Geometry of disulfide-linked cysteine pairs. |
|
|
Backbone-dependent peptide omega and Ramachandran torsion preferences. |
|
|
Backbone-dependent amino-acid rotamer probabilities and deviations. |
|
|
Directional water-mediated solvation and bridging terms. |
|
|
Per-residue-type reference energies. |
|
|
Generic bonded torsions, including ligand torsional parameters. |
|
|
DNA/RNA backbone, glycosidic-chi, sugar, coupling, and rotamer-well preferences with polymer-specific parameters. |
ScoreType.n_score_types is a terminal size sentinel used for weight-vector
allocation; it is not a score component.
Non-bonded and solvation terms#
- class tmol.score.ljlk.LJLKEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
AtomTypeDependentTerm,BondDependentTerm
- class tmol.score.elec.ElecEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
AtomTypeDependentTerm,BondDependentTerm
- class tmol.score.hbond.HBondEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
AtomTypeDependentTerm,HBondDependentTerm
- class tmol.score.lk_ball.LKBallEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
AtomTypeDependentTerm,HBondDependentTerm
Bonded, torsional, and reference terms#
- class tmol.score.cartbonded.CartBondedEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
AtomTypeDependentTerm
- class tmol.score.genbonded.GenBondedEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
AtomTypeDependentTerm
- class tmol.score.disulfide.DisulfideEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
EnergyTerm
- class tmol.score.backbone_torsion.BackboneTorsionEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
EnergyTerm
- class tmol.score.dunbrack.DunbrackEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
EnergyTerm
- class tmol.score.ref.RefEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
EnergyTerm
Nucleic-acid term#
- class tmol.score.na_torsion.NaTorsionEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
EnergyTermScore nucleic-acid backbone, sugar-pucker, and glycosidic torsions.
Nucleic-acid torsion parameter resolution and scoring.
- class tmol.score.na_torsion.NaTorsionParams(backbone_means: Tensor[2, 6, 3], backbone_n_bins: Tensor[2, 6], backbone_sdev: Tensor[2, 6], sugar_means: Tensor[2, 10, 4], chi_means: Tensor[8, 10], well_pucker: Tensor[2, 10], well_alpha_gamma: Tensor[2, 3, 3], well_bibii_pucker: Tensor[2, 2, 2], well_alphanext_bibii: Tensor[2, 3, 2], well_chi_syn: Tensor[2, 10, 8], is_north: Tensor, sdev_sugar: Tensor, sdev_chi: Tensor, weight_bb: Tensor, weight_chi: Tensor, weight_sugar: Tensor, pucker_temperature: float, bin_blend_sdev: float)[source]#
Bases:
ValidateAttrsDevice-resident nucleic-acid torsion distributions and well energies.
- tmol.score.na_torsion.bi_bii_weight(epsilon, zeta)[source]#
Weight on BI, from sin(epsilon - zeta).
exp(-s*del) / (exp(-s*del) + exp(s.del)) with s = 20
- tmol.score.na_torsion.block_type_params(block_type, element_for_atom_type)[source]#
Per-block-type indices this term needs, shared by scoring and packing.
base is -1 for anything this term does not handle, including a nucleotide whose sugar or glycosidic torsions cannot be resolved.
- tmol.score.na_torsion.eval_na_torsion_for_pose(rot_coords, _rot_coord_offset, _pose_ind_for_atom, _first_rot_for_block, _first_rot_block_type, _block_ind_for_rot, _pose_ind_for_rot, block_type_ind_for_rot, _n_rots_for_pose, _rot_offset_for_pose, _n_rots_for_block, _rot_offset_for_block, _max_n_rots_per_pose, has_na, pose_base, pose_is_na, pose_torsion_indices, pose_torsion_ok, pose_ring_indices, pose_ring_ok, pose_prev, bt_base, bt_uaids, bt_ring, bt_down, atom_downstream_of_conn, block_coord_offset, inter_residue_connections, backbone_means, backbone_sdev, sugar_means, chi_means, sdev_sugar, sdev_chi, well_pucker, well_alpha_gamma, well_bibii_pucker, well_alphanext_bibii, well_chi_syn, is_north, pucker_temperature, bin_blend_sdev, weight_bb, weight_chi, weight_sugar, output_block_pair_energies: bool)[source]#
Evaluate nucleic-acid torsion energies for packed rotamer coordinates.
- tmol.score.na_torsion.na_torsion_subterms(rot_coords, block_type_ind_for_rot, bt_base, bt_uaids, bt_ring, bt_down, atom_downstream_of_conn, block_coord_offset, inter_residue_connections, backbone_means, backbone_sdev, sugar_means, chi_means, sdev_sugar, sdev_chi, well_pucker, well_alpha_gamma, well_bibii_pucker, well_alphanext_bibii, well_chi_syn, is_north, pucker_temperature, bin_blend_sdev)[source]#
Per-block (bb, chi, sugar, well) energies, the mask, and the base index.
The base index carries the polymer, which the caller needs in order to pick the per-polymer subterm weights.
- tmol.score.na_torsion.polymer_index(base)[source]#
0 for DNA, 1 for RNA. Non-nucleotides (base < 0) fall to 0 and are masked.
- tmol.score.na_torsion.pucker_weights(ring, temperature)[source]#
Soft distribution over the 10 sugar pucker states.
ring: (…, 5, 3) ring coordinates in cyclic order, heteroatom last.
Walks the 5 cyclic rotations of the ring. Within each, dot measures how planar the leading four atoms are and exxo which face the fifth sits on. Softmax over -dot picks the apex; a sigmoid on exxo splits endo from exo.
- tmol.score.na_torsion.sugar_ring_atoms(block_type, element_for_atom_type)[source]#
Ordered sugar ring, derived from the nu torsions rather than named.
nu0 and nu1 each span four consecutive ring atoms offset by one, so together they give the whole cycle in order. The pucker slot arithmetic is defined relative to a cycle ending on the ring heteroatom, so rotate to put it last.
- tmol.score.na_torsion.syn_weight(chi, width=5.0)[source]#
Soft version of Rosetta’s chi in (20, 100) syn window.
The public parameter aliases and fitted-model constants are also available for lower-level analysis and extension work.
|
|
|
Constraints#
- class tmol.score.constraint.ConstraintEnergyTerm(param_db: ParameterDatabase, device: device)[source]#
Bases:
EnergyTermScore coordinate and geometric constraints attached to a pose stack.
Coordinate, distance, angle, and dihedral constraints.
- class tmol.score.constraint.MCAtomIndices(max_n_mainchain_atoms: int, n_mainchain_atoms: Tensor, mainchain_atoms: Tensor[slice(None, None, None), slice(None, None, None)], is_real_mainchain_atom: Tensor[slice(None, None, None), slice(None, None, None)])[source]#
Bases:
objectPadded main-chain atom indices for every packed block type.
- tmol.score.constraint.constrain_all_ca(pose_stack: PoseStack) PoseStack[source]#
Add coordinate constraints at every available protein CA atom.
- tmol.score.constraint.create_mainchain_coordinate_constraints(pose_stack: PoseStack) PoseStack[source]#
Add coordinate constraints for every declared polymer main-chain atom.
Padded main-chain atom indices for every packed block type. |
|
Add coordinate constraints at every available protein CA atom. |
|
Add coordinate constraints for every declared polymer main-chain atom. |
Score-term construction#
The creator classes below are the public extension surface used by
tmol.score.terms.ScoreTermFactory. Most applications should configure
a tmol.score.ScoreFunction rather than instantiate creators directly.
Factories for constructing standard score terms.
- class tmol.score.terms.BackboneTorsionTermCreator[source]#
Bases:
TermCreatorCreate the protein backbone torsion energy term.
- class tmol.score.terms.CartBondedTermCreator[source]#
Bases:
TermCreatorCreate the Cartesian bonded-geometry energy term.
- class tmol.score.terms.ConstraintTermCreator[source]#
Bases:
TermCreatorCreate the pose-constraint energy term.
- class tmol.score.terms.DisulfideTermCreator[source]#
Bases:
TermCreatorCreate the disulfide-geometry energy term.
- class tmol.score.terms.DunbrackTermCreator[source]#
Bases:
TermCreatorCreate the Dunbrack rotamer energy term.
- class tmol.score.terms.ElecTermCreator[source]#
Bases:
TermCreatorCreate the electrostatic energy term.
- class tmol.score.terms.GenBondedTermCreator[source]#
Bases:
TermCreatorCreate the general bonded-torsion energy term.
- class tmol.score.terms.HBondTermCreator[source]#
Bases:
TermCreatorCreate the hydrogen-bond energy term.
- class tmol.score.terms.LJLKTermCreator[source]#
Bases:
TermCreatorCreate the Lennard-Jones and Lazaridis-Karplus energy term.
- class tmol.score.terms.LKBallTermCreator[source]#
Bases:
TermCreatorCreate the orientation-dependent LK-ball solvation energy term.
- class tmol.score.terms.NaTorsionTermCreator[source]#
Bases:
TermCreatorCreate the nucleic-acid torsion energy term.
- class tmol.score.terms.RefTermCreator[source]#
Bases:
TermCreatorCreate the residue reference-energy term.
- class tmol.score.terms.ScoreTermFactory[source]#
Bases:
objectFactory for the creation of EnergyTerms
This class uses import-time factory registration to discover the set of TermCreators that live in the same directory as it. To register a new TermCreator, simply put the term creator in this directory.
- class tmol.score.terms.TermCreator[source]#
Bases:
objectBase class for registering score terms with the ScoreTermFactory.
To add a new term,
add one or more new entries to the tmol.score._score_types enumeration
derive a new subclass of TermCreator and put it in this directory (the term itself should be implemented in a different directory)
the new TermCreator subclass needs to define two methods, create_term and score_types
create_term should instantiate the term
score_types should return a list of the elements of the score_types enumeration that the term implements in the order that the term will report them