基于ADME的分子过滤和 lead-likeness标准

T002 · 基于ADME的分子过滤和 lead-likeness标准

项目来源于TeachOpenCADD

本文目标

在药物设计的背景下,重要的是通过例如它们的物理化学性质来过滤候选分子。

在这个教程中,从 ChEMBL ( Talktorial T001 )获得的化合物将按照 Lipinsik 的五法则进行过滤,以仅保留口服生物可利用的化合物。

理论内容

  • ADME - 吸收、分布、代谢和排泄
  • Lead-likeness 和 Lipinski 的五法则 (Ro5)
  • Lead-likeness背景下的雷达图

实践内容

  • 定义和可视化示例分子
  • 计算并绘制 Ro5 的分子特性
  • 调查是否符合 Ro5
  • 将 Ro5 应用于 EGFR 数据集
  • 可视化 Ro5 属性(雷达图)

理论

在虚拟筛选中,我们的目标是预测化合物是否可能与特定目标结合并相互作用。然而,如果我们想要鉴定一种新药,同样重要的是该化合物能够到达目标并最终以有利的方式从体内清除。因此,我们还应该考虑一种化合物是否真的被吸收到体内,以及它是否能够跨越某些障碍以达到其目标。它的代谢是否稳定?一旦不再作用于目标,它将如何排泄?这些过程在药代动力学领域进行了研究。与药效学( “药物对我们的身体有什么作用?” )相反,药代动力学处理的问题是“药物在我们体内发生了什么?” .

ADME - 吸收、分布、代谢和排泄

药代动力学主要分为四个步骤:吸收、分布、代谢和排泄。这些总结为 ADME。通常,ADME 还包括毒理学,因此被称为 ADMET 或 ADMETox。下面更详细地讨论了 ADME 步骤。

  • 吸收:药物吸收到体内的量和时间取决于多种因素,这些因素可能因人而异,他们的条件以及物质的特性。化合物溶解度(差)、胃排空时间、肠道转运时间、胃内的化学(不)稳定性和(不)渗透肠壁的能力等因素都会影响药物在给药后的吸收程度例如口服、吸入或接触皮肤。
  • 分布:吸收物质的分布,即在体内、血液和不同组织之间,以及穿过血脑屏障,受区域血流速率、化合物的分子大小和极性以及与血清蛋白和转运体结合的影响酵素。毒理学中的关键影响可能是脂肪组织中高度非极性物质的积累,或穿过血脑屏障。
  • 代谢:化合物进入体内后会被代谢。这意味着该化合物中只有一部分会真正达到其目标。主要是肝脏和肾脏酶负责分解异生素(身体外在的物质)。
  • 排泄:化合物及其代谢物需要通过排泄从体内清除,通常是通过肾脏(尿液)或粪便。不完全排泄会导致外来物质的积累或对正常代谢的不利干扰。

ADME processes in the human body

Figure 1: ADME processes in the human body (figure taken from Openclipart and adapted).

Lead-likeness 和 Lipinski 的五法则 (Ro5)

先导化合物是具有前景的开发候选药物。它们被用作起始结构并进行修饰以开发有效的药物。除了生物活性(化合物与感兴趣的靶标结合)之外,有利的 ADME 特性也是设计高效药物的重要标准。

化合物的生物利用度是一个重要的 ADME 特性。Lipinski 的五规则 (Ro5, Adv. Drug Deliv. Rev. (1997), 23, 3-25 ) 被引入以仅基于化合物的化学结构来估计化合物的生物利用度。Ro5 指出,如果化学结构违反以下规则中的一项以上,则化合物吸收或渗透不良的可能性更大:

  • 分子量 (MWT) <= 500 Da
  • 氢键受体 (HBA) 的数量 <= 10
  • 氢键供体 (HBD) 的数量 <= 5
  • 计算的 LogP(辛醇-水系数)<= 5

注:Ro5中所有数字均为五的倍数;这就是规则名称的由来。

补充说明:

  • LogP也称为分配系数或辛醇-水系数。它测量化合物的分布,通常在疏水相(例如 1-辛醇)和亲水相(例如水)之间。

  • 疏水性分子在水中的溶解度可能会降低,而亲水性更强的分子(例如大量的氢键受体和供体)或大分子(高分子量)可能更难通过磷脂膜。

