Molecular surfaces: solvent-accessible and solvent-excluded area and volume

未关闭
#1,332 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
18/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
cpp
领域
backend

调研方向

Start with the design question, not code: decide which van der Waals radius set (ECCE via TPerTab::vwr in include/tdat/TPerTab.H, or Bondi) the output will use and how it is named. The grid, neighbour search and probe test to reuse are in src/dock/PocketFinder.C on branch wip/1320-pocket-core, which is not yet merged. Done means a wx-free eccedock function returning SAS and SES area and volume, with per-atom contributions, callable from a CLI like src/apps/pockets/ecce-pockets.C and covered by a test.

由索引模型根据 Issue 内容生成。

描述

What is missing

ECCE cannot compute a solvent-accessible surface (SAS) or a solvent-excluded
surface (SES), nor the area or volume of either. There is no molecular-surface
area or volume number anywhere in the tree, and no user-facing way to ask for
one.

Two things that look like molecular surfaces but are not:

The Builder's surface script command (src/apps/builder/BuilderScript.C:2617)
does not build a surface. It searches the scene graph under a property switch
for SoIndexedFaceSet nodes and reports what it finds:

} else if (w[0] == "surface" && w.size() == 2) {
  SoSearchAction sa;
  sa.setType(SoIndexedFaceSet::getClassTypeId(), FALSE);
  sa.setInterest(SoSearchAction::ALL);
  sa.apply(getSG()->getPropertySwitch(w[1]));

For each hit it prints vertices=, triangles=, the transform's centre and the
distance of the farthest vertex from the origin. It is a test/inspection hook
over geometry that something else already built.

MEP/ESP surfaces (include/tdat/EspField.H, include/tdat/DensityPlane.H)
are isosurfaces of a field computed from the wavefunction on a grid. They use no
atomic radii at all and have no probe. They answer a different question.

The vendored OpenMOIV ChemKit does contain ChemSAS
(include/inv/ChemKit/ChemSAS.H, "Implements a Solvent Accessible Surface",
derived from SoVertexShape via ChemIso/ChemLattice3) and
ChemConnollyDot (include/inv/ChemKit/ChemConnollyDot.H,
src/inv/moiv/ConnollyDotFxns.C). They are compiled into libeccemoiv and
ChemSAS::initClass() is called from src/inv/moiv/ChemInit.C:350, but nothing
outside src/inv and include/inv references either class: no ECCE scene graph,
viewer or app ever instantiates them. They are render nodes, not calculators.
ConnollyDotFxns.C does carry a per-dot area field
(include/inv/ChemKit/ChemConnollyDot.H:85, assigned at
ConnollyDotFxns.C:966 and following), but nothing sums or reports it.

The machinery is now half-built

Branch wip/1320-pocket-core (commit 2d8ea1c9d, #1320) adds a binding-pocket
detector in the wx-free eccedock library:

  • include/dock/PocketFinder.H, src/dock/PocketFinder.C
  • CLI src/apps/pockets/ecce-pockets.C
  • test tests/dock/pocketfinder_test.C

Pieces an SES/SAS implementation would reuse directly:

  • A grid over the structure. Options::spacing (default 1.0 Å) and
    Options::margin (4.0 Å padding around the atoms).

  • A van der Waals mask, built through LinkCellList
    (src/dock/PocketFinder.C:5,41-68) as the spatial lookup over the atom set,
    with the cutoff set to rmax + opt.probe.

  • A radius lookup with a fallback chain (src/dock/PocketFinder.C:108-112).
    TPerTab::vwr returns 0.0 silently for an element with no entry, so:

    double r = z > 0 ? tpt.vwr(z) : 0.0;
    if (...) {
      double c = z > 0 ? tpt.covalentRadius(z) : 0.0;
      if (c > 0.0) { r = c + 0.8; res.radiusFromCovalent++; }
      else { r = 1.8; res.radiusFromDefault++; }
    }
    

    The counts and the elements that needed a fallback are reported in Result
    (radiusFromCovalent, radiusFromDefault, fallbackElements).

  • A probe test, Options::probe, default 1.4 Å: a grid point is marked
    closed if it is closer to an atom than r + probe
    (src/dock/PocketFinder.C:138-151). That condition is the
    solvent-accessible condition. The SAS is the boundary of the set this mask
    already computes; the SES is the same construction with the probe rolled back.

So the grid, the neighbour search, the radius assignment and the probe test
exist. What is missing is extracting the boundary and integrating area and
volume over it.

The radius question

This is the substantive part, and it should be settled before any surface code
is written.

An SAS area in Ų is a number people compare against published values. Which
radius set produced it therefore has to be an explicit, stated choice, not
whatever the display code happens to use.

ECCE's van der Waals radii come from data/client/config/AtomicOxidationStates
(second column) through TPerTab::vwr (include/tdat/TPerTab.H:83). They are a
mixed set. The noble gases, S and Cl match Bondi exactly; the organic elements
are well below Bondi:

Element ECCE Bondi
H 1.05 1.20
C 1.45 1.70
N 1.40 1.55
O 1.35 1.52
S 1.80 1.80
Cl 1.75 1.75
He 1.40 1.40
Ne 1.54 1.54
Ar 1.88 1.88

An SAS computed with H 1.05 and C 1.45 is not comparable with an SAS computed
with Bondi radii, and the difference is large.

data/client/config/AtomicOxidationStates has no header or comment at all (no
comment lines in the file). src/inv/moiv/ChemRadii.C carries a third,
different hard-coded table, defaultAtomRadii[] (line 66: H 1.08, C 1.54,
N 1.48, O 1.36, S 1.70, Cl 1.65, with 1.00 as a placeholder for many elements),
also with no cited source. Neither file states where its values come from.

What can be said about the ECCE set is where it is configured: the same values
are overridable through data/client/config/AtomicRadii, whose header reads

# This file contains system-wide override values for van der waals
# radius, covalent radius (single bonds/SP1), and a tolerance for
# bond generation.
...
# atomicsymbol:  vwr cr tolerance

i.e. the van der Waals radius sits in one record with the covalent radius and
the bond-generation tolerance, and is user-overridable per installation. That
layout suggests the values were tuned for display and bond perception rather
than chosen from a measured set. That is an inference from the file layout,
not a documented rationale
— no file in the tree states one.

Recommendation to record

A surface calculation should take its radius set as an explicit, documented
option, with Bondi available (and the chosen set named in the output), so that

  • results are comparable with published values, and
  • changing the display radii — which a user can do by editing
    data/client/config/AtomicRadii — cannot silently change a computed area.

The one existing non-display user of these radii

Solvation. src/tdat/chemistry/Solvate.C:201 takes the radius:

int z = tpt.atomicNumber(s);
double r = z > 0 ? tpt.vwr(z) : 1.5;
if (!(r > 0.0)) r = 1.5;

and rejects a placed solvent atom that comes closer than a scaled sum of radii
(Solvate.C:274):

const double s = isSolute[p] ? opt.scale : opt.solventScale;
if (dist < s * (ra + r[p])) { ok = false; break; }

include/tdat/Solvate.H:49 sets the defaults: scale(1.0),
solventScale(0.57). The GUI front end is src/apps/solvate/SolvateEd.C.

Worth noting as precedent: solvation already compensates for the radius set with
a scale factor of 0.57 for solvent-solvent contacts. A surface calculation
cannot hide the radius choice behind a fudge factor in the same way, because the
area it reports is the quantity of interest.

Scope

  • SAS and SES area and volume for a structure, computed in a wx-free library
    (next to or inside eccedock), callable from a CLI as ecce-pockets is.
  • Radius set as an explicit option, Bondi included, named in the output.
  • Probe radius as an explicit option (1.4 Å default, as in PocketFinder).
  • Per-atom contributions, so buried-surface and per-residue questions can be
    answered later.

References: #1320.

主要语言
C
星标
10
派生
8
平均合并
6 小时 32 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FriendsofECCE/ECCE 的其他 Issue

查看 FriendsofECCE/ECCE 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。