云数据库 PostgreSQL 版
操作符 | 说明 | 使用示例 |
操作符 | 说明 | 使用示例 |
<@ | mol1 <@ mol2: mol1 是 mol2 的子结构则返回 true,否则返回 false。 | -- 查询 mols 表中包含 'c1cccnc1' 结构的分子 select * from mols where 'c1cccnc1'::mol <@ m; -- 查询 mols 表中是 'c1cccnc1' 子结构的分子 select * from mols where m <@ 'c1cccnc1'::mol; |
@> | mol1 @> mol2: mol2 是 mol1 的子结构则返回 true,否则返回 false。 | -- 查询 mols 表中是 'c1cccnc1' 子结构的分子 select * from mols where 'c1cccnc1'::mol @> m; -- 查询 mols 表中包含 'c1cccnc1' 结构的分子 select * from mols where m @> 'c1cccnc1'::mol; |
@= | mol1 @= mol2:mol1 和 mol2的结构相同则返回 true,否则返回 false。 | -- 查询 mols 表中结构同 'C=CCNC(=S)NN=C(C)c1ccccn1' 的分子 select * from mols where m @= 'C=CCNC(=S)NN=C(C)c1ccccn1'::mol; |
> | mol1 > mol2:mol1 大于 mol2 则返回 true,否则返回 false。 | -- 查询 mols 表中大于 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1' 的分子 select * from mols where m > 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1'::mol; |
>= | mol1 >= mol2:mol1 大于或等于 mol2 则返回 true,否则返回 false。 | -- 查询 mols 表中大于等于 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1' 的分子 select * from mols where m >= 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1'::mol; |
< | mol1 < mol2:mol1 小于 mol2 则返回 true,否则返回 false。 | -- 查询 mols 表中小于 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1' 的分子 select * from mols where m < 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1'::mol; |
<= | mol1 <= mol2:mol1 小于或等于 mol2 则返回 true,否则返回 false。 | -- 查询 mols 表中小于等于 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1' 的分子 select * from mols where m <= 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1'::mol; |
<> | mol1 <> mol2:mol1 不等于 mol2 则返回 true,否则返回 false。 | -- 查询 mols 表中不等于 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1' 的分子 select * from mols where m <> 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1'::mol; |
= | mol1 = mol2:mol1 等于 mol2 则返回 true,否则返回 false。 | -- 查询 mols 表中等于 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1' 的分子 select * from mols where m = 'CC(=NNc1ncc(Cl)cc1Cl)c1ccccn1'::mol; |
操作符 | 说明 | 使用示例 |
操作符 | 说明 | 使用示例 |
% | bfp1 % bfp2: bfp1 和 bfp2 的 Tanimoto 相似度超过阈值则返回 true,否则返回 false。 | -- 查询 bfps 表中分子与 'c1cccnc1' 的 Tanimoto 相似度 select id, tanimoto_sml(morganbv_fp('c1cccnc1'::mol) , mfp) from bfps; -- 查询 bfps 表中分子与 'c1cccnc1' 的 Tanimoto 相似度是否超过阈值 select id, morganbv_fp('c1cccnc1'::mol) % mfp from bfps; |
<%> | bfp1 <%> bfp2: 返回 bfp1 和 bfp2 的 Tanimoto 相似度距离,通常用于排序。 | -- 查询 bfps 表中分子与 'c1cccnc1' 的 Tanimoto 相似度距离 select id, morganbv_fp('c1cccnc1'::mol) <%> mfp from bfps order by morganbv_fp('c1cccnc1'::mol) <%> mfp; |
# | bfp1 # bfp2: bfp1 和 bfp2 的 Dice 相似度超过阈值则返回 true,否则返回 false。 | -- 查询 bfps 表中分子与 'c1cccnc1' 的 Dice 相似度 select id, dice_sml(morganbv_fp('c1cccnc1'::mol), mfp) from bfps; -- 查询 bfps 表中分子与 'c1cccnc1' 的 Dice 相似度是否超过阈值 select id, morganbv_fp('c1cccnc1'::mol) # mfp from bfps; |
<#> | bfp1 <#> bfp2: 返回 bfp1 和 bfp2 的 Dice 相似度距离,通常用于排序。 | -- 查询 bfps 表中分子与 'c1cccnc1' 的 Dice 相似度距离 select id, morganbv_fp('c1cccnc1'::mol) <#> mfp from bfps order by morganbv_fp('c1cccnc1'::mol) <#> mfp; |
> | bfp1 > bfp2:bfp1 大于 bfp2 则返回 true,否则返回 false。 | -- 查询 bfps 表中大于 'CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O' 的分子 select id, mfp from bfps where mfp > morganbv_fp('CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O'::mol); |
>= | bfp1 >= bfp2:bfp1 大于或等于 bfp2 则返回 true,否则返回 false。 | -- 查询 bfps 表中大于等于 'CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O' 的分子 select id, mfp from bfps where mfp >= morganbv_fp('CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O'::mol); |
< | bfp1 < bfp2:bfp1 小于 bfp2 则返回 true,否则返回 false。 | -- 查询 mols 表中小于 'CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O' 的分子 select id, mfp from bfps where mfp < morganbv_fp('CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O'::mol); |
<= | bfp1 <= bfp2:bfp1 小于或等于 bfp2 则返回 true,否则返回 false。 | -- 查询 mols 表中小于等于 'CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O' 的分子 select id, mfp from bfps where mfp <= morganbv_fp('CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O'::mol); |
<> | bfp1 <> bfp2:bfp1 不等于 bfp2 则返回 true,否则返回 false。 | -- 查询 mols 表中不等于 'CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O' 的分子 select id, mfp from bfps where mfp <> morganbv_fp('CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O'::mol); |
= | bfp1 = bfp2:bfp1 等于 bfp2 则返回 true,否则返回 false。 | -- 查询 mols 表中等于 'CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O' 的分子 select id, mfp from bfps where mfp = morganbv_fp('CC1=CC=C(C=C1)C(=O)SC2=CC=CC=CC2=O'::mol); |