Molecular surfaces: solvent-accessible and solvent-excluded area and volume
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 18/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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 tormax + opt.probe. -
A radius lookup with a fallback chain (
src/dock/PocketFinder.C:108-112).
TPerTab::vwrreturns 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 thanr + 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 insideeccedock), callable from a CLI asecce-pocketsis. - 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.
- Linguagem predominante
- C
- Estrelas
- 10
- Forks
- 8
- Merge médio
- 6h 32min
- PRs com merge (30d)
- 1
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de FriendsofECCE/ECCE
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
FriendsofECCE/ECCE#1358 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
FriendsofECCE/ECCE#1353 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
FriendsofECCE/ECCE#1348 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
FriendsofECCE/ECCE#1347 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
FriendsofECCE/ECCE#1345 ·
Todas as issues de FriendsofECCE/ECCE
Issues semelhantes
-
Installation fails from source: missing libintl.h on macOS, undeclared R_typeToChar() on R 4.6Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
vincentarelbundock/xtx#11 ·
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
compiler-explorer/compiler-explorer#9738 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 3 dias
-
[Android Auto] MU1017 (MHI2Q_JP_AUG22_P1017) cluster map works with a pinned profile — values insideAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
kamgurgul/mib2q-carplay#74 ·