当前位置: 首页 > news >正文

AF3 Cropper类解读

AlphaFold3 protein_datamodule 模块 Cropper 类用于裁剪蛋白质输入数据的 PyTorch nn.Module 模块。在 ProteinDataModule 的数据预处理流程中,它是 transform 组合的一部分,主要作用是将蛋白质的相关特征裁剪为固定长度(如 384 residues),以适配下游模型的输入要求。

源代码:

class Cropper(nn.Module):
    """A transformation that crops the protein elements."""

    def __init__(self, crop_size: int = 384):
        super().__init__()
        self.crop_size = crop_size

    def forward(self, protein_dict: dict):
        """Crop the protein
        :param protein_dict: the protein dictionary with the elements
         - 'X': 3D coordinates of N, C, Ca, O, `(total_L, 4, 3)`,
         - 'S': sequence indices (shape `(total_L)`),
         - 'mask': residue mask (0 where coordinates are missing, 1 otherwise; with interpolation 0s are replaced
                   with 1s), (total_L),
         - 'mask_original': residue mask (0 where coordinates are missing, 1 otherwise; not changed with
                              interpolation), `(total_L)`,
         - 'residue_idx': residue indices (from 0 to length of sequence, +100 where chains change),
                            `(total_L)`,
         - 'chain_encoding_all&#

相关文章:

  • 音视频转换器 AV 接口静电保护方案
  • 状态压缩dp
  • Odrive源码分析(六) 相关控制变量传递
  • 基于redis 实现我的收藏功能优化详细设计方案
  • HCIP第十一天
  • 攻防世界——Web题ez_curl
  • 代码学习总结(二)
  • AIDD-人工智能药物-pyecharts-gallery
  • 滑动窗口(4)—将x减到0的最⼩操作数
  • 基于时间序列分解与XGBoost的交通通行时间预测方法解析
  • x265 编码参数 rdLevel 详细解析
  • buuctf sql注入类练习
  • UITableVIew性能优化概述
  • 【DE2-115】Verilog实现DDS+Quartus仿真波形
  • 【算法】One-Stage检测器与Two-Stage检测器的原理和区别
  • 开启bitlocker使用windows的加密功能
  • (1)VTK环境配置
  • Unity 基于navMesh的怪物追踪惯性系统
  • CAP理论 与 BASE理论
  • RAG文献阅读——用于知识密集型自然语言处理任务的检索增强生成
  • 怎样在微信上做网站/seo网络培训班
  • 自建站需要注册公司吗/sem竞价托管代运营
  • seo对网站的重要性/宁波seo网站
  • 营销型网站设计文章/seo课程培训机构
  • 校园网网站建设/网页制作html代码
  • design设计网站/新手如何涨1000粉