lead-likeness背景下的雷达图

分子特性,例如 Ro5 特性,可以通过多种方式可视化(例如克雷格图、花图或金三角)以支持药物化学家的解释(Drug. Discov. Today (2011), 16(1-2 ) , 65-72).

由于它们的外观,雷达图有时也被称为“蜘蛛”或“蜘蛛网”图。它们以 360 度环状排列,每个条件都有一个轴,从中心开始。每个参数的值绘制在轴上并用一条线连接。阴影区域可以表示参数满足条件的区域。

Radar plot for physicochemical properties

Figure 2: Radar plot displaying physico-chemical properties of a compound dataset

实践

from pathlib import Path
import math

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
import matplotlib.patches as mpatches
from rdkit import Chem
from rdkit.Chem import Descriptors, Draw, PandasTools
# Set path to this notebook
HERE = Path(_dh[-1])
DATA = HERE / "data"

定义和可视化示例分子

在处理从 ChEMBL 检索到的整个数据集之前,我们选择了四种示例化合物来研究它们的化学性质。

我们从他们的 SMILES 中抽取了四个示例分子。

smiles = [
    "CCC1C(=O)N(CC(=O)N(C(C(=O)NC(C(=O)N(C(C(=O)NC(C(=O)NC(C(=O)N(C(C(=O)N(C(C(=O)N(C(C(=O)N(C(C(=O)N1)C(C(C)CC=CC)O)C)C(C)C)C)CC(C)C)C)CC(C)C)C)C)C)CC(C)C)C)C(C)C)CC(C)C)C)C",
    "CN1CCN(CC1)C2=C3C=CC=CC3=NC4=C(N2)C=C(C=C4)C",
    "CC1=C(C(CCC1)(C)C)C=CC(=CC=CC(=CC=CC=C(C)C=CC=C(C)C=CC2=C(CCCC2(C)C)C)C)C",
    "CCCCCC1=CC(=C(C(=C1)O)C2C=C(CCC2C(=C)C)C)O",
]
names = ["cyclosporine", "clozapine", "beta-carotene", "cannabidiol"]

首先,我们将分子的名称和 SMILES 及其结构组合在一个 DataFrame 中。

molecules = pd.DataFrame({"name": names, "smiles": smiles})
PandasTools.AddMoleculeColumnToFrame(molecules, "smiles")
molecules
namesmilesROMol
0cyclosporineCCC1C(=O)N(CC(=O)N(C(C(=O)NC(C(=O)N(C(C(=O)NC(...
Mol
1clozapineCN1CCN(CC1)C2=C3C=CC=CC3=NC4=C(N2)C=C(C=C4)C
Mol
2beta-caroteneCC1=C(C(CCC1)(C)C)C=CC(=CC=CC(=CC=CC=C(C)C=CC=...
Mol
3cannabidiolCCCCCC1=CC(=C(C(=C1)O)C2C=C(CCC2C(=C)C)C)O
Mol

计算并绘制 Ro5 的分子特性¶

  1. 使用rdkit描述符descriptors计算分子量、氢键受体和供体的数量以及 logP 。
molecules["molecular_weight"] = molecules["ROMol"].apply(Descriptors.ExactMolWt)
molecules["n_hba"] = molecules["ROMol"].apply(Descriptors.NumHAcceptors)
molecules["n_hbd"] = molecules["ROMol"].apply(Descriptors.NumHDonors)
molecules["logp"] = molecules["ROMol"].apply(Descriptors.MolLogP)

# Colors are used for plotting the molecules later
molecules["color"] = ["red", "green", "blue", "cyan"]
# NBVAL_CHECK_OUTPUT
molecules[["molecular_weight", "n_hba", "n_hbd", "logp"]]
molecular_weightn_hban_hbdlogp
01201.8413681253.26900
1306.184447411.68492
2536.4382020012.60580
3314.224580225.84650
# Full preview
molecules
namesmilesROMolmolecular_weightn_hban_hbdlogpcolor
0cyclosporineCCC1C(=O)N(CC(=O)N(C(C(=O)NC(C(=O)N(C(C(=O)NC(...
Mol
1201.8413681253.26900red
1clozapineCN1CCN(CC1)C2=C3C=CC=CC3=NC4=C(N2)C=C(C=C4)C
Mol
306.184447411.68492green
2beta-caroteneCC1=C(C(CCC1)(C)C)C=CC(=CC=CC(=CC=CC=C(C)C=CC=...
Mol
536.4382020012.60580blue
3cannabidiolCCCCCC1=CC(=C(C(=C1)O)C2C=C(CCC2C(=C)C)C)O
Mol
314.224580225.84650cyan
  1. 将分子特性绘制为条形图。
ro5_properties = {
    "molecular_weight": (500, "molecular weight (Da)"),
    "n_hba": (10, "# HBA"),
    "n_hbd": (5, "# HBD"),
    "logp": (5, "logP"),
}
# Start 1x4 plot frame
fig, axes = plt.subplots(figsize=(10, 2.5), nrows=1, ncols=4)
x = np.arange(1, len(molecules) + 1)
colors = ["red", "green", "blue", "cyan"]

# Create subplots
for index, (key, (threshold, title)) in enumerate(ro5_properties.items()):
    axes[index].bar([1, 2, 3, 4], molecules[key], color=colors)
    axes[index].axhline(y=threshold, color="black", linestyle="dashed")
    axes[index].set_title(title)
    axes[index].set_xticks([])

# Add legend
legend_elements = [
    mpatches.Patch(color=row["color"], label=row["name"]) for index, row in molecules.iterrows()
]
legend_elements.append(Line2D([0], [0], color="black", ls="dashed", label="Threshold"))
fig.legend(handles=legend_elements, bbox_to_anchor=(1.2, 0.8))

# Fit subplots and legend into figure
plt.tight_layout()
plt.show()

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-EJnxiOra-1686104448503)(null)]

在条形图中,我们比较了四个具有不同属性的示例分子的 Ro5 属性。在接下来的步骤中,我们将调查每种化合物是否违反 Ro5。

调查是否符合Ro5

def calculate_ro5_properties(smiles):
    """
    Test if input molecule (SMILES) fulfills Lipinski's rule of five.

    Parameters
    ----------
    smiles : str
        SMILES for a molecule.

    Returns
    -------
    pandas.Series
        Molecular weight, number of hydrogen bond acceptors/donor and logP value
        and Lipinski's rule of five compliance for input molecule.
    """
    # RDKit molecule from SMILES
    molecule = Chem.MolFromSmiles(smiles)
    # Calculate Ro5-relevant chemical properties
    molecular_weight = Descriptors.ExactMolWt(molecule)
    n_hba = Descriptors.NumHAcceptors(molecule)
    n_hbd = Descriptors.NumHDonors(molecule)
    logp = Descriptors.MolLogP(molecule)
    # Check if Ro5 conditions fulfilled
    conditions = [molecular_weight <= 500, n_hba <= 10, n_hbd <= 5, logp <= 5]
    ro5_fulfilled = sum(conditions) >= 3
    # Return True if no more than one out of four conditions is violated
    return pd.Series(
        [molecular_weight, n_hba, n_hbd, logp, ro5_fulfilled],
        index=["molecular_weight", "n_hba", "n_hbd", "logp", "ro5_fulfilled"],
    )
# NBVAL_CHECK_OUTPUT
for name, smiles in zip(molecules["name"], molecules["smiles"]):
    print(f"Ro5 fulfilled for {name}: {calculate_ro5_properties(smiles)['ro5_fulfilled']}")
Ro5 fulfilled for cyclosporine: False
Ro5 fulfilled for clozapine: True
Ro5 fulfilled for beta-carotene: False
Ro5 fulfilled for cannabidiol: True

根据 Ro5,估计环孢菌素cyclosporin和β-胡萝卜素beta-carotene的生物利用度较差。
然而,由于它们都是批准的药物,它们是 Ro5 如何用作警报但不一定用作过滤器的好例子。

将 Ro5 应用于 EGFR 数据集

该calculate_ro5_properties函数可应用于符合 Ro5 标准的化合物的 EGFR 数据集。

molecules = pd.read_csv(HERE / "../T001_query_chembl/data/EGFR_compounds.csv", index_col=0)
print(molecules.shape)
molecules.head()
(5568, 5)
molecule_chembl_idIC50unitssmilespIC50
0CHEMBL637860.003nMBrc1cccc(Nc2ncnc3cc4ccccc4cc23)c111.522879
1CHEMBL358200.006nMCCOc1cc2ncnc(Nc3cccc(Br)c3)c2cc1OCC11.221849
2CHEMBL537110.006nMCN(C)c1cc2c(Nc3cccc(Br)c3)ncnc2cn111.221849
3CHEMBL660310.008nMBrc1cccc(Nc2ncnc3cc4[nH]cnc4cc23)c111.096910
4CHEMBL537530.008nMCNc1cc2c(Nc3cccc(Br)c3)ncnc2cn111.096910

Apply the Ro5 to all molecules.

# This takes a couple of seconds
ro5_properties = molecules["smiles"].apply(calculate_ro5_properties)
ro5_properties.head()
molecular_weightn_hban_hbdlogpro5_fulfilled
0349.021459315.2891True
1387.058239514.9333True
2343.043258513.5969True
3339.011957424.0122True
4329.027607523.5726True

Concatenate molecules with Ro5 data.

molecules = pd.concat([molecules, ro5_properties], axis=1)
molecules.head()
molecule_chembl_idIC50unitssmilespIC50molecular_weightn_hban_hbdlogpro5_fulfilled
0CHEMBL637860.003nMBrc1cccc(Nc2ncnc3cc4ccccc4cc23)c111.522879349.021459315.2891True
1CHEMBL358200.006nMCCOc1cc2ncnc(Nc3cccc(Br)c3)c2cc1OCC11.221849387.058239514.9333True
2CHEMBL537110.006nMCN(C)c1cc2c(Nc3cccc(Br)c3)ncnc2cn111.221849343.043258513.5969True
3CHEMBL660310.008nMBrc1cccc(Nc2ncnc3cc4[nH]cnc4cc23)c111.096910339.011957424.0122True
4CHEMBL537530.008nMCNc1cc2c(Nc3cccc(Br)c3)ncnc2cn111.096910329.027607523.5726True
# Note that the column "ro5_fulfilled" contains boolean values.
# Thus, we can use the column values directly to subset data.
# Note that ~ negates boolean values.
molecules_ro5_fulfilled = molecules[molecules["ro5_fulfilled"]]
molecules_ro5_violated = molecules[~molecules["ro5_fulfilled"]]

print(f"# compounds in unfiltered data set: {molecules.shape[0]}")
print(f"# compounds in filtered data set: {molecules_ro5_fulfilled.shape[0]}")
print(f"# compounds not compliant with the Ro5: {molecules_ro5_violated.shape[0]}")
# NBVAL_CHECK_OUTPUT
# compounds in unfiltered data set: 5568
# compounds in filtered data set: 4635
# compounds not compliant with the Ro5: 933
# Save filtered data
molecules_ro5_fulfilled.to_csv(DATA / "EGFR_compounds_lipinski.csv")
molecules_ro5_fulfilled.head()
molecule_chembl_idIC50unitssmilespIC50molecular_weightn_hban_hbdlogpro5_fulfilled
0CHEMBL637860.003nMBrc1cccc(Nc2ncnc3cc4ccccc4cc23)c111.522879349.021459315.2891True
1CHEMBL358200.006nMCCOc1cc2ncnc(Nc3cccc(Br)c3)c2cc1OCC11.221849387.058239514.9333True
2CHEMBL537110.006nMCN(C)c1cc2c(Nc3cccc(Br)c3)ncnc2cn111.221849343.043258513.5969True
3CHEMBL660310.008nMBrc1cccc(Nc2ncnc3cc4[nH]cnc4cc23)c111.096910339.011957424.0122True
4CHEMBL537530.008nMCNc1cc2c(Nc3cccc(Br)c3)ncnc2cn111.096910329.027607523.5726True

可视化 Ro5 属性(雷达图)

计算 Ro5 属性的统计数据

定义一个辅助函数来计算输入 DataFrame 的均值和标准差。

def calculate_mean_std(dataframe):
    """
    Calculate the mean and standard deviation of a dataset.

    Parameters
    ----------
    dataframe : pd.DataFrame
        Properties (columns) for a set of items (rows).

    Returns
    -------
    pd.DataFrame
        Mean and standard deviation (columns) for different properties (rows).
    """
    # Generate descriptive statistics for property columns
    stats = dataframe.describe()
    # Transpose DataFrame (statistical measures = columns)
    stats = stats.T
    # Select mean and standard deviation
    stats = stats[["mean", "std"]]
    return stats

计算满足 Ro5的化合物数据集的统计数据。

molecules_ro5_fulfilled_stats = calculate_mean_std(
    molecules_ro5_fulfilled[["molecular_weight", "n_hba", "n_hbd", "logp"]]
)
molecules_ro5_fulfilled_stats
# NBVAL_CHECK_OUTPUT
meanstd
molecular_weight414.43901187.985100
n_hba5.9965481.875491
n_hbd1.8899681.008368
logp4.0705681.193034

计算了 违反 Ro5 的化合物数据集的统计数据

molecules_ro5_violated_stats = calculate_mean_std(
    molecules_ro5_violated[["molecular_weight", "n_hba", "n_hbd", "logp"]]
)
molecules_ro5_violated_stats
meanstd
molecular_weight587.961963101.999229
n_hba7.9635582.373576
n_hbd2.3011791.719732
logp5.9734611.430636

定义辅助函数为雷达绘图准备数据

下面,我们将定义一些仅用于雷达绘图的辅助函数。

准备 y 值:用于 Ro5 标准的属性具有不同的大小。MWT 的阈值为 500,而 HBA 和 HBD 的数量以及 LogP 的阈值分别仅为 10、5 和 5。为了最简单地可视化这些不同的尺度,我们将把所有属性值缩放到5 的缩放阈值:

scaled property value = property value / property threshold * scaled property threshold

  • scaled MWT = MWT / 500 * 5 = MWT / 100
  • scaled HBA = HBA / 10 * 5 = HBA / 2
  • scaled HBD = HBD / 5 * 5 = HBD
  • scaled LogP = LogP / 5 * 5 = LogP

这导致 MWT 缩小 100,HBA 缩小 2,而 HBD 和 LogP 保持不变。

以下辅助函数执行此类缩放,稍后将在雷达绘图期间使用。

def _scale_by_thresholds(stats, thresholds, scaled_threshold):
    """
    Scale values for different properties that have each an individually defined threshold.

    Parameters
    ----------
    stats : pd.DataFrame
        Dataframe with "mean" and "std" (columns) for each physicochemical property (rows).
    thresholds : dict of str: int
        Thresholds defined for each property.
    scaled_threshold : int or float
        Scaled thresholds across all properties.

    Returns
    -------
    pd.DataFrame
        DataFrame with scaled means and standard deviations for each physiochemical property.
    """
    # Raise error if scaling keys and data_stats indicies are not matching
    for property_name in stats.index:
        if property_name not in thresholds.keys():
            raise KeyError(f"Add property '{property_name}' to scaling variable.")
    # Scale property data
    stats_scaled = stats.apply(lambda x: x / thresholds[x.name] * scaled_threshold, axis=1)
    return stats_scaled

Prepare x values:

以下辅助函数返回 雷达图的物理化学属性轴的角度。例如,如果我们想为 4 个属性生成雷达图,我们想将轴设置为 0°、90°、180° 和 270°。辅助函数返回弧度等角度。

def _define_radial_axes_angles(n_axes):
    """Define angles (radians) for radial (x-)axes depending on the number of axes."""
    x_angles = [i / float(n_axes) * 2 * math.pi for i in range(n_axes)]
    x_angles += x_angles[:1]
    return x_angles

Both functions will be used as helper functions in the radar plotting function, which is defined next.

生成雷达图!

现在,我们定义了一个函数,以雷达图的形式可视化化合物的化学性质。我们遵循了stackoverflow 上的这些说明。

def plot_radar(
    y,
    thresholds,
    scaled_threshold,
    properties_labels,
    y_max=None,
    output_path=None,
):
    """
    Plot a radar chart based on the mean and standard deviation of a data set's properties.

    Parameters
    ----------
    y : pd.DataFrame
        Dataframe with "mean" and "std" (columns) for each physicochemical property (rows).
    thresholds : dict of str: int
        Thresholds defined for each property.
    scaled_threshold : int or float
        Scaled thresholds across all properties.
    properties_labels : list of str
        List of property names to be used as labels in the plot.
    y_max : None or int or float
        Set maximum y value. If None, let matplotlib decide.
    output_path : None or pathlib.Path
        If not None, save plot to file.
    """

    # Define radial x-axes angles -- uses our helper function!
    x = _define_radial_axes_angles(len(y))
    # Scale y-axis values with respect to a defined threshold -- uses our helper function!
    y = _scale_by_thresholds(y, thresholds, scaled_threshold)
    # Since our chart will be circular we append the first value of each property to the end
    y = y.append(y.iloc[0])

    # Set figure and subplot axis
    plt.figure(figsize=(6, 6))
    ax = plt.subplot(111, polar=True)

    # Plot data
    ax.fill(x, [scaled_threshold] * 5, "cornflowerblue", alpha=0.2)
    ax.plot(x, y["mean"], "b", lw=3, ls="-")
    ax.plot(x, y["mean"] + y["std"], "orange", lw=2, ls="--")
    ax.plot(x, y["mean"] - y["std"], "orange", lw=2, ls="-.")

    # From here on, we only do plot cosmetics
    # Set 0° to 12 o'clock
    ax.set_theta_offset(math.pi / 2)
    # Set clockwise rotation
    ax.set_theta_direction(-1)

    # Set y-labels next to 180° radius axis
    ax.set_rlabel_position(180)
    # Set number of radial axes' ticks and remove labels
    plt.xticks(x, [])
    # Get maximal y-ticks value
    if not y_max:
        y_max = int(ax.get_yticks()[-1])
    # Set axes limits
    plt.ylim(0, y_max)
    # Set number and labels of y axis ticks
    plt.yticks(
        range(1, y_max),
        ["5" if i == scaled_threshold else "" for i in range(1, y_max)],
        fontsize=16,
    )

    # Draw ytick labels to make sure they fit properly
    # Note that we use [:1] to exclude the last element which equals the first element (not needed here)
    for i, (angle, label) in enumerate(zip(x[:-1], properties_labels)):
        if angle == 0:
            ha = "center"
        elif 0 < angle < math.pi:
            ha = "left"
        elif angle == math.pi:
            ha = "center"
        else:
            ha = "right"
        ax.text(
            x=angle,
            y=y_max + 1,
            s=label,
            size=16,
            horizontalalignment=ha,
            verticalalignment="center",
        )

    # Add legend relative to top-left plot
    labels = ("mean", "mean + std", "mean - std", "rule of five area")
    ax.legend(labels, loc=(1.1, 0.7), labelspacing=0.3, fontsize=16)

    # Save plot - use bbox_inches to include text boxes
    if output_path:
        plt.savefig(output_path, dpi=300, bbox_inches="tight", transparent=True)

    plt.show()

在下文中,我们要绘制两个数据集的雷达图:

  1. 满足 Ro5 的化合物
  2. 违反 Ro5 的化合物

定义两个雷达图应保持相同的输入参数

thresholds = {"molecular_weight": 500, "n_hba": 10, "n_hbd": 5, "logp": 5}
scaled_threshold = 5
properties_labels = [
    "Molecular weight (Da) / 100",
    "# HBA / 2",
    "# HBD",
    "LogP",
]
y_max = 8
  1. 绘制了满足 Ro5 的化合物数据集的雷达图。
plot_radar(
    molecules_ro5_fulfilled_stats,
    thresholds,
    scaled_threshold,
    properties_labels,
    y_max,
)

在这里插入图片描述

蓝色方块表示分子理化性质符合 Ro5 的区域。

蓝线突出显示平均值,而橙色虚线显示标准偏差。

我们可以看到,平均值从不违反任何 Lipinski 规则。但是,根据标准偏差,某些属性的值大于 Ro5 阈值。这是可以接受的,因为根据 Ro5,可以违反四项规则中的一项。

  1. 绘制了违反 Ro5 的化合物数据集的雷达图。 violate the Ro5.
plot_radar(
    molecules_ro5_violated_stats,
    thresholds,
    scaled_threshold,
    properties_labels,
    y_max,
)

我们看到化合物大多违反 Ro5,因为它们的 logP 值和分子量。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/27351.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

卷积编码和维特比译码

文章目录 卷积编码维特比译码 卷积编码 卷积码是一种非分组码&#xff0c;通常适用于前向纠错。在分组码中&#xff0c;编码器产生的 n 个码元的一个码组&#xff0c;完全决定于这段时间中 k 比特输入信息。这个码组中的监督位仅监督本码组中 k 个信息位。卷积码在编码时虽然也…

【马蹄集】第十四周作业

第十四周作业 目录 MT2134 泡泡MT2135 调整队伍MT2141 快排变形MT2142 逆序MT2143 线段树 MT2134 泡泡 难度&#xff1a;黄金    时间限制&#xff1a;1秒    占用内存&#xff1a;128M 题目描述 小码哥小时候喜欢吹泡泡&#xff0c;有一次他吹出了 n n n 个一样小的泡泡&…

SSM-Spring+SpringMVC+MyBatis框架的水果商城网站

项目介绍 主要功能&#xff1a; 前端用户购物端&#xff1a; ①角色信息&#xff1a;用户注册、用户登录、个人中心 ②个人中心&#xff1a;基本信息、我的订单、商品收藏、修改密码 ③首页管理&#xff1a;公告、留言、折扣大促销、热门商品 ④商品详情&#xff1a;收藏、加入…

使用阿里云OSS实现图片文件上传

说明&#xff1a;注册用户时&#xff0c;经常会用到上传头像。文件的上传/接收与一般文本数据不同。 一、创建Demo页面 先准备一个Demo页面 <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title>图片上传…

影响电磁铁磁力大小的因素有哪些

影响电磁铁磁力大小的因素主要有四个&#xff0c;一是缠绕在铁芯上线圈的圈数&#xff0c;二是线圈中电流的强度&#xff0c;三是缠绕的线圈与铁芯的距离&#xff0c;四是铁芯的大小形状。 首先要了解电磁铁的磁性是如何产生的&#xff0c;通电螺线管的磁场&#xff0c;由毕奥&…

总结895

学习目标&#xff1a; 月目标&#xff1a;6月&#xff08;线性代数强化9讲&#xff0c;背诵15篇短文&#xff0c;考研核心词过三遍&#xff09; 周目标&#xff1a;线性代数强化3讲&#xff0c;英语背3篇文章并回诵&#xff0c;检测 每日必复习&#xff08;5分钟&#xff09;…

JMM如何实现volatile写/读的内存语义

内存屏障类型表 StoreLoad Barriers是一个“全能型”的屏障&#xff0c;它同时具有其他3个屏障的效果。现代的多处理器大多支持该屏障&#xff08;其他类型的屏障不一定被所有处理器支持&#xff09;。执行该屏障开销会很昂贵&#xff0c;因为当前处理器通常要把写缓冲区中的数…

基于html+css的图展示112

准备项目 项目开发工具 Visual Studio Code 1.44.2 版本: 1.44.2 提交: ff915844119ce9485abfe8aa9076ec76b5300ddd 日期: 2020-04-16T16:36:23.138Z Electron: 7.1.11 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.19044 项目…

【图书推荐 | 13】后端系列

【赠书活动第十二期 】 图书推荐 本期书籍&#xff1a;后端系列 图书列表 本期图书列表&#xff1a; Spring Cloud 微服务快速上手项目驱动零起点学JavaNode.js 从基础到项目实战Diango Web 开发实例精解Flask Web 全栈开发实战精通Hadoopsmysql 数据库基础与实战应用Neo4j 图谱…

【Hive】安装配置及导入Hdfs数据

知识目录 一、写在前面&#x1f495;二、Hive的安装与配置✨2.1 Hive简介2.2 上传与解压2.3 拷贝MySQL驱动2.4 hive-site.xml文件2.5 启动hive 三、导入Hdfs数据到Hive✨3.1 修改Hadoop集群配置3.2 初始化3.3 创建表3.4 从Hdfs导入数据 四、总结撒花&#x1f60a; 一、写在前面…

MySQL-索引详解(上)

♥️作者&#xff1a;小刘在C站 ♥️个人主页&#xff1a;小刘主页 ♥️每天分享云计算网络运维课堂笔记&#xff0c;努力不一定有回报&#xff0c;但一定会有收获加油&#xff01;一起努力&#xff0c;共赴美好人生&#xff01; ♥️树高千尺&#xff0c;落叶归根人生不易&…

Qt(C++)绘制指针仪表盘显示当前温度

一、功能介绍 当前文章要实现的功能: 使用Qt绘制一个仪表盘,用来显示当前的温度,绘制刻度、绘制数字、绘制温度指针。仪表盘全程使用QPainter进行绘制,QPainter是Qt框架中非常重要的一个类,绘制功能的实现离不开它。如果想要使用Qt进行高质量的绘图或UI设计,必须掌握QP…

Django新手必看:如何创建应用和定义数据表。(详细讲解)

Django新手必看&#xff1a;如何创建应用和定义数据表。 1. Django创建应用1.1 创建应用1.2 应用的添加 2. Django ORM2.1 定义数据表2.2 定义项目数据表2.3 通用字段选项2.4 外键使用2.5 应用数据库迁移 &#x1f3d8;️&#x1f3d8;️个人简介&#xff1a;以山河作礼。 &…

学习HCIP的day.11

目录 十一、BGP的属性 1、权重属性 2、本地优先级 3、as-path 4、起源属性 5、MED --多出口的鉴别属性 十二、BGP选路规则 十三、BGP的社团属性 十四、BGP的在MA网络中的下一跳问题 五、BGP的认证 十一、BGP的属性 BGP协议在选路时&#xff0c;先对比属性&#xf…

Java(30天拿下---第一天)

Java开发&#xff08;30天拿下---第一天&#xff09; 一 hello world以及JDK,JRE,JVM二 转义字符三 注释四 代码规范五 DOS命令&#xff08;了解&#xff09;六 变量1.加号的使用2.数据类型整型浮点型字符类型布尔类型自动类型转换强制类型转换String类型 七 API文档 一 hello …

ASP.NET Core Web API入门之一:创建新项目

ASP.NET Core Web API入门之一&#xff1a;创建新项目 一、引言二、创建新项目三、加入Startup类&#xff0c;并替换Program.cs内容四、编辑Program.cs代码五、修改控制器的路由六、运行项目 一、引言 最近闲着&#xff0c;想着没真正从0-1开发过ASP.NET Core Web API的项目&a…

softmax之温度系数

1.数学表示 这是传统的softmax&#xff1a; q i e x p ( z i ) ∑ j e x p ( z j ) q_i \frac{exp(z_i)}{\sum_jexp(z_j)} qi​∑j​exp(zj​)exp(zi​)​ 或者写&#xff1a; q i e x p ( z i ) / 1.0 ∑ j e x p ( z j / 1.0 ) q_i \frac{exp(z_i)/1.0}{\sum_jexp(z_j/…

七、进程地址空间

一、环境变量 &#xff08;一&#xff09;概念 环境变量(environment variables)&#xff1a;系统当中用做特殊用途的系统变量。 如&#xff1a;我们在编写C/C代码的时候&#xff0c;在链接的时候&#xff0c;从来不知道我们的所链接的动态静态库在哪里&#xff0c;但是照样可…

vue3---模板引用 nextTick

目录 模板引用--ref 访问模板引用 v-for 中的模板引用 函数模板引用 组件上的 ref 简单理解Vue中的nextTick 示例 二、应用场景 三、nextTick源码浅析 实战 --- vue3实现编辑与查看功能 模板引用--ref 虽然 Vue 的声明性渲染模型为你抽象了大部分对 DOM 的直接操作&…

LeetCode - 15 三数之和

目录 题目来源 题目描述 示例 提示 题目解析 算法源码 题目来源 15. 三数之和 - 力扣&#xff08;LeetCode&#xff09; 题目描述 给你一个整数数组 nums &#xff0c;判断是否存在三元组 [nums[i], nums[j], nums[k]] 满足 i ! j、i ! k 且 j ! k &#xff0c;同时还满…
最新文章