当前位置: 首页> 健康> 科研 > 中国核工业第二二建设有限公司待遇_2345网址大全设首页_十大禁止安装应用入口_长沙seo优化公司

中国核工业第二二建设有限公司待遇_2345网址大全设首页_十大禁止安装应用入口_长沙seo优化公司

时间:2025/7/13 8:28:53来源:https://blog.csdn.net/qq_27390023/article/details/147169958 浏览次数:0次
中国核工业第二二建设有限公司待遇_2345网址大全设首页_十大禁止安装应用入口_长沙seo优化公司

AlphaFold3 protein_dataset 模块 ProteinDataset 类 get_anchor_ind 方法是一个 @staticmethod 静态方法,用来获取“锚定残基(anchor residues)”的索引,目的是在蛋白质序列中被遮蔽(masked)的区域两端找到“已知(known)”的残基,以便后续作为上下文参考。

源代码:

    @staticmethoddef get_anchor_ind(masked_res, mask):"""Get the indices of the anchor residues.Anchor residues are defined as the first and last known residues before andafter each continuous masked region.Parameters----------masked_res : torch.TensorA boolean tensor indicating which residues should be predictedmask : torch.TensorA boolean tensor indicating which residues are knownReturns-------listA list of indices of the anchor residues"""anchor_ind = []masked_ind = torch.where(masked_res.bool())[0]known_ind = torch.where(mask.bool())[0]for _, g in groupby(enumerate(masked_ind), lambda x: x[0] - x[1]):group = map(itemgetter(1), g)group = list(map(int, group))start, end = group[0], group[-1]
关键字:中国核工业第二二建设有限公司待遇_2345网址大全设首页_十大禁止安装应用入口_长沙seo优化公司

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: