AF3 OpenFoldDataset类get_stochastic_train_filter_prob方法解读

AlphaFold3 data_modules 模块的 OpenFoldDataset 类的 get_stochastic_train_filter_prob 方法是类的静态方法@staticmethod),该方法接收一个 cache_entry(字典或类似的结构),用于存储蛋白质的相关信息。返回一个 浮点数,表示当前样本的采样概率。

源代码:

@staticmethod
    def get_stochastic_train_filter_prob(
        cache_entry: Any,
        *args, **kwargs
    ) -> float:
        # Stochastic filters
        probabilities = []

        cluster_size = cache_entry.get("cluster_size", None)
        if cluster_size is not None and cluster_size > 0:
            probabilities.append(1 / cluster_size)

        chain_length = len(cache_entry["seq"])
        probabilities.append((1 / 512) * (max(min(chain_length, 512), 256)))

        # Risk of underflow here?
        out = 1
        for p in probabilities:
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值