deepfold package¶
Subpackages¶
- deepfold.common package
- Submodules
- deepfold.common.protein module
- deepfold.common.residue_constants module
- Module contents
- deepfold.data package
- Subpackages
- deepfold.data.modules package
- deepfold.data.multimer package
- Submodules
- deepfold.data.multimer.input_features module
ComplexInfo
add_assembly_features()
convert_monomer_features()
create_all_seq_msa_features()
create_all_seq_msa_features_from_a3m()
create_multimer_features()
crop_chains()
int_id_to_str_id()
pad_msa()
pair_and_merge()
process_final()
process_multimer_features()
process_single_chain()
process_unmerged_features()
- deepfold.data.multimer.msa_pairing module
- Module contents
- deepfold.data.search package
- Submodules
- deepfold.data.search.crfalign module
- deepfold.data.search.input_features module
- deepfold.data.search.mmcif module
- deepfold.data.search.msa_identifiers module
- deepfold.data.search.parsers module
- deepfold.data.search.templates module
AlignRatioError
CaDistanceError
DateError
DuplicateError
LengthError
NoAtomDataInTemplateError
NoChainsError
PrefilterError
QueryToTemplateAlignError
SequenceNotInTemplateError
TemplateAtomMaskAllZerosError
TemplateFeaturesResult
TemplateHitFeaturizer
build_query_to_hit_index_mapping()
create_empty_template_feats()
extract_template_features()
get_atom_positions()
load_mmcif_dict()
load_pdb_obsolete_mapping()
- Module contents
- deepfold.data.tools package
- Submodules
- deepfold.data.errors module
- deepfold.data.monomer module
- deepfold.data.pdbio module
- deepfold.data.pdbx_parsing module
- Module contents
- Subpackages
- deepfold.distributed package
- Submodules
- deepfold.distributed.model_parallel module
Disable
Enable
all_to_all()
broadcast()
broadcast_on_model_parallel_region()
col_to_row()
copy_to_model_parallel_reigon()
disable()
enable()
gather()
gather_from_model_parallel_region()
group()
group_rank()
initialize()
is_enabled()
is_initialized()
rank()
reduce()
reduce_from_model_parallel_region()
row_to_col()
scatter()
scatter_to_model_parallel_region()
size()
transpose_on_model_parallel_region()
- deepfold.distributed.utils module
- Module contents
- deepfold.eval package
- deepfold.losses package
- deepfold.modules package
- Subpackages
- Submodules
- deepfold.modules.alphafold module
- deepfold.modules.angle_resnet module
- deepfold.modules.attention module
- deepfold.modules.auxiliary_heads module
- deepfold.modules.backbone_update module
- deepfold.modules.dropout module
- deepfold.modules.evoformer_block module
- deepfold.modules.evoformer_block_pair_core module
- deepfold.modules.evoformer_stack module
- deepfold.modules.extra_msa_block module
- deepfold.modules.extra_msa_embedder module
- deepfold.modules.extra_msa_stack module
- deepfold.modules.global_attention module
- deepfold.modules.inductor module
- deepfold.modules.input_embedder module
- deepfold.modules.invariant_point_attention module
- deepfold.modules.layer_norm module
- deepfold.modules.linear module
- deepfold.modules.msa_column_attention module
- deepfold.modules.msa_column_global_attention module
- deepfold.modules.msa_row_attention_with_pair_bias module
- deepfold.modules.msa_transition module
- deepfold.modules.outer_product_mean module
- deepfold.modules.pair_transition module
- deepfold.modules.recycling_embedder module
- deepfold.modules.single_transition module
- deepfold.modules.structure_module module
- deepfold.modules.template_angle_embedder module
- deepfold.modules.template_pair_block module
- deepfold.modules.template_pair_embedder module
- deepfold.modules.template_pair_stack module
- deepfold.modules.template_pointwise_attention module
- deepfold.modules.template_projection module
- deepfold.modules.triangular_attention module
- deepfold.modules.triangular_multiplicative_update module
- Module contents
- deepfold.ops package
- deepfold.relax package
- deepfold.runner package
- Submodules
- deepfold.runner.config_utils module
- deepfold.runner.interpreter module
- deepfold.runner.main module
- deepfold.runner.parser module
Lexer
Lexer.states
Lexer.t_ANY_error()
Lexer.t_BEGIN_ARRAY()
Lexer.t_BEGIN_OBJECT()
Lexer.t_DECIMAL_POINT
Lexer.t_DIGITS
Lexer.t_E
Lexer.t_FALSE
Lexer.t_ID()
Lexer.t_MINUS
Lexer.t_NAME_SEPARATOR
Lexer.t_NEWLINE()
Lexer.t_NULL
Lexer.t_PLUS
Lexer.t_QUOTATION_MARK()
Lexer.t_SEMICOLON
Lexer.t_TRUE
Lexer.t_VALUE_SEPARATOR
Lexer.t_ZERO
Lexer.t_escaped_BACKSPACE_CHAR()
Lexer.t_escaped_CARRIAGE_RETURN_CHAR()
Lexer.t_escaped_FORM_FEED_CHAR()
Lexer.t_escaped_LINE_FEED_CHAR()
Lexer.t_escaped_QUOTATION_MARK()
Lexer.t_escaped_REVERSE_SOLIDUS()
Lexer.t_escaped_SOLIDUS()
Lexer.t_escaped_TAB_CHAR()
Lexer.t_escaped_UNICODE_HEX()
Lexer.t_escaped_ignore
Lexer.t_graph_BEGIN_EDGE_LIST()
Lexer.t_graph_EDGE_SEP()
Lexer.t_graph_END_EDGE_LIST()
Lexer.t_graph_ID()
Lexer.t_graph_NEWLINE()
Lexer.t_graph_VALUE_SEPARATOR
Lexer.t_graph_ignore
Lexer.t_ignore
Lexer.t_ignore_COMMENT()
Lexer.t_iterable_END_ARRAY()
Lexer.t_iterable_END_OBJECT()
Lexer.t_iterable_NEWLINE()
Lexer.t_stoi_DIGITS()
Lexer.t_stoi_ID()
Lexer.t_stoi_NUM_SYM_SEP()
Lexer.t_stoi_STOI_SEP()
Lexer.t_stoi_ignore
Lexer.t_string_ESCAPE()
Lexer.t_string_QUOTATION_MARK()
Lexer.t_string_UNESCAPED()
Lexer.t_string_ignore
Lexer.tokenize()
Lexer.tokens
Parser
Parser.p_array()
Parser.p_begin_array()
Parser.p_begin_dict()
Parser.p_begin_edge()
Parser.p_char()
Parser.p_char_unicode_hex()
Parser.p_chars()
Parser.p_command()
Parser.p_dict()
Parser.p_edge()
Parser.p_edge_list()
Parser.p_edges()
Parser.p_end_array()
Parser.p_end_dict()
Parser.p_end_edge()
Parser.p_entity()
Parser.p_error()
Parser.p_exp()
Parser.p_exp_negative()
Parser.p_exp_positive()
Parser.p_frac()
Parser.p_graph()
Parser.p_id()
Parser.p_int_non_zero()
Parser.p_int_zero()
Parser.p_integer()
Parser.p_integer_exp()
Parser.p_member()
Parser.p_members()
Parser.p_model_definition()
Parser.p_number_float()
Parser.p_number_float_exp()
Parser.p_number_negative()
Parser.p_number_positive()
Parser.p_object()
Parser.p_pred_opt()
Parser.p_pred_opts()
Parser.p_predict()
Parser.p_script()
Parser.p_statement()
Parser.p_statements()
Parser.p_stoi_entry()
Parser.p_stoi_list()
Parser.p_string()
Parser.p_value()
Parser.p_value_false()
Parser.p_value_null()
Parser.p_value_seperator()
Parser.p_value_true()
Parser.p_values()
Parser.p_variable_let()
Parser.parse()
Parser.tokens
- deepfold.runner.utils module
- Module contents
- deepfold.testing package
- Submodules
- deepfold.testing.common module
MultiProcessTestCase
skip_if_lt_x_gpu()
skip_if_no_gpu()
with_nccl_blocking_wait()
- deepfold.testing.utils module
- Module contents
- deepfold.train package
- deepfold.utils package
- Subpackages
- deepfold.utils.geometry package
- Submodules
- deepfold.utils.geometry.quat_rigid module
- deepfold.utils.geometry.rigid_matrix_vector module
Rigid3Array
Rigid3Array.apply()
Rigid3Array.apply_inverse_to_point()
Rigid3Array.apply_to_point()
Rigid3Array.cat()
Rigid3Array.compose()
Rigid3Array.compose_rotation()
Rigid3Array.cuda()
Rigid3Array.device
Rigid3Array.dtype
Rigid3Array.from_array()
Rigid3Array.from_array4x4()
Rigid3Array.from_tensor_4x4()
Rigid3Array.identity()
Rigid3Array.inverse()
Rigid3Array.invert_apply()
Rigid3Array.map_tensor_fn()
Rigid3Array.reshape()
Rigid3Array.rotation
Rigid3Array.scale_translation()
Rigid3Array.shape
Rigid3Array.stop_rot_gradient()
Rigid3Array.to_tensor()
Rigid3Array.to_tensor_4x4()
Rigid3Array.translation
Rigid3Array.unsqueeze()
- deepfold.utils.geometry.rotation_matrix module
Rot3Array
Rot3Array.apply_inverse_to_point()
Rot3Array.apply_to_point()
Rot3Array.cat()
Rot3Array.from_array()
Rot3Array.from_quaternion()
Rot3Array.from_two_vectors()
Rot3Array.identity()
Rot3Array.inverse()
Rot3Array.map_tensor_fn()
Rot3Array.reshape()
Rot3Array.stop_gradient()
Rot3Array.to_tensor()
Rot3Array.unsqueeze()
Rot3Array.xx
Rot3Array.xy
Rot3Array.xz
Rot3Array.yx
Rot3Array.yy
Rot3Array.yz
Rot3Array.zx
Rot3Array.zy
Rot3Array.zz
- deepfold.utils.geometry.utils module
- deepfold.utils.geometry.vector module
Vec3Array
Vec3Array.cat()
Vec3Array.clone()
Vec3Array.cross()
Vec3Array.dot()
Vec3Array.from_array()
Vec3Array.map_tensor_fn()
Vec3Array.norm()
Vec3Array.norm2()
Vec3Array.normalized()
Vec3Array.reshape()
Vec3Array.shape
Vec3Array.sum()
Vec3Array.to_tensor()
Vec3Array.unsqueeze()
Vec3Array.x
Vec3Array.y
Vec3Array.z
Vec3Array.zeros()
cross()
dihedral_angle()
dot()
euclidean_distance()
norm()
normalized()
square_euclidean_distance()
- Module contents
Rigid
Rigid.apply()
Rigid.apply_rot_fn()
Rigid.apply_trans_fn()
Rigid.cat()
Rigid.compose()
Rigid.compose_q_update_vec()
Rigid.cuda()
Rigid.device
Rigid.dtype
Rigid.from_3_points()
Rigid.from_tensor_4x4()
Rigid.from_tensor_7()
Rigid.get_rots()
Rigid.get_trans()
Rigid.identity()
Rigid.invert()
Rigid.invert_apply()
Rigid.make_transform_from_reference()
Rigid.map_tensor_fn()
Rigid.scale_translation()
Rigid.shape
Rigid.stop_rot_gradient()
Rigid.to_tensor_4x4()
Rigid.to_tensor_7()
Rigid.unsqueeze()
Rigid3Array
Rigid3Array.apply()
Rigid3Array.apply_inverse_to_point()
Rigid3Array.apply_to_point()
Rigid3Array.cat()
Rigid3Array.compose()
Rigid3Array.compose_rotation()
Rigid3Array.cuda()
Rigid3Array.device
Rigid3Array.dtype
Rigid3Array.from_array()
Rigid3Array.from_array4x4()
Rigid3Array.from_tensor_4x4()
Rigid3Array.identity()
Rigid3Array.inverse()
Rigid3Array.invert_apply()
Rigid3Array.map_tensor_fn()
Rigid3Array.reshape()
Rigid3Array.rotation
Rigid3Array.scale_translation()
Rigid3Array.shape
Rigid3Array.stop_rot_gradient()
Rigid3Array.to_tensor()
Rigid3Array.to_tensor_4x4()
Rigid3Array.translation
Rigid3Array.unsqueeze()
Rot3Array
Rot3Array.apply_inverse_to_point()
Rot3Array.apply_to_point()
Rot3Array.cat()
Rot3Array.from_array()
Rot3Array.from_quaternion()
Rot3Array.from_two_vectors()
Rot3Array.identity()
Rot3Array.inverse()
Rot3Array.map_tensor_fn()
Rot3Array.reshape()
Rot3Array.stop_gradient()
Rot3Array.to_tensor()
Rot3Array.unsqueeze()
Rot3Array.xx
Rot3Array.xy
Rot3Array.xz
Rot3Array.yx
Rot3Array.yy
Rot3Array.yz
Rot3Array.zx
Rot3Array.zy
Rot3Array.zz
Rotation
Rotation.apply()
Rotation.cat()
Rotation.compose_q()
Rotation.compose_q_update_vec()
Rotation.compose_r()
Rotation.cuda()
Rotation.detach()
Rotation.device
Rotation.dtype
Rotation.get_cur_rot()
Rotation.get_quats()
Rotation.get_rot_mats()
Rotation.identity()
Rotation.invert()
Rotation.invert_apply()
Rotation.map_tensor_fn()
Rotation.requires_grad
Rotation.shape
Rotation.to()
Rotation.unsqueeze()
Vec3Array
Vec3Array.cat()
Vec3Array.clone()
Vec3Array.cross()
Vec3Array.dot()
Vec3Array.from_array()
Vec3Array.map_tensor_fn()
Vec3Array.norm()
Vec3Array.norm2()
Vec3Array.normalized()
Vec3Array.reshape()
Vec3Array.shape
Vec3Array.sum()
Vec3Array.to_tensor()
Vec3Array.unsqueeze()
Vec3Array.x
Vec3Array.y
Vec3Array.z
Vec3Array.zeros()
dihedral_angle()
euclidean_distance()
square_euclidean_distance()
- deepfold.utils.geometry package
- Submodules
- deepfold.utils.checkpoint_utils module
- deepfold.utils.chunk_utils module
- deepfold.utils.crop_utils module
- deepfold.utils.datetime_utils module
- deepfold.utils.dist_utils module
- deepfold.utils.feats_utils module
- deepfold.utils.file_utils module
- deepfold.utils.hash_utils module
- deepfold.utils.import_utils module
- deepfold.utils.iter_utils module
- deepfold.utils.log_utils module
- deepfold.utils.precision module
- deepfold.utils.random module
- deepfold.utils.rigid_utils module
Rigid
Rigid.apply()
Rigid.apply_rot_fn()
Rigid.apply_trans_fn()
Rigid.cat()
Rigid.compose()
Rigid.compose_q_update_vec()
Rigid.cuda()
Rigid.device
Rigid.dtype
Rigid.from_3_points()
Rigid.from_tensor_4x4()
Rigid.from_tensor_7()
Rigid.get_rots()
Rigid.get_trans()
Rigid.identity()
Rigid.invert()
Rigid.invert_apply()
Rigid.make_transform_from_reference()
Rigid.map_tensor_fn()
Rigid.scale_translation()
Rigid.shape
Rigid.stop_rot_gradient()
Rigid.to_tensor_4x4()
Rigid.to_tensor_7()
Rigid.unsqueeze()
Rotation
Rotation.apply()
Rotation.cat()
Rotation.compose_q()
Rotation.compose_q_update_vec()
Rotation.compose_r()
Rotation.cuda()
Rotation.detach()
Rotation.device
Rotation.dtype
Rotation.get_cur_rot()
Rotation.get_quats()
Rotation.get_rot_mats()
Rotation.identity()
Rotation.invert()
Rotation.invert_apply()
Rotation.map_tensor_fn()
Rotation.requires_grad
Rotation.shape
Rotation.to()
Rotation.unsqueeze()
identity_quats()
identity_rot_mats()
identity_trans()
invert_quat()
invert_rot_mat()
quat_multiply()
quat_multiply_by_vec()
quat_to_rot()
rot_matmul()
rot_to_quat()
rot_vec_mul()
- deepfold.utils.script_utils module
- deepfold.utils.swa_utils module
- deepfold.utils.tensor_utils module
- Module contents
- Subpackages
Submodules¶
deepfold.config module¶
DeepFold2 model configuration.
- class deepfold.config.AlphaFoldConfig(is_multimer: 'bool' = False, input_embedder_config: 'InputEmbedderConfig' = InputEmbedderConfig(tf_dim=22, msa_dim=49, c_z=128, c_m=256, relpos_k=32, max_relative_chain=2, max_relative_index=32, use_chain_relative=True), recycling_embedder_config: 'RecyclingEmbedderConfig' = RecyclingEmbedderConfig(c_m=256, c_z=128, min_bin=3.25, max_bin=20.75, num_bins=15, inf=100000000.0), template_angle_embedder_config: 'TemplateAngleEmbedderConfig' = TemplateAngleEmbedderConfig(ta_dim=57, c_m=256), template_pair_embedder_config: 'TemplatePairEmbedderConfig' = TemplatePairEmbedderConfig(tp_dim=88, c_t=64, c_z=128, c_dgram=39, c_aatype=22), template_pair_stack_config: 'TemplatePairStackConfig' = TemplatePairStackConfig(c_t=64, c_hidden_tri_att=16, c_hidden_tri_mul=64, num_blocks=2, num_heads_tri=4, pair_transition_n=2, dropout_rate=0.25, inf=1000000000.0, chunk_size_tri_att=None, block_size_tri_mul=None, tri_att_first=True), template_pointwise_attention_config: 'TemplatePointwiseAttentionConfig' = TemplatePointwiseAttentionConfig(c_t=64, c_z=128, c_hidden=16, num_heads=4, inf=100000.0, chunk_size=None), template_projection_config: 'TemplateProjectionConfig' = TemplateProjectionConfig(c_t=64, c_z=128), extra_msa_embedder_config: 'ExtraMSAEmbedderConfig' = ExtraMSAEmbedderConfig(emsa_dim=25, c_e=64), extra_msa_stack_config: 'ExtraMSAStackConfig' = ExtraMSAStackConfig(c_e=64, c_z=128, c_hidden_msa_att=8, c_hidden_opm=32, c_hidden_tri_mul=128, c_hidden_tri_att=32, num_heads_msa=8, num_heads_tri=4, num_blocks=4, transition_n=4, msa_dropout=0.15, pair_dropout=0.25, inf=1000000000.0, eps=1e-08, eps_opm=0.001, chunk_size_msa_att=None, chunk_size_opm=None, chunk_size_tri_att=None, block_size_tri_mul=None, outer_product_mean_first=False), evoformer_stack_config: 'EvoformerStackConfig' = EvoformerStackConfig(c_m=256, c_z=128, c_hidden_msa_att=32, c_hidden_opm=32, c_hidden_tri_mul=128, c_hidden_tri_att=32, c_s=384, num_heads_msa=8, num_heads_tri=4, num_blocks=48, transition_n=4, msa_dropout=0.15, pair_dropout=0.25, inf=1000000000.0, eps_opm=0.001, chunk_size_msa_att=None, chunk_size_opm=None, chunk_size_tri_att=None, block_size_tri_mul=None, outer_product_mean_first=False), structure_module_config: 'StructureModuleConfig' = StructureModuleConfig(c_s=384, c_z=128, c_hidden_ipa=16, c_hidden_ang_res=128, num_heads_ipa=12, num_qk_points=4, num_v_points=8, is_multimer=False, dropout_rate=0.1, num_blocks=8, num_ang_res_blocks=2, num_angles=7, scale_factor=10.0, inf=100000.0, eps=1e-08), auxiliary_heads_config: 'AuxiliaryHeadsConfig' = AuxiliaryHeadsConfig(per_residue_lddt_ca_predictor_config=PerResidueLDDTCaPredictorConfig(c_s=384, c_hidden=128, num_bins=50), distogram_head_config=DistogramHeadConfig(c_z=128, num_bins=64), masked_msa_head_config=MaskedMSAHeadConfig(c_m=256, c_out=23), experimentally_resolved_head_config=ExperimentallyResolvedHeadConfig(c_s=384, c_out=37), tm_score_head_config=TMScoreHeadConfig(c_z=128, num_bins=64, max_bin=31), tm_score_head_enabled=False, ptm_weight=0.2, iptm_weight=0.8), loss_config: 'LossConfig' = LossConfig(fape_loss_config=FAPELossConfig(weight=1.0, backbone_clamp_distance=10.0, backbone_loss_unit_distance=10.0, backbone_weight=0.5, interface_clamp_distance=30.0, interface_loss_unit_distance=20.0, interface_weight=0.5, sidechain_clamp_distance=10.0, sidechain_length_scale=10.0, sidechain_weight=0.5, eps=0.0001), supervised_chi_loss_config=SupervisedChiLossConfig(weight=1.0, chi_weight=0.5, angle_norm_weight=0.01, eps=1e-08), distogram_loss_config=DistogramLossConfig(weight=0.3, min_bin=2.3125, max_bin=21.6875, num_bins=64, eps=1e-08), masked_msa_loss_config=MaskedMSALossConfig(weight=2.0, eps=1e-08, num_classes=23), plddt_loss_config=PLDDTLossConfig(weight=0.01, cutoff=15.0, min_resolution=0.1, max_resolution=3.0, num_bins=50, eps=1e-08), experimentally_resolved_loss_config=ExperimentallyResolvedLossConfig(weight=0.0, min_resolution=0.1, max_resolution=3.0, eps=1e-08), violation_loss_config=ViolationLossConfig(weight=0.0, violation_tolerance_factor=12.0, average_clashes=False, clash_overlap_tolerance=1.5, eps=1e-06), tm_loss_config=TMLossConfig(enabled=False, weight=0.0, min_resolution=0.1, max_resolution=3.0, num_bins=64, max_bin=31, eps=1e-08), chain_center_of_mass_config=CenterOfMassConfig(enabled=False, clamp_distance=-4.0, eps=1e-10, weight=0.05)), recycle_early_stop_enabled: 'bool' = False, recycle_early_stop_tolerance: 'float' = 0.5, templates_enabled: 'bool' = True, embed_template_torsion_angles: 'bool' = True, template_pair_feat_distogram_min_bin: 'float' = 3.25, template_pair_feat_distogram_max_bin: 'float' = 50.75, template_pair_feat_distogram_num_bins: 'int' = 39, template_pair_feat_use_unit_vector: 'bool' = False, template_pair_feat_inf: 'float' = 100000.0, template_pair_feat_eps: 'float' = 1e-06)¶
Bases:
object
- auxiliary_heads_config: AuxiliaryHeadsConfig = AuxiliaryHeadsConfig(per_residue_lddt_ca_predictor_config=PerResidueLDDTCaPredictorConfig(c_s=384, c_hidden=128, num_bins=50), distogram_head_config=DistogramHeadConfig(c_z=128, num_bins=64), masked_msa_head_config=MaskedMSAHeadConfig(c_m=256, c_out=23), experimentally_resolved_head_config=ExperimentallyResolvedHeadConfig(c_s=384, c_out=37), tm_score_head_config=TMScoreHeadConfig(c_z=128, num_bins=64, max_bin=31), tm_score_head_enabled=False, ptm_weight=0.2, iptm_weight=0.8)¶
- embed_template_torsion_angles: bool = True¶
- evoformer_stack_config: EvoformerStackConfig = EvoformerStackConfig(c_m=256, c_z=128, c_hidden_msa_att=32, c_hidden_opm=32, c_hidden_tri_mul=128, c_hidden_tri_att=32, c_s=384, num_heads_msa=8, num_heads_tri=4, num_blocks=48, transition_n=4, msa_dropout=0.15, pair_dropout=0.25, inf=1000000000.0, eps_opm=0.001, chunk_size_msa_att=None, chunk_size_opm=None, chunk_size_tri_att=None, block_size_tri_mul=None, outer_product_mean_first=False)¶
- extra_msa_embedder_config: ExtraMSAEmbedderConfig = ExtraMSAEmbedderConfig(emsa_dim=25, c_e=64)¶
- extra_msa_stack_config: ExtraMSAStackConfig = ExtraMSAStackConfig(c_e=64, c_z=128, c_hidden_msa_att=8, c_hidden_opm=32, c_hidden_tri_mul=128, c_hidden_tri_att=32, num_heads_msa=8, num_heads_tri=4, num_blocks=4, transition_n=4, msa_dropout=0.15, pair_dropout=0.25, inf=1000000000.0, eps=1e-08, eps_opm=0.001, chunk_size_msa_att=None, chunk_size_opm=None, chunk_size_tri_att=None, block_size_tri_mul=None, outer_product_mean_first=False)¶
- classmethod from_dict(cfg: dict) AlphaFoldConfig ¶
- classmethod from_preset(is_multimer: bool = False, precision: str = 'fp32', enable_ptm: bool = False, enable_templates: bool = False, inference_chunk_size: int | None = 4, inference_block_size: int | None = None, **additional_options) AlphaFoldConfig ¶
- input_embedder_config: InputEmbedderConfig = InputEmbedderConfig(tf_dim=22, msa_dim=49, c_z=128, c_m=256, relpos_k=32, max_relative_chain=2, max_relative_index=32, use_chain_relative=True)¶
- is_multimer: bool = False¶
- loss_config: LossConfig = LossConfig(fape_loss_config=FAPELossConfig(weight=1.0, backbone_clamp_distance=10.0, backbone_loss_unit_distance=10.0, backbone_weight=0.5, interface_clamp_distance=30.0, interface_loss_unit_distance=20.0, interface_weight=0.5, sidechain_clamp_distance=10.0, sidechain_length_scale=10.0, sidechain_weight=0.5, eps=0.0001), supervised_chi_loss_config=SupervisedChiLossConfig(weight=1.0, chi_weight=0.5, angle_norm_weight=0.01, eps=1e-08), distogram_loss_config=DistogramLossConfig(weight=0.3, min_bin=2.3125, max_bin=21.6875, num_bins=64, eps=1e-08), masked_msa_loss_config=MaskedMSALossConfig(weight=2.0, eps=1e-08, num_classes=23), plddt_loss_config=PLDDTLossConfig(weight=0.01, cutoff=15.0, min_resolution=0.1, max_resolution=3.0, num_bins=50, eps=1e-08), experimentally_resolved_loss_config=ExperimentallyResolvedLossConfig(weight=0.0, min_resolution=0.1, max_resolution=3.0, eps=1e-08), violation_loss_config=ViolationLossConfig(weight=0.0, violation_tolerance_factor=12.0, average_clashes=False, clash_overlap_tolerance=1.5, eps=1e-06), tm_loss_config=TMLossConfig(enabled=False, weight=0.0, min_resolution=0.1, max_resolution=3.0, num_bins=64, max_bin=31, eps=1e-08), chain_center_of_mass_config=CenterOfMassConfig(enabled=False, clamp_distance=-4.0, eps=1e-10, weight=0.05))¶
- recycle_early_stop_enabled: bool = False¶
- recycle_early_stop_tolerance: float = 0.5¶
- recycling_embedder_config: RecyclingEmbedderConfig = RecyclingEmbedderConfig(c_m=256, c_z=128, min_bin=3.25, max_bin=20.75, num_bins=15, inf=100000000.0)¶
- structure_module_config: StructureModuleConfig = StructureModuleConfig(c_s=384, c_z=128, c_hidden_ipa=16, c_hidden_ang_res=128, num_heads_ipa=12, num_qk_points=4, num_v_points=8, is_multimer=False, dropout_rate=0.1, num_blocks=8, num_ang_res_blocks=2, num_angles=7, scale_factor=10.0, inf=100000.0, eps=1e-08)¶
- template_angle_embedder_config: TemplateAngleEmbedderConfig = TemplateAngleEmbedderConfig(ta_dim=57, c_m=256)¶
- template_pair_embedder_config: TemplatePairEmbedderConfig = TemplatePairEmbedderConfig(tp_dim=88, c_t=64, c_z=128, c_dgram=39, c_aatype=22)¶
- template_pair_feat_distogram_max_bin: float = 50.75¶
- template_pair_feat_distogram_min_bin: float = 3.25¶
- template_pair_feat_distogram_num_bins: int = 39¶
- template_pair_feat_eps: float = 1e-06¶
- template_pair_feat_inf: float = 100000.0¶
- template_pair_feat_use_unit_vector: bool = False¶
- template_pair_stack_config: TemplatePairStackConfig = TemplatePairStackConfig(c_t=64, c_hidden_tri_att=16, c_hidden_tri_mul=64, num_blocks=2, num_heads_tri=4, pair_transition_n=2, dropout_rate=0.25, inf=1000000000.0, chunk_size_tri_att=None, block_size_tri_mul=None, tri_att_first=True)¶
- template_pointwise_attention_config: TemplatePointwiseAttentionConfig = TemplatePointwiseAttentionConfig(c_t=64, c_z=128, c_hidden=16, num_heads=4, inf=100000.0, chunk_size=None)¶
- template_projection_config: TemplateProjectionConfig = TemplateProjectionConfig(c_t=64, c_z=128)¶
- templates_enabled: bool = True¶
- to_dict() dict ¶
- class deepfold.config.AuxiliaryHeadsConfig(per_residue_lddt_ca_predictor_config: 'PerResidueLDDTCaPredictorConfig' = PerResidueLDDTCaPredictorConfig(c_s=384, c_hidden=128, num_bins=50), distogram_head_config: 'DistogramHeadConfig' = DistogramHeadConfig(c_z=128, num_bins=64), masked_msa_head_config: 'MaskedMSAHeadConfig' = MaskedMSAHeadConfig(c_m=256, c_out=23), experimentally_resolved_head_config: 'ExperimentallyResolvedHeadConfig' = ExperimentallyResolvedHeadConfig(c_s=384, c_out=37), tm_score_head_config: 'TMScoreHeadConfig' = TMScoreHeadConfig(c_z=128, num_bins=64, max_bin=31), tm_score_head_enabled: 'bool' = False, ptm_weight: 'float' = 0.2, iptm_weight: 'float' = 0.8)¶
Bases:
object
- distogram_head_config: DistogramHeadConfig = DistogramHeadConfig(c_z=128, num_bins=64)¶
- experimentally_resolved_head_config: ExperimentallyResolvedHeadConfig = ExperimentallyResolvedHeadConfig(c_s=384, c_out=37)¶
- iptm_weight: float = 0.8¶
- masked_msa_head_config: MaskedMSAHeadConfig = MaskedMSAHeadConfig(c_m=256, c_out=23)¶
- per_residue_lddt_ca_predictor_config: PerResidueLDDTCaPredictorConfig = PerResidueLDDTCaPredictorConfig(c_s=384, c_hidden=128, num_bins=50)¶
- ptm_weight: float = 0.2¶
- tm_score_head_config: TMScoreHeadConfig = TMScoreHeadConfig(c_z=128, num_bins=64, max_bin=31)¶
- tm_score_head_enabled: bool = False¶
- class deepfold.config.CenterOfMassConfig(enabled: 'bool' = False, clamp_distance: 'float' = -4.0, eps: 'float' = 1e-10, weight: 'float' = 0.05)¶
Bases:
object
- clamp_distance: float = -4.0¶
- enabled: bool = False¶
- eps: float = 1e-10¶
- weight: float = 0.05¶
- class deepfold.config.DistogramHeadConfig(c_z: 'int' = 128, num_bins: 'int' = 64)¶
Bases:
object
- c_z: int = 128¶
- num_bins: int = 64¶
- class deepfold.config.DistogramLossConfig(weight: 'float' = 0.3, min_bin: 'float' = 2.3125, max_bin: 'float' = 21.6875, num_bins: 'int' = 64, eps: 'float' = 1e-08)¶
Bases:
object
- eps: float = 1e-08¶
- max_bin: float = 21.6875¶
- min_bin: float = 2.3125¶
- num_bins: int = 64¶
- weight: float = 0.3¶
- class deepfold.config.EvoformerStackConfig(c_m: 'int' = 256, c_z: 'int' = 128, c_hidden_msa_att: 'int' = 32, c_hidden_opm: 'int' = 32, c_hidden_tri_mul: 'int' = 128, c_hidden_tri_att: 'int' = 32, c_s: 'int' = 384, num_heads_msa: 'int' = 8, num_heads_tri: 'int' = 4, num_blocks: 'int' = 48, transition_n: 'int' = 4, msa_dropout: 'float' = 0.15, pair_dropout: 'float' = 0.25, inf: 'float' = 1000000000.0, eps_opm: 'float' = 0.001, chunk_size_msa_att: 'Optional[int]' = None, chunk_size_opm: 'Optional[int]' = None, chunk_size_tri_att: 'Optional[int]' = None, block_size_tri_mul: 'Optional[int]' = None, outer_product_mean_first: 'bool' = False)¶
Bases:
object
- block_size_tri_mul: int | None = None¶
- c_m: int = 256¶
- c_s: int = 384¶
- c_z: int = 128¶
- chunk_size_msa_att: int | None = None¶
- chunk_size_opm: int | None = None¶
- chunk_size_tri_att: int | None = None¶
- eps_opm: float = 0.001¶
- inf: float = 1000000000.0¶
- msa_dropout: float = 0.15¶
- num_blocks: int = 48¶
- num_heads_msa: int = 8¶
- num_heads_tri: int = 4¶
- outer_product_mean_first: bool = False¶
- pair_dropout: float = 0.25¶
- transition_n: int = 4¶
- class deepfold.config.ExperimentallyResolvedHeadConfig(c_s: 'int' = 384, c_out: 'int' = 37)¶
Bases:
object
- c_out: int = 37¶
- c_s: int = 384¶
- class deepfold.config.ExperimentallyResolvedLossConfig(weight: 'float' = 0.0, min_resolution: 'float' = 0.1, max_resolution: 'float' = 3.0, eps: 'float' = 1e-08)¶
Bases:
object
- eps: float = 1e-08¶
- max_resolution: float = 3.0¶
- min_resolution: float = 0.1¶
- weight: float = 0.0¶
- class deepfold.config.ExtraMSAEmbedderConfig(emsa_dim: 'int' = 25, c_e: 'int' = 64)¶
Bases:
object
- c_e: int = 64¶
- emsa_dim: int = 25¶
- class deepfold.config.ExtraMSAStackConfig(c_e: 'int' = 64, c_z: 'int' = 128, c_hidden_msa_att: 'int' = 8, c_hidden_opm: 'int' = 32, c_hidden_tri_mul: 'int' = 128, c_hidden_tri_att: 'int' = 32, num_heads_msa: 'int' = 8, num_heads_tri: 'int' = 4, num_blocks: 'int' = 4, transition_n: 'int' = 4, msa_dropout: 'float' = 0.15, pair_dropout: 'float' = 0.25, inf: 'float' = 1000000000.0, eps: 'float' = 1e-08, eps_opm: 'float' = 0.001, chunk_size_msa_att: 'Optional[int]' = None, chunk_size_opm: 'Optional[int]' = None, chunk_size_tri_att: 'Optional[int]' = None, block_size_tri_mul: 'Optional[int]' = None, outer_product_mean_first: 'bool' = False)¶
Bases:
object
- block_size_tri_mul: int | None = None¶
- c_e: int = 64¶
- c_z: int = 128¶
- chunk_size_msa_att: int | None = None¶
- chunk_size_opm: int | None = None¶
- chunk_size_tri_att: int | None = None¶
- eps: float = 1e-08¶
- eps_opm: float = 0.001¶
- inf: float = 1000000000.0¶
- msa_dropout: float = 0.15¶
- num_blocks: int = 4¶
- num_heads_msa: int = 8¶
- num_heads_tri: int = 4¶
- outer_product_mean_first: bool = False¶
- pair_dropout: float = 0.25¶
- transition_n: int = 4¶
- class deepfold.config.FAPELossConfig(weight: 'float' = 1.0, backbone_clamp_distance: 'float' = 10.0, backbone_loss_unit_distance: 'float' = 10.0, backbone_weight: 'float' = 0.5, interface_clamp_distance: 'float' = 30.0, interface_loss_unit_distance: 'float' = 20.0, interface_weight: 'float' = 0.5, sidechain_clamp_distance: 'float' = 10.0, sidechain_length_scale: 'float' = 10.0, sidechain_weight: 'float' = 0.5, eps: 'float' = 0.0001)¶
Bases:
object
- backbone_clamp_distance: float = 10.0¶
- backbone_loss_unit_distance: float = 10.0¶
- backbone_weight: float = 0.5¶
- eps: float = 0.0001¶
- interface_clamp_distance: float = 30.0¶
- interface_loss_unit_distance: float = 20.0¶
- interface_weight: float = 0.5¶
- sidechain_clamp_distance: float = 10.0¶
- sidechain_length_scale: float = 10.0¶
- sidechain_weight: float = 0.5¶
- weight: float = 1.0¶
- class deepfold.config.FeaturePipelineConfig(preset: 'str' = '', is_multimer: 'bool' = False, seed: 'int' = 0, num_chunks: 'int' = 8, fixed_size: 'bool' = True, max_msa_clusters: 'int' = 128, max_extra_msa: 'int' = 1024, sample_msa_distillation_enabled: 'bool' = False, max_distillation_msa_clusters: 'int' = 1000, block_delete_msa_enabled: 'bool' = True, msa_fraction_per_deletion_block: 'float' = 0.3, randomize_num_msa_deletion_blocks: 'bool' = False, num_msa_deletion_blocks: 'int' = 5, masked_msa_enabled: 'bool' = True, masked_msa_profile_prob: 'float' = 0.1, masked_msa_same_prob: 'float' = 0.1, masked_msa_uniform_prob: 'float' = 0.1, masked_msa_replace_fraction: 'float' = 0.15, max_recycling_iters: 'int' = 3, resample_msa_in_recycling: 'bool' = True, residue_cropping_enabled: 'bool' = False, crop_size: 'int' = 256, spatial_crop_prob: 'float' = 0.5, interface_threshold: 'float' = 10.0, primary_raw_feature_names: 'List[str]' = <factory>, msa_cluster_features_enabled: 'bool' = True, templates_enabled: 'bool' = True, embed_template_torsion_angles: 'bool' = True, max_templates: 'int' = 4, shuffle_top_k_prefiltered: 'int' = 20, subsample_templates: 'bool' = False, template_raw_feature_names: 'List[str]' = <factory>, supervised_features_enabled: 'bool' = False, supervised_raw_feature_names: 'List[str]' = <factory>, clamped_fape_enabled: 'bool' = False, clamped_fape_probability: 'float' = 0.9, self_distillation_plddt_threshold: 'float' = 50.0)¶
Bases:
object
- block_delete_msa_enabled: bool = True¶
- clamped_fape_enabled: bool = False¶
- clamped_fape_probability: float = 0.9¶
- crop_size: int = 256¶
- embed_template_torsion_angles: bool = True¶
- feature_names() List[str] ¶
- fixed_size: bool = True¶
- classmethod from_dict(cfg: dict) FeaturePipelineConfig ¶
- classmethod from_preset(preset: str, seed: int, is_multimer: bool = False, **additional_options) FeaturePipelineConfig ¶
- interface_threshold: float = 10.0¶
- is_multimer: bool = False¶
- masked_msa_enabled: bool = True¶
- masked_msa_profile_prob: float = 0.1¶
- masked_msa_replace_fraction: float = 0.15¶
- masked_msa_same_prob: float = 0.1¶
- masked_msa_uniform_prob: float = 0.1¶
- max_distillation_msa_clusters: int = 1000¶
- max_extra_msa: int = 1024¶
- max_msa_clusters: int = 128¶
- max_recycling_iters: int = 3¶
- max_templates: int = 4¶
- msa_cluster_features_enabled: bool = True¶
- msa_fraction_per_deletion_block: float = 0.3¶
- num_chunks: int = 8¶
- num_msa_deletion_blocks: int = 5¶
- preset: str = ''¶
- primary_raw_feature_names: List[str]¶
- randomize_num_msa_deletion_blocks: bool = False¶
- resample_msa_in_recycling: bool = True¶
- residue_cropping_enabled: bool = False¶
- sample_msa_distillation_enabled: bool = False¶
- seed: int = 0¶
- self_distillation_plddt_threshold: float = 50.0¶
- shuffle_top_k_prefiltered: int = 20¶
- spatial_crop_prob: float = 0.5¶
- subsample_templates: bool = False¶
- supervised_features_enabled: bool = False¶
- supervised_raw_feature_names: List[str]¶
- template_raw_feature_names: List[str]¶
- templates_enabled: bool = True¶
- to_dict() dict ¶
- class deepfold.config.InputEmbedderConfig(tf_dim: 'int' = 22, msa_dim: 'int' = 49, c_z: 'int' = 128, c_m: 'int' = 256, relpos_k: 'int' = 32, max_relative_chain: 'int' = 2, max_relative_index: 'int' = 32, use_chain_relative: 'bool' = True)¶
Bases:
object
- c_m: int = 256¶
- c_z: int = 128¶
- max_relative_chain: int = 2¶
- max_relative_index: int = 32¶
- msa_dim: int = 49¶
- relpos_k: int = 32¶
- tf_dim: int = 22¶
- use_chain_relative: bool = True¶
- class deepfold.config.LossConfig(fape_loss_config: 'FAPELossConfig' = FAPELossConfig(weight=1.0, backbone_clamp_distance=10.0, backbone_loss_unit_distance=10.0, backbone_weight=0.5, interface_clamp_distance=30.0, interface_loss_unit_distance=20.0, interface_weight=0.5, sidechain_clamp_distance=10.0, sidechain_length_scale=10.0, sidechain_weight=0.5, eps=0.0001), supervised_chi_loss_config: 'SupervisedChiLossConfig' = SupervisedChiLossConfig(weight=1.0, chi_weight=0.5, angle_norm_weight=0.01, eps=1e-08), distogram_loss_config: 'DistogramLossConfig' = DistogramLossConfig(weight=0.3, min_bin=2.3125, max_bin=21.6875, num_bins=64, eps=1e-08), masked_msa_loss_config: 'MaskedMSALossConfig' = MaskedMSALossConfig(weight=2.0, eps=1e-08, num_classes=23), plddt_loss_config: 'PLDDTLossConfig' = PLDDTLossConfig(weight=0.01, cutoff=15.0, min_resolution=0.1, max_resolution=3.0, num_bins=50, eps=1e-08), experimentally_resolved_loss_config: 'ExperimentallyResolvedLossConfig' = ExperimentallyResolvedLossConfig(weight=0.0, min_resolution=0.1, max_resolution=3.0, eps=1e-08), violation_loss_config: 'ViolationLossConfig' = ViolationLossConfig(weight=0.0, violation_tolerance_factor=12.0, average_clashes=False, clash_overlap_tolerance=1.5, eps=1e-06), tm_loss_config: 'TMLossConfig' = TMLossConfig(enabled=False, weight=0.0, min_resolution=0.1, max_resolution=3.0, num_bins=64, max_bin=31, eps=1e-08), chain_center_of_mass_config: 'CenterOfMassConfig' = CenterOfMassConfig(enabled=False, clamp_distance=-4.0, eps=1e-10, weight=0.05))¶
Bases:
object
- chain_center_of_mass_config: CenterOfMassConfig = CenterOfMassConfig(enabled=False, clamp_distance=-4.0, eps=1e-10, weight=0.05)¶
- distogram_loss_config: DistogramLossConfig = DistogramLossConfig(weight=0.3, min_bin=2.3125, max_bin=21.6875, num_bins=64, eps=1e-08)¶
- experimentally_resolved_loss_config: ExperimentallyResolvedLossConfig = ExperimentallyResolvedLossConfig(weight=0.0, min_resolution=0.1, max_resolution=3.0, eps=1e-08)¶
- fape_loss_config: FAPELossConfig = FAPELossConfig(weight=1.0, backbone_clamp_distance=10.0, backbone_loss_unit_distance=10.0, backbone_weight=0.5, interface_clamp_distance=30.0, interface_loss_unit_distance=20.0, interface_weight=0.5, sidechain_clamp_distance=10.0, sidechain_length_scale=10.0, sidechain_weight=0.5, eps=0.0001)¶
- masked_msa_loss_config: MaskedMSALossConfig = MaskedMSALossConfig(weight=2.0, eps=1e-08, num_classes=23)¶
- plddt_loss_config: PLDDTLossConfig = PLDDTLossConfig(weight=0.01, cutoff=15.0, min_resolution=0.1, max_resolution=3.0, num_bins=50, eps=1e-08)¶
- supervised_chi_loss_config: SupervisedChiLossConfig = SupervisedChiLossConfig(weight=1.0, chi_weight=0.5, angle_norm_weight=0.01, eps=1e-08)¶
- tm_loss_config: TMLossConfig = TMLossConfig(enabled=False, weight=0.0, min_resolution=0.1, max_resolution=3.0, num_bins=64, max_bin=31, eps=1e-08)¶
- violation_loss_config: ViolationLossConfig = ViolationLossConfig(weight=0.0, violation_tolerance_factor=12.0, average_clashes=False, clash_overlap_tolerance=1.5, eps=1e-06)¶
- class deepfold.config.MaskedMSAHeadConfig(c_m: 'int' = 256, c_out: 'int' = 23)¶
Bases:
object
- c_m: int = 256¶
- c_out: int = 23¶
- class deepfold.config.MaskedMSALossConfig(weight: 'float' = 2.0, eps: 'float' = 1e-08, num_classes: 'int' = 23)¶
Bases:
object
- eps: float = 1e-08¶
- num_classes: int = 23¶
- weight: float = 2.0¶
- class deepfold.config.PLDDTLossConfig(weight: 'float' = 0.01, cutoff: 'float' = 15.0, min_resolution: 'float' = 0.1, max_resolution: 'float' = 3.0, num_bins: 'int' = 50, eps: 'float' = 1e-08)¶
Bases:
object
- cutoff: float = 15.0¶
- eps: float = 1e-08¶
- max_resolution: float = 3.0¶
- min_resolution: float = 0.1¶
- num_bins: int = 50¶
- weight: float = 0.01¶
- class deepfold.config.PerResidueLDDTCaPredictorConfig(c_s: 'int' = 384, c_hidden: 'int' = 128, num_bins: 'int' = 50)¶
Bases:
object
- c_s: int = 384¶
- num_bins: int = 50¶
- class deepfold.config.RecyclingEmbedderConfig(c_m: 'int' = 256, c_z: 'int' = 128, min_bin: 'float' = 3.25, max_bin: 'float' = 20.75, num_bins: 'int' = 15, inf: 'float' = 100000000.0)¶
Bases:
object
- c_m: int = 256¶
- c_z: int = 128¶
- inf: float = 100000000.0¶
- max_bin: float = 20.75¶
- min_bin: float = 3.25¶
- num_bins: int = 15¶
- class deepfold.config.StructureModuleConfig(c_s: 'int' = 384, c_z: 'int' = 128, c_hidden_ipa: 'int' = 16, c_hidden_ang_res: 'int' = 128, num_heads_ipa: 'int' = 12, num_qk_points: 'int' = 4, num_v_points: 'int' = 8, is_multimer: 'bool' = False, dropout_rate: 'float' = 0.1, num_blocks: 'int' = 8, num_ang_res_blocks: 'int' = 2, num_angles: 'int' = 7, scale_factor: 'float' = 10.0, inf: 'float' = 100000.0, eps: 'float' = 1e-08)¶
Bases:
object
- c_s: int = 384¶
- c_z: int = 128¶
- dropout_rate: float = 0.1¶
- eps: float = 1e-08¶
- inf: float = 100000.0¶
- is_multimer: bool = False¶
- num_ang_res_blocks: int = 2¶
- num_angles: int = 7¶
- num_blocks: int = 8¶
- num_heads_ipa: int = 12¶
- num_qk_points: int = 4¶
- num_v_points: int = 8¶
- scale_factor: float = 10.0¶
- class deepfold.config.SupervisedChiLossConfig(weight: 'float' = 1.0, chi_weight: 'float' = 0.5, angle_norm_weight: 'float' = 0.01, eps: 'float' = 1e-08)¶
Bases:
object
- angle_norm_weight: float = 0.01¶
- chi_weight: float = 0.5¶
- eps: float = 1e-08¶
- weight: float = 1.0¶
- class deepfold.config.TMLossConfig(enabled: 'bool' = False, weight: 'float' = 0.0, min_resolution: 'float' = 0.1, max_resolution: 'float' = 3.0, num_bins: 'int' = 64, max_bin: 'int' = 31, eps: 'float' = 1e-08)¶
Bases:
object
- enabled: bool = False¶
- eps: float = 1e-08¶
- max_bin: int = 31¶
- max_resolution: float = 3.0¶
- min_resolution: float = 0.1¶
- num_bins: int = 64¶
- weight: float = 0.0¶
- class deepfold.config.TMScoreHeadConfig(c_z: 'int' = 128, num_bins: 'int' = 64, max_bin: 'int' = 31)¶
Bases:
object
- c_z: int = 128¶
- max_bin: int = 31¶
- num_bins: int = 64¶
- class deepfold.config.TemplateAngleEmbedderConfig(ta_dim: 'int' = 57, c_m: 'int' = 256)¶
Bases:
object
- c_m: int = 256¶
- ta_dim: int = 57¶
- class deepfold.config.TemplatePairEmbedderConfig(tp_dim: 'int' = 88, c_t: 'int' = 64, c_z: 'int' = 128, c_dgram: 'int' = 39, c_aatype: 'int' = 22)¶
Bases:
object
- c_aatype: int = 22¶
- c_dgram: int = 39¶
- c_t: int = 64¶
- c_z: int = 128¶
- tp_dim: int = 88¶
- class deepfold.config.TemplatePairStackConfig(c_t: 'int' = 64, c_hidden_tri_att: 'int' = 16, c_hidden_tri_mul: 'int' = 64, num_blocks: 'int' = 2, num_heads_tri: 'int' = 4, pair_transition_n: 'int' = 2, dropout_rate: 'float' = 0.25, inf: 'float' = 1000000000.0, chunk_size_tri_att: 'Optional[int]' = None, block_size_tri_mul: 'Optional[int]' = None, tri_att_first: 'bool' = True)¶
Bases:
object
- block_size_tri_mul: int | None = None¶
- c_t: int = 64¶
- chunk_size_tri_att: int | None = None¶
- dropout_rate: float = 0.25¶
- inf: float = 1000000000.0¶
- num_blocks: int = 2¶
- num_heads_tri: int = 4¶
- pair_transition_n: int = 2¶
- tri_att_first: bool = True¶
- class deepfold.config.TemplatePointwiseAttentionConfig(c_t: 'int' = 64, c_z: 'int' = 128, c_hidden: 'int' = 16, num_heads: 'int' = 4, inf: 'float' = 100000.0, chunk_size: 'Optional[int]' = None)¶
Bases:
object
- c_t: int = 64¶
- c_z: int = 128¶
- chunk_size: int | None = None¶
- inf: float = 100000.0¶
- num_heads: int = 4¶
- class deepfold.config.TemplateProjectionConfig(c_t: 'int' = 64, c_z: 'int' = 128)¶
Bases:
object
- c_t: int = 64¶
- c_z: int = 128¶
- class deepfold.config.TrainingConfig(gradient_clipping: 'bool' = True, clip_grad_max_nrom: 'float' = 0.1, swa_enabled: 'bool' = True, swa_decay_rate: 'float' = 0.9)¶
Bases:
object
- clip_grad_max_nrom: float = 0.1¶
- classmethod from_dict(cfg: dict) TrainingConfig ¶
- classmethod from_preset(**additional_options) TrainingConfig ¶
- gradient_clipping: bool = True¶
- optimizer_adam_amsgrad = False¶
- optimizer_adam_beta_1 = 0.9¶
- optimizer_adam_beta_2 = 0.999¶
- optimizer_adam_eps = 1e-06¶
- optimizer_adam_weight_decay = 0.0¶
- swa_decay_rate: float = 0.9¶
- swa_enabled: bool = True¶
- to_dict() dict ¶
- class deepfold.config.ViolationLossConfig(weight: 'float' = 0.0, violation_tolerance_factor: 'float' = 12.0, average_clashes: 'bool' = False, clash_overlap_tolerance: 'float' = 1.5, eps: 'float' = 1e-06)¶
Bases:
object
- average_clashes: bool = False¶
- clash_overlap_tolerance: float = 1.5¶
- eps: float = 1e-06¶
- violation_tolerance_factor: float = 12.0¶
- weight: float = 0.0¶
deepfold.loss module¶
- class deepfold.loss.AlphaFoldLoss(config: LossConfig)¶
Bases:
PatchedModule
AlphaFold loss module.
Supplementary ‘1.9 Loss functions and auxiliary heads’.
- forward(outputs: Dict[str, Tensor], batch: Dict[str, Tensor]) Tuple[Tensor, Dict[str, Tensor]] ¶
AlphaFold loss forward pass.
- Parameters:
outputs – forward pass output dict
batch – train batch dict
- Returns:
total loss connected to the graph losses: dict with loss detached from the graph
- Return type:
scaled_weight_total_loss
deepfold.package_info module¶
Package constants.