221 lines
10 KiB
HTML
221 lines
10 KiB
HTML
<!doctype html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<title>NUPACK Design 使用笔记</title>
|
||
<style>
|
||
:root {
|
||
--paper: #f7f2e8;
|
||
--ink: #162033;
|
||
--muted: #64708a;
|
||
--line: #ddd4c4;
|
||
--accent: #1f6f5f;
|
||
--accent-2: #b65b2a;
|
||
}
|
||
body {
|
||
margin: 0;
|
||
background: linear-gradient(135deg, #fbf7ee 0%, #edf5f0 100%);
|
||
color: var(--ink);
|
||
font-family: "Avenir Next", "Noto Sans SC", sans-serif;
|
||
line-height: 1.65;
|
||
}
|
||
main {
|
||
max-width: 960px;
|
||
margin: 0 auto;
|
||
padding: 36px 20px 72px;
|
||
}
|
||
h1, h2, h3 {
|
||
line-height: 1.25;
|
||
}
|
||
h1 {
|
||
font-size: clamp(2rem, 5vw, 4rem);
|
||
letter-spacing: -0.04em;
|
||
margin: 0 0 12px;
|
||
}
|
||
h2 {
|
||
margin-top: 34px;
|
||
padding-top: 18px;
|
||
border-top: 1px solid var(--line);
|
||
}
|
||
code, pre {
|
||
font-family: "Inconsolata", "SFMono-Regular", Consolas, monospace;
|
||
}
|
||
pre {
|
||
overflow: auto;
|
||
background: #15221f;
|
||
color: #f4ead7;
|
||
border-radius: 18px;
|
||
padding: 16px;
|
||
}
|
||
.card {
|
||
background: rgba(255, 255, 255, 0.72);
|
||
border: 1px solid var(--line);
|
||
border-radius: 22px;
|
||
padding: 20px;
|
||
margin: 18px 0;
|
||
box-shadow: 0 18px 50px rgba(42, 31, 20, 0.08);
|
||
}
|
||
.toc {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 10px;
|
||
margin: 22px 0;
|
||
}
|
||
a.button {
|
||
display: inline-block;
|
||
border: 1px solid var(--line);
|
||
border-radius: 999px;
|
||
padding: 9px 14px;
|
||
color: var(--accent);
|
||
background: #fffaf0;
|
||
text-decoration: none;
|
||
font-weight: 700;
|
||
}
|
||
.warn {
|
||
border-left: 4px solid var(--accent-2);
|
||
padding-left: 14px;
|
||
color: #5b3828;
|
||
}
|
||
.muted {
|
||
color: var(--muted);
|
||
}
|
||
table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
background: rgba(255,255,255,0.75);
|
||
border-radius: 16px;
|
||
overflow: hidden;
|
||
}
|
||
th, td {
|
||
border-bottom: 1px solid var(--line);
|
||
padding: 10px;
|
||
text-align: left;
|
||
vertical-align: top;
|
||
}
|
||
th {
|
||
background: #efe6d6;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<main>
|
||
<p class="muted">NUPACK replica / Design workflow notes</p>
|
||
<h1>Design 使用笔记</h1>
|
||
<p>这份笔记只讲当前网页里已经接入的功能:Design domains、target complexes、target tubes、hard constraints、soft constraints 和 defect weights。</p>
|
||
|
||
<nav class="toc">
|
||
<a class="button" href="#quick-start">快速跑通</a>
|
||
<a class="button" href="#targets">Targets 怎么填</a>
|
||
<a class="button" href="#mixed">混合材料 Design</a>
|
||
<a class="button" href="#hard">Hard constraints</a>
|
||
<a class="button" href="#soft">Soft constraints</a>
|
||
<a class="button" href="#staged">分阶段计算</a>
|
||
<a class="button" href="#speed">为什么会慢</a>
|
||
<a class="button" href="/workspace#design-targets">跳到工作台 Targets</a>
|
||
<a class="button" href="/workspace#design-hard">跳到工作台 Hard</a>
|
||
<a class="button" href="/workspace#design-soft">跳到工作台 Soft</a>
|
||
<a class="button" href="/cloud">打开云端记录</a>
|
||
</nav>
|
||
|
||
<section id="quick-start" class="card">
|
||
<h2>1. 快速跑通</h2>
|
||
<p>主界面选择 <strong>Design</strong>,点击 <strong>载入示例</strong>,会得到一个可直接运行的双链设计:</p>
|
||
<pre><code>domain:
|
||
a = N10
|
||
|
||
strands:
|
||
A = a
|
||
B = ~a
|
||
|
||
target complex:
|
||
AB_target = A+B
|
||
structure = (10+)10
|
||
|
||
target tube:
|
||
AB_target = 1 uM
|
||
off-target max size = 2</code></pre>
|
||
<p><code>~a</code> 表示 domain <code>a</code> 的反向互补,因此 <code>(10+)10</code> 这个全双链目标结构是合法的。</p>
|
||
</section>
|
||
|
||
<section id="targets" class="card">
|
||
<h2>2. Targets 怎么填</h2>
|
||
<table>
|
||
<thead>
|
||
<tr><th>区域</th><th>含义</th><th>示例</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>Design Domains</td><td>给每段可设计区域命名,并写 IUPAC 约束。</td><td><code>a = N10</code></td></tr>
|
||
<tr><td>链输入</td><td>Design 模式下,序列框可以写 domain composition。</td><td><code>A = a</code>, <code>B = ~a</code></td></tr>
|
||
<tr><td>Target Complex</td><td>指定哪些链组成目标复合物,以及目标二级结构。</td><td><code>A+B</code>, <code>(10+)10</code></td></tr>
|
||
<tr><td>Target Tube</td><td>Tube design 才需要。指定 on-target 浓度,off-target 由 max size 自动补全。</td><td><code>AB_target = 1 uM</code></td></tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
|
||
<section id="mixed" class="card">
|
||
<h2>3. 混合材料 Design</h2>
|
||
<p>选择 <code>rna-dna06</code> 或 <code>rna-merna06</code> 后,Domain 约束必须显式标注小写材料前缀。点击“插入混合片段模板”可生成可直接编辑的起点:</p>
|
||
<pre><code>RNA/DNA: mixed1 = rN6dN6
|
||
RNA/2′OMe: mixed1 = rN6mN6
|
||
材料也可设计: mixed1 = wN12</code></pre>
|
||
<p><code>r</code>、<code>d</code>、<code>m</code> 分别表示 RNA、DNA、2′OMe-RNA;<code>w</code> 表示 wildcard material。材料前缀不计入碱基长度,IUPAC 约束与计数仍可组合,例如 <code>rS4dN8</code>。</p>
|
||
<p>链输入仍推荐填写 Domain composition,例如 <code>A = mixed1</code>、<code>B = ~mixed1</code>。反向互补由所选模型的 material alphabet 计算,结果和“载入为 Analysis”都会保留材料前缀。</p>
|
||
</section>
|
||
|
||
<section id="hard" class="card">
|
||
<h2>4. Hard constraints 怎么用</h2>
|
||
<p>Hard constraint 是“必须满足”的约束,写错会让设计空间为空,或直接报错。</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>类型</th><th>必填字段</th><th>当前推荐示例</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>Match</td><td>左侧、右侧</td><td><code>a</code> 与 <code>a</code></td></tr>
|
||
<tr><td>Complementarity</td><td>左侧、右侧</td><td><code>A</code> 与 <code>B</code></td></tr>
|
||
<tr><td>Similarity</td><td>scope、reference、上下限</td><td><code>scope=a</code>, <code>reference=R10</code></td></tr>
|
||
<tr><td>Window</td><td>scope、source sequences</td><td><code>scope=a</code>, 每行一个 10 nt source</td></tr>
|
||
<tr><td>Pattern</td><td>patterns;scope 可空表示全局</td><td><code>AAAA, UUUU</code></td></tr>
|
||
</tbody>
|
||
</table>
|
||
<p class="warn">如果看到 “Constraint scope cannot be empty”,就是当前 constraint 类型需要填写 scope,但该字段为空。新版界面会在提交前拦截这类错误。</p>
|
||
</section>
|
||
|
||
<section id="soft" class="card">
|
||
<h2>5. Soft constraints 和 weights</h2>
|
||
<p>Soft constraint 不会替代 ensemble defect,只是给优化目标增加加权惩罚。权重越大,设计器越偏向满足它,但也可能变慢。</p>
|
||
<p>Defect weights 用来告诉设计器哪些 domain、strand、complex 或 tube 更重要。初学时建议先不填,确认 target 能跑通后再逐步添加。</p>
|
||
</section>
|
||
|
||
<section id="staged" class="card">
|
||
<h2>6. 推荐的分阶段流程</h2>
|
||
<p>复杂体系不要一开始就把搜索条件设到最终验证强度。推荐把“找候选序列”和“验证候选序列”分开:</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>阶段</th><th>建议设置</th><th>目的</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>输入检查</td><td>1 trial,max size 2,<code>f_stop=0.1–0.2</code>,填写明确的最大时间</td><td>先确认 targets、结构和约束可行,并快速暴露填写错误。</td></tr>
|
||
<tr><td>正式设计</td><td>从已验证输入逐步收紧 <code>f_stop</code>;确有需要时再增加 trials</td><td>获得候选序列。每个 trial 都是一次完整随机搜索,不是免费的重复采样。</td></tr>
|
||
<tr><td>最终验证</td><td>把设计结果载入 Analysis,以 max size 3–4 检查更大的复合物集合</td><td>保留严格的最终热力学验证,同时避免在每一步优化迭代中反复枚举大集合。</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<p class="warn">分阶段流程会改变“在哪个阶段计算哪些集合”,但不会偷减最终验证。若研究目标明确要求在优化目标中直接包含 size 3–4 off-target,应保留该设置并给任务填写最大时间。</p>
|
||
</section>
|
||
|
||
<section id="speed" class="card">
|
||
<h2>7. 为什么 Design 会慢</h2>
|
||
<p>NUPACK design 是优化问题,不是一次性的结构分析。影响耗时的主要因素:</p>
|
||
<ul>
|
||
<li><strong>off-target max size</strong> 越大,需要考虑的非目标复合物越多。</li>
|
||
<li><strong>f_stop</strong> 越小,停止条件越严格,通常越慢。</li>
|
||
<li><strong>trials</strong> 大于 1 时会跑多个随机种子,NUPACK 源码里会并行提交多个 trial。</li>
|
||
<li><strong>hard constraints</strong> 太多或互相矛盾,会反复搜索甚至失败。</li>
|
||
</ul>
|
||
<p>页面的“设计预检”会实时显示可变碱基数、固定目标数和复合物上限,并提醒无限时长、严格停止阈值、多 trial 与大 off-target 集合。它只做估算和提示,不会改写提交参数。</p>
|
||
<p>当前服务会按 CPU 和内存自动限制同时运行的任务数,并已显式设置 NUPACK 的 <code>config.threads</code>。这些调度参数不改变模型、约束或结果目标;它们主要用于防止多个 8–9 GB 任务把机器内存耗尽。增加线程不保证单个 design 等比例加速,因为部分优化阶段主要使用单核;多任务通常比单任务更容易占满多核。增加内存本身也不会让搜索更快,只会减少 OOM、换页和缓存压力。</p>
|
||
<p>当前 NUPACK 4.1.0.1 wheel/镜像不是 CUDA 构建,且官方分发包中没有附带 <code>source/</code> 源码树;直接填写环境变量或安装显卡不能生效。GPU 路线需要重新编译或替换核心 wheel,并对结果一致性与稳定性重新测试。</p>
|
||
</section>
|
||
</main>
|
||
</body>
|
||
</html>
|