SYMBOL INDEX (1958 symbols across 175 files) FILE: analysis/TMalign.cpp function print_version (line 86) | void print_version() function print_extra_help (line 98) | void print_extra_help() function print_help (line 176) | void print_help(bool h_opt=false) function PrintErrorAndQuit (line 245) | void PrintErrorAndQuit(const string sErrorString) function T (line 251) | inline T getmin(const T &a, const T &b) function NewArray (line 256) | void NewArray(A *** array, int Narray1, int Narray2) function DeleteArray (line 262) | void DeleteArray(A *** array, int Narray) function string (line 270) | string AAmap(char A) function AAmap (line 299) | char AAmap(const string &AA) function split (line 333) | void split(const string &line, vector &line_vec, function string (line 354) | string Trim(const string &inputString) function split_white (line 370) | void split_white(const string &line, vector &line_vec, function get_PDB_lines (line 397) | size_t get_PDB_lines(const string filename, function get_FASTA_lines (line 738) | size_t get_FASTA_lines(const string filename, function extract_aln_from_resi (line 788) | int extract_aln_from_resi(vector &sequence, char *seqx, char *seqy, function read_PDB (line 854) | int read_PDB(const vector &PDB_lines, double **a, char *seq, function dist (line 873) | double dist(double x[3], double y[3]) function dot (line 882) | double dot(double *a, double *b) function transform (line 887) | void transform(double t[3], double u[3][3], double *x, double *x1) function do_rotation (line 894) | void do_rotation(double **x, double **x1, int len, double t[3], double u... function read_user_alignment (line 905) | void read_user_alignment(vector&sequence, const string &fname_lign, function file2chainlist (line 953) | void file2chainlist(vector&chain_list, const string &name, function Kabsch (line 983) | bool Kabsch(double **x, double **y, int n, int mode, double *rms, function NWDP_TM (line 1321) | void NWDP_TM(double **score, bool **path, double **val, function NWDP_TM (line 1403) | void NWDP_TM(bool **path, double **val, double **x, double **y, function NWDP_SE (line 1490) | void NWDP_SE(bool **path, double **val, double **x, double **y, function NWDP_TM (line 1570) | void NWDP_TM(bool **path, double **val, const char *secx, const char *secy, function parameter_set4search (line 1647) | void parameter_set4search(const int xlen, const int ylen, function parameter_set4final_C3prime (line 1669) | void parameter_set4final_C3prime(const double len, double &D0_MIN, function parameter_set4final (line 1687) | void parameter_set4final(const double len, double &D0_MIN, double &Lnorm, function parameter_set4scale (line 1707) | void parameter_set4scale(const int len, const double d_s, double &Lnorm, function score_fun8 (line 1719) | int score_fun8( double **xa, double **ya, int n_ali, double d, int i_ali[], function score_fun8_standard (line 1762) | int score_fun8_standard(double **xa, double **ya, int n_ali, double d, function TMscore8_search (line 1807) | double TMscore8_search(double **r1, double **r2, double **xtm, double **... function TMscore8_search_standard (line 1962) | double TMscore8_search_standard( double **r1, double **r2, function detailed_search (line 2122) | double detailed_search(double **r1, double **r2, double **xtm, double **... function detailed_search_standard (line 2156) | double detailed_search_standard( double **r1, double **r2, function get_score_fast (line 2194) | double get_score_fast( double **r1, double **r2, double **xtm, double **... function get_initial (line 2341) | double get_initial(double **r1, double **r2, double **xtm, double **ytm, function smooth (line 2392) | void smooth(int *sec, int len) function sec_str (line 2436) | char sec_str(double dis13, double dis14, double dis15, function make_sec (line 2466) | void make_sec(double **x, int len, char *sec) function get_initial_ss (line 2499) | void get_initial_ss(bool **path, double **val, function get_initial5 (line 2514) | bool get_initial5( double **r1, double **r2, double **xtm, double **ytm, function score_matrix_rmsd_sec (line 2613) | void score_matrix_rmsd_sec( double **r1, double **r2, double **score, function get_initial_ssplus (line 2665) | void get_initial_ssplus(double **r1, double **r2, double **score, bool *... function find_max_frag (line 2678) | void find_max_frag(double **x, int len, int *start_max, function get_initial_fgt (line 2744) | double get_initial_fgt(double **r1, double **r2, double **xtm, double **... function DP_iter (line 2979) | double DP_iter(double **r1, double **r2, double **xtm, double **ytm, function output_superpose (line 3047) | void output_superpose(const string xname, const string yname, function output_rotation_matrix (line 3666) | void output_rotation_matrix(const char* fname_matrix, function output_results (line 3696) | void output_results( function standard_TMscore (line 3787) | double standard_TMscore(double **r1, double **r2, double **xtm, double *... function copy_t_u (line 3858) | void copy_t_u(double t[3], double u[3][3], double t0[3], double u0[3][3]) function approx_TM (line 3869) | double approx_TM(const int xlen, const int ylen, const int a_opt, function clean_up_after_approx_TM (line 3902) | void clean_up_after_approx_TM(int *invmap0, int *invmap, function TMalign_main (line 3923) | int TMalign_main(double **xa, double **ya, function CPalign_main (line 4528) | int CPalign_main(double **xa, double **ya, function main (line 4686) | int main(int argc, char *argv[]) FILE: analysis/TMscore.cpp function print_version (line 72) | void print_version() function print_extra_help (line 88) | void print_extra_help() function print_help (line 159) | void print_help(bool h_opt=false) type redi (line 268) | namespace redi type pstreams (line 271) | struct pstreams class basic_pstreambuf (line 296) | class basic_pstreambuf type buf_read_src (line 409) | enum buf_read_src { rsrc_out = 0, rsrc_err = 1 } class pstream_common (line 472) | class pstream_common class basic_ipstream (line 543) | class basic_ipstream method pmode (line 554) | pmode readable(pmode mode) method basic_ipstream (line 569) | basic_ipstream() method basic_ipstream (line 583) | explicit method basic_ipstream (line 599) | basic_ipstream( const std::string& file, method basic_ipstream (line 615) | explicit method basic_ipstream (line 622) | explicit method open (line 645) | void method open (line 661) | void method basic_ipstream (line 673) | basic_ipstream& method basic_ipstream (line 684) | basic_ipstream& class basic_opstream (line 703) | class basic_opstream method basic_opstream (line 721) | basic_opstream() method basic_opstream (line 735) | explicit method basic_opstream (line 751) | basic_opstream( const std::string& file, method basic_opstream (line 767) | explicit method basic_opstream (line 781) | explicit method open (line 803) | void method open (line 819) | void class basic_pstream (line 843) | class basic_pstream method basic_pstream (line 861) | basic_pstream() method basic_pstream (line 875) | explicit method basic_pstream (line 891) | basic_pstream( const std::string& file, method basic_pstream (line 907) | explicit method basic_pstream (line 921) | explicit method open (line 943) | void method open (line 959) | void method basic_pstream (line 971) | basic_pstream& method basic_pstream (line 982) | basic_pstream& class basic_rpstream (line 1013) | class basic_rpstream method basic_rpstream (line 1033) | basic_rpstream() method basic_rpstream (line 1047) | explicit method basic_rpstream (line 1063) | basic_rpstream( const std::string& file, method basic_rpstream (line 1079) | explicit method basic_rpstream (line 1094) | explicit method open (line 1112) | void method open (line 1128) | void method istream_type (line 1141) | istream_type& method istream_type (line 1153) | istream_type& function close_fd (line 1354) | inline void function close_fd_array (line 1372) | inline void function pid_t (line 1515) | pid_t function PrintErrorAndQuit (line 2462) | void PrintErrorAndQuit(const string sErrorString) function T (line 2468) | inline T getmin(const T &a, const T &b) function NewArray (line 2473) | void NewArray(A *** array, int Narray1, int Narray2) function DeleteArray (line 2479) | void DeleteArray(A *** array, int Narray) function string (line 2487) | string AAmap(char A) function AAmap (line 2517) | char AAmap(const string &AA) function split (line 2554) | void split(const string &line, vector &line_vec, function string (line 2575) | string Trim(const string &inputString) function get_PDB_lines (line 2584) | size_t get_PDB_lines(const string filename, function read_PDB (line 3002) | int read_PDB(const vector &PDB_lines, double **a, char *seq, function dist (line 3021) | double dist(double x[3], double y[3]) function dot (line 3030) | double dot(double *a, double *b) function transform (line 3035) | void transform(double t[3], double u[3][3], double *x, double *x1) function do_rotation (line 3042) | void do_rotation(double **x, double **x1, int len, double t[3], double u... function file2chainlist (line 3056) | void file2chainlist(vector&chain_list, const string &name, function parameter_set4search (line 3079) | void parameter_set4search(const int xlen, const int ylen, function parameter_set4final_C3prime (line 3101) | void parameter_set4final_C3prime(const double len, double &D0_MIN, function parameter_set4final (line 3119) | void parameter_set4final(const double len, double &D0_MIN, double &Lnorm, function parameter_set4scale (line 3139) | void parameter_set4scale(const int len, const double d_s, double &Lnorm, function Kabsch (line 3162) | bool Kabsch(double **x, double **y, int n, int mode, double *rms, function init_gotoh_mat (line 3632) | void init_gotoh_mat(int **S, int **JumpH, int **JumpV, int **P, function find_highest_align_score (line 3669) | void find_highest_align_score( int **S, int **P, function calculate_score_gotoh (line 3716) | int calculate_score_gotoh(const int xlen,const int ylen, int **S, function trace_back_gotoh (line 3806) | void trace_back_gotoh(const char *seqx, const char *seqy, function trace_back_sw (line 3882) | void trace_back_sw(const char *seqx, const char *seqy, function NWalign_main (line 3995) | int NWalign_main(const char *seqx, const char *seqy, const int xlen, function extract_aln_from_resi (line 4053) | int extract_aln_from_resi(vector &sequence, char *seqx, char *seqy, function score_fun8 (line 4189) | int score_fun8( double **xa, double **ya, int n_ali, double d, int i_ali[], function score_fun8_standard (line 4232) | int score_fun8_standard(double **xa, double **ya, int n_ali, double d, function TMscore8_search (line 4277) | double TMscore8_search(double **r1, double **r2, double **xtm, double **... function TMscore8_search_standard (line 4432) | double TMscore8_search_standard( double **r1, double **r2, function detailed_search_standard (line 4585) | double detailed_search_standard( double **r1, double **r2, function smooth (line 4622) | void smooth(int *sec, int len) function output_pymol (line 4666) | void output_pymol(const string xname, const string yname, function output_rasmol (line 4992) | void output_rasmol(const string xname, const string yname, function output_rotation_matrix (line 5648) | void output_rotation_matrix(const char* fname_matrix, function standard_TMscore (line 5677) | double standard_TMscore(double **r1, double **r2, double **xtm, double *... function approx_TM (line 5748) | double approx_TM(const int xlen, const int ylen, const int a_opt, function clean_up_after_approx_TM (line 5781) | void clean_up_after_approx_TM(int *invmap0, int *invmap, function score_fun8 (line 5798) | int score_fun8( double **xa, double **ya, int n_ali, double d, int i_ali[], function score_fun8_standard (line 5870) | int score_fun8_standard(double **xa, double **ya, int n_ali, double d, function TMscore8_search (line 5942) | double TMscore8_search(double **r1, double **r2, double **xtm, double **... function TMscore8_search_standard (line 6108) | double TMscore8_search_standard( double **r1, double **r2, function detailed_search_standard (line 6272) | double detailed_search_standard( double **r1, double **r2, function TMscore_main (line 6315) | int TMscore_main(double **xa, double **ya, function output_TMscore_results (line 6638) | void output_TMscore_results( function main (line 6762) | int main(int argc, char *argv[]) FILE: analysis/cal_plddt_dir.py function read_fasta (line 49) | def read_fasta( function read_alignment_lines (line 65) | def read_alignment_lines( function enable_cpu_offloading (line 95) | def enable_cpu_offloading(model): function init_model_on_gpu_with_cpu_offloading (line 117) | def init_model_on_gpu_with_cpu_offloading(model): function create_batched_sequence_datasest (line 126) | def create_batched_sequence_datasest( function create_parser (line 142) | def create_parser(): function run (line 198) | def run(args): function main (line 285) | def main(): FILE: analysis/cal_tmscore.py function run_tmalign (line 18) | def run_tmalign(query, reference, fast=True): function tm_one2refs (line 44) | def tm_one2refs( function tm_set2set (line 60) | def tm_set2set(querys, targets, save_path, n_threads=mp.cpu_count()): function main (line 78) | def main(): function cal_novelty (line 111) | def cal_novelty(query_dir, reference_dir): function cal_diversity (line 133) | def cal_diversity(query_dir, reference_dir): FILE: generate_dplm.py function format_check (line 11) | def format_check(args): function initialize_generation (line 42) | def initialize_generation( function generate (line 73) | def generate(args): function main (line 118) | def main(): FILE: generate_dplm2.py function initialize_conditional_generation (line 16) | def initialize_conditional_generation( function initialize_generation (line 136) | def initialize_generation( function unconditional_generate (line 199) | def unconditional_generate(args): function conditional_generate_from_fasta (line 291) | def conditional_generate_from_fasta(args): function save_fasta (line 331) | def save_fasta( function save_results (line 354) | def save_results( function main (line 462) | def main(): FILE: run/scaffold_generate_dplm.py function generate (line 19) | def generate(args, saveto): function main (line 88) | def main(): FILE: run/scaffold_generate_dplm2.py function generate (line 17) | def generate(args, saveto): function save_results (line 130) | def save_results( function main (line 188) | def main(): FILE: src/byprot/datamodules/__init__.py function register_datamodule (line 16) | def register_datamodule(name): FILE: src/byprot/datamodules/cath_datamodule.py class CATHDataModule (line 25) | class CATHDataModule(LightningDataModule): method __init__ (line 26) | def __init__( method setup (line 55) | def setup(self, stage: Optional[str] = None): method _build_batch_sampler (line 92) | def _build_batch_sampler( method train_dataloader (line 109) | def train_dataloader(self): method val_dataloader (line 124) | def val_dataloader(self): method test_dataloader (line 137) | def test_dataloader(self): FILE: src/byprot/datamodules/dataset/cath.py function CATH (line 24) | def CATH( function collate_batch (line 143) | def collate_batch( class CoordBatchConverter (line 190) | class CoordBatchConverter(esm.data.BatchConverter): method __init__ (line 191) | def __init__( method __call__ (line 203) | def __call__(self, raw_batch: Sequence[Tuple[Sequence, str]], device=N... method from_lists (line 269) | def from_lists( method collate_dense_tensors (line 299) | def collate_dense_tensors(samples, pad_v): function new_arange (line 327) | def new_arange(x, *size): class ToSabdabDataFormat (line 338) | class ToSabdabDataFormat(object): method __init__ (line 339) | def __init__(self, alphabet) -> None: method _map_aatypes (line 352) | def _map_aatypes(self, tokens): method __call__ (line 359) | def __call__(self, batch_data) -> Any: function ToPiFoldFormat (line 390) | def ToPiFoldFormat(X, S, cfd, pad_special_tokens=False): class Featurizer (line 410) | class Featurizer(object): method __init__ (line 411) | def __init__( method __call__ (line 428) | def __call__(self, raw_batch: dict): FILE: src/byprot/datamodules/dataset/data_utils.py class Alphabet (line 28) | class Alphabet(object): method __init__ (line 29) | def __init__( method __getattr__ (line 76) | def __getattr__(self, name: str) -> Any: method __len__ (line 84) | def __len__(self): method get_featurizer (line 87) | def get_featurizer(self, name="cath", **kwds): method featurizer (line 102) | def featurizer(self): method featurize (line 105) | def featurize(self, raw_batch, **kwds): method decode (line 108) | def decode(self, batch_ids, return_as="str", remove_special=False): class PDBDataProcessor (line 127) | class PDBDataProcessor(object): method parse_PDB (line 128) | def parse_PDB( method parse_PDB_biounits (line 260) | def parse_PDB_biounits(self, x, atoms=["N", "CA", "C"], chain=None): function identity (line 379) | def identity(example): class MaxTokensBatchSampler (line 383) | class MaxTokensBatchSampler(BatchSampler): method __init__ (line 384) | def __init__( method __len__ (line 417) | def __len__(self): method __iter__ (line 420) | def __iter__(self) -> Iterator[DataChunk[T_co]]: method _build_batches (line 424) | def _build_batches(self): method set_epoch (line 488) | def set_epoch(self, epoch): FILE: src/byprot/datamodules/dataset/tokenized_protein.py function load_vocab_file (line 22) | def load_vocab_file(vocab_file): function preprocess_dataset (line 28) | def preprocess_dataset(csv_path, data_bin, split): class SortishSampler (line 98) | class SortishSampler(Sampler): method __init__ (line 102) | def __init__( method __iter__ (line 128) | def __iter__(self): method __len__ (line 143) | def __len__(self): method set_epoch (line 146) | def set_epoch(self, epoch): class ApproxBatchSampler (line 150) | class ApproxBatchSampler(BatchSampler): method __init__ (line 167) | def __init__( method _build_batches (line 189) | def _build_batches(self): method __len__ (line 235) | def __len__(self): method __iter__ (line 238) | def __iter__(self): class TokenizedProteinDataset (line 243) | class TokenizedProteinDataset(Dataset): method __init__ (line 252) | def __init__( method __len__ (line 276) | def __len__(self): method get_metadata_lens (line 279) | def get_metadata_lens(self): method __getitem__ (line 282) | def __getitem__(self, idx): class Subset (line 323) | class Subset(Dataset[T_co]): method __init__ (line 335) | def __init__(self, dataset: Dataset[T_co], indices: Sequence[int]) -> ... method __getitem__ (line 339) | def __getitem__(self, idx): method __len__ (line 344) | def __len__(self): class DPLM2Tokenizer (line 348) | class DPLM2Tokenizer(EsmTokenizer): method __init__ (line 361) | def __init__( method aa_eos_token (line 409) | def aa_eos_token(self) -> str: method aa_cls_token (line 420) | def aa_cls_token(self) -> str: method aa_unk_token (line 431) | def aa_unk_token(self) -> str: method aa_mask_token (line 442) | def aa_mask_token(self) -> str: method struct_eos_token (line 453) | def struct_eos_token(self) -> str: method struct_cls_token (line 464) | def struct_cls_token(self) -> str: method struct_unk_token (line 475) | def struct_unk_token(self) -> str: method struct_mask_token (line 486) | def struct_mask_token(self) -> str: method aa_cls_token (line 497) | def aa_cls_token(self, value): method aa_eos_token (line 505) | def aa_eos_token(self, value): method aa_unk_token (line 513) | def aa_unk_token(self, value): method aa_mask_token (line 521) | def aa_mask_token(self, value): method struct_cls_token (line 529) | def struct_cls_token(self, value): method struct_eos_token (line 537) | def struct_eos_token(self, value): method struct_unk_token (line 545) | def struct_unk_token(self, value): method struct_mask_token (line 553) | def struct_mask_token(self, value): class DPLM2Collater (line 561) | class DPLM2Collater(object): method __init__ (line 562) | def __init__(self, tokenizer): method __call__ (line 567) | def __call__(self, raw_batch): function setup_dataloader (line 610) | def setup_dataloader( function load_dataset_from_hf (line 643) | def load_dataset_from_hf(data_path, split): FILE: src/byprot/datamodules/dataset/uniref.py class SortishSampler (line 32) | class SortishSampler(Sampler): method __init__ (line 36) | def __init__( method __iter__ (line 61) | def __iter__(self): method __len__ (line 76) | def __len__(self): method set_epoch (line 79) | def set_epoch(self, epoch): class ApproxBatchSampler (line 83) | class ApproxBatchSampler(BatchSampler): method __init__ (line 100) | def __init__( method _build_batches (line 121) | def _build_batches(self): method __len__ (line 176) | def __len__(self): method __iter__ (line 179) | def __iter__(self): class UniRefDataset (line 184) | class UniRefDataset(Dataset): method __init__ (line 193) | def __init__( method __len__ (line 211) | def __len__(self): method get_metadata_lens (line 214) | def get_metadata_lens(self): method __getitem__ (line 217) | def __getitem__(self, idx): class Subset (line 233) | class Subset(Dataset[T_co]): method __init__ (line 244) | def __init__(self, dataset: Dataset[T_co], indices: Sequence[int]) -> ... method __getitem__ (line 248) | def __getitem__(self, idx): method __len__ (line 253) | def __len__(self): class DPLMCollater (line 257) | class DPLMCollater(object): method __init__ (line 258) | def __init__(self, tokenizer_path=None): method __call__ (line 269) | def __call__(self, sequences): function setup_dataloader (line 289) | def setup_dataloader( FILE: src/byprot/datamodules/dataset/uniref_hf.py class SortishSampler (line 21) | class SortishSampler(Sampler): method __init__ (line 25) | def __init__( method __iter__ (line 50) | def __iter__(self): method __len__ (line 65) | def __len__(self): method set_epoch (line 68) | def set_epoch(self, epoch): class ApproxBatchSampler (line 72) | class ApproxBatchSampler(BatchSampler): method __init__ (line 89) | def __init__( method _build_batches (line 110) | def _build_batches(self): method __len__ (line 165) | def __len__(self): method __iter__ (line 168) | def __iter__(self): class UniRefHFDataset (line 173) | class UniRefHFDataset(Dataset): method __init__ (line 182) | def __init__( method __len__ (line 194) | def __len__(self): method get_metadata_lens (line 197) | def get_metadata_lens(self): method __getitem__ (line 200) | def __getitem__(self, idx): class UniRefDatasetForTesting (line 213) | class UniRefDatasetForTesting(Dataset): method __init__ (line 214) | def __init__( method __len__ (line 230) | def __len__(self): method get_metadata_lens (line 233) | def get_metadata_lens(self): method __getitem__ (line 236) | def __getitem__(self, idx): class Subset (line 241) | class Subset(Dataset[T_co]): method __init__ (line 252) | def __init__(self, dataset: Dataset[T_co], indices: Sequence[int]) -> ... method __getitem__ (line 256) | def __getitem__(self, idx): method __len__ (line 261) | def __len__(self): class DPLMCollater (line 265) | class DPLMCollater(object): method __init__ (line 269) | def __init__(self, tokenizer_path=None): method __call__ (line 280) | def __call__(self, sequences): function setup_dataloader (line 300) | def setup_dataloader( function load_dataset_from_hf (line 331) | def load_dataset_from_hf(data_path, split): FILE: src/byprot/datamodules/pdb_dataset/all_atom.py function to_atom37 (line 44) | def to_atom37(trans, rots): function torsion_angles_to_frames (line 53) | def torsion_angles_to_frames( function prot_to_torsion_angles (line 129) | def prot_to_torsion_angles(aatype, atom37, atom37_mask): function frames_to_atom14_pos (line 144) | def frames_to_atom14_pos( function compute_backbone (line 180) | def compute_backbone(bb_rigids, psi_torsions): function calculate_neighbor_angles (line 205) | def calculate_neighbor_angles(R_ac, R_ab): function vector_projection (line 230) | def vector_projection(R_ab, P_n): function transrot_to_atom37 (line 250) | def transrot_to_atom37(transrot_traj, res_mask): function atom37_from_trans_rot (line 270) | def atom37_from_trans_rot(trans, rots, res_mask): function process_trans_rot_traj (line 284) | def process_trans_rot_traj(trans_traj, rots_traj, res_mask): function adjust_oxygen_pos (line 294) | def adjust_oxygen_pos( FILE: src/byprot/datamodules/pdb_dataset/pdb_datamodule.py function load_from_pdb (line 44) | def load_from_pdb(pdb_path, batch=False): function collate_fn (line 51) | def collate_fn(batch: list): function exists (line 61) | def exists(o): class PdbDataModule (line 66) | class PdbDataModule(LightningDataModule): method __init__ (line 67) | def __init__(self, data_cfg): method setup (line 77) | def setup(self, stage: str): method train_dataloader (line 89) | def train_dataloader(self, rank=None, num_replicas=None): method _build_batch_sampler (line 153) | def _build_batch_sampler( method val_dataloader (line 178) | def val_dataloader(self): class PdbDataset (line 189) | class PdbDataset(Dataset): method __init__ (line 190) | def __init__( method is_training (line 208) | def is_training(self): method dataset_cfg (line 212) | def dataset_cfg(self): method _init_metadata (line 215) | def _init_metadata(self): method sample_cluster (line 335) | def sample_cluster(self, pdb_csv, seed): method _process_csv_row2 (line 338) | def _process_csv_row2(self, processed_file_path): method process_chain (line 387) | def process_chain(chain_feats: dict, random_crop=False, crop_size=256): method __len__ (line 510) | def __len__(self): method __getitem__ (line 513) | def __getitem__(self, idx): method _process_csv_row (line 522) | def _process_csv_row(self, csv_row): class LengthBatcher (line 573) | class LengthBatcher: method __init__ (line 574) | def __init__( method _replica_epoch_batches (line 610) | def _replica_epoch_batches(self): method _create_batches (line 650) | def _create_batches(self): method __iter__ (line 664) | def __iter__(self): method __len__ (line 669) | def __len__(self): function _rog_quantile_curve (line 677) | def _rog_quantile_curve(df, quantile, eval_x): FILE: src/byprot/datamodules/pdb_dataset/protein.py class Protein (line 37) | class Protein: method __post_init__ (line 64) | def __post_init__(self): function from_pdb_string (line 72) | def from_pdb_string(pdb_str: str, chain_id: Optional[str] = None) -> Pro... function _chain_end (line 154) | def _chain_end(atom_index, end_resname, chain_name, residue_index) -> str: function to_pdb (line 162) | def to_pdb(prot: Protein, model=1, add_end=True) -> str: function ideal_atom_mask (line 260) | def ideal_atom_mask(prot: Protein) -> np.ndarray: function from_prediction (line 276) | def from_prediction( FILE: src/byprot/datamodules/pdb_dataset/residue_constants.py function load_stereo_chemical_props (line 438) | def load_stereo_chemical_props() -> Tuple[ function sequence_to_onehot (line 887) | def sequence_to_onehot( function _make_standard_atom_mask (line 1040) | def _make_standard_atom_mask() -> np.ndarray: function chi_angle_atom (line 1058) | def chi_angle_atom(atom_index: int) -> np.ndarray: function _make_rigid_transformation_4x4 (line 1105) | def _make_rigid_transformation_4x4(ex, ey, translation): function _make_rigid_group_constants (line 1136) | def _make_rigid_group_constants(): function make_atom14_dists_bounds (line 1221) | def make_atom14_dists_bounds( FILE: src/byprot/datamodules/pdb_dataset/utils.py function pad_feats (line 87) | def pad_feats(raw_feats, max_len, use_torch=False): function pad_rigid (line 110) | def pad_rigid(rigid: torch.tensor, max_len: int): function pad (line 119) | def pad(x: np.ndarray, max_len: int, dim=0, use_torch=False, reverse=Fal... class DataError (line 151) | class DataError(Exception): class FileExistsError (line 157) | class FileExistsError(DataError): class MmcifParsingError (line 163) | class MmcifParsingError(DataError): class ResolutionError (line 169) | class ResolutionError(DataError): class LengthError (line 175) | class LengthError(DataError): class CPU_Unpickler (line 181) | class CPU_Unpickler(pickle.Unpickler): method find_class (line 187) | def find_class(self, module, name): function create_rigid (line 194) | def create_rigid(rots, trans): function batch_align_structures (line 199) | def batch_align_structures(pos_1, pos_2, mask=None): function adjust_oxygen_pos (line 231) | def adjust_oxygen_pos( function write_pkl (line 334) | def write_pkl( function read_pkl (line 349) | def read_pkl(read_path: str, verbose=True, use_torch=False, map_location... function chain_str_to_int (line 369) | def chain_str_to_int(chain_str: str): function parse_chain_feats (line 378) | def parse_chain_feats(chain_feats, scale_factor=1.0): function concat_np_features (line 400) | def concat_np_features( function center_zero (line 425) | def center_zero( function align_structures (line 446) | def align_structures( function process_mmcif (line 531) | def process_mmcif(mmcif_path: str, max_resolution: int, max_len: int): function process_pdb_file (line 643) | def process_pdb_file(file_path: str): function parse_pdb_feats (line 727) | def parse_pdb_feats( function process_chain (line 766) | def process_chain(chain: Chain, chain_id: str) -> Protein: FILE: src/byprot/datamodules/tokenized_protein_datamodule.py class TokenizedProteinDataModule (line 33) | class TokenizedProteinDataModule(LightningDataModule): method __init__ (line 34) | def __init__( method setup (line 55) | def setup(self, stage: Optional[str] = None, split: Optional[str] = No... method train_dataloader (line 97) | def train_dataloader(self): method val_dataloader (line 131) | def val_dataloader(self): method test_dataloader (line 140) | def test_dataloader(self): function length_cropping (line 151) | def length_cropping(dataset_pandas, epoch, min_crop_length=60): function sample_cluster (line 167) | def sample_cluster(dataset_pandas, epoch): FILE: src/byprot/datamodules/uniref50.py class UniRefDataModule (line 34) | class UniRefDataModule(LightningDataModule): method __init__ (line 35) | def __init__( method setup (line 58) | def setup(self, stage: Optional[str] = None): method train_dataloader (line 102) | def train_dataloader(self): method val_dataloader (line 114) | def val_dataloader(self): method test_dataloader (line 124) | def test_dataloader(self): FILE: src/byprot/datamodules/uniref50_hf.py class UniRefHFDataModule (line 31) | class UniRefHFDataModule(LightningDataModule): method __init__ (line 32) | def __init__( method setup (line 51) | def setup(self, stage: Optional[str] = None): method train_dataloader (line 83) | def train_dataloader(self): method val_dataloader (line 94) | def val_dataloader(self): method test_dataloader (line 102) | def test_dataloader(self): FILE: src/byprot/models/__init__.py function register_model (line 16) | def register_model(name): FILE: src/byprot/models/dplm/dplm.py class DPLMConfig (line 30) | class DPLMConfig: class DiffusionProteinLanguageModel (line 39) | class DiffusionProteinLanguageModel(nn.Module): method __init__ (line 42) | def __init__(self, cfg, net=None): method from_pretrained (line 60) | def from_pretrained( method _update_cfg (line 106) | def _update_cfg(self, cfg): method q_sample_coupled (line 109) | def q_sample_coupled(self, x_0, t1, t2, maskable_mask): method q_sample (line 135) | def q_sample(self, x_0, t1, maskable_mask): method forward (line 150) | def forward(self, input_ids, return_last_hidden_state=False, **kwargs): method compute_loss (line 161) | def compute_loss(self, batch, weighting="constant"): method forward_encoder (line 205) | def forward_encoder(self, input_tokens, **kwargs): method initialize_output_tokens (line 208) | def initialize_output_tokens(self, input_tokens, partial_masks=None, *... method resample (line 220) | def resample(self, _tokens, _scores, ratio, scale): method forward_decoder (line 304) | def forward_decoder( method get_non_special_symbol_mask (line 377) | def get_non_special_symbol_mask(self, output_tokens, partial_masks=None): method _reparam_decoding (line 387) | def _reparam_decoding( method generate (line 503) | def generate( FILE: src/byprot/models/dplm/dplm_invfold.py class GVPTransEncoderConfig (line 27) | class GVPTransEncoderConfig: class DPLMInvFoldConfig (line 33) | class DPLMInvFoldConfig: class DPLMInvFold (line 40) | class DPLMInvFold(nn.Module): method __init__ (line 43) | def __init__(self, cfg) -> None: method _update_cfg (line 61) | def _update_cfg(self, cfg): method from_pretrained (line 67) | def from_pretrained(cls, net_name, cfg_override={}, net_override={}): method forward (line 102) | def forward( method forward_encoder (line 147) | def forward_encoder(self, batch, use_draft_seq=False): method get_non_special_sym_mask (line 173) | def get_non_special_sym_mask(self, output_tokens, partial_masks=None): method forward_decoder (line 183) | def forward_decoder( method initialize_output_tokens (line 242) | def initialize_output_tokens( method _reparam_decoding (line 283) | def _reparam_decoding( method generate (line 399) | def generate( FILE: src/byprot/models/dplm/modules/dplm_adapter.py class DPLMWithAdapterConfig (line 29) | class DPLMWithAdapterConfig: class DPLMWithConditionalAdatper (line 37) | class DPLMWithConditionalAdatper(nn.Module): method from_pretrained (line 41) | def from_pretrained(cls, cfg): method __init__ (line 59) | def __init__(self, cfg, net=None): method forward (line 72) | def forward( method compute_loss (line 95) | def compute_loss( method _update_cfg (line 146) | def _update_cfg(self, cfg): method q_sample_coupled (line 151) | def q_sample_coupled(self, x_0, t1, t2, maskable_mask): method get_non_special_sym_mask (line 178) | def get_non_special_sym_mask(self, output_tokens, partial_masks=None): class AdapterLayer (line 189) | class AdapterLayer(nn.Module): method __init__ (line 190) | def __init__(self, cfg, config): method forward (line 213) | def forward( method feed_forward_chunk (line 276) | def feed_forward_chunk(self, attention_output): method adapter_feed_forward_chunk (line 282) | def adapter_feed_forward_chunk(self, attention_output): class ModifiedEsmSelfAttention (line 291) | class ModifiedEsmSelfAttention(EsmSelfAttention): method __init__ (line 292) | def __init__( class ModifiedEsmAttention (line 302) | class ModifiedEsmAttention(EsmAttention): method __init__ (line 303) | def __init__(self, config, kdim=None, vdim=None): FILE: src/byprot/models/dplm/modules/dplm_modeling_esm.py class ModifiedEsmSelfAttention (line 20) | class ModifiedEsmSelfAttention(EsmSelfAttention): method forward (line 21) | def forward( class ModifiedEsmAttention (line 107) | class ModifiedEsmAttention(EsmAttention): method __init__ (line 108) | def __init__(self, config): class ModifiedEsmLayer (line 118) | class ModifiedEsmLayer(EsmLayer): method __init__ (line 119) | def __init__(self, config): class ModifiedEsmEncoder (line 139) | class ModifiedEsmEncoder(EsmEncoder): method __init__ (line 140) | def __init__(self, config): class ModifiedEsmModel (line 152) | class ModifiedEsmModel(EsmModel): method __init__ (line 153) | def __init__(self, config, add_pooling_layer=True): method forward (line 170) | def forward( class EsmForDPLM (line 317) | class EsmForDPLM(EsmForMaskedLM): method __init__ (line 318) | def __init__(self, config, dropout=0.1): method forward (line 337) | def forward( method forward_encoder (line 368) | def forward_encoder(self, batch, **kwargs): method get_non_special_sym_mask (line 371) | def get_non_special_sym_mask(self, output_tokens, partial_masks=None): method initialize_output_tokens (line 381) | def initialize_output_tokens( method forward_decoder (line 397) | def forward_decoder( method generate (line 443) | def generate( function sample_from_categorical (line 504) | def sample_from_categorical(logits=None, temperature=1.0): FILE: src/byprot/models/dplm/modules/gvp_transformer_encoder.py class GVPTransformerEncoderWrapper (line 13) | class GVPTransformerEncoderWrapper(nn.Module): method __init__ (line 14) | def __init__(self, freeze=True, output_logits=False, d_model=512): method forward (line 26) | def forward(self, batch, output_logits=False, **kwargs): FILE: src/byprot/models/dplm2/dplm2.py function exists (line 20) | def exists(obj): class SelfMixupConfig (line 25) | class SelfMixupConfig: class TokenizerConfig (line 31) | class TokenizerConfig: class StructTokenizerConfig (line 38) | class StructTokenizerConfig: class DPLM2Config (line 44) | class DPLM2Config: class MultimodalDiffusionProteinLanguageModel (line 70) | class MultimodalDiffusionProteinLanguageModel(nn.Module): method __init__ (line 73) | def __init__(self, cfg, net=None): method _update_cfg (line 96) | def _update_cfg(self, cfg): method special_token_list (line 100) | def special_token_list(self): method from_pretrained (line 119) | def from_pretrained( method _prepare_special_token (line 168) | def _prepare_special_token(self): method device (line 190) | def device(self): method struct_tokenizer (line 198) | def struct_tokenizer(self): method q_sample (line 206) | def q_sample(self, x_0, t, type_ids, maskable_mask): method get_modality_type (line 220) | def get_modality_type(self, input_ids): method forward (line 229) | def forward(self, input_ids, **kwargs): method self_mixup (line 272) | def self_mixup(self, x_t, single_modality_index): method get_mixup_xt (line 297) | def get_mixup_xt(self, input_ids, model_pred, non_special_sym_mask=None): method construct_x_t (line 317) | def construct_x_t(self, struct_target, aatype_target): method compute_loss (line 394) | def compute_loss(self, batch, weighting="linear"): method forward_encoder (line 456) | def forward_encoder(self, input_tokens, **kwargs): method initialize_output_tokens (line 459) | def initialize_output_tokens( method forward_decoder (line 477) | def forward_decoder( method get_non_special_symbol_mask (line 554) | def get_non_special_symbol_mask(self, output_tokens, partial_masks=None): method _reparam_decoding (line 566) | def _reparam_decoding( method generate (line 741) | def generate( FILE: src/byprot/models/dplm2/dplm2_bit.py class BitConfig (line 24) | class BitConfig: class DPLM2BitConfig (line 32) | class DPLM2BitConfig(DPLM2Config): class DPLM2Bit (line 38) | class DPLM2Bit(DPLM2): method __init__ (line 41) | def __init__(self, cfg, net=None): method _prepare_special_token (line 80) | def _prepare_special_token(self): method forward (line 87) | def forward(self, input_ids, **kwargs): method compute_loss (line 149) | def compute_loss(self, batch, weighting="linear"): method self_mixup (line 222) | def self_mixup(self, x_t, single_modality_index, bsz, seq_len): method forward_decoder (line 254) | def forward_decoder( method sample_from_logits (line 321) | def sample_from_logits( method generate (line 343) | def generate( method prepare_for_struct_tokenizer (line 438) | def prepare_for_struct_tokenizer(self, decoder_out, non_special_sym_ma... FILE: src/byprot/models/dplm2/modules/dplm2_bit_modeling_esm.py class ModifiedRotaryEmbedding (line 28) | class ModifiedRotaryEmbedding(RotaryEmbedding): method __init__ (line 35) | def __init__(self, dim: int): method _update_cos_sin_tables (line 40) | def _update_cos_sin_tables(self, x, type_ids, seq_dimension=2): method forward (line 64) | def forward( class ModifiedEsmSelfAttention (line 88) | class ModifiedEsmSelfAttention(EsmSelfAttention): method __init__ (line 89) | def __init__(self, config, position_embedding_type=None): method forward (line 95) | def forward( class ModifiedEsmAttention (line 220) | class ModifiedEsmAttention(EsmAttention): method __init__ (line 221) | def __init__(self, config): method forward (line 230) | def forward( class ModifiedEsmLayer (line 259) | class ModifiedEsmLayer(EsmLayer): method __init__ (line 260) | def __init__(self, config): method forward (line 279) | def forward( class ModifiedEsmEncoder (line 355) | class ModifiedEsmEncoder(EsmEncoder): method __init__ (line 356) | def __init__(self, config): method forward (line 367) | def forward( class ModifiedEsmModel (line 467) | class ModifiedEsmModel(EsmModel): method __init__ (line 468) | def __init__(self, config, add_pooling_layer=True): method forward (line 485) | def forward( class EsmForDPLM2Bit (line 638) | class EsmForDPLM2Bit(EsmForMaskedLM): method __init__ (line 639) | def __init__(self, config, dropout=0.1, codebook_embed_dim=13): method forward (line 672) | def forward( FILE: src/byprot/models/dplm2/modules/dplm2_modeling_esm.py class ModifiedRotaryEmbedding (line 28) | class ModifiedRotaryEmbedding(RotaryEmbedding): method __init__ (line 35) | def __init__(self, dim: int): method _update_cos_sin_tables (line 40) | def _update_cos_sin_tables(self, x, type_ids, seq_dimension=2): method forward (line 64) | def forward( class ModifiedEsmSelfAttention (line 88) | class ModifiedEsmSelfAttention(EsmSelfAttention): method __init__ (line 89) | def __init__(self, config, position_embedding_type=None): method forward (line 95) | def forward( class ModifiedEsmAttention (line 220) | class ModifiedEsmAttention(EsmAttention): method __init__ (line 221) | def __init__(self, config): method forward (line 230) | def forward( class ModifiedEsmLayer (line 259) | class ModifiedEsmLayer(EsmLayer): method __init__ (line 260) | def __init__(self, config): method forward (line 279) | def forward( class ModifiedEsmEncoder (line 355) | class ModifiedEsmEncoder(EsmEncoder): method __init__ (line 356) | def __init__(self, config): method forward (line 367) | def forward( class ModifiedEsmModel (line 467) | class ModifiedEsmModel(EsmModel): method __init__ (line 468) | def __init__(self, config, add_pooling_layer=True): method forward (line 485) | def forward( class EsmForDPLM2 (line 638) | class EsmForDPLM2(EsmForMaskedLM): method __init__ (line 639) | def __init__(self, config, dropout=0.1, vocab_size=None): method forward (line 651) | def forward( method forward_encoder (line 688) | def forward_encoder(self, batch, **kwargs): method get_non_special_sym_mask (line 691) | def get_non_special_sym_mask(self, output_tokens, partial_masks=None): method _get_resized_embeddings (line 701) | def _get_resized_embeddings( FILE: src/byprot/models/structok/modules/ema.py class LitEma (line 11) | class LitEma(nn.Module): method __init__ (line 12) | def __init__(self, model, decay=0.9999, use_num_upates=True): method forward (line 35) | def forward(self, model): method copy_to (line 62) | def copy_to(self, model): method store (line 73) | def store(self, parameters): method restore (line 82) | def restore(self, parameters): FILE: src/byprot/models/structok/modules/folding_utils/categorical_mixture.py class CategoricalMixture (line 12) | class CategoricalMixture: method __init__ (line 13) | def __init__(self, param, bins=50, start=0, end=1): method log_prob (line 25) | def log_prob(self, true): method mean (line 47) | def mean(self): function categorical_lddt (line 51) | def categorical_lddt(logits, bins=50): FILE: src/byprot/models/structok/modules/folding_utils/decoder.py class ESMFoldConfig (line 39) | class ESMFoldConfig: class ESMFoldStructureDecoder (line 63) | class ESMFoldStructureDecoder(nn.Module): method __init__ (line 64) | def __init__(self, esmfold_config=None, **kwargs): method _af2_to_esm (line 130) | def _af2_to_esm(d: Alphabet): method _af2_idx_to_esm_idx (line 137) | def _af2_idx_to_esm_idx(self, aa, mask): method _esm_idx_to_af2_idx (line 141) | def _esm_idx_to_af2_idx(self, esmaa, mask): method _compute_language_model_representations (line 144) | def _compute_language_model_representations( method _compute_input_representations (line 176) | def _compute_input_representations(self, emb_s, emb_z, esmaa): method _mask_inputs_to_esm (line 180) | def _mask_inputs_to_esm(self, esmaa, pattern): method forward (line 185) | def forward( method infer (line 337) | def infer( method output_to_pdb (line 403) | def output_to_pdb(self, output: T.Dict) -> T.List[str]: method infer_pdbs (line 408) | def infer_pdbs(self, seqs: T.List[str], *args, **kwargs) -> T.List[str]: method infer_pdb (line 414) | def infer_pdb(self, sequence: str, *args, **kwargs) -> str: method set_chunk_size (line 419) | def set_chunk_size(self, chunk_size: T.Optional[int]): method device (line 428) | def device(self): FILE: src/byprot/models/structok/modules/folding_utils/esmfold.py class ESMFoldConfig (line 28) | class ESMFoldConfig: class ESMFold (line 49) | class ESMFold(nn.Module): method __init__ (line 50) | def __init__(self, esmfold_config=None, **kwargs): method _af2_to_esm (line 106) | def _af2_to_esm(d: Alphabet): method _af2_idx_to_esm_idx (line 113) | def _af2_idx_to_esm_idx(self, aa, mask): method _compute_language_model_representations (line 117) | def _compute_language_model_representations(self, esmaa: torch.Tensor)... method _mask_inputs_to_esm (line 142) | def _mask_inputs_to_esm(self, esmaa, pattern): method forward (line 147) | def forward( method infer (line 274) | def infer( method output_to_pdb (line 332) | def output_to_pdb(self, output: T.Dict) -> T.List[str]: method infer_pdbs (line 336) | def infer_pdbs(self, seqs: T.List[str], *args, **kwargs) -> T.List[str]: method infer_pdb (line 341) | def infer_pdb(self, sequence: str, *args, **kwargs) -> str: method set_chunk_size (line 345) | def set_chunk_size(self, chunk_size: T.Optional[int]): method device (line 354) | def device(self): FILE: src/byprot/models/structok/modules/folding_utils/misc.py function encode_sequence (line 30) | def encode_sequence( function batch_encode_sequences (line 73) | def batch_encode_sequences( function output_to_pdb (line 111) | def output_to_pdb(output: T.Dict) -> T.List[str]: function collate_dense_tensors (line 159) | def collate_dense_tensors( class Attention (line 189) | class Attention(nn.Module): method __init__ (line 190) | def __init__(self, embed_dim, num_heads, head_width, gated=False): method forward (line 210) | def forward(self, x, mask=None, bias=None, indices=None): class Dropout (line 254) | class Dropout(nn.Module): method __init__ (line 258) | def __init__(self, r: float, batch_dim: T.Union[int, T.List[int]]): method forward (line 267) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SequenceToPair (line 275) | class SequenceToPair(nn.Module): method __init__ (line 276) | def __init__(self, sequence_state_dim, inner_dim, pairwise_state_dim): method forward (line 286) | def forward(self, sequence_state): class PairToSequence (line 313) | class PairToSequence(nn.Module): method __init__ (line 314) | def __init__(self, pairwise_state_dim, num_heads): method forward (line 320) | def forward(self, pairwise_state): class ResidueMLP (line 334) | class ResidueMLP(nn.Module): method __init__ (line 335) | def __init__(self, embed_dim, inner_dim, norm=nn.LayerNorm, dropout=0): method forward (line 346) | def forward(self, x): FILE: src/byprot/models/structok/modules/folding_utils/pretrained.py function _load_model (line 16) | def _load_model(model_name): function esmfold_v0 (line 48) | def esmfold_v0(): function esmfold_v1 (line 58) | def esmfold_v1(): function esmfold_structure_module_only_8M (line 69) | def esmfold_structure_module_only_8M(): function esmfold_structure_module_only_8M_270K (line 79) | def esmfold_structure_module_only_8M_270K(): function esmfold_structure_module_only_35M (line 89) | def esmfold_structure_module_only_35M(): function esmfold_structure_module_only_35M_270K (line 99) | def esmfold_structure_module_only_35M_270K(): function esmfold_structure_module_only_150M (line 109) | def esmfold_structure_module_only_150M(): function esmfold_structure_module_only_150M_270K (line 119) | def esmfold_structure_module_only_150M_270K(): function esmfold_structure_module_only_650M (line 129) | def esmfold_structure_module_only_650M(): function esmfold_structure_module_only_650M_270K (line 139) | def esmfold_structure_module_only_650M_270K(): function esmfold_structure_module_only_3B (line 149) | def esmfold_structure_module_only_3B(): function esmfold_structure_module_only_3B_270K (line 159) | def esmfold_structure_module_only_3B_270K(): function esmfold_structure_module_only_15B (line 169) | def esmfold_structure_module_only_15B(): FILE: src/byprot/models/structok/modules/folding_utils/structure_module.py class AngleResnetBlock (line 59) | class AngleResnetBlock(nn.Module): method __init__ (line 60) | def __init__(self, c_hidden): method forward (line 75) | def forward(self, a: torch.Tensor) -> torch.Tensor: class AngleResnet (line 87) | class AngleResnet(nn.Module): method __init__ (line 90) | def __init__(self, c_in, c_hidden, no_blocks, no_angles, epsilon): method forward (line 124) | def forward( class InvariantPointAttention (line 171) | class InvariantPointAttention(nn.Module): method __init__ (line 174) | def __init__( method forward (line 240) | def forward( class BackboneUpdate (line 434) | class BackboneUpdate(nn.Module): method __init__ (line 437) | def __init__(self, c_s): method forward (line 449) | def forward(self, s: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: class StructureModuleTransitionLayer (line 462) | class StructureModuleTransitionLayer(nn.Module): method __init__ (line 463) | def __init__(self, c): method forward (line 474) | def forward(self, s): class StructureModuleTransition (line 487) | class StructureModuleTransition(nn.Module): method __init__ (line 488) | def __init__(self, c, num_layers, dropout_rate): method forward (line 503) | def forward(self, s): class StructureModule (line 513) | class StructureModule(nn.Module): method __init__ (line 514) | def __init__( method forward (line 666) | def forward( method _init_residue_constants (line 801) | def _init_residue_constants(self, float_dtype, device): method torsion_angles_to_frames (line 846) | def torsion_angles_to_frames(self, r, alpha, f): method frames_and_literature_positions_to_atom14_pos (line 852) | def frames_and_literature_positions_to_atom14_pos( FILE: src/byprot/models/structok/modules/folding_utils/tri_self_attn_block.py class TriangularSelfAttentionBlock (line 29) | class TriangularSelfAttentionBlock(nn.Module): method __init__ (line 30) | def __init__( method forward (line 119) | def forward( FILE: src/byprot/models/structok/modules/folding_utils/trunk.py class StructureModuleConfig (line 24) | class StructureModuleConfig: class FoldingTrunkConfig (line 44) | class FoldingTrunkConfig: function get_axial_mask (line 63) | def get_axial_mask(mask): class RelativePosition (line 83) | class RelativePosition(nn.Module): method __init__ (line 84) | def __init__(self, bins, pairwise_state_dim): method forward (line 92) | def forward(self, residue_index, mask=None): class FoldingTrunk (line 118) | class FoldingTrunk(nn.Module): method __init__ (line 119) | def __init__(self, **kwargs): method set_chunk_size (line 181) | def set_chunk_size(self, chunk_size): method forward (line 188) | def forward( method distogram (line 296) | def distogram(coords, min_bin, max_bin, num_bins): FILE: src/byprot/models/structok/modules/gvp_encoder.py function exists (line 10) | def exists(x): class GVPTransformerEncoderWrapper (line 14) | class GVPTransformerEncoderWrapper(nn.Module): method __init__ (line 15) | def __init__(self, alphabet=None, freeze=True, return_logits=False): method forward (line 31) | def forward(self, backb_positions, mask, padding_mask, **kwargs): class GVPTransformerEncoderWrapper2 (line 53) | class GVPTransformerEncoderWrapper2(nn.Module): method __init__ (line 54) | def __init__(self, alphabet=None, freeze=True, return_logits=False): method forward (line 70) | def forward(self, backb_positions, mask, padding_mask, **kwargs): FILE: src/byprot/models/structok/modules/lfq.py function exists (line 40) | def exists(v): function default (line 44) | def default(*args): function pack_one (line 51) | def pack_one(t, pattern): function unpack_one (line 55) | def unpack_one(t, ps, pattern): function entropy (line 62) | def entropy(prob): function mult_along_first_dims (line 69) | def mult_along_first_dims(x, y): function masked_mean (line 79) | def masked_mean(x, m): function entropy_loss (line 95) | def entropy_loss( class LFQ (line 133) | class LFQ(Module): method __init__ (line 134) | def __init__( method dtype (line 202) | def dtype(self): method indices_to_bits (line 205) | def indices_to_bits(self, x): method get_codebook_entry (line 218) | def get_codebook_entry(self, x, shape=None): method bits_to_indices (line 241) | def bits_to_indices(self, bits): method decode (line 257) | def decode(self, x): method forward (line 272) | def forward( FILE: src/byprot/models/structok/modules/loss.py function drmsd (line 53) | def drmsd(structure_1, structure_2, mask=None): function compute_validation_metrics (line 76) | def compute_validation_metrics(batch, outputs, superimposition_metrics=F... function softmax_cross_entropy (line 129) | def softmax_cross_entropy(logits, labels): function sigmoid_cross_entropy (line 137) | def sigmoid_cross_entropy(logits, labels): function torsion_angle_loss (line 150) | def torsion_angle_loss( function compute_fape (line 174) | def compute_fape( function backbone_loss (line 247) | def backbone_loss( function sidechain_loss (line 305) | def sidechain_loss( function fape_loss (line 355) | def fape_loss( function supervised_chi_loss (line 382) | def supervised_chi_loss( function compute_plddt (line 467) | def compute_plddt(logits: torch.Tensor) -> torch.Tensor: function lddt (line 481) | def lddt( function lddt_ca (line 537) | def lddt_ca( function lddt_loss (line 560) | def lddt_loss( function distogram_loss (line 612) | def distogram_loss( function _calculate_bin_centers (line 660) | def _calculate_bin_centers(boundaries: torch.Tensor): function _calculate_expected_aligned_error (line 669) | def _calculate_expected_aligned_error( function compute_predicted_aligned_error (line 680) | def compute_predicted_aligned_error( function compute_tm (line 720) | def compute_tm( function tm_loss (line 754) | def tm_loss( function between_residue_bond_loss (line 811) | def between_residue_bond_loss( function between_residue_clash_loss (line 976) | def between_residue_clash_loss( function within_residue_violations (line 1123) | def within_residue_violations( function find_structural_violations (line 1210) | def find_structural_violations( function find_structural_violations_np (line 1327) | def find_structural_violations_np( function extreme_ca_ca_distance_violations (line 1344) | def extreme_ca_ca_distance_violations( function compute_violation_metrics (line 1381) | def compute_violation_metrics( function compute_violation_metrics_np (line 1424) | def compute_violation_metrics_np( function violation_loss (line 1440) | def violation_loss( function compute_renamed_ground_truth (line 1466) | def compute_renamed_ground_truth( function experimentally_resolved_loss (line 1573) | def experimentally_resolved_loss( function masked_msa_loss (line 1599) | def masked_msa_loss(logits, true_msa, bert_mask, eps=1e-8, **kwargs): function lm_loss (line 1631) | def lm_loss(logits, aatype, mask=None, eps=1e-8, **kwargs): function backbone_atom_loss (line 1662) | def backbone_atom_loss( function measure_perplexity (line 1690) | def measure_perplexity(predicted_indices, n_embed): class StructureVQLoss (line 1702) | class StructureVQLoss(nn.Module): method __init__ (line 1703) | def __init__(self, config): method forward (line 1711) | def forward( class AlphaFoldLoss (line 1770) | class AlphaFoldLoss(nn.Module): method __init__ (line 1773) | def __init__(self, config=None): method forward (line 1777) | def forward(self, out, batch, _return_breakdown=False): FILE: src/byprot/models/structok/modules/nn.py class TransformerEncoder (line 15) | class TransformerEncoder(nn.Module): method __init__ (line 16) | def __init__(self, embed_dim, attnetion_heads, num_layers): method forward (line 37) | def forward( FILE: src/byprot/models/structok/modules/vqvae.py class VectorQuantizer (line 20) | class VectorQuantizer(nn.Module): method __init__ (line 36) | def __init__(self, n_e, e_dim, beta): method forward (line 45) | def forward(self, z): method get_codebook_entry (line 107) | def get_codebook_entry(self, indices, shape): class GumbelQuantize (line 125) | class GumbelQuantize(nn.Module): method __init__ (line 133) | def __init__( method remap_to_used (line 176) | def remap_to_used(self, inds): method unmap_to_all (line 192) | def unmap_to_all(self, inds): method forward (line 202) | def forward(self, z, temp=None, return_logits=False): method get_codebook_entry (line 240) | def get_codebook_entry(self, indices, shape): class VectorQuantizer2 (line 255) | class VectorQuantizer2(nn.Module): method __init__ (line 266) | def __init__( method remap_to_used (line 306) | def remap_to_used(self, inds): method unmap_to_all (line 322) | def unmap_to_all(self, inds): method forward (line 332) | def forward( method get_codebook_entry (line 410) | def get_codebook_entry(self, indices, shape=None): class EmbeddingEMA (line 428) | class EmbeddingEMA(nn.Module): method __init__ (line 429) | def __init__(self, num_tokens, codebook_dim, decay=0.99, eps=1e-5): method forward (line 441) | def forward(self, embed_id): method cluster_size_ema_update (line 444) | def cluster_size_ema_update(self, new_cluster_size): method embed_avg_ema_update (line 449) | def embed_avg_ema_update(self, new_embed_avg): method weight_update (line 454) | def weight_update(self, num_tokens): class EMAVectorQuantizer (line 464) | class EMAVectorQuantizer(nn.Module): method __init__ (line 465) | def __init__( method remap_to_used (line 500) | def remap_to_used(self, inds): method unmap_to_all (line 516) | def unmap_to_all(self, inds): method forward (line 526) | def forward(self, z): FILE: src/byprot/models/structok/structok_lfq.py function exists (line 28) | def exists(o): class VQModel (line 33) | class VQModel(nn.Module): method __init__ (line 34) | def __init__( method forward (line 113) | def forward(self, batch, return_pred_indices=True, decoder_kwargs={}): method encode (line 138) | def encode(self, atom_positions, mask, seq_length=None, gvp_feat=None): method decode (line 161) | def decode(self, quant, aatype, mask, decoder_kwargs={}): method quantize_and_decode (line 178) | def quantize_and_decode( method get_decoder_features (line 195) | def get_decoder_features(self, struct_tokens, res_mask, unk_mask): method tokenize (line 214) | def tokenize(self, atom_positions, res_mask, seq_length=None): method detokenize (line 225) | def detokenize(self, struct_tokens, res_mask=None, **kwargs): method string_to_tensor (line 257) | def string_to_tensor(self, aatype_str, struct_token_str): method init_data (line 265) | def init_data(self, raw_batch): method output_to_pdb (line 268) | def output_to_pdb(self, decoder_out, output_dir, is_trajectory=False): FILE: src/byprot/models/utils.py class NetConfig (line 25) | class NetConfig: class LoRAConfig (line 34) | class LoRAConfig: function get_net_class (line 42) | def get_net_class(dplm_type): function get_net (line 51) | def get_net(cfg): function get_net_dplm2 (line 109) | def get_net_dplm2(cfg): function get_net_dplm2_bit (line 209) | def get_net_dplm2_bit(cfg): function topk_masking (line 257) | def topk_masking(scores, cutoff_len, stochastic=False, temp=1.0): function topk_masking_prior (line 278) | def topk_masking_prior( function mask_fill_811 (line 304) | def mask_fill_811(inputs, masked_indices, mask_id): function sample_from_categorical (line 325) | def sample_from_categorical(logits=None, temperature=1.0): function stochastic_sample_from_categorical (line 335) | def stochastic_sample_from_categorical( function top_k_top_p_filtering (line 347) | def top_k_top_p_filtering( function get_struct_tokenizer (line 387) | def get_struct_tokenizer( FILE: src/byprot/modules/__init__.py class _Criterion (line 12) | class _Criterion(nn.Module): method __init__ (line 13) | def __init__(self, cfg) -> None: method _build (line 22) | def _build(self): method forward (line 31) | def forward(self, model_outs, targets): FILE: src/byprot/modules/cross_entropy.py function label_smoothed_nll_loss (line 10) | def label_smoothed_nll_loss( class CrossEntropyLoss (line 37) | class CrossEntropyLoss(nn.CrossEntropyLoss): method forward (line 38) | def forward(self, scores: Tensor, target: Tensor, mask=None) -> Tensor: class Coord2SeqCrossEntropyLoss (line 88) | class Coord2SeqCrossEntropyLoss(nn.CrossEntropyLoss): method forward (line 89) | def forward( class RDMCrossEntropyLoss (line 155) | class RDMCrossEntropyLoss(nn.CrossEntropyLoss): method forward (line 156) | def forward( class StructAARDMCrossEntropyLoss (line 246) | class StructAARDMCrossEntropyLoss(nn.CrossEntropyLoss): method forward (line 247) | def forward( FILE: src/byprot/modules/metrics.py function luost_rmsd (line 13) | def luost_rmsd(res_list1: list, res_list2: list): function rmsd (line 43) | def rmsd(pred, target, mask=None): function accuracy (line 54) | def accuracy(pred, target, mask=None, reduction="all"): function accuracy_per_sample (line 62) | def accuracy_per_sample(pred, target, mask=None): FILE: src/byprot/modules/protein_metrics.py function calc_tm_score (line 59) | def calc_tm_score(pos_1, pos_2, seq_1, seq_2, mask): function calc_perplexity (line 71) | def calc_perplexity(pred, labels, mask): function calc_mdtraj_metrics (line 79) | def calc_mdtraj_metrics(pdb_path): function rigid_transform_3D (line 96) | def rigid_transform_3D(A, B, verbose=False): function calc_aligned_rmsd (line 148) | def calc_aligned_rmsd(pos_1, pos_2): function protein_metrics (line 156) | def protein_metrics( function ca_ca_distance (line 205) | def ca_ca_distance(ca_pos, tol=0.1): function ca_ca_clashes (line 214) | def ca_ca_clashes(ca_pos, tol=1.5): FILE: src/byprot/tasks/__init__.py function on_prediction_mode (line 33) | def on_prediction_mode(pl_module: LightningModule, enable=True): class TaskLitModule (line 77) | class TaskLitModule(LightningModule): method __init__ (line 91) | def __init__( method setup (line 124) | def setup(self, stage=None) -> None: method lrate (line 129) | def lrate(self): method stage (line 134) | def stage(self): method log (line 137) | def log( method step (line 154) | def step(self, batch): method training_step (line 157) | def training_step(self, batch: Any, batch_idx: int, **kwargs): method training_step_end (line 160) | def training_step_end( method validation_step (line 171) | def validation_step(self, batch: Any, batch_idx: int): method validation_step_end (line 174) | def validation_step_end( method on_validation_epoch_end (line 183) | def on_validation_epoch_end(self): method test_step (line 190) | def test_step(self, batch: Any, batch_idx: int): method test_step_end (line 193) | def test_step_end( method on_test_epoch_end (line 200) | def on_test_epoch_end(self): method forward (line 204) | def forward(self, batch): method predict_step (line 207) | def predict_step( method predict_epoch_end (line 212) | def predict_epoch_end(self, results: List[Any], log_pref=None) -> None: method configure_optimizers (line 216) | def configure_optimizers(self): method on_train_epoch_end (line 241) | def on_train_epoch_end(self) -> None: class AutoMetric (line 254) | class AutoMetric(nn.Module): method __init__ (line 262) | def __init__(self) -> None: method device (line 267) | def device(self): method update (line 270) | def update(self, name, value, type="mean", **kwds): method compute (line 280) | def compute(self, name): method reset (line 283) | def reset(self, name): function register_task (line 290) | def register_task(name): FILE: src/byprot/tasks/lm/dplm.py function new_arange (line 21) | def new_arange(x, *size): class DPLMTrainingTask (line 33) | class DPLMTrainingTask(TaskLitModule): method __init__ (line 44) | def __init__( method setup (line 65) | def setup(self, stage=None) -> None: method on_before_optimizer_step (line 76) | def on_before_optimizer_step(self, optimizer): method build_model (line 83) | def build_model(self): method build_criterion (line 89) | def build_criterion(self): method build_torchmetric (line 95) | def build_torchmetric(self): method step (line 101) | def step(self, batch): method training_step (line 136) | def training_step(self, batch: Any, batch_idx: int): method on_test_epoch_start (line 162) | def on_test_epoch_start(self) -> None: method validation_step (line 165) | def validation_step(self, batch: Any, batch_idx: int): method on_validation_epoch_end (line 177) | def on_validation_epoch_end(self): FILE: src/byprot/tasks/lm/dplm2.py function cal_index_acc (line 22) | def cal_index_acc(logits, target, loss_mask, bit_level=False): class DPLM2TrainingTask (line 43) | class DPLM2TrainingTask(TaskLitModule): method __init__ (line 52) | def __init__( method setup (line 70) | def setup(self, stage=None) -> None: method on_before_optimizer_step (line 81) | def on_before_optimizer_step(self, optimizer): method build_model (line 88) | def build_model(self): method build_criterion (line 94) | def build_criterion(self): method build_torchmetric (line 100) | def build_torchmetric(self): method load_from_ckpt (line 112) | def load_from_ckpt(self, ckpt_path, not_load=False): method step (line 127) | def step(self, batch): method training_step (line 185) | def training_step(self, batch: Any, batch_idx: int): method validation_step (line 211) | def validation_step(self, batch: Any, batch_idx: int): method on_validation_epoch_end (line 241) | def on_validation_epoch_end(self): FILE: src/byprot/tasks/lm/dplm_invfold.py function new_arange (line 26) | def new_arange(x, *size): class ConditionalDPLMTrainingTask (line 38) | class ConditionalDPLMTrainingTask(TaskLitModule): method __init__ (line 61) | def __init__( method setup (line 83) | def setup(self, stage=None) -> None: method on_test_epoch_start (line 94) | def on_test_epoch_start(self) -> None: method on_predict_epoch_start (line 104) | def on_predict_epoch_start(self) -> None: method load_from_ckpt (line 114) | def load_from_ckpt(self, ckpt_path, not_load=False): method build_model (line 128) | def build_model(self): method build_generator (line 134) | def build_generator(self): method build_criterion (line 141) | def build_criterion(self): method build_torchmetric (line 147) | def build_torchmetric(self): method inject_noise (line 164) | def inject_noise( method step (line 232) | def step(self, batch): method training_step (line 295) | def training_step(self, batch: Any, batch_idx: int): method validation_step (line 321) | def validation_step(self, batch: Any, batch_idx: int): method eval_self_consistency (line 337) | def eval_self_consistency(self, pred_ids, positions, mask=None): method on_validation_epoch_end (line 380) | def on_validation_epoch_end(self): method forward (line 427) | def forward(self, batch, return_ids=False): method predict_step (line 439) | def predict_step( method on_predict_epoch_end (line 500) | def on_predict_epoch_end(self) -> None: method save_prediction (line 567) | def save_prediction(self, results, saveto=None): function decode (line 605) | def decode(batch_ids, alphabet, remove_special=False, replace_X=True): FILE: src/byprot/tasks/lm/mlm.py function new_arange (line 27) | def new_arange(x, *size): class MLMTrainingTask (line 39) | class MLMTrainingTask(TaskLitModule): method __init__ (line 52) | def __init__( method setup (line 71) | def setup(self, stage=None) -> None: method on_before_optimizer_step (line 82) | def on_before_optimizer_step(self, optimizer): method build_model (line 89) | def build_model(self): method build_criterion (line 93) | def build_criterion(self): method build_torchmetric (line 99) | def build_torchmetric(self): method inject_noise (line 109) | def inject_noise(self, tokens): method step (line 157) | def step(self, batch): method training_step (line 188) | def training_step(self, batch: Any, batch_idx: int): method on_test_epoch_start (line 214) | def on_test_epoch_start(self) -> None: method validation_step (line 217) | def validation_step(self, batch: Any, batch_idx: int): method on_validation_epoch_end (line 231) | def on_validation_epoch_end(self): method forward (line 277) | def forward(self, batch, return_ids=False): method predict_step (line 296) | def predict_step( method on_predict_epoch_end (line 313) | def on_predict_epoch_end(self) -> None: FILE: src/byprot/tasks/struct_tokenizer/structok.py function exists (line 36) | def exists(o): class StrucTok (line 41) | class StrucTok(TaskLitModule): method __init__ (line 49) | def __init__( method setup (line 67) | def setup(self, stage=None) -> None: method load_from_ckpt (line 84) | def load_from_ckpt(self, ckpt_path): method build_model (line 111) | def build_model(self): method build_criterion (line 117) | def build_criterion(self): method build_torchmetric (line 122) | def build_torchmetric(self): method ema_scope (line 128) | def ema_scope(self, context=None): method step (line 142) | def step(self, batch): method training_step (line 160) | def training_step(self, batch: Any, batch_idx: int, **kwargs): method validation_step (line 189) | def validation_step(self, batch: Any, batch_idx: int): method on_validation_epoch_end (line 201) | def on_validation_epoch_end(self): method _log (line 226) | def _log(self, loss_breakdown, batch, outputs, train=True): method _compute_validation_metrics (line 263) | def _compute_validation_metrics( method configure_optimizers (line 327) | def configure_optimizers(self): FILE: src/byprot/testing_pipeline.py function test (line 25) | def test(config: DictConfig) -> None: FILE: src/byprot/training_pipeline.py function train (line 26) | def train(config: DictConfig) -> Optional[float]: FILE: src/byprot/utils/__init__.py function get_logger (line 38) | def get_logger(name=__name__) -> logging.Logger: function load_from_experiment (line 62) | def load_from_experiment(experiment_save_dir, ckpt="best.ckpt"): function extras (line 75) | def extras(config: DictConfig) -> None: function print_config (line 103) | def print_config( function log_hyperparameters (line 156) | def log_hyperparameters( function finish (line 203) | def finish( function common_pipeline (line 221) | def common_pipeline(config, training=False): function resolve_ckpt_path (line 270) | def resolve_ckpt_path(ckpt_dir, ckpt_path): function recursive_to (line 288) | def recursive_to(obj, device): function recursive_apply (line 307) | def recursive_apply(obj, fn): function recursive_eval (line 320) | def recursive_eval(obj): function import_modules (line 335) | def import_modules(models_dir, namespace, excludes=[]): function get_git_revision_hash (line 359) | def get_git_revision_hash() -> str: function seed_everything (line 370) | def seed_everything(seed, verbose=False) -> int: function local_seed (line 399) | def local_seed(seed, enable=True): FILE: src/byprot/utils/callbacks.py function _package_available (line 29) | def _package_available(package_name: str) -> bool: function _compare_version (line 43) | def _compare_version( function float_fmt (line 88) | def float_fmt(float_value): class BetterMetricsTextColumn (line 96) | class BetterMetricsTextColumn(MetricsTextColumn): method render (line 99) | def render(self, task) -> Text: class BetterRichProgressBar (line 123) | class BetterRichProgressBar(RichProgressBar): method _init_progress (line 124) | def _init_progress(self, trainer): class ValEveryNSteps (line 150) | class ValEveryNSteps(pl.Callback): method __init__ (line 151) | def __init__(self, every_n_step): method on_batch_end (line 154) | def on_batch_end(self, trainer, pl_module): class CheckpointEveryNSteps (line 162) | class CheckpointEveryNSteps(pl.Callback): method __init__ (line 166) | def __init__( method on_batch_end (line 184) | def on_batch_end(self, trainer: pl.Trainer, _): class ModelCheckpoint (line 201) | class ModelCheckpoint(callbacks.ModelCheckpoint): method _format_checkpoint_name (line 206) | def _format_checkpoint_name( method on_train_start (line 221) | def on_train_start( method _update_best_and_save (line 227) | def _update_best_and_save( method _save_last_checkpoint (line 290) | def _save_last_checkpoint( class TrackNorms (line 307) | class TrackNorms(pl.Callback): method on_after_training_step (line 311) | def on_after_training_step( method on_after_backward (line 333) | def on_after_backward( FILE: src/byprot/utils/config.py function get_logger (line 14) | def get_logger(name=__name__) -> logging.Logger: function make_config (line 38) | def make_config(**kwargs): function compose_config (line 42) | def compose_config(**kwds): function merge_config (line 46) | def merge_config(default_cfg, override_cfg): function load_yaml_config (line 52) | def load_yaml_config(fpath: str) -> OmegaConf: function parse_cli_override_args (line 58) | def parse_cli_override_args(): function resolve_experiment_config (line 72) | def resolve_experiment_config(config: DictConfig): function _convert_target_to_string (line 102) | def _convert_target_to_string(t: Any) -> Any: function get_obj_from_str (line 109) | def get_obj_from_str(string, reload=False): function instantiate_from_config (line 117) | def instantiate_from_config(cfg: OmegaConf, group=None, **override_kwargs): function instantiate_from_config2 (line 143) | def instantiate_from_config2(config): FILE: src/byprot/utils/io.py function filter_backbone2 (line 28) | def filter_backbone2(array): function load_structure (line 52) | def load_structure(fpath, chain=None): function extract_coords_from_structure (line 88) | def extract_coords_from_structure( function load_coords (line 109) | def load_coords(fpath, chain, atoms=["N", "CA", "C", "O"]): function get_atom_coords_residuewise (line 123) | def get_atom_coords_residuewise( function save_pdb (line 141) | def save_pdb(path, coords, seq): FILE: src/byprot/utils/logger.py class ByProtWandbLogger (line 32) | class ByProtWandbLogger(WandbLogger): method __init__ (line 33) | def __init__( FILE: src/byprot/utils/lr_scheduler.py function get_scheduler (line 10) | def get_scheduler(cfg, optimizer): class BlackHole (line 65) | class BlackHole(object): method __setattr__ (line 66) | def __setattr__(self, name, value): method __call__ (line 69) | def __call__(self, *args, **kwargs): method __getattr__ (line 72) | def __getattr__(self, name): function inverse_sqrt_lr_schedule (line 76) | def inverse_sqrt_lr_schedule( class InverseSqrtLRScheduler (line 87) | class InverseSqrtLRScheduler(LambdaLR): method __init__ (line 88) | def __init__( function noam_lr_schedule (line 116) | def noam_lr_schedule(step, warmup_steps, factor, model_size): class NoamScheduler (line 125) | class NoamScheduler(LambdaLR): method __init__ (line 126) | def __init__( function polynomial_lr_schedule (line 145) | def polynomial_lr_schedule( class PolyNomialLRScheduler (line 161) | class PolyNomialLRScheduler(LambdaLR): method __init__ (line 162) | def __init__( FILE: src/byprot/utils/optim.py function get_optimizer (line 15) | def get_optimizer(cfg, params): class AdamW (line 52) | class AdamW(torch.optim.AdamW): method step (line 54) | def step(self, closure=None): FILE: src/byprot/utils/protein/all_atom.py function to_atom37 (line 44) | def to_atom37(trans, rots): function torsion_angles_to_frames (line 53) | def torsion_angles_to_frames( function prot_to_torsion_angles (line 129) | def prot_to_torsion_angles(aatype, atom37, atom37_mask): function frames_to_atom14_pos (line 144) | def frames_to_atom14_pos( function compute_backbone (line 180) | def compute_backbone(bb_rigids, psi_torsions): function calculate_neighbor_angles (line 205) | def calculate_neighbor_angles(R_ac, R_ab): function vector_projection (line 230) | def vector_projection(R_ab, P_n): function transrot_to_atom37 (line 250) | def transrot_to_atom37(transrot_traj, res_mask): function atom37_from_trans_rot (line 270) | def atom37_from_trans_rot(trans, rots, res_mask): function process_trans_rot_traj (line 284) | def process_trans_rot_traj(trans_traj, rots_traj, res_mask): function adjust_oxygen_pos (line 294) | def adjust_oxygen_pos( FILE: src/byprot/utils/protein/evaluator_dplm2.py function load_from_pdb (line 53) | def load_from_pdb(pdb_path, process_chain=PdbDataset.process_chain): function load_pdb_by_name (line 60) | def load_pdb_by_name(pdb_name, metadata_df): class EvalRunner (line 70) | class EvalRunner: method __init__ (line 71) | def __init__(self, cfg: DictConfig): method load_metadata (line 122) | def load_metadata(self, cfg): method device_id (line 136) | def device_id(self): method device (line 142) | def device(self): method folding_model (line 148) | def folding_model(self): method struct_tokenizer (line 156) | def struct_tokenizer(self): method inference_dir (line 166) | def inference_dir(self): method setup_inference_dir (line 180) | def setup_inference_dir(self, ckpt_path): method run_detokenize_from_fasta (line 193) | def run_detokenize_from_fasta(self, fasta_path): method get_pdb_from_struct_fasta (line 252) | def get_pdb_from_struct_fasta(self, struct_fasta_path): method write_trajectory (line 263) | def write_trajectory(self, pdb_folder): method _run_struct_tokenizer (line 288) | def _run_struct_tokenizer(self, batch, output_dir, is_trajectory=False): method run_tokenize (line 307) | def run_tokenize(self, pdb_folder, output_dir): method evaluate_reconstruction (line 364) | def evaluate_reconstruction(self, pdb_folder, inplace_save=False): method evaluate_unconditional (line 419) | def evaluate_unconditional(self, pdb_folder, inplace_save=False): method evaluate_forward_folding (line 448) | def evaluate_forward_folding(self, pdb_folder, inplace_save=False): method evaluate_inverse_folding (line 489) | def evaluate_inverse_folding(self, fasta_path, inplace_save=False): method run_evaluation (line 555) | def run_evaluation(self, batch, eval_dir): method run_pmpnn (line 806) | def run_pmpnn( method compute_sample_metrics (line 830) | def compute_sample_metrics( method compute_unconditional_metrics (line 1016) | def compute_unconditional_metrics(self, output_dir): method compute_reconstruction_metrics (line 1051) | def compute_reconstruction_metrics(self, output_dir): method compute_forward_folding_metrics (line 1074) | def compute_forward_folding_metrics(self, output_dir): method compute_inverse_folding_metrics (line 1095) | def compute_inverse_folding_metrics(self, output_dir): function run (line 1123) | def run(cfg: DictConfig) -> None: FILE: src/byprot/utils/protein/folding_model.py class FoldingModel (line 25) | class FoldingModel: method __init__ (line 26) | def __init__(self, cfg, device_id=None): method device_id (line 34) | def device_id(self): method device (line 40) | def device(self): method fold_fasta (line 45) | def fold_fasta(self, fasta_path, output_dir): method _esmf_model (line 57) | def _esmf_model(self, fasta_path, output_dir): method _af2_model (line 86) | def _af2_model(self, fasta_path, output_dir): method run_pmpnn (line 141) | def run_pmpnn(self, input_dir, output_path): FILE: src/byprot/utils/protein/residue_constants.py function load_stereo_chemical_props (line 438) | def load_stereo_chemical_props() -> Tuple[ function sequence_to_onehot (line 887) | def sequence_to_onehot( function _make_standard_atom_mask (line 1040) | def _make_standard_atom_mask() -> np.ndarray: function chi_angle_atom (line 1058) | def chi_angle_atom(atom_index: int) -> np.ndarray: function _make_rigid_transformation_4x4 (line 1105) | def _make_rigid_transformation_4x4(ex, ey, translation): function _make_rigid_group_constants (line 1136) | def _make_rigid_group_constants(): function make_atom14_dists_bounds (line 1221) | def make_atom14_dists_bounds( FILE: src/byprot/utils/protein/tokenize_pdb.py function load_from_pdb (line 29) | def load_from_pdb(pdb_path, process_chain=PdbDataset.process_chain): function run_tokenize (line 37) | def run_tokenize(struct_tokenizer, input_pdb_folder, output_dir): function main (line 89) | def main(): FILE: src/byprot/utils/protein/utils.py class LengthDataset (line 45) | class LengthDataset(torch.utils.data.Dataset): method __init__ (line 46) | def __init__(self, samples_cfg): method __len__ (line 70) | def __len__(self): method __getitem__ (line 73) | def __getitem__(self, idx): function dataset_creation (line 87) | def dataset_creation(dataset_class, cfg, task): function get_available_device (line 101) | def get_available_device(num_device): function run_easy_cluster (line 105) | def run_easy_cluster(designable_dir, output_dir): function get_all_top_samples (line 138) | def get_all_top_samples(output_dir, csv_fname="*/*/top_sample.csv"): function calculate_diversity (line 149) | def calculate_diversity( function add_diversity_metrics (line 171) | def add_diversity_metrics(designable_dir, designable_csv, designable_csv... function calculate_pmpnn_consistency (line 178) | def calculate_pmpnn_consistency( function calculate_pmpnn_designability (line 211) | def calculate_pmpnn_designability( function get_pylogger (line 250) | def get_pylogger(name=__name__) -> logging.Logger: function get_ddp_info (line 272) | def get_ddp_info(): function flatten_dict (line 285) | def flatten_dict(raw_dict): function save_traj (line 296) | def save_traj( function get_dataset_cfg (line 384) | def get_dataset_cfg(cfg): function create_full_prot (line 399) | def create_full_prot( function write_prot_to_pdb (line 425) | def write_prot_to_pdb( function calc_distogram (line 490) | def calc_distogram(pos, min_bin, max_bin, num_bins): function get_index_embedding (line 500) | def get_index_embedding(indices, embed_size, max_len=2056): function get_time_embedding (line 522) | def get_time_embedding(timesteps, embedding_dim, max_positions=2000): function sinusoidal_encoding (line 540) | def sinusoidal_encoding(v, N, D): function distance (line 572) | def distance(p, eps=1e-10): function dist_from_ca (line 577) | def dist_from_ca(trans): function calc_rbf (line 593) | def calc_rbf(ca_dists, num_rbf, D_min=1e-3, D_max=22.0): function t_stratified_loss (line 602) | def t_stratified_loss(batch_t, batch_loss, num_bins=4, loss_name=None): function process_folded_outputs (line 624) | def process_folded_outputs(sample_path, folded_output, true_bb_pos=None): function extract_clusters_from_maxcluster_out (line 758) | def extract_clusters_from_maxcluster_out(file_path): function calc_mdtraj_metrics (line 797) | def calc_mdtraj_metrics(pdb_path): function calc_aatype_metrics (line 822) | def calc_aatype_metrics(generated_aatypes): function calc_ca_ca_metrics (line 881) | def calc_ca_ca_metrics(ca_pos, bond_tol=0.1, clash_tol=1.0): function calc_tm_score (line 900) | def calc_tm_score(pos_1, pos_2, seq_1, seq_2): FILE: src/byprot/utils/registry.py function get_module (line 14) | def get_module(group_name, module_name): function get_registered_modules (line 24) | def get_registered_modules(group_name): FILE: src/byprot/utils/scaffold_utils.py function get_intervals (line 192) | def get_intervals(list, single_res_domain=False): function get_motif_dplm (line 212) | def get_motif_dplm(pdb, ori_pdb): function get_motif_dplm2 (line 247) | def get_motif_dplm2(pdb_name, ori_pdb_name, motif_seq, mask_token, space... function prepare_data (line 278) | def prepare_data(pdb_path, alphabet, collator, num_seqs, device): function get_initial_dplm (line 300) | def get_initial_dplm(args, tokenizer, pdb, ori_pdb, device): function get_initial_dplm2 (line 395) | def get_initial_dplm2(args, aa_seq, struct_seq, tokenizer, pdb, ori_pdb,... function create_init_seq (line 410) | def create_init_seq(pdb, ori_pdb, aa_seq, struct_seq, tokenizer, args): function collate (line 511) | def collate(tokenizer, init_aa_seq, init_struct_seq, args, device): function create_idxs_list (line 567) | def create_idxs_list(pdb, tokenizer, batch, args): function create_batches (line 599) | def create_batches(batch, args): FILE: src/byprot/utils/strategies.py class CPUInitFSDPStrategy (line 28) | class CPUInitFSDPStrategy(FSDPStrategy): method _setup_model (line 30) | def _setup_model(self, model: Module) -> Module: FILE: test.py function main (line 25) | def main(config: DictConfig): FILE: train.py function main (line 51) | def main(config: DictConfig): FILE: vendor/openfold/openfold/config.py function set_inf (line 6) | def set_inf(c, inf): function enforce_config_constraints (line 14) | def enforce_config_constraints(config): function model_config (line 51) | def model_config( FILE: vendor/openfold/openfold/data/data_modules.py class OpenFoldSingleDataset (line 23) | class OpenFoldSingleDataset(torch.utils.data.Dataset): method __init__ (line 24) | def __init__(self, method _parse_mmcif (line 170) | def _parse_mmcif(self, path, file_id, chain_id, alignment_dir, alignme... method chain_id_to_idx (line 195) | def chain_id_to_idx(self, chain_id): method idx_to_chain_id (line 198) | def idx_to_chain_id(self, idx): method __getitem__ (line 201) | def __getitem__(self, idx): method __len__ (line 283) | def __len__(self): function deterministic_train_filter (line 287) | def deterministic_train_filter( function get_stochastic_train_filter_prob (line 310) | def get_stochastic_train_filter_prob( class OpenFoldDataset (line 331) | class OpenFoldDataset(torch.utils.data.Dataset): method __init__ (line 338) | def __init__(self, method __getitem__ (line 401) | def __getitem__(self, idx): method __len__ (line 405) | def __len__(self): method reroll (line 408) | def reroll(self): class OpenFoldBatchCollator (line 423) | class OpenFoldBatchCollator: method __call__ (line 424) | def __call__(self, prots): class OpenFoldDataLoader (line 429) | class OpenFoldDataLoader(torch.utils.data.DataLoader): method __init__ (line 430) | def __init__(self, *args, config, stage="train", generator=None, **kwa... method _prep_batch_properties_probs (line 437) | def _prep_batch_properties_probs(self): method _add_batch_properties (line 467) | def _add_batch_properties(self, batch): method __iter__ (line 503) | def __iter__(self): class OpenFoldDataModule (line 513) | class OpenFoldDataModule(pl.LightningDataModule): method __init__ (line 514) | def __init__(self, method setup (line 605) | def setup(self): method _gen_dataloader (line 688) | def _gen_dataloader(self, stage): method train_dataloader (line 720) | def train_dataloader(self): method val_dataloader (line 723) | def val_dataloader(self): method predict_dataloader (line 728) | def predict_dataloader(self): class DummyDataset (line 732) | class DummyDataset(torch.utils.data.Dataset): method __init__ (line 733) | def __init__(self, batch_path): method __getitem__ (line 737) | def __getitem__(self, idx): method __len__ (line 740) | def __len__(self): class DummyDataLoader (line 744) | class DummyDataLoader(pl.LightningDataModule): method __init__ (line 745) | def __init__(self, batch_path): method train_dataloader (line 749) | def train_dataloader(self): FILE: vendor/openfold/openfold/data/data_pipeline.py function empty_template_feats (line 33) | def empty_template_feats(n_res) -> FeatureDict: function make_template_features (line 43) | def make_template_features( function unify_template_features (line 70) | def unify_template_features( function make_sequence_features (line 115) | def make_sequence_features( function make_mmcif_features (line 137) | def make_mmcif_features( function _aatype_to_str_sequence (line 173) | def _aatype_to_str_sequence(aatype): function make_protein_features (line 180) | def make_protein_features( function make_pdb_features (line 210) | def make_pdb_features( function make_msa_features (line 228) | def make_msa_features( function make_dummy_msa_feats (line 265) | def make_dummy_msa_feats(input_sequence): function make_sequence_features_with_custom_template (line 276) | def make_sequence_features_with_custom_template( class AlignmentRunner (line 311) | class AlignmentRunner: method __init__ (line 313) | def __init__( method run (line 451) | def run( class DataPipeline (line 506) | class DataPipeline: method __init__ (line 508) | def __init__( method _parse_msa_data (line 514) | def _parse_msa_data( method _parse_template_hits (line 569) | def _parse_template_hits( method _get_msas (line 602) | def _get_msas(self, method _process_msa_feats (line 627) | def _process_msa_feats( method _process_seqemb_features (line 644) | def _process_seqemb_features(self, method process_fasta (line 659) | def process_fasta( method process_mmcif (line 706) | def process_mmcif( method process_pdb (line 748) | def process_pdb( method process_core (line 800) | def process_core( method process_multiseq_fasta (line 835) | def process_multiseq_fasta(self, FILE: vendor/openfold/openfold/data/data_transforms.py function cast_to_64bit_ints (line 43) | def cast_to_64bit_ints(protein): function make_one_hot (line 52) | def make_one_hot(x, num_classes): function make_seq_mask (line 58) | def make_seq_mask(protein): function make_template_mask (line 65) | def make_template_mask(protein): function curry1 (line 72) | def curry1(f): function make_all_atom_aatype (line 81) | def make_all_atom_aatype(protein): function fix_templates_aatype (line 86) | def fix_templates_aatype(protein): function correct_msa_restypes (line 105) | def correct_msa_restypes(protein): function squeeze_features (line 130) | def squeeze_features(protein): function randomly_replace_msa_with_unknown (line 162) | def randomly_replace_msa_with_unknown(protein, replace_proportion): function sample_msa (line 184) | def sample_msa(protein, max_seq, keep_extra, seed=None): function add_distillation_flag (line 215) | def add_distillation_flag(protein, distillation): function sample_msa_distillation (line 220) | def sample_msa_distillation(protein, max_seq): function crop_extra_msa (line 227) | def crop_extra_msa(protein, max_extra_msa): function delete_extra_msa (line 240) | def delete_extra_msa(protein): function block_delete_msa (line 249) | def block_delete_msa(protein, config): function nearest_neighbor_clusters (line 283) | def nearest_neighbor_clusters(protein, gap_agreement_weight=0.0): function unsorted_segment_sum (line 319) | def unsorted_segment_sum(data, segment_ids, num_segments): function summarize_clusters (line 347) | def summarize_clusters(protein): function make_msa_mask (line 372) | def make_msa_mask(protein): function pseudo_beta_fn (line 381) | def pseudo_beta_fn(aatype, all_atom_positions, all_atom_mask): function make_pseudo_beta (line 402) | def make_pseudo_beta(protein, prefix=""): function add_constant_field (line 417) | def add_constant_field(protein, key, value): function shaped_categorical (line 422) | def shaped_categorical(probs, epsilon=1e-10): function make_hhblits_profile (line 432) | def make_hhblits_profile(protein): function make_masked_msa (line 445) | def make_masked_msa(protein, config, replace_fraction): function make_fixed_size (line 489) | def make_fixed_size( function make_msa_feat (line 528) | def make_msa_feat(protein): function select_feat (line 579) | def select_feat(protein, feature_list): function crop_templates (line 584) | def crop_templates(protein, max_templates): function make_atom14_masks (line 591) | def make_atom14_masks(protein): function make_atom14_masks_np (line 665) | def make_atom14_masks_np(batch): function make_atom14_positions (line 676) | def make_atom14_positions(protein): function atom37_to_frames (line 779) | def atom37_to_frames(protein, eps=1e-8): function get_chi_atom_indices (line 918) | def get_chi_atom_indices(): function atom37_to_torsion_angles (line 946) | def atom37_to_torsion_angles( function get_backbone_frames (line 1114) | def get_backbone_frames(protein): function get_chi_angles (line 1124) | def get_chi_angles(protein): function random_crop_to_size (line 1135) | def random_crop_to_size( FILE: vendor/openfold/openfold/data/errors.py class Error (line 17) | class Error(Exception): class MultipleChainsError (line 21) | class MultipleChainsError(Error): FILE: vendor/openfold/openfold/data/feature_pipeline.py function np_to_tensor_dict (line 30) | def np_to_tensor_dict( function make_data_config (line 53) | def make_data_config( function np_example_to_features (line 79) | def np_example_to_features( class FeaturePipeline (line 121) | class FeaturePipeline: method __init__ (line 122) | def __init__( method process_features (line 128) | def process_features( FILE: vendor/openfold/openfold/data/input_pipeline.py function nonensembled_transform_fns (line 23) | def nonensembled_transform_fns(common_cfg, mode_cfg): function ensembled_transform_fns (line 70) | def ensembled_transform_fns(common_cfg, mode_cfg, ensemble_seed): function process_tensors_from_config (line 153) | def process_tensors_from_config(tensors, common_cfg, mode_cfg): function compose (line 194) | def compose(x, fs): function map_fn (line 200) | def map_fn(fun, x): FILE: vendor/openfold/openfold/data/mmcif_parsing.py class Monomer (line 42) | class Monomer: class AtomSite (line 50) | class AtomSite: class ResiduePosition (line 63) | class ResiduePosition: class ResidueAtPosition (line 70) | class ResidueAtPosition: class MmcifObject (line 78) | class MmcifObject: class ParsingResult (line 104) | class ParsingResult: class ParseError (line 117) | class ParseError(Exception): function mmcif_loop_to_list (line 121) | def mmcif_loop_to_list( function mmcif_loop_to_dict (line 153) | def mmcif_loop_to_dict( function parse (line 176) | def parse( function _get_first_model (line 306) | def _get_first_model(structure: PdbStructure) -> PdbStructure: function get_release_date (line 314) | def get_release_date(parsed_info: MmCIFDict) -> str: function _get_header (line 320) | def _get_header(parsed_info: MmCIFDict) -> PdbHeader: function _get_atom_site_list (line 356) | def _get_atom_site_list(parsed_info: MmCIFDict) -> Sequence[AtomSite]: function _get_protein_chains (line 373) | def _get_protein_chains( function _is_set (line 427) | def _is_set(data: str) -> bool: function get_atom_coords (line 432) | def get_atom_coords( FILE: vendor/openfold/openfold/data/parsers.py class TemplateHit (line 28) | class TemplateHit: function parse_fasta (line 41) | def parse_fasta(fasta_string: str) -> Tuple[Sequence[str], Sequence[str]]: function parse_stockholm (line 72) | def parse_stockholm( function parse_a3m (line 132) | def parse_a3m(a3m_string: str) -> Tuple[Sequence[str], DeletionMatrix]: function _convert_sto_seq_to_a3m (line 166) | def _convert_sto_seq_to_a3m( function convert_stockholm_to_a3m (line 176) | def convert_stockholm_to_a3m( function _get_hhr_line_regex_groups (line 230) | def _get_hhr_line_regex_groups( function _update_hhr_residue_indices_list (line 239) | def _update_hhr_residue_indices_list( function _parse_hhr_hit (line 252) | def _parse_hhr_hit(detailed_lines: Sequence[str]) -> TemplateHit: function parse_hhr (line 358) | def parse_hhr(hhr_string: str) -> Sequence[TemplateHit]: function parse_e_values_from_tblout (line 378) | def parse_e_values_from_tblout(tblout: str) -> Dict[str, float]: FILE: vendor/openfold/openfold/data/templates.py class NoChainsError (line 35) | class NoChainsError(Error): class SequenceNotInTemplateError (line 39) | class SequenceNotInTemplateError(Error): class NoAtomDataInTemplateError (line 43) | class NoAtomDataInTemplateError(Error): class TemplateAtomMaskAllZerosError (line 47) | class TemplateAtomMaskAllZerosError(Error): class QueryToTemplateAlignError (line 51) | class QueryToTemplateAlignError(Error): class CaDistanceError (line 55) | class CaDistanceError(Error): class PrefilterError (line 60) | class PrefilterError(Exception): class DateError (line 64) | class DateError(PrefilterError): class PdbIdError (line 68) | class PdbIdError(PrefilterError): class AlignRatioError (line 72) | class AlignRatioError(PrefilterError): class DuplicateError (line 76) | class DuplicateError(PrefilterError): class LengthError (line 80) | class LengthError(PrefilterError): function _get_pdb_id_and_chain (line 94) | def _get_pdb_id_and_chain(hit: parsers.TemplateHit) -> Tuple[str, str]: function _is_after_cutoff (line 104) | def _is_after_cutoff( function _replace_obsolete_references (line 133) | def _replace_obsolete_references(obsolete_mapping) -> Mapping[str, str]: function _parse_obsolete (line 149) | def _parse_obsolete(obsolete_file_path: str) -> Mapping[str, str]: function generate_release_dates_cache (line 165) | def generate_release_dates_cache(mmcif_dir: str, out_path: str): function _parse_release_dates (line 190) | def _parse_release_dates(path: str) -> Mapping[str, datetime.datetime]: function _assess_hhsearch_hit (line 203) | def _assess_hhsearch_hit( function _find_template_in_pdb (line 282) | def _find_template_in_pdb( function _realign_pdb_template_to_query (line 356) | def _realign_pdb_template_to_query( function _check_residue_distances (line 494) | def _check_residue_distances( function _get_atom_positions (line 518) | def _get_atom_positions( function _extract_template_features (line 537) | def _extract_template_features( function _build_query_to_hit_index_mapping (line 697) | def _build_query_to_hit_index_mapping( class PrefilterResult (line 757) | class PrefilterResult: class SingleHitResult (line 763) | class SingleHitResult: function _prefilter_hit (line 769) | def _prefilter_hit( function _process_single_hit (line 811) | def _process_single_hit( function get_custom_template_features (line 932) | def get_custom_template_features( class TemplateSearchResult (line 983) | class TemplateSearchResult: class TemplateHitFeaturizer (line 989) | class TemplateHitFeaturizer: method __init__ (line 991) | def __init__( method get_templates (line 1062) | def get_templates( FILE: vendor/openfold/openfold/data/tools/hhblits.py class HHBlits (line 30) | class HHBlits: method __init__ (line 33) | def __init__( method query (line 102) | def query(self, input_fasta_path: str) -> Mapping[str, Any]: FILE: vendor/openfold/openfold/data/tools/hhsearch.py class HHSearch (line 26) | class HHSearch: method __init__ (line 29) | def __init__( method query (line 65) | def query(self, a3m: str) -> str: FILE: vendor/openfold/openfold/data/tools/jackhmmer.py class Jackhmmer (line 29) | class Jackhmmer: method __init__ (line 32) | def __init__( method _query_chunk (line 95) | def _query_chunk( method query (line 183) | def query(self, input_fasta_path: str) -> Sequence[Mapping[str, Any]]: FILE: vendor/openfold/openfold/data/tools/kalign.py function _to_a3m (line 26) | def _to_a3m(sequences: Sequence[str]) -> str: class Kalign (line 36) | class Kalign: method __init__ (line 39) | def __init__(self, *, binary_path: str): method align (line 50) | def align(self, sequences: Sequence[str]) -> str: FILE: vendor/openfold/openfold/data/tools/utils.py function tmpdir_manager (line 27) | def tmpdir_manager(base_dir: Optional[str] = None): function timing (line 37) | def timing(msg: str): function to_date (line 45) | def to_date(s: str): FILE: vendor/openfold/openfold/model/dropout.py class Dropout (line 22) | class Dropout(nn.Module): method __init__ (line 30) | def __init__(self, r: float, batch_dim: Union[int, List[int]]): method forward (line 46) | def forward(self, x: torch.Tensor) -> torch.Tensor: class DropoutRowwise (line 63) | class DropoutRowwise(Dropout): class DropoutColumnwise (line 72) | class DropoutColumnwise(Dropout): FILE: vendor/openfold/openfold/model/embedders.py class InputEmbedder (line 24) | class InputEmbedder(nn.Module): method __init__ (line 31) | def __init__( method relpos (line 71) | def relpos(self, ri: torch.Tensor): method forward (line 93) | def forward( class PreembeddingEmbedder (line 142) | class PreembeddingEmbedder(nn.Module): method __init__ (line 147) | def __init__( method relpos (line 187) | def relpos(self, ri: torch.Tensor): method forward (line 209) | def forward( class RecyclingEmbedder (line 236) | class RecyclingEmbedder(nn.Module): method __init__ (line 242) | def __init__( method forward (line 278) | def forward( class TemplateAngleEmbedder (line 338) | class TemplateAngleEmbedder(nn.Module): method __init__ (line 345) | def __init__( method forward (line 367) | def forward(self, x: torch.Tensor) -> torch.Tensor: class TemplatePairEmbedder (line 381) | class TemplatePairEmbedder(nn.Module): method __init__ (line 388) | def __init__( method forward (line 409) | def forward( class ExtraMSAEmbedder (line 425) | class ExtraMSAEmbedder(nn.Module): method __init__ (line 431) | def __init__( method forward (line 451) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: vendor/openfold/openfold/model/evoformer.py class MSATransition (line 45) | class MSATransition(nn.Module): method __init__ (line 51) | def __init__(self, c_m, n): method _transition (line 70) | def _transition(self, m, mask): method _chunk (line 78) | def _chunk(self, method forward (line 91) | def forward( class EvoformerBlockCore (line 121) | class EvoformerBlockCore(nn.Module): method __init__ (line 122) | def __init__( method forward (line 179) | def forward(self, class EvoformerBlock (line 313) | class EvoformerBlock(nn.Module): method __init__ (line 314) | def __init__(self, method forward (line 366) | def forward(self, class ExtraMSABlock (line 438) | class ExtraMSABlock(nn.Module): method __init__ (line 445) | def __init__(self, method forward (line 497) | def forward(self, class EvoformerStack (line 581) | class EvoformerStack(nn.Module): method __init__ (line 588) | def __init__( method _prep_blocks (line 684) | def _prep_blocks(self, method _forward_offload (line 735) | def _forward_offload(self, method forward (line 776) | def forward(self, class ExtraMSAStack (line 839) | class ExtraMSAStack(nn.Module): method __init__ (line 843) | def __init__(self, method _prep_blocks (line 892) | def _prep_blocks(self, method _forward_offload (line 941) | def _forward_offload(self, method forward (line 976) | def forward(self, FILE: vendor/openfold/openfold/model/heads.py class AuxiliaryHeads (line 28) | class AuxiliaryHeads(nn.Module): method __init__ (line 29) | def __init__(self, config): method forward (line 55) | def forward(self, outputs): class PerResidueLDDTCaPredictor (line 92) | class PerResidueLDDTCaPredictor(nn.Module): method __init__ (line 93) | def __init__(self, no_bins, c_in, c_hidden): method forward (line 108) | def forward(self, s): class DistogramHead (line 119) | class DistogramHead(nn.Module): method __init__ (line 126) | def __init__(self, c_z, no_bins, **kwargs): method _forward (line 141) | def _forward(self, z): # [*, N, N, C_z] method forward (line 154) | def forward(self, z): class TMScoreHead (line 162) | class TMScoreHead(nn.Module): method __init__ (line 167) | def __init__(self, c_z, no_bins, **kwargs): method forward (line 182) | def forward(self, z): class MaskedMSAHead (line 195) | class MaskedMSAHead(nn.Module): method __init__ (line 200) | def __init__(self, c_m, c_out, **kwargs): method forward (line 215) | def forward(self, m): class ExperimentallyResolvedHead (line 228) | class ExperimentallyResolvedHead(nn.Module): method __init__ (line 234) | def __init__(self, c_s, c_out, **kwargs): method forward (line 249) | def forward(self, s): FILE: vendor/openfold/openfold/model/model.py class AlphaFold (line 56) | class AlphaFold(nn.Module): method __init__ (line 63) | def __init__(self, config): method embed_templates (line 124) | def embed_templates(self, batch, z, pair_mask, templ_dim, inplace_safe): method iteration (line 224) | def iteration(self, feats, prevs, _recycle=True): method forward (line 458) | def forward(self, batch): FILE: vendor/openfold/openfold/model/msa.py class MSAAttention (line 36) | class MSAAttention(nn.Module): method __init__ (line 37) | def __init__( method _chunk (line 90) | def _chunk(self, method _prep_inputs (line 128) | def _prep_inputs(self, method _chunked_msa_attn (line 170) | def _chunked_msa_attn(self, method forward (line 218) | def forward(self, class MSARowAttentionWithPairBias (line 290) | class MSARowAttentionWithPairBias(MSAAttention): method __init__ (line 295) | def __init__(self, c_m, c_z, c_hidden, no_heads, inf=1e9): class MSAColumnAttention (line 319) | class MSAColumnAttention(nn.Module): method __init__ (line 327) | def __init__(self, c_m, c_hidden, no_heads, inf=1e9): method forward (line 355) | def forward(self, class MSAColumnGlobalAttention (line 394) | class MSAColumnGlobalAttention(nn.Module): method __init__ (line 395) | def __init__( method _chunk (line 417) | def _chunk(self, method forward (line 439) | def forward( FILE: vendor/openfold/openfold/model/outer_product_mean.py class OuterProductMean (line 27) | class OuterProductMean(nn.Module): method __init__ (line 32) | def __init__(self, c_m, c_z, c_hidden, eps=1e-3): method _opm (line 54) | def _opm(self, a, b): method _chunk (line 67) | def _chunk(self, method _forward (line 97) | def _forward(self, method forward (line 148) | def forward(self, FILE: vendor/openfold/openfold/model/pair_transition.py class PairTransition (line 24) | class PairTransition(nn.Module): method __init__ (line 29) | def __init__(self, c_z, n): method _transition (line 48) | def _transition(self, z, mask): method _chunk (line 63) | def _chunk(self, method forward (line 75) | def forward(self, FILE: vendor/openfold/openfold/model/primitives.py function _prod (line 49) | def _prod(nums): function _calculate_fan (line 56) | def _calculate_fan(linear_weight_shape, fan="fan_in"): function trunc_normal_init_ (line 71) | def trunc_normal_init_(weights, scale=1.0, fan="fan_in"): function lecun_normal_init_ (line 85) | def lecun_normal_init_(weights): function he_normal_init_ (line 89) | def he_normal_init_(weights): function glorot_uniform_init_ (line 93) | def glorot_uniform_init_(weights): function final_init_ (line 97) | def final_init_(weights): function gating_init_ (line 102) | def gating_init_(weights): function normal_init_ (line 107) | def normal_init_(weights): function ipa_point_weights_init_ (line 111) | def ipa_point_weights_init_(weights): class Linear (line 117) | class Linear(nn.Linear): method __init__ (line 126) | def __init__( class LayerNorm (line 185) | class LayerNorm(nn.Module): method __init__ (line 186) | def __init__(self, c_in, eps=1e-5): method forward (line 195) | def forward(self, x): function softmax_no_cast (line 224) | def softmax_no_cast(t: torch.Tensor, dim: int = -1) -> torch.Tensor: function _attention (line 245) | def _attention(query: torch.Tensor, key: torch.Tensor, value: torch.Tens... function _attention_chunked_trainable (line 264) | def _attention_chunked_trainable( class Attention (line 318) | class Attention(nn.Module): method __init__ (line 323) | def __init__( method _prep_qkv (line 380) | def _prep_qkv(self, method _wrap_up (line 405) | def _wrap_up(self, method forward (line 424) | def forward( class GlobalAttention (line 514) | class GlobalAttention(nn.Module): method __init__ (line 515) | def __init__(self, c_in, c_hidden, no_heads, inf, eps): method forward (line 539) | def forward(self, function _lma (line 603) | def _lma( function _flash_attn (line 666) | def _flash_attn(q, k, v, kv_mask): FILE: vendor/openfold/openfold/model/structure_module.py class AngleResnetBlock (line 47) | class AngleResnetBlock(nn.Module): method __init__ (line 48) | def __init__(self, c_hidden): method forward (line 63) | def forward(self, a: torch.Tensor) -> torch.Tensor: class AngleResnet (line 75) | class AngleResnet(nn.Module): method __init__ (line 80) | def __init__(self, c_in, c_hidden, no_blocks, no_angles, epsilon): method forward (line 114) | def forward( class InvariantPointAttention (line 161) | class InvariantPointAttention(nn.Module): method __init__ (line 165) | def __init__( method forward (line 231) | def forward( class BackboneUpdate (line 434) | class BackboneUpdate(nn.Module): method __init__ (line 439) | def __init__(self, c_s): method forward (line 451) | def forward(self, s: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: class StructureModuleTransitionLayer (line 464) | class StructureModuleTransitionLayer(nn.Module): method __init__ (line 465) | def __init__(self, c): method forward (line 476) | def forward(self, s): class StructureModuleTransition (line 489) | class StructureModuleTransition(nn.Module): method __init__ (line 490) | def __init__(self, c, num_layers, dropout_rate): method forward (line 505) | def forward(self, s): class StructureModule (line 515) | class StructureModule(nn.Module): method __init__ (line 516) | def __init__( method forward (line 628) | def forward( method _init_residue_constants (line 757) | def _init_residue_constants(self, float_dtype, device): method torsion_angles_to_frames (line 802) | def torsion_angles_to_frames(self, r, alpha, f): method frames_and_literature_positions_to_atom14_pos (line 808) | def frames_and_literature_positions_to_atom14_pos( FILE: vendor/openfold/openfold/model/template.py class TemplatePointwiseAttention (line 54) | class TemplatePointwiseAttention(nn.Module): method __init__ (line 58) | def __init__(self, c_t, c_z, c_hidden, no_heads, inf, **kwargs): method _chunk (line 85) | def _chunk(self, method forward (line 105) | def forward(self, class TemplatePairStackBlock (line 148) | class TemplatePairStackBlock(nn.Module): method __init__ (line 149) | def __init__( method forward (line 200) | def forward(self, class TemplatePairStack (line 293) | class TemplatePairStack(nn.Module): method __init__ (line 297) | def __init__( method forward (line 353) | def forward( function embed_templates_offload (line 413) | def embed_templates_offload( function embed_templates_average (line 522) | def embed_templates_average( FILE: vendor/openfold/openfold/model/torchscript.py function script_preset_ (line 51) | def script_preset_(model: torch.nn.Module): function _get_module_device (line 75) | def _get_module_device(module: torch.nn.Module) -> torch.device: function _trace_module (line 88) | def _trace_module(module, batch_dims=None): function _script_submodules_helper_ (line 149) | def _script_submodules_helper_( function _trace_submodules_ (line 170) | def _trace_submodules_( function script_submodules_ (line 183) | def script_submodules_( FILE: vendor/openfold/openfold/model/triangular_attention.py class TriangleAttention (line 31) | class TriangleAttention(nn.Module): method __init__ (line 32) | def __init__( method _chunk (line 61) | def _chunk(self, method forward (line 88) | def forward(self, class TriangleAttentionEndingNode (line 155) | class TriangleAttentionEndingNode(TriangleAttention): FILE: vendor/openfold/openfold/model/triangular_multiplicative_update.py class TriangleMultiplicativeUpdate (line 28) | class TriangleMultiplicativeUpdate(nn.Module): method __init__ (line 32) | def __init__(self, c_z, c_hidden, _outgoing=True): method _combine_projections (line 57) | def _combine_projections(self, method _inference_forward (line 87) | def _inference_forward(self, method forward (line 358) | def forward(self, class TriangleMultiplicationOutgoing (line 419) | class TriangleMultiplicationOutgoing(TriangleMultiplicativeUpdate): class TriangleMultiplicationIncoming (line 426) | class TriangleMultiplicationIncoming(TriangleMultiplicativeUpdate): FILE: vendor/openfold/openfold/np/protein.py class Protein (line 40) | class Protein: function from_pdb_string (line 77) | def from_pdb_string(pdb_str: str, chain_id: Optional[str] = None) -> Pro... function from_proteinnet_string (line 174) | def from_proteinnet_string(proteinnet_str: str) -> Protein: function get_pdb_headers (line 227) | def get_pdb_headers(prot: Protein, chain_id: int = 0) -> Sequence[str]: function add_pdb_headers (line 249) | def add_pdb_headers(prot: Protein, pdb_str: str) -> str: function to_pdb (line 299) | def to_pdb(prot: Protein) -> str: function to_modelcif (line 394) | def to_modelcif(prot: Protein) -> str: function ideal_atom_mask (line 522) | def ideal_atom_mask(prot: Protein) -> np.ndarray: function from_prediction (line 538) | def from_prediction( FILE: vendor/openfold/openfold/np/relax/amber_minimize.py function will_restrain (line 40) | def will_restrain(atom: openmm_app.Atom, rset: str) -> bool: function _add_restraints (line 49) | def _add_restraints( function _openmm_minimize (line 79) | def _openmm_minimize( function _get_pdb_string (line 118) | def _get_pdb_string(topology: openmm_app.Topology, positions: unit.Quant... function _check_cleaned_atoms (line 125) | def _check_cleaned_atoms(pdb_cleaned_string: str, pdb_ref_string: str): function _check_residues_are_well_defined (line 149) | def _check_residues_are_well_defined(prot: protein.Protein): function _check_atom_mask_is_ideal (line 159) | def _check_atom_mask_is_ideal(prot): function clean_protein (line 166) | def clean_protein(prot: protein.Protein, checks: bool = True): function make_atom14_positions (line 203) | def make_atom14_positions(prot): function find_violations (line 359) | def find_violations(prot_np: protein.Protein): function get_violation_metrics (line 398) | def get_violation_metrics(prot: protein.Protein): function _run_one_iteration (line 411) | def _run_one_iteration( function run_pipeline (line 474) | def run_pipeline( function get_initial_energies (line 568) | def get_initial_energies( FILE: vendor/openfold/openfold/np/relax/cleanup.py function fix_pdb (line 27) | def fix_pdb(pdbfile, alterations_info): function clean_structure (line 64) | def clean_structure(pdb_structure, alterations_info): function _remove_heterogens (line 75) | def _remove_heterogens(fixer, alterations_info, keep_water): function _replace_met_se (line 97) | def _replace_met_se(pdb_structure, alterations_info): function _remove_chains_of_length_one (line 111) | def _remove_chains_of_length_one(pdb_structure, alterations_info): FILE: vendor/openfold/openfold/np/relax/relax.py class AmberRelaxation (line 23) | class AmberRelaxation(object): method __init__ (line 25) | def __init__( method process (line 59) | def process( FILE: vendor/openfold/openfold/np/relax/utils.py function overwrite_pdb_coordinates (line 25) | def overwrite_pdb_coordinates(pdb_str: str, pos) -> str: function overwrite_b_factors (line 34) | def overwrite_b_factors(pdb_str: str, bfactors: np.ndarray) -> str: function assert_equal_nonterminal_atom_types (line 76) | def assert_equal_nonterminal_atom_types( FILE: vendor/openfold/openfold/np/residue_constants.py function load_stereo_chemical_props (line 441) | def load_stereo_chemical_props() -> Tuple[ function sequence_to_onehot (line 886) | def sequence_to_onehot( function _make_standard_atom_mask (line 1039) | def _make_standard_atom_mask() -> np.ndarray: function chi_angle_atom (line 1057) | def chi_angle_atom(atom_index: int) -> np.ndarray: function _make_rigid_transformation_4x4 (line 1104) | def _make_rigid_transformation_4x4(ex, ey, translation): function _make_rigid_group_constants (line 1135) | def _make_rigid_group_constants(): function make_atom14_dists_bounds (line 1220) | def make_atom14_dists_bounds( function _make_atom14_ambiguity_feats (line 1289) | def _make_atom14_ambiguity_feats(): function aatype_to_str_sequence (line 1308) | def aatype_to_str_sequence(aatype): FILE: vendor/openfold/openfold/utils/argparse.py class ArgparseAlphabetizer (line 4) | class ArgparseAlphabetizer(HelpFormatter): method sort_actions (line 10) | def sort_actions(actions): method add_arguments (line 14) | def add_arguments(self, actions): method add_usage (line 19) | def add_usage(self, usage, actions, groups, prefix=None): function remove_arguments (line 25) | def remove_arguments(parser, args): FILE: vendor/openfold/openfold/utils/callbacks.py class EarlyStoppingVerbose (line 4) | class EarlyStoppingVerbose(EarlyStopping): method _evalute_stopping_criteria (line 9) | def _evalute_stopping_criteria(self, *args, **kwargs): FILE: vendor/openfold/openfold/utils/checkpointing.py function get_checkpoint_fn (line 29) | def get_checkpoint_fn(): function checkpoint_blocks (line 43) | def checkpoint_blocks( FILE: vendor/openfold/openfold/utils/chunk_utils.py function _fetch_dims (line 27) | def _fetch_dims(tree): function _flat_idx_to_idx (line 45) | def _flat_idx_to_idx( function _get_minimal_slice_set (line 58) | def _get_minimal_slice_set( function _chunk_slice (line 176) | def _chunk_slice( function chunk_layer (line 212) | def chunk_layer( class ChunkSizeTuner (line 342) | class ChunkSizeTuner: method __init__ (line 343) | def __init__(self, method _determine_favorable_chunk_size (line 352) | def _determine_favorable_chunk_size(self, fn, args, min_chunk_size): method _compare_arg_caches (line 383) | def _compare_arg_caches(self, ac1, ac2): method tune_chunk_size (line 402) | def tune_chunk_size(self, FILE: vendor/openfold/openfold/utils/exponential_moving_average.py class ExponentialMovingAverage (line 9) | class ExponentialMovingAverage: method __init__ (line 21) | def __init__(self, model: nn.Module, decay: float): method to (line 37) | def to(self, device): method _update_state_dict_ (line 41) | def _update_state_dict_(self, update, state_dict): method update (line 52) | def update(self, model: torch.nn.Module) -> None: method load_state_dict (line 60) | def load_state_dict(self, state_dict: OrderedDict) -> None: method state_dict (line 65) | def state_dict(self) -> OrderedDict: FILE: vendor/openfold/openfold/utils/feats.py function pseudo_beta_fn (line 34) | def pseudo_beta_fn(aatype, all_atom_positions, all_atom_masks): function atom14_to_atom37 (line 55) | def atom14_to_atom37(atom14, batch): function build_template_angle_feat (line 68) | def build_template_angle_feat(template_feats): function build_template_pair_feat (line 92) | def build_template_pair_feat( function build_extra_msa_feat (line 162) | def build_extra_msa_feat(batch): function torsion_angles_to_frames (line 172) | def torsion_angles_to_frames( function frames_and_literature_positions_to_atom14_pos (line 238) | def frames_and_literature_positions_to_atom14_pos( FILE: vendor/openfold/openfold/utils/import_weights.py class ParamType (line 28) | class ParamType(Enum): method __init__ (line 44) | def __init__(self, fn): class Param (line 49) | class Param: function process_translation_dict (line 55) | def process_translation_dict(d, top_layer=True): function stacked (line 74) | def stacked(param_dict_list, out=None): function assign (line 103) | def assign(translation_dict, orig_weights): function generate_translation_dict (line 125) | def generate_translation_dict(model, version): function import_jax_weights_ (line 435) | def import_jax_weights_(model, npz_path, version="model_1"): FILE: vendor/openfold/openfold/utils/kernel/attention_core.py class AttentionCoreFunction (line 26) | class AttentionCoreFunction(torch.autograd.Function): method forward (line 28) | def forward(ctx, q, k, v, bias_1=None, bias_2=None): method backward (line 62) | def backward(ctx, grad_output): FILE: vendor/openfold/openfold/utils/kernel/csrc/softmax_cuda.cpp function PYBIND11_MODULE (line 33) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: vendor/openfold/openfold/utils/kernel/csrc/softmax_cuda_stub.cpp function attn_softmax_inplace_forward_ (line 19) | void attn_softmax_inplace_forward_( function attn_softmax_inplace_backward_ (line 26) | void attn_softmax_inplace_backward_( FILE: vendor/openfold/openfold/utils/logger.py function is_main_process (line 25) | def is_main_process(): class PerformanceLoggingCallback (line 29) | class PerformanceLoggingCallback(Callback): method __init__ (line 30) | def __init__(self, log_file, global_batch_size, warmup_steps: int = 0,... method do_step (line 38) | def do_step(self): method on_train_batch_start (line 45) | def on_train_batch_start(self, trainer, pl_module, batch, batch_idx, d... method on_test_batch_start (line 48) | def on_test_batch_start(self, trainer, pl_module, batch, batch_idx, da... method process_performance_stats (line 51) | def process_performance_stats(self, deltas): method _log (line 66) | def _log(self): method on_train_end (line 74) | def on_train_end(self, trainer, pl_module): method on_epoch_end (line 79) | def on_epoch_end(self, trainer, pl_module): FILE: vendor/openfold/openfold/utils/loss.py function softmax_cross_entropy (line 37) | def softmax_cross_entropy(logits, labels): function sigmoid_cross_entropy (line 45) | def sigmoid_cross_entropy(logits, labels): function torsion_angle_loss (line 58) | def torsion_angle_loss( function compute_fape (line 82) | def compute_fape( function backbone_loss (line 156) | def backbone_loss( function sidechain_loss (line 214) | def sidechain_loss( function fape_loss (line 264) | def fape_loss( function supervised_chi_loss (line 288) | def supervised_chi_loss( function compute_plddt (line 374) | def compute_plddt(logits: torch.Tensor) -> torch.Tensor: function lddt (line 388) | def lddt( function lddt_ca (line 444) | def lddt_ca( function lddt_loss (line 467) | def lddt_loss( function distogram_loss (line 519) | def distogram_loss( function _calculate_bin_centers (line 567) | def _calculate_bin_centers(boundaries: torch.Tensor): function _calculate_expected_aligned_error (line 576) | def _calculate_expected_aligned_error( function compute_predicted_aligned_error (line 587) | def compute_predicted_aligned_error( function compute_tm (line 627) | def compute_tm( function tm_loss (line 661) | def tm_loss( function between_residue_bond_loss (line 718) | def between_residue_bond_loss( function between_residue_clash_loss (line 877) | def between_residue_clash_loss( function within_residue_violations (line 1024) | def within_residue_violations( function find_structural_violations (line 1111) | def find_structural_violations( function find_structural_violations_np (line 1224) | def find_structural_violations_np( function extreme_ca_ca_distance_violations (line 1241) | def extreme_ca_ca_distance_violations( function compute_violation_metrics (line 1278) | def compute_violation_metrics( function compute_violation_metrics_np (line 1321) | def compute_violation_metrics_np( function violation_loss (line 1337) | def violation_loss( function compute_renamed_ground_truth (line 1362) | def compute_renamed_ground_truth( function experimentally_resolved_loss (line 1470) | def experimentally_resolved_loss( function masked_msa_loss (line 1494) | def masked_msa_loss(logits, true_msa, bert_mask, eps=1e-8, **kwargs): class AlphaFoldLoss (line 1527) | class AlphaFoldLoss(nn.Module): method __init__ (line 1529) | def __init__(self, config): method forward (line 1533) | def forward(self, out, batch, _return_breakdown=False): FILE: vendor/openfold/openfold/utils/lr_schedulers.py class AlphaFoldLRScheduler (line 4) | class AlphaFoldLRScheduler(torch.optim.lr_scheduler._LRScheduler): method __init__ (line 13) | def __init__(self, method state_dict (line 54) | def state_dict(self): method load_state_dict (line 61) | def load_state_dict(self, state_dict): method get_lr (line 64) | def get_lr(self): FILE: vendor/openfold/openfold/utils/precision_utils.py function is_fp16_enabled (line 18) | def is_fp16_enabled(): FILE: vendor/openfold/openfold/utils/rigid_utils.py function rot_matmul (line 24) | def rot_matmul( function rot_vec_mul (line 64) | def rot_vec_mul( function identity_rot_mats (line 89) | def identity_rot_mats( function identity_trans (line 106) | def identity_trans( function identity_quats (line 122) | def identity_quats( function _to_mat (line 146) | def _to_mat(pairs): function quat_to_rot (line 168) | def quat_to_rot(quat: torch.Tensor) -> torch.Tensor: function rot_to_quat (line 191) | def rot_to_quat( function _get_quat (line 243) | def _get_quat(quat_key, dtype, device): function quat_multiply (line 247) | def quat_multiply(quat1, quat2): function quat_multiply_by_vec (line 259) | def quat_multiply_by_vec(quat, vec): function invert_rot_mat (line 271) | def invert_rot_mat(rot_mat: torch.Tensor): function invert_quat (line 275) | def invert_quat(quat: torch.Tensor): class Rotation (line 282) | class Rotation: method __init__ (line 292) | def __init__(self, method identity (line 331) | def identity( method __getitem__ (line 371) | def __getitem__(self, index: Any) -> Rotation: method __mul__ (line 394) | def __mul__(self, method __rmul__ (line 419) | def __rmul__(self, method shape (line 436) | def shape(self) -> torch.Size: method dtype (line 456) | def dtype(self) -> torch.dtype: method device (line 471) | def device(self) -> torch.device: method requires_grad (line 486) | def requires_grad(self) -> bool: method get_rot_mats (line 500) | def get_rot_mats(self) -> torch.Tensor: method get_quats (line 516) | def get_quats(self) -> torch.Tensor: method get_cur_rot (line 535) | def get_cur_rot(self) -> torch.Tensor: method compose_q_update_vec (line 551) | def compose_q_update_vec(self, method compose_r (line 578) | def compose_r(self, r: Rotation) -> Rotation: method compose_q (line 594) | def compose_q(self, r: Rotation, normalize_quats: bool = True) -> Rota... method apply (line 615) | def apply(self, pts: torch.Tensor) -> torch.Tensor: method invert_apply (line 629) | def invert_apply(self, pts: torch.Tensor) -> torch.Tensor: method invert (line 643) | def invert(self) -> Rotation: method unsqueeze (line 666) | def unsqueeze(self, method cat (line 691) | def cat( method map_tensor_fn (line 716) | def map_tensor_fn(self, method cuda (line 745) | def cuda(self) -> Rotation: method to (line 763) | def to(self, method detach (line 792) | def detach(self) -> Rotation: class Rigid (line 813) | class Rigid: method __init__ (line 820) | def __init__(self, method identity (line 865) | def identity( method __getitem__ (line 892) | def __getitem__(self, method __mul__ (line 923) | def __mul__(self, method __rmul__ (line 944) | def __rmul__(self, method shape (line 960) | def shape(self) -> torch.Size: method device (line 972) | def device(self) -> torch.device: method get_rots (line 981) | def get_rots(self) -> Rotation: method get_trans (line 990) | def get_trans(self) -> torch.Tensor: method compose_q_update_vec (line 999) | def compose_q_update_vec(self, method compose (line 1021) | def compose(self, method apply (line 1037) | def apply(self, method invert_apply (line 1051) | def invert_apply(self, method invert (line 1065) | def invert(self) -> Rigid: method map_tensor_fn (line 1077) | def map_tensor_fn(self, method to_tensor_4x4 (line 1099) | def to_tensor_4x4(self) -> torch.Tensor: method from_tensor_4x4 (line 1113) | def from_tensor_4x4( method to_tensor_7 (line 1133) | def to_tensor_7(self) -> torch.Tensor: method from_tensor_7 (line 1148) | def from_tensor_7( method from_3_points (line 1166) | def from_3_points( method unsqueeze (line 1210) | def unsqueeze(self, method cat (line 1230) | def cat( method apply_rot_fn (line 1253) | def apply_rot_fn(self, fn: Callable[Rotation, Rotation]) -> Rigid: method apply_trans_fn (line 1265) | def apply_trans_fn(self, fn: Callable[torch.Tensor, torch.Tensor]) -> ... method scale_translation (line 1278) | def scale_translation(self, trans_scale_factor: float) -> Rigid: method stop_rot_gradient (line 1291) | def stop_rot_gradient(self) -> Rigid: method make_transform_from_reference (line 1302) | def make_transform_from_reference(n_xyz, ca_xyz, c_xyz, eps=1e-20): method cuda (line 1374) | def cuda(self) -> Rigid: FILE: vendor/openfold/openfold/utils/script_utils.py function count_models_to_evaluate (line 26) | def count_models_to_evaluate(openfold_checkpoint_path, jax_param_path): function get_model_basename (line 35) | def get_model_basename(model_path): function make_output_directory (line 43) | def make_output_directory(output_dir, model_name, multiple_model_mode): function load_models_from_command_line (line 52) | def load_models_from_command_line(config, model_device, openfold_checkpo... function parse_fasta (line 117) | def parse_fasta(data): function update_timings (line 130) | def update_timings(timing_dict, output_file=os.path.join(os.getcwd(), "t... function run_model (line 149) | def run_model(model, batch, tag, output_dir): function prep_output (line 169) | def prep_output(out, batch, feature_dict, feature_processor, config_pres... function relax_protein (line 231) | def relax_protein(config, model_device, unrelaxed_protein, output_direct... FILE: vendor/openfold/openfold/utils/seed.py function seed_globally (line 10) | def seed_globally(seed=None): FILE: vendor/openfold/openfold/utils/superimposition.py function _superimpose_np (line 19) | def _superimpose_np(reference, coords): function _superimpose_single (line 37) | def _superimpose_single(reference, coords): function superimpose (line 44) | def superimpose(reference, coords, mask): FILE: vendor/openfold/openfold/utils/suppress_output.py class SuppressStdout (line 5) | class SuppressStdout: method __enter__ (line 6) | def __enter__(self): method __exit__ (line 11) | def __exit__(self, typ, value, traceback): class SuppressLogging (line 17) | class SuppressLogging: method __init__ (line 18) | def __init__(self, level): method __enter__ (line 21) | def __enter__(self): method __exit__ (line 24) | def __exit__(self, typ, value, traceback): FILE: vendor/openfold/openfold/utils/tensor_utils.py function add (line 24) | def add(m1, m2, inplace): function permute_final_dims (line 35) | def permute_final_dims(tensor: torch.Tensor, inds: List[int]): function flatten_final_dims (line 41) | def flatten_final_dims(t: torch.Tensor, no_dims: int): function masked_mean (line 45) | def masked_mean(mask, value, dim, eps=1e-4): function pts_to_distogram (line 50) | def pts_to_distogram(pts, min_bin=2.3125, max_bin=21.6875, no_bins=64): function dict_multimap (line 60) | def dict_multimap(fn, dicts): function one_hot (line 73) | def one_hot(x, v_bins): function batched_gather (line 80) | def batched_gather(data, inds, dim=0, no_batch_dims=0): function dict_map (line 96) | def dict_map(fn, dic, leaf_type): function tree_map (line 107) | def tree_map(fn, tree, leaf_type): FILE: vendor/openfold/openfold/utils/trace_utils.py function pad_feature_dict_seq (line 23) | def pad_feature_dict_seq(feature_dict, seqlen): function trace_model_ (line 61) | def trace_model_(model, sample_input): FILE: vendor/openfold/openfold/utils/validation_metrics.py function drmsd (line 17) | def drmsd(structure_1, structure_2, mask=None): function drmsd_np (line 39) | def drmsd_np(structure_1, structure_2, mask=None): function gdt (line 48) | def gdt(p1, p2, mask, cutoffs): function gdt_ts (line 63) | def gdt_ts(p1, p2, mask): function gdt_ha (line 67) | def gdt_ha(p1, p2, mask): FILE: vendor/openfold/run_pretrained_openfold.py function precompute_alignments (line 65) | def precompute_alignments(tags, seqs, alignment_dir, args): function round_up_seqlen (line 112) | def round_up_seqlen(seqlen): function generate_feature_dict (line 116) | def generate_feature_dict( function list_files_with_extensions (line 150) | def list_files_with_extensions(dir, extensions): function main (line 154) | def main(args): FILE: vendor/openfold/scripts/alignment_db_scripts/create_alignment_db.py function main (line 6) | def main(args): FILE: vendor/openfold/scripts/alignment_db_scripts/unify_alignment_db_indices.py function main (line 9) | def main(args): FILE: vendor/openfold/scripts/convert_of_weights_to_jax.py function reshape_fn (line 33) | def reshape_fn(of_param, af_weight): function transfer (line 51) | def transfer(of_dict, af_weight_template): function main (line 61) | def main(args): FILE: vendor/openfold/scripts/data_dir_to_fasta.py function main (line 9) | def main(args): FILE: vendor/openfold/scripts/download_cameo.py function generate_url (line 21) | def generate_url(period, end_date): function main (line 32) | def main(args): FILE: vendor/openfold/scripts/generate_alphafold_feature_dict.py function main (line 10) | def main(args): FILE: vendor/openfold/scripts/generate_chain_data_cache.py function parse_file (line 17) | def parse_file( function main (line 70) | def main(args): FILE: vendor/openfold/scripts/generate_mmcif_cache.py function parse_file (line 16) | def parse_file(f, args): function main (line 40) | def main(args): FILE: vendor/openfold/scripts/precompute_alignments.py function run_seq_group_alignments (line 22) | def run_seq_group_alignments(seq_groups, alignment_runner, args): function parse_and_align (line 64) | def parse_and_align(files, alignment_runner, args): function main (line 115) | def main(args): FILE: vendor/openfold/scripts/precompute_alignments_mmseqs.py function _split_a3ms (line 10) | def _split_a3ms(output_dir): function main (line 35) | def main(args): FILE: vendor/openfold/scripts/precompute_embeddings.py class SequenceDataset (line 12) | class SequenceDataset(object): method __init__ (line 13) | def __init__(self, labels, sequences) -> None: method from_file (line 18) | def from_file(cls, fasta_file): method __len__ (line 30) | def __len__(self): method __getitem__ (line 33) | def __getitem__(self, idx): method get_batch_indices (line 36) | def get_batch_indices(self, toks_per_batch, extra_toks_per_seq): class EmbeddingGenerator (line 62) | class EmbeddingGenerator: method __init__ (line 64) | def __init__(self, method parse_sequences (line 83) | def parse_sequences(self, fasta_dir, output_dir): method run (line 108) | def run( function main (line 151) | def main(args): FILE: vendor/openfold/scripts/prep_proteinnet_msas.py function main (line 7) | def main(args): FILE: vendor/openfold/scripts/unpack_proteinnet.py function _write_file (line 6) | def _write_file(args, file_in_progress): function main (line 14) | def main(args): FILE: vendor/openfold/scripts/utils.py function add_data_args (line 7) | def add_data_args(parser: argparse.ArgumentParser): function get_nvidia_cc (line 47) | def get_nvidia_cc(): FILE: vendor/openfold/scripts/zero_to_fp32.py function get_model_state_file (line 29) | def get_model_state_file(checkpoint_dir, zero_stage): function get_optim_files (line 45) | def get_optim_files(checkpoint_dir): function parse_model_state (line 56) | def parse_model_state(file): function parse_optim_states (line 74) | def parse_optim_states(files, ds_checkpoint_dir): function _get_fp32_state_dict_from_zero_checkpoint (line 127) | def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir): function _get_fp32_state_dict_from_zero2_checkpoint (line 157) | def _get_fp32_state_dict_from_zero2_checkpoint(world_size, function zero3_partitioned_param_info (line 252) | def zero3_partitioned_param_info(unpartitioned_numel, world_size): function _get_fp32_state_dict_from_zero3_checkpoint (line 259) | def _get_fp32_state_dict_from_zero3_checkpoint(world_size, function get_fp32_state_dict_from_zero_checkpoint (line 332) | def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None): function convert_zero_checkpoint_to_fp32_state_dict (line 381) | def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_fi... function load_state_dict_from_zero_checkpoint (line 397) | def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None): function get_global_step_from_zero_checkpoint (line 435) | def get_global_step_from_zero_checkpoint(checkpoint_dir): FILE: vendor/openfold/setup.py function get_cuda_bare_metal_version (line 40) | def get_cuda_bare_metal_version(cuda_dir): FILE: vendor/openfold/tests/compare_utils.py function alphafold_is_installed (line 22) | def alphafold_is_installed(): function skip_unless_alphafold_installed (line 26) | def skip_unless_alphafold_installed(): function import_alphafold (line 30) | def import_alphafold(): function get_alphafold_config (line 48) | def get_alphafold_config(): function get_global_pretrained_openfold (line 58) | def get_global_pretrained_openfold(): function _get_orig_weights (line 77) | def _get_orig_weights(): function _remove_key_prefix (line 85) | def _remove_key_prefix(d, prefix): function fetch_alphafold_module_weights (line 92) | def fetch_alphafold_module_weights(weight_path): FILE: vendor/openfold/tests/data_utils.py function random_template_feats (line 19) | def random_template_feats(n_templ, n, batch_size=None): function random_extra_msa_feats (line 45) | def random_extra_msa_feats(n_extra, n, batch_size=None): function random_affines_vector (line 66) | def random_affines_vector(dim): function random_affines_4x4 (line 82) | def random_affines_4x4(dim): FILE: vendor/openfold/tests/test_data_pipeline.py class TestDataPipeline (line 38) | class TestDataPipeline(unittest.TestCase): method test_fasta_compare (line 40) | def test_fasta_compare(self): FILE: vendor/openfold/tests/test_data_transforms.py class TestDataTransforms (line 19) | class TestDataTransforms(unittest.TestCase): method test_make_seq_mask (line 20) | def test_make_seq_mask(self): method test_add_distillation_flag (line 30) | def test_add_distillation_flag(self): method test_make_all_atom_aatype (line 36) | def test_make_all_atom_aatype(self): method test_fix_templates_aatype (line 46) | def test_fix_templates_aatype(self): method test_correct_msa_restypes (line 57) | def test_correct_msa_restypes(self): method test_squeeze_features (line 65) | def test_squeeze_features(self): method test_randomly_replace_msa_with_unknown (line 91) | def test_randomly_replace_msa_with_unknown(self): method test_sample_msa (line 103) | def test_sample_msa(self): method test_crop_extra_msa (line 121) | def test_crop_extra_msa(self): method test_delete_extra_msa (line 134) | def test_delete_extra_msa(self): method test_nearest_neighbor_clusters (line 144) | def test_nearest_neighbor_clusters(self): method test_make_msa_mask (line 155) | def test_make_msa_mask(self): method test_make_hhblits_profile (line 165) | def test_make_hhblits_profile(self): method test_make_masked_msa (line 174) | def test_make_masked_msa(self): method test_make_msa_feat (line 192) | def test_make_msa_feat(self): method test_crop_templates (line 206) | def test_crop_templates(self): method test_make_atom14_masks (line 217) | def test_make_atom14_masks(self): FILE: vendor/openfold/tests/test_embedders.py class TestInputEmbedder (line 27) | class TestInputEmbedder(unittest.TestCase): method test_shape (line 28) | def test_shape(self): class TestPreembeddingEmbedder (line 50) | class TestPreembeddingEmbedder(unittest.TestCase): method test_shape (line 51) | def test_shape(self): class TestRecyclingEmbedder (line 72) | class TestRecyclingEmbedder(unittest.TestCase): method test_shape (line 73) | def test_shape(self): class TestTemplateAngleEmbedder (line 94) | class TestTemplateAngleEmbedder(unittest.TestCase): method test_shape (line 95) | def test_shape(self): class TestTemplatePairEmbedder (line 113) | class TestTemplatePairEmbedder(unittest.TestCase): method test_shape (line 114) | def test_shape(self): FILE: vendor/openfold/tests/test_evoformer.py class TestEvoformerStack (line 33) | class TestEvoformerStack(unittest.TestCase): method test_shape (line 34) | def test_shape(self): method test_shape_without_column_attention (line 90) | def test_shape_without_column_attention(self): method test_compare (line 147) | def test_compare(self): class TestExtraMSAStack (line 217) | class TestExtraMSAStack(unittest.TestCase): method test_shape (line 218) | def test_shape(self): class TestMSATransition (line 285) | class TestMSATransition(unittest.TestCase): method test_shape (line 286) | def test_shape(self): method test_compare (line 304) | def test_compare(self): FILE: vendor/openfold/tests/test_feats.py class TestFeats (line 42) | class TestFeats(unittest.TestCase): method test_pseudo_beta_fn_compare (line 44) | def test_pseudo_beta_fn_compare(self): method test_atom37_to_torsion_angles_compare (line 82) | def test_atom37_to_torsion_angles_compare(self): method test_atom37_to_frames_compare (line 132) | def test_atom37_to_frames_compare(self): method test_torsion_angles_to_frames_shape (line 185) | def test_torsion_angles_to_frames_shape(self): method test_torsion_angles_to_frames_compare (line 207) | def test_torsion_angles_to_frames_compare(self): method test_frames_and_literature_positions_to_atom14_pos_shape (line 261) | def test_frames_and_literature_positions_to_atom14_pos_shape(self): method test_frames_and_literature_positions_to_atom14_pos_compare (line 283) | def test_frames_and_literature_positions_to_atom14_pos_compare(self): FILE: vendor/openfold/tests/test_import_weights.py class TestImportWeights (line 24) | class TestImportWeights(unittest.TestCase): method test_import_jax_weights_ (line 25) | def test_import_jax_weights_(self): FILE: vendor/openfold/tests/test_kernels.py class TestAttentionCore (line 11) | class TestAttentionCore(unittest.TestCase): method test_attention_core_forward (line 12) | def test_attention_core_forward(self): method test_attention_core_backward (line 30) | def test_attention_core_backward(self): FILE: vendor/openfold/tests/test_loss.py function affine_vector_to_4x4 (line 62) | def affine_vector_to_4x4(affine): class TestLoss (line 67) | class TestLoss(unittest.TestCase): method test_run_torsion_angle_loss (line 68) | def test_run_torsion_angle_loss(self): method test_run_fape (line 78) | def test_run_fape(self): method test_run_between_residue_bond_loss (line 105) | def test_run_between_residue_bond_loss(self): method test_between_residue_bond_loss_compare (line 128) | def test_between_residue_bond_loss_compare(self): method test_run_between_residue_clash_loss (line 169) | def test_run_between_residue_clash_loss(self): method test_between_residue_clash_loss_compare (line 186) | def test_between_residue_clash_loss_compare(self): method test_compute_plddt_compare (line 231) | def test_compute_plddt_compare(self): method test_find_structural_violations (line 245) | def test_find_structural_violations(self): method test_find_structural_violations_compare (line 265) | def test_find_structural_violations_compare(self): method test_compute_renamed_ground_truth_compare (line 318) | def test_compute_renamed_ground_truth_compare(self): method test_msa_loss_compare (line 369) | def test_msa_loss_compare(self): method test_distogram_loss_compare (line 409) | def test_distogram_loss_compare(self): method test_experimentally_resolved_loss_compare (line 460) | def test_experimentally_resolved_loss_compare(self): method test_supervised_chi_loss_compare (line 504) | def test_supervised_chi_loss_compare(self): method test_violation_loss_compare (line 565) | def test_violation_loss_compare(self): method test_lddt_loss_compare (line 620) | def test_lddt_loss_compare(self): method test_backbone_loss_compare (line 674) | def test_backbone_loss_compare(self): method test_sidechain_loss_compare (line 724) | def test_sidechain_loss_compare(self): method test_tm_loss_compare (line 819) | def test_tm_loss_compare(self): FILE: vendor/openfold/tests/test_model.py class TestModel (line 38) | class TestModel(unittest.TestCase): method test_dry_run (line 39) | def test_dry_run(self): method test_dry_run_seqemb_mode (line 80) | def test_dry_run_seqemb_mode(self): method test_compare (line 121) | def test_compare(self): FILE: vendor/openfold/tests/test_msa.py class TestMSARowAttentionWithPairBias (line 33) | class TestMSARowAttentionWithPairBias(unittest.TestCase): method test_shape (line 34) | def test_shape(self): method test_compare (line 56) | def test_compare(self): class TestMSAColumnAttention (line 102) | class TestMSAColumnAttention(unittest.TestCase): method test_shape (line 103) | def test_shape(self): method test_compare (line 122) | def test_compare(self): class TestMSAColumnGlobalAttention (line 164) | class TestMSAColumnGlobalAttention(unittest.TestCase): method test_shape (line 165) | def test_shape(self): method test_compare (line 184) | def test_compare(self): FILE: vendor/openfold/tests/test_outer_product_mean.py class TestOuterProductMean (line 29) | class TestOuterProductMean(unittest.TestCase): method test_shape (line 30) | def test_shape(self): method test_opm_compare (line 49) | def test_opm_compare(self): FILE: vendor/openfold/tests/test_pair_transition.py class TestPairTransition (line 29) | class TestPairTransition(unittest.TestCase): method test_shape (line 30) | def test_shape(self): method test_compare (line 48) | def test_compare(self): FILE: vendor/openfold/tests/test_primitives.py class TestLMA (line 25) | class TestLMA(unittest.TestCase): method test_lma_vs_attention (line 26) | def test_lma_vs_attention(self): FILE: vendor/openfold/tests/test_structure_module.py class TestStructureModule (line 48) | class TestStructureModule(unittest.TestCase): method test_structure_module_shape (line 49) | def test_structure_module_shape(self): method test_structure_module_transition_shape (line 100) | def test_structure_module_transition_shape(self): method test_structure_module_compare (line 118) | def test_structure_module_compare(self): class TestInvariantPointAttention (line 183) | class TestInvariantPointAttention(unittest.TestCase): method test_shape (line 184) | def test_shape(self): method test_ipa_compare (line 215) | def test_ipa_compare(self): class TestAngleResnet (line 271) | class TestAngleResnet(unittest.TestCase): method test_shape (line 272) | def test_shape(self): FILE: vendor/openfold/tests/test_template.py class TestTemplatePointwiseAttention (line 33) | class TestTemplatePointwiseAttention(unittest.TestCase): method test_shape (line 34) | def test_shape(self): class TestTemplatePairStack (line 56) | class TestTemplatePairStack(unittest.TestCase): method test_shape (line 57) | def test_shape(self): method test_compare (line 95) | def test_compare(self): class Template (line 145) | class Template(unittest.TestCase): method test_compare (line 147) | def test_compare(self): FILE: vendor/openfold/tests/test_triangular_attention.py class TestTriangularAttention (line 31) | class TestTriangularAttention(unittest.TestCase): method test_shape (line 32) | def test_shape(self): method _tri_att_compare (line 50) | def _tri_att_compare(self, starting=False): method test_tri_att_end_compare (line 108) | def test_tri_att_end_compare(self): method test_tri_att_start_compare (line 112) | def test_tri_att_start_compare(self): FILE: vendor/openfold/tests/test_triangular_multiplicative_update.py class TestTriangularMultiplicativeUpdate (line 29) | class TestTriangularMultiplicativeUpdate(unittest.TestCase): method test_shape (line 30) | def test_shape(self): method _tri_mul_compare (line 50) | def _tri_mul_compare(self, incoming=False): method test_tri_mul_out_compare (line 101) | def test_tri_mul_out_compare(self): method test_tri_mul_in_compare (line 105) | def test_tri_mul_in_compare(self): method _tri_mul_inplace (line 108) | def _tri_mul_inplace(self, incoming=False): method test_tri_mul_out_inference (line 137) | def test_tri_mul_out_inference(self): method test_tri_mul_in_inference (line 140) | def test_tri_mul_in_inference(self): FILE: vendor/openfold/tests/test_utils.py class TestUtils (line 53) | class TestUtils(unittest.TestCase): method test_rigid_from_3_points_shape (line 54) | def test_rigid_from_3_points_shape(self): method test_rigid_from_4x4 (line 69) | def test_rigid_from_4x4(self): method test_rigid_shape (line 91) | def test_rigid_shape(self): method test_rigid_cat (line 101) | def test_rigid_cat(self): method test_rigid_compose (line 126) | def test_rigid_compose(self): method test_rigid_apply (line 151) | def test_rigid_apply(self): method test_quat_to_rot (line 171) | def test_quat_to_rot(self): method test_rot_to_quat (line 178) | def test_rot_to_quat(self): method test_chunk_layer_tensor (line 184) | def test_chunk_layer_tensor(self): method test_chunk_layer_dict (line 192) | def test_chunk_layer_dict(self): method test_chunk_slice_dict (line 209) | def test_chunk_slice_dict(self): method test_pre_compose_compare (line 225) | def test_pre_compose_compare(self): FILE: vendor/openfold/thread_sequence.py function main (line 36) | def main(args): FILE: vendor/openfold/train_openfold.py class OpenFoldWrapper (line 51) | class OpenFoldWrapper(pl.LightningModule): method __init__ (line 52) | def __init__(self, config): method forward (line 64) | def forward(self, batch): method _log (line 67) | def _log(self, loss_breakdown, batch, outputs, train=True): method training_step (line 97) | def training_step(self, batch, batch_idx): method on_before_zero_grad (line 117) | def on_before_zero_grad(self, *args, **kwargs): method validation_step (line 120) | def validation_step(self, batch, batch_idx): method validation_epoch_end (line 142) | def validation_epoch_end(self, _): method _compute_validation_metrics (line 147) | def _compute_validation_metrics(self, method configure_optimizers (line 201) | def configure_optimizers(self, method on_load_checkpoint (line 235) | def on_load_checkpoint(self, checkpoint): method on_save_checkpoint (line 241) | def on_save_checkpoint(self, checkpoint): method resume_last_lr_step (line 244) | def resume_last_lr_step(self, lr_step): method load_from_jax (line 247) | def load_from_jax(self, jax_path): function main (line 259) | def main(args): function bool_type (line 385) | def bool_type(bool_str: str):