Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/baker-laboratory/rf_diffusion_all_atom
/ functions
Functions
215 in github.com/baker-laboratory/rf_diffusion_all_atom
⨍
Functions
215
◇
Types & classes
19
↓ 7 callers
Function
make_rotX
(angs, eps=1e-6)
util_module.py:171
↓ 7 callers
Function
th_N
(x,alpha:float=0)
util.py:27
↓ 6 callers
Function
rigid_from_3_points
(N, Ca, C, non_ideal=False, eps=1e-8)
util.py:57
↓ 6 callers
Function
th_ang_v
(ab,bc,eps:float=1e-8)
util.py:24
↓ 5 callers
Function
get_dih
calculate dihedral angles for all consecutive quadruples (a[i],b[i],c[i],d[i]) given Cartesian coordinates of four sets of atoms a,b,c,d Para
kinematics.py:53
↓ 5 callers
Function
make_frame
(X, Y)
util.py:212
↓ 4 callers
Method
t_to_idx
Helper function to go from discrete time index t to corresponding sigma_idx. Args: t: time index (integer between 1 and 2
diffusion.py:361
↓ 4 callers
Function
th_dih
(a,b,c,d)
util.py:52
↓ 3 callers
Function
get_beta_schedule
Given a noise schedule type, create the beta schedule
diffusion.py:91
↓ 3 callers
Function
quaternion_raw_multiply
Multiply two quaternions. Usual torch rules for broadcasting apply. Args: a: Quaternions as tensor of shape (..., 4), real part
rotation_conversions.py:382
↓ 3 callers
Method
sigma
Extract \sigma(t) corresponding to chosen sigma schedule. Args: t: torch tensor with time between 0 and 1
diffusion.py:370
↓ 3 callers
Function
th_cross
(a,b)
util.py:36
↓ 2 callers
Function
_angle_from_tan
Extract the first or third Euler angle from the two members of the matrix which are positive constant times its sine and cosine. Args:
rotation_conversions.py:221
↓ 2 callers
Function
_index_from_letter
(letter: str)
rotation_conversions.py:254
↓ 2 callers
Method
assemble_config_from_chk
(self)
inference/model_runners.py:127
↓ 2 callers
Function
cosine_interp
Cosine interpolation of some value between its max <eta_max> and its min <eta_min> from https://pytorch.org/docs/stable/generated/torch.opti
diffusion.py:31
↓ 2 callers
Function
get_init_xyz
(xyz_t, is_sm)
kinematics.py:286
↓ 2 callers
Method
get_inpaint_seq_str
function to generate inpaint_str or inpaint_seq masks specific to this contig
contigs.py:190
↓ 2 callers
Method
get_mappings
(self)
contigs.py:231
↓ 2 callers
Function
make_rot_axis
(angs, u, eps=1e-6)
util_module.py:197
↓ 2 callers
Function
parse_pdb
extract xyz coords for all heavy atoms
inference/utils.py:774
↓ 2 callers
Function
quaternion_to_matrix
Convert rotations given as quaternions to rotation matrices. Args: quaternions: quaternions with real part first, as ten
rotation_conversions.py:39
↓ 2 callers
Method
sample
sample uses the inverse cdf to sample an angle of rotation from IGSO(3) Args: ts: array of integer time steps to sample fr
diffusion.py:408
↓ 2 callers
Function
sample_truncated_normal
(shape, scale=1.0)
util_module.py:26
↓ 2 callers
Function
seed_all
(seed=0)
run_inference.py:60
↓ 2 callers
Function
th_norm
(x,eps:float=1e-8)
util.py:25
↓ 2 callers
Function
truncated_normal
(uniform, mu=0.0, sigma=1.0, a=-2, b=2)
util_module.py:11
↓ 1 callers
Method
__init__
(self, broadcast_dim=None, p_drop=0.15)
util_module.py:67
↓ 1 callers
Function
_axis_angle_rotation
Return the rotation matrices for one of the rotations about an axis of which Euler angles describe, for each value of the angle given. A
rotation_conversions.py:162
↓ 1 callers
Method
_calc_igso3_vals
_calc_igso3_vals computes numerical approximations to the relevant analytically intractable functionals of the igso3 distribution.
diffusion.py:307
↓ 1 callers
Function
_copysign
Return a tensor where each element has the absolute value taken from the, corresponding element of a, with sign taken from the corresponding
rotation_conversions.py:71
↓ 1 callers
Function
_get_atom_type
(atom_name)
pdbio.py:16
↓ 1 callers
Function
_sqrt_positive_part
Returns torch.sqrt(torch.max(0, x)) but with a zero subgradient where x is 0.
rotation_conversions.py:89
↓ 1 callers
Method
align_to_xt_motif
Need to align px0 to motif in xT. This is to permit the swapping of residue positions in the px0 motif for the true coordinates. Firs
inference/utils.py:446
↓ 1 callers
Method
apply_kernel
Applies a noising kernel to the points in x Parameters: x (torch.tensor, required): (N,3,3) set of backbone coordinates
diffusion.py:190
↓ 1 callers
Method
apply_kernel_recursive
Repeatedly apply self.apply_kernel T times and return all crds
diffusion.py:228
↓ 1 callers
Function
axis_angle_to_quaternion
Convert rotations given as axis/angle to quaternions. Args: axis_angle: Rotations given as a vector in axis angle form,
rotation_conversions.py:492
↓ 1 callers
Function
calc_nchains
Calculates number of chains for given symmetry
potentials/manager.py:59
↓ 1 callers
Function
calc_score_norm
score uses the quotient rule to compute the scaling factor for the score of the IGSO(3) density. This function is used within the Diffuser cl
igso3.py:66
↓ 1 callers
Function
chain_letters_from_same_chain
(same_chain)
aa_model.py:46
↓ 1 callers
Method
chains
(self)
aa_model.py:84
↓ 1 callers
Method
compute
Given the current sequence and structure of the model prediction, return the current potential as a PyTorch tensor with a sin
potentials/potentials.py:9
↓ 1 callers
Method
compute_all_potentials
This is the money call. Take the current sequence and structure information and get the sum of all of the potentials that are being used
potentials/manager.py:173
↓ 1 callers
Method
construct_contig
Create contig from target features.
inference/model_runners.py:210
↓ 1 callers
Method
construct_denoiser
Make length-specific denoiser.
inference/model_runners.py:222
↓ 1 callers
Function
contact_energy
(dgram, d_0, r_0)
potentials/potentials.py:61
↓ 1 callers
Function
density
IGSO(3) density. Args: expansion: truncated approximation of the power series in the IGSO(3) density. omega: length of an
igso3.py:47
↓ 1 callers
Method
diffuse_frames
Perform spherical linear interpolation from the True coordinate frame for each residue to a randomly sampled coordinate frame
diffusion.py:486
↓ 1 callers
Method
diffuse_pose
Given full atom xyz, sequence and atom mask, diffuse the protein translations, rotations, and chi angles Parameters:
diffusion.py:785
↓ 1 callers
Method
diffuse_translations
(self, xyz, diffusion_mask=None, var_scale=1)
diffusion.py:186
↓ 1 callers
Function
dist_to_onehot
(dist, params=PARAMS)
kinematics.py:211
↓ 1 callers
Method
exp_score_norm
exp_score_norm returns the expected value of norm of the score for IGSO(3) with time parameter ts of shape [T].
diffusion.py:479
↓ 1 callers
Method
expand_mask
Function to generate a new mask with dilated loops and N and C terminal additions
inference/utils.py:1086
↓ 1 callers
Method
expand_sampled_mask
(self)
contigs.py:128
↓ 1 callers
Method
expand_ss
Given an expanded mask, populate a new ss and adj based on this
inference/utils.py:1105
↓ 1 callers
Function
filter_het
(pdb_lines, ligand)
aa_model.py:138
↓ 1 callers
Method
forward
(self, rfi, **kwargs)
aa_model.py:254
↓ 1 callers
Method
g
g returns the drift coefficient at time t since sigma(t)^2 := \int_0^t g(s)^2 ds, for arbitrary sigma(t) we invert this
diffusion.py:388
↓ 1 callers
Function
get_Cb
recreate Cb given N,Ca,C
kinematics.py:80
↓ 1 callers
Function
get_ang
calculate planar angles for all consecutive triples (a[i],b[i],c[i]) from Cartesian coordinates of three sets of atoms a,b,c Parameters
kinematics.py:31
↓ 1 callers
Function
get_chi_betaT
Function to precalculate beta_T for chi angles (decoded at different time steps, so T in beta_T varies). Calculated empirically
diffusion.py:47
↓ 1 callers
Method
get_decode_positions
Returns the next (0-indexed) positions to decode for this timestep
inference/utils.py:249
↓ 1 callers
Method
get_guide_scale
Given a timestep and a decay type, get the appropriate scale factor to use for applying guiding potentials Inputs:
potentials/manager.py:183
↓ 1 callers
Method
get_idx0
(self)
contigs.py:207
↓ 1 callers
Function
get_ligands
(pdb_lines)
idealize_backbone.py:11
↓ 1 callers
Function
get_mu_xt_x0
Given xt, predicted x0 and the timestep t, give mu of x(t-1) Assumes t is 0 indexed
inference/utils.py:127
↓ 1 callers
Function
get_next_ca
Given full atom x0 prediction (xyz coordinates), diffuse to x(t-1) Parameters: xt (L, 14/27, 3) set of coordinates
inference/utils.py:146
↓ 1 callers
Function
get_next_frames
get_next_frames gets updated frames using either SLERP or the IGSO(3) + score_based reverse diffusion. based on self.so3_type use slerp or s
inference/utils.py:65
↓ 1 callers
Method
get_next_idx
Given indices being currently sampled and a distance map, return one more index which is allowed to be sampled at the same time as cu
inference/utils.py:219
↓ 1 callers
Method
get_next_pose
Wrapper function to take px0, xt and t, and to produce xt-1 First, aligns px0 to xt Then gets coordinates, frames and torsion
inference/utils.py:567
↓ 1 callers
Function
get_o
(xyz, idx)
idealize_backbone.py:37
↓ 1 callers
Function
get_pair_dist
calculate pair distances between two sets of points Parameters ---------- a,b : pytorch tensors of shape [batch,nres,3] sto
kinematics.py:14
↓ 1 callers
Method
get_potential_gradients
This could be moved into potential manager if desired - NRB Function to take a structure (x) and get per-atom gradients used to guid
inference/utils.py:524
↓ 1 callers
Method
get_sampled_mask
Function to get a sampled mask from a contig.
contigs.py:80
↓ 1 callers
Function
get_sampler
(conf)
run_inference.py:77
↓ 1 callers
Method
get_seq_logits
(self)
aa_model.py:132
↓ 1 callers
Method
get_ss_adj
Given at item, get the ss tensor and block adjacency matrix for that item
inference/utils.py:1048
↓ 1 callers
Function
get_tor_mask
(seq, torsion_indices, mask_in=None)
util.py:87
↓ 1 callers
Function
get_torsions
(xyz_in, seq, torsion_indices, torsion_can_flip, ref_angles, mask_in=None)
util.py:116
↓ 1 callers
Method
get_xyz
(self)
aa_model.py:135
↓ 1 callers
Function
hetatm_names
(pdb)
aa_model.py:496
↓ 1 callers
Function
igso3_expansion
Truncated sum of IGSO(3) distribution. This function approximates the power series in equation 5 of "DENOISING DIFFUSION PROBABILISTIC MODELS
igso3.py:9
↓ 1 callers
Function
igso3_expansion_torch
Truncated sum of IGSO(3) distribution implemented in torch Args: omega: rotation of Euler vector (i.e. the angle of rotation) sig
igso3.py:33
↓ 1 callers
Method
initialize
(self, conf: DictConfig)
inference/model_runners.py:43
↓ 1 callers
Method
initialize_all_potentials
Given a list of potential dictionaries where each dictionary defines the configurations for a single potential, initialize al
potentials/manager.py:143
↓ 1 callers
Method
insert_contig
(self, indep, contig_map, partial_T=False)
aa_model.py:259
↓ 1 callers
Method
is_empty
Check whether this instance of PotentialManager actually contains any potentials
potentials/manager.py:121
↓ 1 callers
Method
load_checkpoint
Loads RF checkpoint, from which config can be generated.
inference/model_runners.py:119
↓ 1 callers
Method
load_model
Create RosettaFold model from preloaded checkpoint.
inference/model_runners.py:152
↓ 1 callers
Function
main
(conf: HydraConfig)
run_inference.py:73
↓ 1 callers
Function
make_contact_matrix
Calculate a matrix of inter/intra chain contact indicators Parameters: nchain (int, required): How many chains are in this desig
potentials/manager.py:7
↓ 1 callers
Function
make_deterministic
(seed=0)
run_inference.py:54
↓ 1 callers
Function
make_rotZ
(angs, eps=1e-6)
util_module.py:184
↓ 1 callers
Method
mask_ss_adj
Given an expanded ss and adj, mask some number of residues at either end of non-loop ss
inference/utils.py:1128
↓ 1 callers
Method
mask_to_segments
Takes a mask of True (loop) and False (non-loop), and outputs list of tuples (loop or not, length of element)
inference/utils.py:1057
↓ 1 callers
Function
matrix_to_quaternion
Convert rotations given as rotation matrices to quaternions. Args: matrix: Rotation matrices as tensor of shape (..., 3, 3). Re
rotation_conversions.py:100
↓ 1 callers
Function
pad_dim
(x, dim, new_l, value=0)
aa_model.py:461
↓ 1 callers
Function
parse_pdb_lines
(lines, parse_hetatom=False, ignore_het_h=True)
inference/utils.py:782
↓ 1 callers
Method
parse_potential_string
Parse a single entry in the list of potentials to be run to a dictionary of settings for that potential. An example of how t
potentials/manager.py:128
↓ 1 callers
Method
prepro
Function to prepare inputs to diffusion model. Prepared in a form recognizable by the structure prediction network to enable
aa_model.py:324
next →
1–100 of 215, ranked by callers