MCPcopy Create free account

hub / github.com/apple/ml-simplefold / functions

Functions396 in github.com/apple/ml-simplefold

↓ 63 callersMethodget
Get an item from the Redis database.
src/simplefold/process_mmcif.py:60
↓ 34 callersMethodload
Load the object from a JSON file. Parameters ---------- path : Path The path to the file. Returns
src/simplefold/boltz_data_pipeline/types.py:413
↓ 33 callersFunctionpad_dim
Pad a tensor along a given dimension. Parameters ---------- data : Tensor The input tensor. dim : int The dimension t
src/simplefold/boltz_data_pipeline/feature/pad.py:14
↓ 14 callersMethodadd
(self, coords)
src/simplefold/evaluation/analyze_two_state.py:119
↓ 13 callersMethodlog
Delegate a log call to the underlying logger, after prefixing its message with the rank of the process it's being logged from. If `'rank'` is
src/simplefold/utils/pylogger.py:32
↓ 9 callersFunctionone_hot
MLX version of torch.one_hot. Args: indices: integer MLX array of any shape, containing class indices in [0, num_classes). n
src/simplefold/model/mlx/architecture.py:14
↓ 8 callersFunctioncenter_random_augmentation
Center and randomly augment the input coordinates. Parameters ---------- atom_coords : Tensor The atom coordinates. atom_mask
src/simplefold/utils/boltz_utils.py:57
↓ 8 callersMethoddump
Dump the object to a JSON file. Parameters ---------- path : Path The path to the file.
src/simplefold/boltz_data_pipeline/types.py:75
↓ 7 callersMethodwrite
(self, path=None, idx=None, reverse=False)
src/simplefold/evaluation/analyze_two_state.py:154
↓ 6 callersMethod__init__
Root Mean Square Layer Normalization :param d: model size :param p: partial RMSNorm, valid value [0, 1], default -1.0 (di
src/simplefold/model/torch/layers.py:272
↓ 6 callersFunctiongetmask
(name)
src/simplefold/evaluation/analyze_two_state.py:334
↓ 6 callersFunctionpick_random_token
Pick a random token from the data. Parameters ---------- tokens : np.ndarray The token data. random : np.ndarray The
src/simplefold/boltz_data_pipeline/crop/boltz.py:20
↓ 6 callersMethodsample
(self, model_fn, flow, noise, batch)
src/simplefold/model/mlx/sampler.py:88
↓ 5 callersMethod__init__
(self, hidden_size, out_channels, c_dim=None)
src/simplefold/model/mlx/layers.py:251
↓ 5 callersFunction_tmscore
Calculate TM-score between two PDB files, each containing only one chain and only CA atoms. Args: model_pdb_path (str): path to P
src/simplefold/evaluation/two_state_utils/tm_ens.py:48
↓ 5 callersFunctioncollate_dense_tensors
Takes a list of tensors with the following dimensions: [(d_11, ..., d_1K), (d_21, ..., d_2K),
src/simplefold/utils/esm_utils.py:141
↓ 4 callersFunction_af2_to_esm
(d)
src/simplefold/utils/esm_utils.py:172
↓ 4 callersFunction_make_rigid_transformation_4x4
Create a rigid 4x4 transformation matrix from two axes and transl.
src/simplefold/utils/residue_constants.py:1108
↓ 4 callersMethodcompute_alpha_t
Compute the data coefficient along the path
src/simplefold/model/flow.py:19
↓ 4 callersMethodcompute_sigma_t
Compute the noise coefficient along the path
src/simplefold/model/flow.py:23
↓ 4 callersMethodfilter
Filter structures based on their resolution. Parameters ---------- record : Record The record to filter.
src/simplefold/boltz_data_pipeline/filter/dynamic/size.py:30
↓ 4 callersMethodprocess
Compute features. Parameters ---------- data : Tokenized The tokenized data. max_tokens : int, optional
src/simplefold/boltz_data_pipeline/feature/featurizer.py:385
↓ 4 callersFunctionright_pad_dims_to
(x, t)
src/simplefold/model/flow.py:6
↓ 4 callersFunctionsave_structure
(structure, save_dir, outname, output_format="mmcif", plddts=None)
src/simplefold/utils/boltz_utils.py:442
↓ 4 callersMethodtokenize
Tokenize the input data. Parameters ---------- data : Input The input data. Returns -------
src/simplefold/boltz_data_pipeline/tokenize/tokenizer.py:18
↓ 4 callersFunctionweighted_minimum_rmsd_single
Compute rmsd of the aligned atom coordinates. Parameters ---------- pred_atom_coords : torch.Tensor Predicted atom coordinates
src/simplefold/utils/boltz_utils.py:324
↓ 3 callersMethod__init__
Construct a layernorm layer in the TF style (eps inside the sqrt).
src/simplefold/model/mlx/esm_modules.py:37
↓ 3 callersFunctioncreate_folders
Creates paths for folders
src/simplefold/utils/utils.py:113
↓ 3 callersFunctionextras
Applies optional utilities before the task is started. Utilities: - Ignoring python warnings - Setting tags from command line
src/simplefold/utils/utils.py:134
↓ 3 callersFunctionget_config_path
Get the absolute path to a config file using importlib.resources.
src/simplefold/inference.py:53
↓ 3 callersFunctioninstantiate_callbacks
Instantiates callbacks from config. :param callbacks_cfg: A DictConfig object containing callback configurations. :return: A list of instanti
src/simplefold/utils/instantiators.py:58
↓ 3 callersFunctionlddt_dist
(dmat_predicted, dmat_true, mask, cutoff=15.0, per_atom=False)
src/simplefold/utils/boltz_utils.py:298
↓ 3 callersFunctionlog_hyperparameters
Controls which config parts are saved by Lightning loggers. Additionally saves: - Number of model parameters :param object_dict: A d
src/simplefold/utils/logging_utils.py:17
↓ 3 callersFunctionmake_bond_key
Unique key to lookup bonds.
src/simplefold/utils/residue_constants.py:502
↓ 3 callersFunctionmodulate
(x, shift, scale)
src/simplefold/model/torch/layers.py:13
↓ 3 callersFunctionmodulate
(x, shift, scale)
src/simplefold/model/mlx/layers.py:13
↓ 3 callersFunctionparse_boltz_schema
Parse a Boltz input yaml / json. The input file should be a dictionary with the following format: version: 1 sequences: - protei
src/simplefold/boltz_data_pipeline/parse/schema.py:466
↓ 3 callersFunctionparse_ccd_residue
Parse an MMCIF ligand. First tries to get the SMILES string from the RCSB. Then, tries to infer atom ordering using RDKit. Parameters
src/simplefold/boltz_data_pipeline/parse/schema.py:213
↓ 3 callersMethodpostprocess
(self, out_dict, batch)
src/simplefold/processor/protein_processor.py:181
↓ 3 callersMethodpreprocess_training
(self, batch, esm_model=None, esm_dict=None, af2_to_esm=None)
src/simplefold/processor/protein_processor.py:123
↓ 3 callersFunctionprocess_structure
(structure, coord, pad_mask, record, backend="torch")
src/simplefold/utils/boltz_utils.py:390
↓ 2 callersMethod__init__
( self, self_attention_layer, hidden_size, mlp_ratio=4.0, use_swiglu=T
src/simplefold/model/torch/blocks.py:17
↓ 2 callersMethod__init__
( self, in_dim: int, include_input: bool = False, min_freq_log2: float = 0,
src/simplefold/model/torch/pos_embed.py:50
↓ 2 callersMethod__init__
( self, self_attention_layer, hidden_size, mlp_ratio=4.0, use_swiglu=T
src/simplefold/model/mlx/blocks.py:17
↓ 2 callersMethod__init__
( self, in_dim: int, include_input: bool = False, min_freq_log2: float = 0,
src/simplefold/model/mlx/pos_embed.py:53
↓ 2 callersFunction_parse_a3m
Process an MSA file. Parameters ---------- lines : TextIO The lines of the MSA file. taxonomy : dict[str, str] The ta
src/simplefold/boltz_data_pipeline/parse/a3m.py:19
↓ 2 callersFunctionapply_rotary_pos_emb
(x, cos, sin)
src/simplefold/model/mlx/esm_rotary_embedding.py:18
↓ 2 callersMethodbatch_to_device
(self, batch, multiplicity=1)
src/simplefold/processor/protein_processor.py:106
↓ 2 callersFunctionchi_angle_atom
Define chi-angle rigid groups via one-hot representations.
src/simplefold/utils/residue_constants.py:1061
↓ 2 callersMethodcompute_score_from_velocity
(self, v_t, y_t, t)
src/simplefold/model/flow.py:64
↓ 2 callersMethodcreate_atom_attn_mask
( self, feats, natoms, atom_n_queries=None, atom_n_keys=None,
src/simplefold/model/torch/architecture.py:151
↓ 2 callersMethodcreate_atom_attn_mask
( self, feats, natoms, atom_n_queries=None, atom_n_keys=None, inf: float = 1e10 )
src/simplefold/model/mlx/architecture.py:182
↓ 2 callersFunctiondownload_fasta_utilities
Download all the required data. Parameters ---------- cache : Path The cache directory.
src/simplefold/utils/fasta_utils.py:116
↓ 2 callersFunctionextract_sequence_from_tokens
(tokenized)
src/simplefold/utils/datamodule_utils.py:158
↓ 2 callersFunctiongenerate_tags
Generate chain tags. Yields ------ str The next chain tag
src/simplefold/boltz_data_pipeline/write/utils.py:13
↓ 2 callersFunctionget_conformer
Retrieve an rdkit object for a deemed conformer. Inspired by `pdbeccdutils.core.component.Component`. Parameters ---------- mol: Mol
src/simplefold/utils/mmcif_utils.py:237
↓ 2 callersFunctionget_conformer
Retrieve an rdkit object for a deemed conformer. Inspired by `pdbeccdutils.core.component.Component`. Parameters ---------- mol: Mol
src/simplefold/boltz_data_pipeline/parse/schema.py:167
↓ 2 callersFunctionget_structures
(path1, path2, seq)
src/simplefold/evaluation/analyze_two_state.py:198
↓ 2 callersFunctioninstantiate_loggers
Instantiates loggers from config. :param logger_cfg: A DictConfig object containing logger configurations. :return: A list of instantiated lo
src/simplefold/utils/instantiators.py:81
↓ 2 callersMethodinterpolant
(self, t, x0, x1)
src/simplefold/model/flow.py:49
↓ 2 callersFunctionload_input
Load the given input data. Parameters ---------- record : Record The record to load. target_dir : Path The path to th
src/simplefold/utils/datamodule_utils.py:83
↓ 2 callersFunctionpdb_to_npy
(pdb_path, model_num=0, chain_id=None, seqres=None)
src/simplefold/evaluation/analyze_two_state.py:59
↓ 2 callersMethodpreprocess_inference
(self, batch, esm_model=None, esm_dict=None, af2_to_esm=None)
src/simplefold/processor/protein_processor.py:156
↓ 2 callersMethodprocess_esm
( self, batch, esm_model=None, esm_dict=None, af2_to_esm=None,
src/simplefold/processor/protein_processor.py:46
↓ 2 callersFunctionprocess_fastas
Process the input data and output directory. Parameters ---------- data : list[Path] The input data. out_dir : Path T
src/simplefold/utils/fasta_utils.py:144
↓ 2 callersFunctionprocess_one_inference_structure
( structure_path, record_path, tokenizer: BoltzTokenizer, featurizer: BoltzFeaturizer, pr
src/simplefold/utils/datamodule_utils.py:179
↓ 2 callersMethodremove_invalid_chains
Remove invalid chains. Parameters ---------- structure : Structure The structure to process. Returns
src/simplefold/boltz_data_pipeline/types.py:185
↓ 2 callersMethodreset_esm
(self, esm_model: str)
src/simplefold/model/simplefold.py:614
↓ 2 callersFunctionscatterplot_apo
(x, y, save_to=None, xlabel=None, ylabel=None, regplot=False)
src/simplefold/evaluation/two_state_utils/plot.py:30
↓ 2 callersFunctionto_mmcif
Write a structure into an MMCIF file. Parameters ---------- structure : Structure The input structure Returns -------
src/simplefold/boltz_data_pipeline/write/mmcif.py:25
↓ 2 callersFunctionto_pdb
Write a structure into a PDB file. Parameters ---------- structure : Structure The input structure Returns ------- s
src/simplefold/boltz_data_pipeline/write/pdb.py:19
↓ 2 callersFunctionview_as_complex
(x)
src/simplefold/model/mlx/pos_embed.py:152
↓ 2 callersFunctionview_as_real
(input)
src/simplefold/model/mlx/pos_embed.py:158
↓ 2 callersFunctionweighted_rigid_align
Compute weighted alignment. Parameters ---------- true_coords: torch.Tensor The ground truth atom coordinates pred_coords: to
src/simplefold/utils/boltz_utils.py:209
↓ 2 callersFunctionwrap
(cfg: DictConfig)
src/simplefold/utils/utils.py:182
↓ 1 callersFunctionPROCESS_RESIDUES
(d)
src/simplefold/evaluation/analyze_two_state.py:42
↓ 1 callersMethod__init__
(self)
src/simplefold/model/flow.py:16
↓ 1 callersMethod__init__
Initialize the training dataset. Parameters ---------- manifest : Manifest The manifest to load data from.
src/simplefold/datasets/test_datamodule.py:30
↓ 1 callersMethod__init__
Initialize the training dataset.
src/simplefold/datasets/train_datamodule.py:56
↓ 1 callersFunction_copysign
Return a tensor where each element has the absolute value taken from the, corresponding element of a, with sign taken from the corresponding
src/simplefold/utils/boltz_utils.py:116
↓ 1 callersMethod_init_submodules
(self, add_bias_kv, use_esm1b_layer_norm)
src/simplefold/model/mlx/esm_modules.py:80
↓ 1 callersMethod_init_submodules
(self)
src/simplefold/model/mlx/esm_network.py:53
↓ 1 callersFunction_make_atom14_ambiguity_feats
()
src/simplefold/utils/residue_constants.py:1293
↓ 1 callersFunction_make_chi_atom_indices
Returns atom indices needed to compute chi angles for all residue types. Returns: A tensor of shape [residue_types=21, chis=4, atoms=4]. The re
src/simplefold/utils/residue_constants.py:1320
↓ 1 callersFunction_make_renaming_matrices
Matrices to map atoms to symmetry partners in ambiguous case.
src/simplefold/utils/residue_constants.py:1346
↓ 1 callersFunction_make_restype_atom14_is_ambiguous
Mask which atoms are ambiguous in atom14.
src/simplefold/utils/residue_constants.py:1433
↓ 1 callersFunction_make_restype_atom14_mask
Mask of which atoms are present for which residue type in atom14.
src/simplefold/utils/residue_constants.py:1386
↓ 1 callersFunction_make_restype_atom14_to_atom37
Map from atom14 to atom37 per residue type.
src/simplefold/utils/residue_constants.py:1417
↓ 1 callersFunction_make_restype_atom37_mask
Mask of which atoms are present for which residue type in atom37.
src/simplefold/utils/residue_constants.py:1373
↓ 1 callersFunction_make_restype_atom37_to_atom14
Map from atom37 to atom14 per residue type.
src/simplefold/utils/residue_constants.py:1400
↓ 1 callersFunction_make_restype_rigidgroup_base_atom37_idx
Create Map from rigidgroups to atom37 indices.
src/simplefold/utils/residue_constants.py:1451
↓ 1 callersFunction_make_rigid_group_constants
Fill the arrays above.
src/simplefold/utils/residue_constants.py:1139
↓ 1 callersFunction_make_standard_atom_mask
Returns [num_res_types, num_atom_types] mask array.
src/simplefold/utils/residue_constants.py:1043
↓ 1 callersMethod_update_cos_sin_tables
(self, x, seq_dimension=1)
src/simplefold/model/mlx/esm_rotary_embedding.py:50
↓ 1 callersMethodadd_plddt
(self, plddts)
src/simplefold/boltz_data_pipeline/write/mmcif.py:178
↓ 1 callersFunctionaf2_idx_to_esm_idx
(aa, mask, af2_to_esm)
src/simplefold/utils/esm_utils.py:180
↓ 1 callersFunctionaggregate_eval
(args)
src/simplefold/evaluation/analyze_folding.py:156
↓ 1 callersFunctionall_different_after_swap
(l)
src/simplefold/boltz_data_pipeline/feature/symmetry.py:108
↓ 1 callersFunctionanalyze
(pairs_df, samples_dir, output_dir, targets_dir, TMscore_bin, nsample=5)
src/simplefold/evaluation/analyze_two_state.py:227
↓ 1 callersFunctionapc
Perform average product correct, used for contact prediction.
src/simplefold/model/mlx/esm_modules.py:24
next →1–100 of 396, ranked by callers