fix something
This commit is contained in:
@@ -0,0 +1,91 @@
|
|||||||
|
---
|
||||||
|
name: ax-blog-markdown-typesetting
|
||||||
|
description: Format, rewrite, sanitize, and normalize Markdown articles for this AX Blog repository. Use when Codex needs to draft a new blog post, convert rough notes into publishable AX Blog Markdown, repair frontmatter, reorganize headings, clean up code/math blocks, remove sensitive paths/IPs/secrets by default, or make an article compatible with this repo's static Markdown pipeline.
|
||||||
|
---
|
||||||
|
|
||||||
|
# AX Blog Markdown Typesetting
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Use this skill to produce Markdown that matches the actual AX Blog parser and article layout in this repository.
|
||||||
|
Base decisions on the repo's supported frontmatter, heading behavior, code fences, math syntax, link rewriting, and raw-HTML restrictions.
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
1. Read the target Markdown draft or article file.
|
||||||
|
2. Silently remove or generalize sensitive information before publication.
|
||||||
|
3. Normalize frontmatter to the supported keys only.
|
||||||
|
4. Restructure the article into a clean `#` title plus `##` and `###` sections.
|
||||||
|
5. Convert examples, commands, formulas, links, and images into AX Blog-compatible Markdown.
|
||||||
|
6. Remove dependence on raw HTML.
|
||||||
|
7. Preserve the author's meaning while tightening structure and readability.
|
||||||
|
|
||||||
|
## Core Rules
|
||||||
|
|
||||||
|
- Use only supported frontmatter fields:
|
||||||
|
`title`, `date`, `tags`, `collections`, `summary`, `draft`, `featured`, `pinned`.
|
||||||
|
- Prefer `date` in `YYYY-MM-DD`.
|
||||||
|
- Keep `summary` to one compact sentence suited for archive cards and search snippets.
|
||||||
|
- Prefer one body `#` heading that matches the article title.
|
||||||
|
- Keep the real structure at heading levels 2 and 3.
|
||||||
|
- Use fenced code blocks with language labels when known.
|
||||||
|
- Use `$...$` and `$$...$$` for math.
|
||||||
|
- Use normal Markdown tables, lists, blockquotes, links, and images.
|
||||||
|
- Do not rely on raw HTML because the renderer escapes it.
|
||||||
|
|
||||||
|
## Privacy Defaults
|
||||||
|
|
||||||
|
- Treat drafts as publishable by default: do not leave private or environment-specific identifiers in the final Markdown.
|
||||||
|
- Remove or generalize IP addresses, private hostnames, internal Git remotes, usernames, home/NAS/workstation paths, API tokens, passwords, secret keys, emails, phone numbers, and other local identifiers unless the user explicitly asks to keep them.
|
||||||
|
- Prefer relative paths, environment variables, or neutral placeholders such as `/path/to/project`, `private-git-host`, `user@example.com`, or `TOKEN_VALUE` when a command still needs a usable shape.
|
||||||
|
- Do not add prose saying that content was hidden, redacted, anonymized, or replaced. Sanitization is an editing step, not article content.
|
||||||
|
- If removing a value would break a command's meaning, keep the command pattern and replace only the sensitive segment.
|
||||||
|
|
||||||
|
## Rewrite Heuristics
|
||||||
|
|
||||||
|
- Turn messy headings into short, scannable section names.
|
||||||
|
- Split oversized paragraphs when they hide structure.
|
||||||
|
- Promote important enumerations into lists.
|
||||||
|
- Keep examples near the paragraph that explains them.
|
||||||
|
- Preserve technical precision; do not simplify away important qualifiers.
|
||||||
|
- If the source uses HTML for callouts or layout, rewrite it into Markdown-native sections or blockquotes.
|
||||||
|
- If tags or collections are implied but missing, infer conservatively from the content.
|
||||||
|
- Remove meta-notes about sanitization unless the article is explicitly about data privacy or redaction.
|
||||||
|
|
||||||
|
## Default Article Shape
|
||||||
|
|
||||||
|
Use this shape unless the source material strongly suggests another structure:
|
||||||
|
|
||||||
|
1. frontmatter
|
||||||
|
2. `#` article title
|
||||||
|
3. short opening paragraph
|
||||||
|
4. `##` sections for background, method, result, checklist, takeaway, or next step
|
||||||
|
5. fenced code, tables, math, and images where needed
|
||||||
|
6. short closing section
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
- Read [references/ax-blog-markdown-reference.md](references/ax-blog-markdown-reference.md) for the concrete syntax and behavioral constraints of this repo.
|
||||||
|
- Start from [assets/article-template.md](assets/article-template.md) when creating a new article from scratch.
|
||||||
|
|
||||||
|
## Output Requirements
|
||||||
|
|
||||||
|
- Output plain Markdown, not HTML.
|
||||||
|
- Keep frontmatter valid YAML.
|
||||||
|
- Keep article structure readable in raw source form.
|
||||||
|
- Prefer concise, publishable prose over note-dump formatting.
|
||||||
|
- When editing an existing article, preserve facts, links, and code semantics.
|
||||||
|
|
||||||
|
## Final Check
|
||||||
|
|
||||||
|
Before finishing, verify:
|
||||||
|
|
||||||
|
- frontmatter keys are supported
|
||||||
|
- summary is present and useful
|
||||||
|
- heading depth is reasonable
|
||||||
|
- code blocks are fenced
|
||||||
|
- math syntax is valid Markdown math
|
||||||
|
- image and link paths are plausible for the repo
|
||||||
|
- no required meaning depends on raw HTML
|
||||||
|
- no sensitive IPs, hostnames, credentials, user names, or local absolute paths remain
|
||||||
|
- the article does not mention that sanitization was performed unless the user explicitly requested that wording
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
interface:
|
||||||
|
display_name: "AX Blog Markdown"
|
||||||
|
short_description: "按 AX Blog 语法编排文章与 frontmatter。"
|
||||||
|
default_prompt: "Use $ax-blog-markdown-typesetting to rewrite this draft into AX Blog-compatible Markdown with clean frontmatter and stable article structure."
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
title: 示例标题
|
||||||
|
date: 2026-05-16
|
||||||
|
tags: [标签一, 标签二]
|
||||||
|
collections: [合集名]
|
||||||
|
summary: 用一句话概括文章价值、主题或结论。
|
||||||
|
draft: false
|
||||||
|
featured: false
|
||||||
|
---
|
||||||
|
|
||||||
|
# 示例标题
|
||||||
|
|
||||||
|
用一小段说明这篇文章回答什么问题,或者给出核心判断。
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
交代上下文、问题来源或使用场景。
|
||||||
|
|
||||||
|
## 主体
|
||||||
|
|
||||||
|
分段展开核心内容。需要代码时使用 fenced code block:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
export function example(name: string): string {
|
||||||
|
return `hello, ${name}`;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
需要公式时使用:
|
||||||
|
|
||||||
|
行内公式 $E = mc^2$。
|
||||||
|
|
||||||
|
块级公式:
|
||||||
|
|
||||||
|
$$
|
||||||
|
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
|
||||||
|
$$
|
||||||
|
|
||||||
|
## 补充材料
|
||||||
|
|
||||||
|
- 可以放列表
|
||||||
|
- 可以放表格
|
||||||
|
- 可以放相对图片
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 结论
|
||||||
|
|
||||||
|
用两三句话收束文章,给出结果、建议或下一步。
|
||||||
@@ -0,0 +1,208 @@
|
|||||||
|
# AX Blog Markdown Reference
|
||||||
|
|
||||||
|
## Frontmatter
|
||||||
|
|
||||||
|
Use YAML frontmatter at the top of each article.
|
||||||
|
|
||||||
|
Supported keys:
|
||||||
|
|
||||||
|
- `title`: string. Prefer a clear title that can stand alone in archive pages.
|
||||||
|
- `date`: string or date-like value. Prefer `YYYY-MM-DD`.
|
||||||
|
- `tags`: array of strings or comma-separated string.
|
||||||
|
- `collections`: array of strings or comma-separated string.
|
||||||
|
- `summary`: string. Keep it short enough to read well in cards and tables.
|
||||||
|
- `draft`: boolean. `true` excludes the article from public output.
|
||||||
|
- `featured`: boolean. Marks the article as recommended on the home page.
|
||||||
|
- `pinned`: boolean. Moves the article ahead of normal chronological order.
|
||||||
|
|
||||||
|
Minimal example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
title: 本地搜索索引如何设计
|
||||||
|
date: 2026-04-20
|
||||||
|
tags: [搜索, 前端, 性能]
|
||||||
|
collections: [前端工程]
|
||||||
|
summary: 一个小型博客可以用构建期 JSON 索引完成站内搜索,不一定需要引入搜索服务。
|
||||||
|
draft: false
|
||||||
|
featured: false
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
## Heading behavior
|
||||||
|
|
||||||
|
- The system reads the article title from frontmatter.
|
||||||
|
- Article pages drop the first Markdown `#` heading if present.
|
||||||
|
- Prefer one top-level `#` in the body that matches or closely tracks the frontmatter title.
|
||||||
|
- Use `##` and `###` for the real article structure.
|
||||||
|
- The right-side table of contents includes headings up to level 3.
|
||||||
|
|
||||||
|
Recommended pattern:
|
||||||
|
|
||||||
|
```md
|
||||||
|
# 文章标题
|
||||||
|
|
||||||
|
导语段落。
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
内容。
|
||||||
|
|
||||||
|
## 方法
|
||||||
|
|
||||||
|
内容。
|
||||||
|
|
||||||
|
### 细节
|
||||||
|
|
||||||
|
内容。
|
||||||
|
```
|
||||||
|
|
||||||
|
## Supported Markdown features
|
||||||
|
|
||||||
|
- CommonMark-style paragraphs and headings
|
||||||
|
- Ordered and unordered lists
|
||||||
|
- Fenced code blocks with language labels
|
||||||
|
- Inline code
|
||||||
|
- Tables
|
||||||
|
- Blockquotes
|
||||||
|
- Relative and absolute links
|
||||||
|
- Relative and absolute images
|
||||||
|
- Inline math with `$...$`
|
||||||
|
- Block math with `$$ ... $$`
|
||||||
|
|
||||||
|
## Code blocks
|
||||||
|
|
||||||
|
Always use fenced code blocks. Add a language label when possible.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
````md
|
||||||
|
```ts
|
||||||
|
export function hotness(views: number, likes: number): number {
|
||||||
|
return views + likes * 5;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
````
|
||||||
|
|
||||||
|
The renderer uses `highlight.js`. Unknown languages fall back to plaintext.
|
||||||
|
|
||||||
|
## Math
|
||||||
|
|
||||||
|
Math is rendered with KaTeX when `enableMath` is on.
|
||||||
|
|
||||||
|
Inline example:
|
||||||
|
|
||||||
|
```md
|
||||||
|
行内公式:$E = mc^2$
|
||||||
|
```
|
||||||
|
|
||||||
|
Block example:
|
||||||
|
|
||||||
|
```md
|
||||||
|
$$
|
||||||
|
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
|
||||||
|
$$
|
||||||
|
```
|
||||||
|
|
||||||
|
Keep math expressions clean and avoid mixing them with raw HTML.
|
||||||
|
|
||||||
|
## Links and images
|
||||||
|
|
||||||
|
Absolute paths such as `/posts/` stay as-is.
|
||||||
|
|
||||||
|
Relative Markdown links are rewritten:
|
||||||
|
|
||||||
|
- `./next.md` becomes a same-article route like `/a/<id>/next/`
|
||||||
|
- relative asset paths such as `../assets/diagram.svg` become public asset URLs under the article output path
|
||||||
|
|
||||||
|
Use:
|
||||||
|
|
||||||
|
```md
|
||||||
|
[返回首页](/)
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
Avoid linking to local absolute filesystem paths.
|
||||||
|
|
||||||
|
## Sensitive information
|
||||||
|
|
||||||
|
AX Blog articles should be publishable after rewriting. Silently remove or generalize sensitive values from drafts:
|
||||||
|
|
||||||
|
- IP addresses and private hostnames
|
||||||
|
- internal Git remotes, registry URLs, SSH hosts, and service ports
|
||||||
|
- usernames, personal Home directories, NAS paths, workstation paths, and local absolute paths
|
||||||
|
- API tokens, passwords, secret keys, cookies, private emails, phone numbers, and similar identifiers
|
||||||
|
|
||||||
|
When a command needs the shape of a value, use a neutral replacement instead:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone ssh://git@private-git-host:port/group/project.git
|
||||||
|
python /path/to/project/script.py --config /path/to/project/config.yaml
|
||||||
|
export API_TOKEN="TOKEN_VALUE"
|
||||||
|
```
|
||||||
|
|
||||||
|
Do not add article text that says the original values were hidden, redacted, anonymized, or replaced. The final Markdown should read naturally without exposing the sanitization step.
|
||||||
|
|
||||||
|
## Raw HTML and safety
|
||||||
|
|
||||||
|
Raw HTML inside Markdown is disabled.
|
||||||
|
|
||||||
|
This means:
|
||||||
|
|
||||||
|
- `<script>` and other raw HTML tags are escaped and shown as text
|
||||||
|
- do not rely on embedded HTML for layout
|
||||||
|
- prefer pure Markdown structures
|
||||||
|
|
||||||
|
Do not write articles that depend on inline HTML like:
|
||||||
|
|
||||||
|
```md
|
||||||
|
<div class="warning">...</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
Rewrite those into blockquotes, lists, headings, or plain paragraphs.
|
||||||
|
|
||||||
|
## Writing for this blog layout
|
||||||
|
|
||||||
|
The public pages show:
|
||||||
|
|
||||||
|
- title
|
||||||
|
- summary
|
||||||
|
- tags
|
||||||
|
- collections
|
||||||
|
- body
|
||||||
|
- archive rows and search snippets
|
||||||
|
|
||||||
|
Optimize for that layout:
|
||||||
|
|
||||||
|
- keep `summary` to one compact sentence
|
||||||
|
- keep the opening paragraph direct and useful
|
||||||
|
- use short section headings
|
||||||
|
- avoid giant frontmatter values
|
||||||
|
- prefer Chinese punctuation and prose if the article is Chinese
|
||||||
|
|
||||||
|
## Recommended article shape
|
||||||
|
|
||||||
|
For technical or research notes, prefer:
|
||||||
|
|
||||||
|
1. frontmatter
|
||||||
|
2. `#` title
|
||||||
|
3. one short opening paragraph
|
||||||
|
4. `##` sections for background, method, result, checklist, or takeaway
|
||||||
|
5. code/math/table blocks where needed
|
||||||
|
6. a short closing section or next-step note
|
||||||
|
|
||||||
|
## Rewrite checklist
|
||||||
|
|
||||||
|
When rewriting a draft into AX Blog Markdown, verify:
|
||||||
|
|
||||||
|
- frontmatter keys are supported
|
||||||
|
- `date` is normalized
|
||||||
|
- `tags` and `collections` are arrays or clean comma-separated values
|
||||||
|
- there is one usable summary sentence
|
||||||
|
- headings are shallow and scannable
|
||||||
|
- code blocks are fenced
|
||||||
|
- math uses `$` or `$$`
|
||||||
|
- images and links use valid relative or absolute URLs
|
||||||
|
- no raw HTML is required for understanding
|
||||||
|
- no IPs, private hostnames, credentials, usernames, or local absolute paths remain
|
||||||
|
- the article does not mention sanitization unless that is the topic of the article
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
---
|
|
||||||
title: Cell|叶史瓦大学|Robert D. Burk等团队对年轻女性CVM分析揭示CT感染规律
|
|
||||||
date: 2026-03-10
|
|
||||||
tags: [Cell, CVM]
|
|
||||||
collections: [文献]
|
|
||||||
---
|
|
||||||
# Cell|叶史瓦大学|Robert D. Burk等团队对年轻女性CVM分析揭示CT感染规律
|
|
||||||
## 一分钟快读
|
|
||||||
本研究对560名性活跃的黑人及西班牙裔青少年和年轻成年女性进行调查,探究宫颈阴道微生物群(CVM)对沙眼衣原体(CT)感染的影响。将187例新发CT病例与373例对照进行匹配,并分析CT感染前、感染期间和感染后CVM的情况,结果发现特定的分子BV亚型(含CST-IV-A的mBV-A)是CT感染的重要风险因素,优势比为2.51(95%置信区间:1.40-4.49,p=0.002)。细菌多样性以及如阴道弯曲菌等特定分类群也与CT风险相关。治疗后,CVM恢复到与感染前相似的状态,但mBV-A与CT再感染有关(调整比率为3.58;95%置信区间:1.16-13.28,p=0.034)。此外,治疗后的CVM与盆腔炎和流产相关,凸显了CVM在CT感染自然史中的作用及其作为治疗靶点的潜力。
|
|
||||||
## 文章信息
|
|
||||||
题名:Cervicovaginal microbiome and natural history of Chlamydia trachomatis in adolescents and young women
|
|
||||||
译名:青少年和年轻女性的宫颈阴道微生物组与沙眼衣原体自然史
|
|
||||||
期刊:Cell
|
|
||||||
5YIF:49.1
|
|
||||||
发表时间:2025-01-15
|
|
||||||
DOI:10.1016/j.cell.2024.12.011
|
|
||||||
|
|
||||||
## 图文摘要
|
|
||||||

|
|
||||||
## 研究背景
|
|
||||||
沙眼衣原体(CT)是全球最常见的细菌性性传播感染疾病,2019年病例超1.3亿且发病率持续40年上升,约20%感染女性会出现盆腔炎等后遗症,超半数新发性传播感染发生于青少年和年轻成人,其中黑人和西班牙裔感染率比非西班牙裔白人高5倍,存在社会经济和种族差异。目前已知的CT感染风险因素包括多性伴、既往性传播感染史等,而细菌性阴道病(BV)虽被认为与CT感染有关,但二者受性行为影响且常无症状,难以确定关联。人体阴道包含多种微生物构成CVM,其中乳杆菌有抗CT作用,但BV与CT感染风险因素的重叠使情况复杂,在此背景下开展了本次研究以探究CVM与CT感染的关系。
|
|
||||||
## 研究思路
|
|
||||||
本研究选取了纽约市性活跃的黑人和西班牙裔青少年及年轻成年女性作为研究对象,采用嵌套病例对照设计,将187例新发CT感染女性与373例对照按年龄、入组时间和既往CT感染史进行匹配。收集参与者感染前约6个月、感染时及治疗后约8个月的宫颈阴道拭子样本,运用16SrRNA和ITS1扩增子测序分别评估细菌和真菌/真核生物,同时结合分子BV(molBV)算法和社区状态类型(CST)聚类分析宫颈阴道微生物组(CVM),并利用微生物风险评分(MRS)探究与CT感染风险相关的细菌属网络,通过多变量建模等方法确定CT感染的前瞻性风险、感染与CVM的关联以及治疗后CT感染对CVM的残留影响,从而全面分析CVM在CT感染自然史中的作用。
|
|
||||||
## 主要研究结果
|
|
||||||
- CVM特定亚型与CT感染风险紧密相连
|
|
||||||
|
|
||||||

|
|
||||||
图2 CT感染前、感染时和感染后访视的molBV评分分布
|
|
||||||
研究发现,通过对宫颈阴道微生物组(CVM)的分析,特定亚型如含有CST-IV-A的分子细菌性阴道病(mBV-A)与沙眼衣原体(CT)感染风险密切相关。在感染前,相较于对照组,病例组的mBV评分更高,其中mBV阳性(molBV评分7-10)尤其是mBV-A亚型与CT感染显著相关,mBV-A亚型参与者患CT感染的风险比mBV阴性者高2.38倍(OR=2.38,95%CI:1.21-4.69,p=0.012),且与CST-IV-A相关的CVM特征在感染前后均有明显变化(图2、图S2、图S3)。
|
|
||||||
- 细菌属网络影响CT感染及再感染可能
|
|
||||||
|
|
||||||

|
|
||||||
图3 CT感染前瞻性细菌危险因素的交叉验证和细菌群落建模
|
|
||||||
研究表明存在一个由10个细菌属组成的网络对CT感染及再感染有影响。通过ANCOM分析和10倍交叉验证,确定了如Candidatus Lachnocurva vaginae、Prevotella、Megasphaera等细菌属与CT感染密切相关,它们的相关性系数pairwise correlations>0.6,p<0.001。基于这些细菌属构建的微生物风险评分(MRS)显示,MRS每增加一个单位,CT感染的优势比为2.50(95% CI:1.35-5.60,p=0.0037)。在CT再感染方面,mBV-A和mBV-intermediate状态的参与者再感染率增加,分别为调整率比aRR=3.58(95%CI:1.16-13.28,p=0.034)和aRR=3.17(95%CI:1.18-11.1,p=0.038),(图3、图S4)。
|
|
||||||
- CT感染改变CVM,治疗后有恢复趋势
|
|
||||||
|
|
||||||

|
|
||||||
图4 CT感染与宫颈阴道微生物组的关联
|
|
||||||
CT感染对宫颈阴道微生物组(CVM)产生了显著影响,在感染发生时(t_0访视),CT病例的CVM细菌多样性相较于对照组明显升高,如Chao1指数(p=0.046)和Shannon指数(p=2.50×10^-7)所示,且有37种细菌物种在病例和对照组间存在持续差异。然而在抗生素治疗后(t_+1访视),CT病例的CVM在细菌和真菌的α及β多样性分析上与对照组无明显差异,尽管多变量建模显示mBV-intermediate组在病例中仍高于对照组(OR=1.83,95% CI:1.09-3.08,p=0.02),但整体上CVM组成恢复到接近感染前的状态(图4、图S5、S6)。
|
|
||||||
- mBV状态与CT再感染及后遗症相关联
|
|
||||||
|
|
||||||
研究显示mBV状态在CT感染的后续进程中起到关键作用。在CT再感染方面,mBV-A和mBV-intermediate状态的参与者再感染率显著增加,其中mBV-A参与者的调整率比达到3.58(95% CI:1.16-13.28,p=0.034)。对于后遗症,虽然在盆腔炎和流产方面没有达到显著的关联,但mBV阳性的CVM在治疗后(t_+1访视)的参与者更有可能出现这些情况,如出现盆腔炎的优势比为2.93(95% CI:0.88-11.17,p=0.087),流产的优势比为4.43(95% CI:1.03-30.63,p=0.070)。
|
|
||||||
## 小结
|
|
||||||
本研究通过对大量黑人和西班牙裔青少年及年轻成年女性的宫颈阴道微生物组(CVM)进行分析,发现CVM中与细菌性阴道病(BV)相关的多种特征,如特定的mBV状态、社区状态类型(CSTs)及特定细菌属等,对沙眼衣原体(CT)感染及再感染具有重要的预测作用。其中mBV-A亚型与CT感染及再感染风险紧密相连,且CT感染会改变CVM组成,治疗后虽整体有恢复趋势但某些状态仍有异常,这些发现为基于CVM特征制定预防和治疗CT感染的新公共卫生措施提供了依据,不过研究也存在如采样间隔、抗生素影响难以区分及部分分析样本量有限等局限性。
|
|
||||||
###### 本文原创为原创编译,不主张原文版权,侵删。本文个人闲暇时间收集,个人水平有限,若有纰漏,麻烦留言指出,我尽快修改!
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
---
|
|
||||||
title: install RFantibody
|
|
||||||
date: 2026-03-12
|
|
||||||
tags: [antibody, soft insatll]
|
|
||||||
collections: [antibody, install]
|
|
||||||
---
|
|
||||||
# install RFantibody
|
|
||||||
```shell
|
|
||||||
# dir: /share/nas3/zhushixin/soft/unzip/RFantibody
|
|
||||||
git clone ssh://git@39.104.92.69:8512/pub_soft/RFantibody.git
|
|
||||||
|
|
||||||
# download weight
|
|
||||||
bash include/download_weights.sh
|
|
||||||
|
|
||||||
mamba create -n rfanibody
|
|
||||||
mamba activate rfanibody
|
|
||||||
mamba install python=3.10
|
|
||||||
|
|
||||||
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
|
|
||||||
pip install --pre dgl --no-deps -f https://data.dgl.ai/wheels-test/torch-2.4/cu124/repo.html
|
|
||||||
|
|
||||||
|
|
||||||
# 安装依赖
|
|
||||||
pip install .
|
|
||||||
pip install omegaconf
|
|
||||||
# pip install hydra-core==1.3.2
|
|
||||||
pip install hydra
|
|
||||||
pip install scipy
|
|
||||||
|
|
||||||
# test
|
|
||||||
python /home/src/rfantibody/rfdiffusion/rfdiffusion_inference.py \
|
|
||||||
--config-name antibody \
|
|
||||||
antibody.target_pdb=/home/scripts/examples/example_inputs/rsv_site3.pdb \
|
|
||||||
antibody.framework_pdb=/home/scripts/examples/example_inputs/hu-4D5-8_Fv.pdb \
|
|
||||||
inference.ckpt_override_path=/home/weights/RFdiffusion_Ab.pt \
|
|
||||||
'ppi.hotspot_res=[T305,T456]' \
|
|
||||||
'antibody.design_loops=[L1:8-13,L2:7,L3:9-11,H1:7,H2:6,H3:5-13]' \
|
|
||||||
inference.num_designs=20 \
|
|
||||||
inference.output_prefix=/home/scripts/examples/example_outputs/ab_des
|
|
||||||
#faild
|
|
||||||
```
|
|
||||||
|
|
||||||
# gpu0
|
|
||||||
```shell
|
|
||||||
# dir: /share/nas3/zhushixin/soft/gpu0_soft/RFantibody
|
|
||||||
git clone ssh://git@39.104.92.69:8512/pub_soft/RFantibody.git
|
|
||||||
|
|
||||||
# download weight
|
|
||||||
bash include/download_weights.sh
|
|
||||||
|
|
||||||
# test
|
|
||||||
docker run --gpus '"device=1"' -it --rm 36d3aa0632ed
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
# gpu0
|
|
||||||
```shell
|
|
||||||
# dir: /share/nas3/zhushixin/soft/gpu0_soft/RFantibody
|
|
||||||
git clone ssh://git@39.104.92.69:8512/pub_soft/RFantibody.git
|
|
||||||
|
|
||||||
# download weight
|
|
||||||
bash include/download_weights.sh
|
|
||||||
|
|
||||||
mamba activate uv
|
|
||||||
uv sync
|
|
||||||
```
|
|
||||||
test
|
|
||||||
```shell
|
|
||||||
# test
|
|
||||||
bash scripts/examples/nanobody_full_pipeline.sh
|
|
||||||
|
|
||||||
# 查看设计结果
|
|
||||||
qvls scripts/examples/example_outputs/nb_ha_pipeline/2_proteinmpnn.qv
|
|
||||||
mkdir check_install
|
|
||||||
## split结果
|
|
||||||
qvextract scripts/examples/example_outputs/nb_ha_pipeline/3_rf2.qv -o check_install/
|
|
||||||
## 提取分数文件
|
|
||||||
qvscorefile scripts/examples/example_outputs/nb_ha_pipeline/3_rf2.qv
|
|
||||||
cp scripts/examples/example_outputs/nb_ha_pipeline/3_rf2.sc check_install/3_rf2.tsv
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 219 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 196 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 181 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 472 KiB |
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
title: 测试下这个博客网站
|
|
||||||
date: 2026-03-10
|
|
||||||
tags: [test, deploy]
|
|
||||||
collections: [test]
|
|
||||||
---
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
title: Hello mdblog
|
|
||||||
date: 2026-03-10
|
|
||||||
tags: [intro, static]
|
|
||||||
collections: [入门, 示例]
|
|
||||||
summary: 这是 mdblog 的第一篇文章,展示基础 Markdown 能力。
|
|
||||||
---
|
|
||||||
|
|
||||||
# Hello mdblog
|
|
||||||
|
|
||||||
欢迎使用 **mdblog**。
|
|
||||||
|
|
||||||
## 功能预览
|
|
||||||
|
|
||||||
- 支持递归扫描 Markdown
|
|
||||||
- 支持代码高亮
|
|
||||||
- 支持图片与相对链接
|
|
||||||
|
|
||||||
> 这是一个静态博客生成器示例。
|
|
||||||
|
|
||||||
### 代码块
|
|
||||||
|
|
||||||
```ts
|
|
||||||
export function greet(name: string): string {
|
|
||||||
return `hello, ${name}`;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 表格
|
|
||||||
|
|
||||||
| 功能 | 状态 |
|
|
||||||
| --- | --- |
|
|
||||||
| RSS | 已启用 |
|
|
||||||
| Sitemap | 已启用 |
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
[查看文档](./doc/a.md)
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
title: Deployment Doc
|
|
||||||
date: 2026-03-08
|
|
||||||
tags: [docs, deploy]
|
|
||||||
collections: [docker compose, ]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Deployment Doc
|
|
||||||
|
|
||||||
部署时使用 Docker Compose:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker compose up -d --build
|
|
||||||
```
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
title: Python Notes
|
|
||||||
date: 2026-03-09
|
|
||||||
tags: [python, notes]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Python Notes
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 列表
|
|
||||||
|
|
||||||
1. 安装依赖
|
|
||||||
2. 编写脚本
|
|
||||||
3. 运行测试
|
|
||||||
|
|
||||||
更多内容稍后补充。
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
fakepng
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
title: 在macOS上安装CREST(m1 Pro)
|
|
||||||
date: 2026-05-02
|
|
||||||
tags: [CREST, install]
|
|
||||||
collections: [软件安装,模拟]
|
|
||||||
summary: 安装CREST
|
|
||||||
---
|
|
||||||
|
|
||||||
# 介绍:CREST
|
|
||||||
CREST 是一个开源的小分子构象与势能面自动探索工具,基于 xTB 作为能量评估引擎,利用 metadynamics 等采样方法自动搜索分子的低能构象空间,生成按能量排序的构象集合及其 Boltzmann 分布,从而无需人为指定扫描坐标即可系统性地覆盖分子的柔性构象与局部势能面,广泛用于药物分子构象生成、虚拟筛选预处理以及后续高精度量化计算的初始结构准备。
|
|
||||||
|
|
||||||
# 安装,使用mamba
|
|
||||||
```shell
|
|
||||||
mamba create -n crest
|
|
||||||
mamba activate crest
|
|
||||||
mamba install crest -y
|
|
||||||
|
|
||||||
|
|
||||||
# 其他辅助包 openbabel 不能高于3.12 2026-05-02
|
|
||||||
mamba install rdkit openbabel python=3.12 -y
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
# 使用crest进行势能面搜索
|
|
||||||
先用rdkit生成构象。
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
title: 在macOS上安装cp2k(m1 Pro)
|
|
||||||
date: 2026-03-10
|
|
||||||
tags: [cp2k, install]
|
|
||||||
collections: [软件安装,模拟]
|
|
||||||
summary: 安装cp2k
|
|
||||||
---
|
|
||||||
# 软件下载
|
|
||||||
|
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
---
|
||||||
|
title: DiffDock CUDA 12.8 环境安装记录
|
||||||
|
date: 2026-05-16
|
||||||
|
tags: [DiffDock, CUDA, Python, 分子对接]
|
||||||
|
collections: [软件安装]
|
||||||
|
summary: 记录 DiffDock CUDA 12.8 环境的源码获取、依赖安装、PyG 扩展编译和推理测试流程。
|
||||||
|
draft: false
|
||||||
|
featured: false
|
||||||
|
---
|
||||||
|
|
||||||
|
# DiffDock CUDA 12.8 环境安装记录
|
||||||
|
|
||||||
|
本文记录一次 DiffDock CUDA 12.8 版本的安装过程。实际执行时按自己的环境修改源码仓库、工作目录和模型缓存路径即可。
|
||||||
|
|
||||||
|
## 准备源码
|
||||||
|
|
||||||
|
先准备工作目录,并从私有仓库拉取 CUDA 12.8 适配版本。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
WORKDIR="/path/to/software/unpack"
|
||||||
|
DIFFDOCK_REPO="ssh://git@private-git-host:port/group/DiffDock_cu128.git"
|
||||||
|
|
||||||
|
cd "${WORKDIR}"
|
||||||
|
git clone "${DIFFDOCK_REPO}"
|
||||||
|
cd DiffDock_cu128
|
||||||
|
```
|
||||||
|
|
||||||
|
## 创建 Conda 环境
|
||||||
|
|
||||||
|
项目仓库中提供了 `environment.yml`,优先使用它创建环境。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mamba env create -f environment.yml
|
||||||
|
mamba activate diffdock
|
||||||
|
```
|
||||||
|
|
||||||
|
如果后续出现 `networkx` 版本不兼容,可按需固定版本。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m pip install networkx==2.8.4
|
||||||
|
```
|
||||||
|
|
||||||
|
## 安装 PyTorch 与 PyG 组件
|
||||||
|
|
||||||
|
原始安装记录使用了 CUDA 13.0 的 PyTorch/PyG wheel 源来安装部分组件。按当前环境保留如下命令,必要时根据实际 CUDA、PyTorch 版本替换 `cu130`、`torch==2.7.1+cu130` 和 PyG wheel 页面。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m pip install \
|
||||||
|
--extra-index-url https://download.pytorch.org/whl/cu130 \
|
||||||
|
--find-links https://data.pyg.org/whl/torch-2.7.0+cu130.html \
|
||||||
|
torch==2.7.1+cu130 \
|
||||||
|
pyg-lib \
|
||||||
|
torch-cluster \
|
||||||
|
torch-geometric==2.7.0 \
|
||||||
|
torch-scatter \
|
||||||
|
torch-sparse \
|
||||||
|
e3nn==0.5.1 \
|
||||||
|
fair-esm==2.0.0 \
|
||||||
|
networkx==2.8.4 \
|
||||||
|
pandas==1.5.1 \
|
||||||
|
pybind11==2.11.1 \
|
||||||
|
rdkit==2022.03.3 \
|
||||||
|
scikit-learn==1.1.0 \
|
||||||
|
"gradio==3.50.*" \
|
||||||
|
requests
|
||||||
|
```
|
||||||
|
|
||||||
|
如果只需要补装 `torch-cluster`,可单独执行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m pip install \
|
||||||
|
--extra-index-url https://download.pytorch.org/whl/cu130 \
|
||||||
|
--find-links https://data.pyg.org/whl/torch-2.7.0+cu130.html \
|
||||||
|
torch-cluster
|
||||||
|
```
|
||||||
|
|
||||||
|
## 固定基础科学计算依赖
|
||||||
|
|
||||||
|
安装 PyG 扩展前,先固定 `numpy`、`scipy` 和 `biopython` 版本。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m pip install --force-reinstall numpy==1.26.4 scipy==1.12.0 biopython==1.76
|
||||||
|
```
|
||||||
|
|
||||||
|
## 本地编译 PyG 扩展
|
||||||
|
|
||||||
|
如果预编译 wheel 与运行环境不匹配,可以强制从源码重新编译安装相关扩展。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m pip install --force-reinstall --no-build-isolation --no-binary torch-scatter torch-scatter
|
||||||
|
python -m pip install --force-reinstall --no-build-isolation --no-binary torch-sparse torch-sparse
|
||||||
|
python -m pip install --force-reinstall --no-build-isolation --no-binary torch-cluster torch-cluster
|
||||||
|
python -m pip install --force-reinstall --no-build-isolation --no-binary torch-spline-conv torch-spline-conv
|
||||||
|
```
|
||||||
|
|
||||||
|
编译时如果缺少合适的 C++ 编译器,可安装 `gxx=12`。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mamba install gxx=12
|
||||||
|
```
|
||||||
|
|
||||||
|
## 安装 OpenFold 相关依赖
|
||||||
|
|
||||||
|
`dllogger` 和 `openfold` 来自私有 Git 仓库,按实际仓库地址安装即可。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m pip install "dllogger @ git+ssh://git@private-git-host:port/group/dllogger.git@master"
|
||||||
|
python -m pip install --no-build-isolation "openfold @ git+ssh://git@private-git-host:port/group/openfold.git@v2.2.0"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 模型缓存
|
||||||
|
|
||||||
|
推理测试会用到 ESM2 模型文件。可将模型放在当前用户的 Torch Hub 缓存目录,或显式配置到项目支持的模型路径。
|
||||||
|
|
||||||
|
```text
|
||||||
|
~/.cache/torch/hub/checkpoints/esm2_t33_650M_UR50D-contact-regression.pt
|
||||||
|
~/.cache/torch/hub/checkpoints/esm2_t33_650M_UR50D.pt
|
||||||
|
```
|
||||||
|
|
||||||
|
## 推理测试
|
||||||
|
|
||||||
|
安装完成后,可以使用项目自带的示例 CSV 运行一次推理。下面使用相对路径,避免暴露本机环境中的绝对目录。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python inference.py \
|
||||||
|
--config default_inference_args.yaml \
|
||||||
|
--protein_ligand_csv data/protein_ligand_example.csv \
|
||||||
|
--out_dir results/user_predictions_small
|
||||||
|
```
|
||||||
|
|
||||||
|
如果需要显式指定环境中的 Python,可用占位符路径替换:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/path/to/miniforge/envs/diffdock/bin/python /path/to/DiffDock_cu128/inference.py \
|
||||||
|
--config /path/to/DiffDock_cu128/default_inference_args.yaml \
|
||||||
|
--protein_ligand_csv /path/to/DiffDock_cu128/data/protein_ligand_example.csv \
|
||||||
|
--out_dir /path/to/DiffDock_cu128/results/user_predictions_small
|
||||||
|
```
|
||||||
|
|
||||||
|
## 检查要点
|
||||||
|
|
||||||
|
- `torch`、`torch-cluster`、`torch-scatter`、`torch-sparse` 的 CUDA 与 PyTorch ABI 需要一致。
|
||||||
|
- 从源码编译 PyG 扩展时,优先确认 `gxx`、CUDA Toolkit、PyTorch 版本是否匹配。
|
||||||
|
- 私有仓库地址、内网 IP、用户名、NAS 目录和 Home 目录不应写入公开文章。
|
||||||
Reference in New Issue
Block a user